CORRECTION SYSTEM AND METHOD FOR ELIMINATING NON-UNIFORM DISTRIBUTION OF LIGHT FIELD DURING HYPERSPECTRAL IMAGE ACQUISITION
20250203222 ยท 2025-06-19
Inventors
- Xiaoli LI (Hangzhou City, CN)
- YONG HE (HANGZHOU CITY, CN)
- Yuying ZHANG (Hangzhou City, CN)
- Xuelun LUO (Hangzhou City, CN)
- Qinghai HE (Hangzhou City, CN)
- Xuechen ZHANG (Hangzhou City, CN)
- Huahao YU (Hangzhou City, CN)
Cpc classification
H04N25/10
ELECTRICITY
H04N25/71
ELECTRICITY
International classification
H04N25/71
ELECTRICITY
H04N25/10
ELECTRICITY
Abstract
Disclosed are a correction system and method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition, to effectively eliminate the impact of non-uniform light field distribution caused by halogen light illumination on acquisition of hyperspectral image information. The correction method includes acquiring hyperspectral images A corresponding to two standard whiteboards with different reflectance under illumination of a halogen light source. A hyperspectral image B is acquired corresponding to a tea leaf sample under illumination of the same light source. Spatial distribution characteristics of a light field are obtained based on the hyperspectral images A. Pixels in the hyperspectral images A and B are spatially matched. Light field correction is performed on a pixel of the sample in the hyperspectral image B, and reflectance correction is performed on the sample after the light field correction.
Claims
1. A correction system for eliminating non-uniform distribution of a light field during hyperspectral image acquisition, comprising: a charge-coupled device (CCD) camera, an imaging spectrometer positioned under the CCD camera with a top of the imaging spectrometer being connected to the CCD camera, a light source, a lens provided at a bottom of the imaging spectrometer and having the light source positioned on left and right sides of the lens, a first standard whiteboard, a second standard whiteboard disposed below the lens, the first standard whiteboard being placed on the second standard whiteboard, and a darkroom, the CCD camera being positioned in an upper portion of the darkroom connected to the CCD camera;
2. The correction system for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 1, wherein the first standard whiteboard has a reflectance of 20%, and the second standard whiteboard has a reflectance of 60%.
3. A correction method based on the correction system for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 1, comprising: S1: acquiring hyperspectral images A corresponding to the first standard whiteboard and the second standard whiteboard under illumination of a halogen light source; S2: acquiring a hyperspectral image B corresponding to a sample under illumination of the same light source; S3: obtaining spatial distribution characteristics of a light field based on the hyperspectral images A; S4: spatially matching pixels in the hyperspectral images A and the hyperspectral image B; S5: performing light field correction on a pixel of the sample in the hyperspectral image B; and S6: performing reflectance correction on the sample after the light field correction.
4. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 3, wherein S3 comprises: S3.1: marking a center of the first standard whiteboard in the hyperspectral images A as (x.sub.1, y.sub.1); S3.2: quantitatively analyzing light field distribution of a pixel (i, j) in the hyperspectral images A using the following formula:
5. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 4, wherein S4 comprises: S4.1: marking a center of the first standard whiteboard in the hyperspectral image B as (x.sub.2, y.sub.2); S4.2: recording a relative position S.sub.(m,n)=(c.sub.mx.sub.2, d.sub.ny.sub.2) of a pixel (m, n) of the sample in the hyperspectral image B to the center of relative first standard whiteboard, wherein (c.sub.m, d.sub.n) represents a position of the pixel (m, n), m(0, g], n(0, k], m, nN, and g, k represents the size of the sample detection area; when |(a.sub.ix.sub.1)(c.sub.mx.sub.2)||(b.sub.jy.sub.1)(d.sub.ny.sub.2)|2, the pixel (i, j) and the pixel (m, n) are considered to be at the same position.
6. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 5, wherein S5 comprises: when the pixel (i, j) and the pixel (m, n) are considered to be at the same position, performing light field correction on the pixel (m, n) of the sample in the hyperspectral image B using the following formula:
7. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 6, wherein S6 comprises: S6.1: taking an average spectrum R.sub.B.sub.
8. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 3, wherein the first standard whiteboard has a reflectance of 20%, and the second standard whiteboard has a reflectance of 60%.
9. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 8, wherein S3 comprises: S3.1: marking a center of the first standard whiteboard in the hyperspectral images A as (x.sub.1, y.sub.1); S3.2: quantitatively analyzing light field distribution of a pixel (i, j) in the hyperspectral images A using the following formula:
10. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 9, wherein S4 comprises: S4.1: marking a center of the first standard whiteboard in the hyperspectral image B as (x.sub.2, y.sub.2); S4.2: recording a relative position S.sub.(m,n)=(c.sub.mx.sub.2, d.sub.ny.sub.2) of a pixel (m, n) of the sample in the hyperspectral image B to the center of relative first standard whiteboard, wherein (c.sub.m, d.sub.n) represents a position of the pixel (m, n), m(0, g], n(0, k], m, nN, and g, k represents the size of the sample detection area; when |(a.sub.ix.sub.1)(c.sub.mx.sub.2)||(b.sub.jy.sub.1)(d.sub.ny.sub.2)|2, the pixel (i, j) and the pixel (m, n) are considered to be at the same position.
11. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 10, wherein S5 comprises: when the pixel (i, j) and the pixel (m, n) are considered to be at the same position, performing light field correction on the pixel (m, n) of the sample in the hyperspectral image B using the following formula:
12. The correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition according to claim 11, wherein S6 comprises: S6.1: taking an average spectrum R.sub.B.sub.
Description
BRIEF DESCRIPTION OF THE DRAWINGS
[0030]
[0031]
[0032]
[0033]
[0034]
[0035]
[0036]
[0037]
[0038]
[0039]
[0040]
[0041]
[0042]
[0043]
[0044]
[0045]
[0046]
[0047]
[0048]
[0049]
[0050] Meanings of reference numerals in the figures: 1: darkroom; 2: first standard whiteboard; 3: sample detection area; 4: second standard whiteboard; 5: lens; 6: light source; 7: imaging spectrometer; 8: CCD camera.
DETAILED DESCRIPTION OF THE EMBODIMENTS
[0051] As shown in
[0052] The objective of the present disclosure is to effectively eliminate the impact of non-uniform light field distribution under halogen light illumination on hyperspectral image acquisition by correcting the light field and leaf reflectance, and to achieve reflectance correction for hyperspectral data. To achieve the foregoing objective, the correction method of the present disclosure is described in detail below in conjunction with the accompanying drawings.
[0053] As shown in
[0054] Step S1: Acquire hyperspectral images A corresponding to a first standard whiteboard 2 and a second standard whiteboard 4 under illumination of a halogen light source 6, and define a sample detection area 3.
[0055] Before hyperspectral image acquisition, the second standard whiteboard 4 is placed 60 cm below the lens 5, and the first standard whiteboard 2 is secured on the second standard whiteboard 4. The sample detection area 3 is defined at the center of the second standard whiteboard 4. To obtain clear and undistorted images, an imaging spectrometer 7 is adjusted to have a moving speed of 26 mm/s and an exposure time of 40 ms. The hyperspectral images A obtained under the illumination of the halogen light source are shown in
[0056] Step S2: Acquire a hyperspectral image B corresponding to a tea leaf sample under illumination of the same light source, as shown in
[0057] Step S3: Obtain spatial distribution characteristics of a light field based on the hyperspectral images A.
[0058] Specifically,
[0059] S3.1: Select a hyperspectral image corresponding to 633 nm in the hyperspectral images A (at the band of 633 nm, there is a clear distinction between the first standard whiteboard 2 and the second standard whiteboard 4, allowing effective masking for the first standard whiteboard 2), appropriately crop the image, find a position corresponding to the first standard whiteboard 2, and create a mask image corresponding to the first standard whiteboard 2. Binary image segmentation is performed on the hyperspectral image corresponding to 633 nm in the hyperspectral images A by using the mask image, to obtain a segmented area corresponding to the first standard whiteboard 2.
[0060] S3.2: Perform dilation and erosion processing on the segmented area corresponding to the first standard whiteboard 2 by applying dilation and erosion operations in digital morphology, to obtaining an area corresponding to the first standard whiteboard 2.
[0061] S3.3: Extract connected regions from the image after dilation and erosion by using a connected-component labeling method in binary image analysis, with a length and a width of the connected region containing the first standard whiteboard 2 ranging from 100 to 300; and through selection, obtain a center (x.sub.1, y.sub.1) of the first standard whiteboard 2 in the hyperspectral images A.
[0062] S3.4: Extract a spectrum R.sub.(i,j) of a pixel (i, j) in the corresponding sample detection area 3 of the hyperspectral images A, and quantitatively analyze light field distribution of the pixel (i, j) in the hyperspectral images A using the following formula:
to obtain the spatial distribution characteristics of the light field.
g, k represents a size of the sample detection area 3.
[0063] S3.5: Record a relative position S.sub.(i,j)=(a.sub.ix.sub.1, b.sub.jy.sub.1) of the pixel (i, j) to the center of the first standard whiteboard 2, where (a.sub.i, b.sub.j) represents a position of the pixel (i, j).
[0064] Step S4: Spatially match pixels in the hyperspectral images A and the hyperspectral image B.
[0065] S4.1: Obtain a center (x.sub.2, y.sub.2) of the first standard whiteboard 2 in the hyperspectral image B by using the same method as in step S3. A hyperspectral image corresponding to 733 nm in the hyperspectral image B is selected (at the band of 733 nm, there is a clear distinction between the sample and the second standard whiteboard 4, allowing effective masking for the sample), and a mask image corresponding to the sample in the sample detection area 3 is created; binary image segmentation is performed on the hyperspectral image corresponding to 733 nm in the hyperspectral image B by using the mask image, to obtain a segmented area corresponding to the sample.
[0066] S4.2: Extract a spectrum R.sub.(m,n) of a pixel (m, n) of the sample in the sample detection area 3 corresponding to the hyperspectral image B; record a relative position S.sub.(m,n)=(c.sub.mx.sub.2, d.sub.ny.sub.2) of the pixel (m, n) of the sample to the center of the first standard whiteboard 2 in the hyperspectral image B, where (c.sub.m, d.sub.n) represents a position of the pixel (m, n), and m(0, g], n(0, k], m, nN; g, k represents the size of the sample detection area 3; when |(a.sub.ix.sub.1)(c.sub.mx.sub.2)||(b.sub.jy.sub.1)(d.sub.ny.sub.2)|2, the pixel (i, j) in the hyperspectral images A and the pixel (m, n) in the hyperspectral image B are considered to be at the same position.
[0067] Step S5: Perform light field correction on a pixel of the sample in the hyperspectral image B.
[0068] When the pixel (i, j) and the pixel (m, n) are considered to be at the same position, light field correction is performed on the pixel (m, n) of the sample in the hyperspectral image B by using the following formula:
to obtain a light field correction result for the sample, as shown in
[0069] By observing the original spectral image of the tea sample and the spectral image of the sample after light field correction, three bands are selected, which are 550 nm (peak), 680 nm (valley), and 750 nm (peak). The original spectral DN values of the sample in the three bands are compared with the DN values after light field correction, as shown in
[0070] The statistical analysis for the original spectral line DN values of the sample in the three bands and the DN values after light field correction is shown in
[0071] Step S6: Perform reflectance correction on the sample after the light field correction.
[0072] S6.1: Take an average spectrum R.sub.B.sub.
[0073] S6.2: Perform fitting using points [R.sub.B.sub.
[0075] S6.3: Substitute a light field correction result C.sub.(m,n) (s) of the pixel (m, n) into the formula Re(s)=e.sub.sx+f.sub.s to obtain a reflectance fitting correction result Re(s) of the pixel (m, n), where C.sub.(m,n)(s) represents the light field correction result of the pixel (m, n) when the band is s.
[0076] S6.4: When the pixel (I, j) in the hyperspectral images A and the pixel (m, n) in the hyperspectral image B are considered to be at the same position, perform reflectance correction on the pixel (m, n) of the sample in the hyperspectral image B by using the following formula:
to obtain a single reflectance correction result for the sample. R.sub.(m, n) is the spectrum of the pixel (m, n) of the sample in the hyperspectral image B, and R.sub.(i,j) is the spectrum of the pixel (i, j) in the corresponding sample detection area 3 of the hyperspectral images A. Since no sample is placed in the corresponding sample detection area 3 in the hyperspectral images A, the second standard whiteboard 4 is scanned in the sample detection area 3, where the second standard whiteboard 4 has a reflectance of 60%. Therefore, to obtain the sample reflectance correction result, the following formula needs to be used:
which is a general formula for hyperspectral reflectance correction. Typically, a standard whiteboard with 100% reflectance is used for hyperspectral scanning, but a whiteboard with 60% reflectance is adopted herein. Therefore, the formula needs to be divided by 0.6.
[0077] Three bands are selected, which are 550 nm (peak), 680 nm (valley), and 750 nm (peak). The reflectance after single correction and the reflectance after fitting correction are compared for the sample in the three bands. The comparison results are shown in
[0078] From the results of the two different reflectance correction methods (single correction and fitting correction), it is observed that the results after correction using the second standard whiteboard 4 with a single reflectance of 60% are skewed, while the results after fitting using the first standard whiteboard 2 with a reflectance of 20% and the second standard whiteboard 4 with a reflectance of 60% are normally distributed, and the coefficient of variation decreases. This indicates that the reflectance correction method provided by the present disclosure can better correct reflectance in the case of non-uniform light field distribution.
[0079] Through the embodiments, it is demonstrated that the light field and reflectance correction method proposed by the present disclosure can effectively eliminate the impact of non-uniform light field distribution caused by halogen light illumination on the acquisition of hyperspectral image information and can achieve the purpose of reflectance correction for hyperspectral data.