Error using hypercube>findActualImgFileName
6 次查看(过去 30 天)
显示 更早的评论
I'm getting "Error using hypercube>findActualImgFileName (line 1320)" when trying to load a hyperspectral image with the hypercube function. I've opened other .hdr files before with Matlab using the hypercube function without any problems. Any ideas on what is causing the hypercube>findActualImgFileName error? I guess finding the .hdr file with the given name is not a problem, but there's something in the metadata that can't be located? There are no issues when trying to open the .hdr file with ReSe GLIMPS.

As seen in the screenshot I checked that a normal .jpg image can be found in the current folder, and also tested the hypercube with the 'indian_pines.dat' image that comes with Matlab to check if the hypercube is working as it should. No errors so far. Then in the third section I try to load my own hyperspectral image and that's when I get an error about finding the actual image file name.
0 个评论
采纳的回答
Walter Roberson
2021-12-14
编辑:Walter Roberson
2021-12-14
"Read ENVI format data into the workspace by specifying a header file that contains information about hyperspectral data. The associated ENVI binary data file must be stored in the same folder as the ENVI header file."
and see https://www.mathworks.com/help/images/ref/hypercube.html#d123e305031 which indicates that it expects a .dat file or .L1R file when you use a .hdr file.
I seem to recall that .hdr files have the name of the corresponding image data stored inside them, so I suspect the file extension is not completely important. However, I suspect that the .hdr file is saying that the image data is stored in a file that has the same name but no extension at all. In particular, I do not think the .hdr file is referring the the .hyspex file.
4 个评论
Walter Roberson
2021-12-15
Interestingly, there is specific code in hypercube() to detect if the parameter order has been reversed by the user by checking the first parameter for ".hdr". I did not happen to check whether that was done before or after the file format was checked.
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Hyperspectral Image Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!