Hyper-spectral image read and display in Matlab
조회 수: 3 (최근 30일)
이전 댓글 표시
I have recently started working on Remote sensing images and want to process them in MATLAB. I have Hyper-spectral Images and each image have:
- A(chs. 30,20,10).tiff
- A.cluster
- A.lan
- A.Project
- A.sta
- A_1.mat I have opened the A_1.mat file in MATLAB it shows me 1040x1392x61 uint16I want to ask couple of this. If this .mat file are the Hyper-spectral image Then which bands I can select to see the RGB image? If I do
Imshow(output(:,:,1));
It just shows me the black image. Another thing which I have saw is to open the .tif image using multibandread function. I have also tried that like this:
SIZE=[1392, 1040, 61];X = multibandread('A(chs. 30,20,10).tif', SIZE, 'uint16',0, 'bil', 'ieee-be');
But it gives me error
Error using multibandread (line 118)
The file is too small to contain the specified data. Check the size, offset, and precision arguments.
Anyone please help me to read and display that image.
댓글 수: 0
답변 (1개)
Mary Abbott
2017년 11월 1일
Hello,
If you only want a general idea of what the picture looks like, a grayscale image would be the simplest to view:
slice = output(:,:,17); % 17 is an example, you can try different bands
figure; imagesc(slice); colormap('gray'); brighten(0.5);
If you want to display an RGB image, the following external page provides a good example:
The error when reading the TIFF file occurs because "multibandread" is recommended for reading BSQ, BIL, and BIP files. For the TIFF file format, the "imread" function should be used:
https://www.mathworks.com/help/matlab/ref/imread.html
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!