How to upload ENVI cubes with different file formats?
22 views (last 30 days)
Show older comments
I'm attempting to upload an ENVI cube, and to my understanding, Image Processing Toolbox and Hyperspectral Viewer require a Header file (.hdr) and an Image file (.dat, .img, .raw, .bsq, .bil, .bip). I am using the Hyperspectral Imaging software perClass Mira, but the exported filetype doesn't include an Image format in the required formats listed (.pcf, or .bin). Is there any other way to upload an ENVI cube?
0 Comments
Answers (1)
Vinayak Choyyan
on 25 Apr 2024
Hi Keegan,
As per this doc page of perClass Mira, you can export your ENVI image cubes to MATLAB supported formats too. Please try and export your data to one of the supported formats.
Once you have exported the data, you can load it in MATALB using the hypercube function and pass it to the hyperspectralViewer app or directly load the file to the app.
Additionally, if you are able to share some sample data in formats you would like to be supported in MATLAB, we will consider adding these file format supports in one of our future versions.
Regards,
Vinayak Choyyan
2 Comments
Vinayak Choyyan
on 26 Apr 2024
Great to here you were able to read the file into MATLAB.
.mat file is a binary format supported by MATLAB to save and load variables and data. You can read more about it here.
load("fileName.mat")
The below command will tell you what the contents of the .mat file are without loading the data
whos("-file","fileName.mat")
I assume this .mat file from perClass Mira has variables corresponding to the image cube, wavelength and header file. You can pass them to the hypercube function like this
hcube=hypercube(imageCube,wavelengthData,metadata)
If this does not help, please share the .mat file with some sample data exported from perClass Mira and I can help you with loading the exported data directly to hypercube.
See Also
Categories
Find more on Hyperspectral Image Processing in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!