hyperspectral imaging signature plot

9 views (last 30 days)
Alexai on 18 Sep 2022
Answered: Image Analyst on 18 Sep 2022
I have hyperspectral imaging raw data.
How can I get like this plot (reflectance, wavelength)
Rik on 18 Sep 2022
You didn't answer my question. Have a read here and here. It will greatly improve your chances of getting an answer.
You can also have a look at the answer Sulaymon posted.

Sign in to comment.

Answers (2)

Sulaymon Eshkabilov
Sulaymon Eshkabilov on 18 Sep 2022
It can be obtained with the following steps:
(1) Import your HSI data into MATLAB. In other words, read your hypespectral images. You may use any available apps or HSI data reader apps, or 3rd party developed toolboxes, like this one: https://www.mathworks.com/matlabcentral/fileexchange/61630-matlab-hyperspectral-toolbox
(2) Just plot using plot() command, for instance.
(3) If your HSI data are noisy, you can smooth them by using smooth() or smoothdata(), sgolayfilt().

Image Analyst
Image Analyst on 18 Sep 2022
Read your images into a 3-D array, then do this:
image3d = rand(100, 100, 32); % Create sample data.
[rows, columns, numChannels] = size(image3d)
hold on;
for row = 1 : rows
fprintf('Plotting spectra from row #%d of %d.\n', row, rows)
for col= 1 : columns
thisSpectra = squeeze(image3d(row, col, :));
plot(thisSpectra, '-');
% Update plot
if mod(row, 20) == 0 || row == 1
caption = sprintf('Spectra 1 though %d.\n', row * columns);
xlabel('Wavelength (nm)');
grid on;
ylabel('Reflectance (nm)');
fprintf('Done plotting %d spectra.\n', rows * columns)

Community Treasure Hunt

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

Start Hunting!

Translated by