S=load('Daylight_Scene_06.mat');image1=S.tensor;image1=S.tensor(:,:,1); %S.tensor(:,:,k) k wavelengths
imshow(image1);%BW=roipoly;
BW = roipoly(image1);r=zeros(1312,959);for i=1:1312; for j=1:959; if BW(i,j)==1 r(i,j)=image1(i,j); %r2(i,j)=image2(i,j);
end endendimshow(r);image2=S.tensor;image2=S.tensor(:,:,2); %S.tensor(:,:,k) k wavelengthsimshow(image2);%BW=roipoly;BW = roipoly(image2);r1=zeros(1312,959);for i=1:1312; for j=1:959; if BW(i,j)==1 r1(i,j)=image2(i,j); %r2(i,j)=image2(i,j); end endendimshow(r1);
MATLAB: How to take the mean of hyperspectral image of size (1312*959*31) and plot its spectrum in matlab 7.0 after masking the specific part
hyperspectral imageImage Processing Toolboxmeanplot
Best Answer