spectral plot of hyperspectral image
조회 수: 3 (최근 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.
댓글 수: 0
답변 (1개)
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 !
댓글 수: 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!