Hyper-spectral image read and display in Matlab
3 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
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 comentarios
Respuestas (1)
Mary Abbott
el 1 de Nov. de 2017
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
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!