how can i write a code in order to get spectral reflectance plot of a pixel in a hyperspectral image
Show older comments
I want to get the reflectance profile of a pixel.how can the code be written for a hypeerion hyperspectral data
1 Comment
Shrutika Sawant
on 27 Feb 2017
Edited: Walter Roberson
on 27 Feb 2017
Use the following code
reflectance = squeeze(img(i, j,:));
reflectance = reflectance/max(reflectance(:));
plot(reflectance)
Answers (1)
Image Analyst
on 4 Jan 2014
Assuming you have a 3D matrix where each image plane is the scene taken at a different wavelength, you can just get a spectrum like this:
theSpectrum = hyperSpectralImage3D(row, column, :);
7 Comments
ALINA
on 5 Jan 2014
Image Analyst
on 5 Jan 2014
I didn't use any function. What function are you talking about? Just specify some row, and some column, like row 42 and column 73, and index into your array. What is your array called? Is it called A, M, I, hyperSpectralImage3D, grayImage, multiSpecImage, or what? I have no idea. But whatever it's called, just use that row and that column and use semicolon to extract out all the spectral values:
B=A(42,73,:);
ALINA
on 13 Jan 2014
Edited: Walter Roberson
on 27 Feb 2016
Image Analyst
on 13 Jan 2014
Well, what values does R have? Do they look like normal, regular numbers? R is not empty or complex or anything is it?
ALINA
on 14 Jan 2014
Edited: Walter Roberson
on 27 Feb 2016
yanjie qi
on 27 Feb 2016
I tried it was right, and I also ploted it.
Image Analyst
on 8 Mar 2017
ALINA, I'm not sure how to answer. Please provide more info.
Categories
Find more on Hyperspectral Image Processing in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!