Hyper-spectral image read and display in Matlab

5 visualizaciones (últimos 30 días)
Adnan Farooq Awan
Adnan Farooq Awan el 30 de Oct. de 2017
Comentada: Adnan Farooq Awan el 2 de Nov. de 2017
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.

Respuestas (1)

Mary Abbott
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
  1 comentario
Adnan Farooq Awan
Adnan Farooq Awan el 2 de Nov. de 2017
Thanks Mary, I am checking that. Also is it possible to know that out of 61 bands, which band belongs to which frequency range? Actually i just not want RGB image, I want to extract different images with different combination of bands. i.e. R-G-B, R-G-NIR, G-B-NIR etc

Iniciar sesión para comentar.

Categorías

Más información sobre Hyperspectral Image Processing en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by