フィルターのクリア

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 Center および File ExchangeHyperspectral Image Processing についてさらに検索

タグ

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by