Normalize hyperspectral image using a target/reference

조회 수: 9 (최근 30일)
Ananas
Ananas 2022년 1월 7일
답변: Prachi Kulkarni 2022년 1월 12일
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?

답변 (1개)

Prachi Kulkarni
Prachi Kulkarni 2022년 1월 12일
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);

카테고리

Help CenterFile Exchange에서 Hyperspectral Image Processing에 대해 자세히 알아보기

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by