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.
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
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;
axis image off
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.