I have multispectral image of [ 8225,8850,6]. How to read image and i need to seperate bands for analysis?
4 次查看(过去 30 天)
显示 更早的评论
I have multispectral image of dimension 8225*8850*6. kindly suggest me how to read that image in matlab and view it?( i tried imread and imshow -not works). also i need to seperate the bands for calculating NDWI. kindly suggest me to do this task.
2 个评论
Onur Kutlu
2021-5-26
hyper_data1 = load('data.adres');
hyper_data1 = (hyper_data1. HypeRvieW -min(min(min(hyper_data1. HypeRvieW))))/(max(max(max(hyper_data1. HypeRvieW)))- min(min(min(hyper_data1. HypeRvieW))));
%HypeRview is name to in hyper_data1 matris
%You can try this
采纳的回答
Walter Roberson
2021-4-1
There are (fairly) new Hyperspectral functions available; see https://www.mathworks.com/help/images/hyperspectral-image-processing.html
6 个评论
Walter Roberson
2021-4-2
There is no Mathworks-provided function to view multiband images with all bands.
If a remote sensing image is taken in NIR-I, NIR-II, soft-X-ray, hard-X-ray, and gamma ray bands, then what should the result look like ?
Is your assumption that the 6 bands of your image represent 6 different optical-wavelength filters on a single scene, and you want to reconstruct what the scene would look like in RGB, similar to the way that color images used to be constructed by taking black and white using three different filters? If so then you would need to know the filtering characteristics.
Or are some of the sensors not primarily optical wavelength but have some overlap with optical wavelengths and you want to reconstruct what the scene would look like in RGB ?
Or are you wanting to take each of the bands and pseudo-color each one according to a user-chosen palette for each, and then blend the RGB components ?
Or are you wanting to assign one band to R, another to G, another to B, and the other three to bands associated with special hardware you have installed for your display (such as IR and UV and... something...) in order to display the images for the rare tetrachromats and very very rare pentachromats and ... I don't think any hexachromats are believed to exist in the world (and the existance of pentachromats is disputed...)
更多回答(1 个)
Subhadeep Koley
2021-4-8
For visualization of individual pixel spectra / hyperspectral band image you can use the interactive hyperspetralViewer App. e.g.
% Read the data
cube = imread('data3.tif');
% Launch hyperspectral viewer
hyperspectralViewer(hCube)
You can also use spectralIndices(_) function to calculate MNDWI. However, to calculate indices with this function, you need construct a hypercube object with the TIF file and corresponding center wavelength for each band images. e.g.
% Construct the hypercube object
hCube = hypercube('data3.tif', wavelength); % Here wavelength is a C-element vector. C is the number of bands
% Calculate MNDWI image
C = spectralIndices(hCube, 'mndwi');
mndwiImg = C.IndexImage;
figure
imagesc(mndwiImg)
axis image off
title("MNDWI Image")
All the above mentioned fetures come under Image Processing Toolbox's Hyperspectral Imaging Library support package, and can be downloaded from here. For more information on Hyperspectral Imaging Library see the documentation.
0 个评论
另请参阅
类别
在 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!