How to upload ENVI cubes with different file formats?
10 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Vinayak Choyyan
2024-4-25
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 个评论
Vinayak Choyyan
2024-4-26
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!