필터 지우기
필터 지우기

spectral plot of hyperspectral image

조회 수: 3 (최근 30일)
ALINA
ALINA 2014년 1월 22일
답변: Parth Parikh 2022년 11월 30일
Hi sir, This is the code i wrote X=multibandread('EO1H1460512012064110KZ_L1T.dat',[3481,1091,155],'int16',0,'bil','ieee-le',{'Band','Direct',[54,29,16]}); S=decorrstretch(X); spectrum=S(2000,500,:); band=size(spectrum); band=band(3); for n=0:(band-1) x(n+1)=(n*5)+1; y(n+1)=spectrum(1,1,n+1); end plot(x,y) xlabel('band no.'); ylabel('reflectance');
But sir,can you help me with this code so that i get a proper spectral plot.

답변 (1개)

Parth Parikh
Parth Parikh 2022년 11월 30일
Hi Alina,
I guess you would like to extract the spectral information from the hyperspectral data at location [2000,500]. In that case you should use multibandread something like this:
X=multibandread('EO1H1460512012064110KZ_L1T.dat',[3481,1091,155],'int16',0,'bil','ieee-le',{'Band','Direct',[1:155]});
S=decorrstretch(X);
spectrum=squeeze(S(2000,500,:));
plot(spectrum);
Simpler way I would suggest is:
hcube = hypercube('EO1H1460512012064110KZ_L1T.dat');
S = decorrstretch(hcube.DataCube);
spectrum = squeeze(S(2000,500,:));
plot(spectrum);
For more details take a look at this documentation: Read hyperspectral data - MATLAB (mathworks.com)
Hope it helps !

카테고리

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