Normalize hyperspectral image using a target/reference

9 vues (au cours des 30 derniers jours)
Ananas
Ananas le 7 Jan 2022
I have a hyperspectral image with a target reference within the same image as the data I want to analyze. From what I understand I need to normalize the image using this reference before I start working with the data.
I think I found an example of normalizing hyperspectral data with on this page about denoising hyperspectral images: https://www.mathworks.com/help/images/ref/denoisengmeet.html
In the example on how to use the denoise function I think this is the line used to normalize the image: hcube = hypercube(rescale(hcube.DataCube),hcube.Wavelength);
I found the coordinates of the part of the target I want by using the hyperspectralViewer() function, but haven't found a way to use them as input for the above method of normalizing the data. Is there a way to do this, or do I have to use a different approach when I want to normalize using a reference?

Réponses (1)

Prachi Kulkarni
Prachi Kulkarni le 12 Jan 2022
Hi,
If you want to normalize all the data in the hyperspectral image, such that-
  • the minimum of the normalized hyperspectral image is same as the minimum of the reference region
  • the maximum of the normalized hyperspectral image is same as the maximum of the reference region
you can use the sample code below
hcube = hypercube('paviaU.hdr');
data = hcube.DataCube;
x_range = 1:100; % example range
y_range = 1:50; % example range
z_range = 1:25; % example range
reference = data(x_range,y_range,z_range);
lower_bound = min(reference(:));
upper_bound = max(reference(:));
rescaled_data = rescale(data,lower_bound,upper_bound);
hcube = hypercube(rescaled_data,hcube.Wavelength);

Catégories

En savoir plus sur Hyperspectral Image Processing dans Help Center et File Exchange

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by