# hyperspectral imaging signature plot

23 Ansichten (letzte 30 Tage)
Alexai am 18 Sep. 2022
Beantwortet: Mandar am 9 Feb. 2023
I have hyperspectral imaging raw data.
How can I get like this plot (reflectance, wavelength)
##### 3 Kommentare1 älteren Kommentar anzeigen1 älteren Kommentar ausblenden
Alexai am 18 Sep. 2022
I have raw data(including hdr file)
But I want to know related code.
Rik am 18 Sep. 2022
You can also have a look at the answer Sulaymon posted.

Melden Sie sich an, um zu kommentieren.

### Antworten (3)

Sulaymon Eshkabilov am 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().
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Image Analyst am 18 Sep. 2022
image3d = rand(100, 100, 32); % Create sample data.
[rows, columns, numChannels] = size(image3d)
figure;
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, '-');
end
% Update plot
if mod(row, 20) == 0 || row == 1
caption = sprintf('Spectra 1 though %d.\n', row * columns);
title(caption);
xlabel('Wavelength (nm)');
ylabel('Reflectance');
drawnow;
end
end
grid on;
xlabel('Wavelength');
ylabel('Reflectance (nm)');
fprintf('Done plotting %d spectra.\n', rows * columns)
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

Mandar am 9 Feb. 2023
Install the hyperspectral imaging library from this link. Use “hypercube” function to read the hyperspectral data. The function returns the hypercube object. The “DataCube” property of the object holds the hyperspectral data in 3-D numeric array. Access the data and use “plot” function to get the reflectance values on Y-axis for respective wavelengths on X-axis.
##### 0 Kommentare-2 ältere Kommentare anzeigen-2 ältere Kommentare ausblenden

Melden Sie sich an, um zu kommentieren.

### Kategorien

Mehr zu Hyperspectral Image Processing finden Sie in Help Center und File Exchange

### Community Treasure Hunt

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

Start Hunting!

Translated by