Hyper-spectral image read and display in Matlab

2 次查看(过去 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.

回答(1 个)

Mary Abbott
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
  1 个评论
Adnan Farooq Awan
Adnan Farooq Awan 2017-11-2
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

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Hyperspectral Image Processing 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by