フィルターのクリア

Extracting spectral plot from HyperspectralViewer

3 ビュー (過去 30 日間)
Molly Fort
Molly Fort 2022 年 6 月 10 日
回答済み: Subhadeep Koley 2022 年 6 月 10 日
Hi,
I'm quite a matlab rookie, and I was wondering how is it possible to extract spectral plot data for a single pixel in the HyperspectralViewer toolbox.
Ideally this would be extractable in plotable dataset.
Thanks,

回答 (1 件)

Subhadeep Koley
Subhadeep Koley 2022 年 6 月 10 日
Not possible from within the HyperspectralViewer app. However, you can achieve the same using the code below (just replace the spatial location row and column index with your intended ones).
% Read the hyperspectral image
hCube = hypercube("indian_pines.dat");
% Extract the DataCube adn wavelength
dataCube = hCube.DataCube;
wavelength = hCube.Wavelength;
% Extract the single spectral signature of the (50,50) spatial location
sig = dataCube(50,50,:);
sig = squeeze(sig);
% Plot the signature
figure
plot(wavelength,sig,"LineWidth",2)
axis tight
xlabel("Wavelength")
ylabel("Amplitude")

カテゴリ

Help Center および File ExchangeHyperspectral Image Processing についてさらに検索

製品


リリース

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by