How to convert the raw hyperspectral image (hawaii or yellowstone)into .mat file?
3 次查看(过去 30 天)
显示 更早的评论
I have raw images which I has taken from the link
I need to convert this raw files to .mat file through the matlab, so that I can get the image band by band
0 个评论
采纳的回答
Walter Roberson
2019-5-9
X = multibandread('hawaii_sc01.raw', [512, 614, 224], '*uint16', 0, 'bip', 'ieee-be');
The datatype is uint16 but the data is 12 bit, so the used portion is theoretically 0 to 4095 but in practice the range is 82 to 1006, so call it [0 1023]
According to the README, that particular file is the above size, and the maine file below it is a different size also 12 bit, and all of the rest of the files are 512 lines x 680 samples x 224 bands, instrument bit depth = 16 bits which would correspond to
X = multibandread(filename, [512, 680, 224], '*uint16', 0, 'bip', 'ieee-be');
You would have to examine the values to see what the actual data range is.
4 个评论
Walter Roberson
2019-5-10
filename = 'aviris_sc0.raw';
X = multibandread(filename, [512, 680, 224], '*uint16', 0, 'bip', 'ieee-be');
X100 = fliplr(X(:,:,100));
imshow(X100,[])
Now compare to the first false-color image at https://coding.jpl.nasa.gov/hyperspectral/falsecolor.html and it will be obvious that the data has been extracted in the right order.
更多回答(1 个)
Shrish Bajpai
2019-5-10
1 个评论
Walter Roberson
2019-5-10
Earlier I posted
X = multibandread('hawaii_sc01.raw', [512, 614, 224], '*uint16', 0, 'bip', 'ieee-be');
Before I posted that I tested it and compared it to the sample images that they provided, so I was sure that the data was read properly.
另请参阅
类别
在 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!