CORRECTION SYSTEM AND METHOD FOR ELIMINATING NON-UNIFORM DISTRIBUTION OF LIGHT FIELD DURING HYPERSPECTRAL IMAGE ACQUISITION

20250203222 ยท 2025-06-19

    Inventors

    Cpc classification

    International classification

    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: C ( i , j ) = R ( i , j ) A v e , to obtain the spatial distribution characteristics of the light field; wherein Ave = .Math. i ( 0 , g ] , j ( 0 , k ] , i , j N R ( i , j ) ( g k ) , R.sub.(i,j) represents a spectrum of the pixel (i, j), and g, k represents a size of a sample detection area; and S3.3: recording 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, wherein (a.sub.i, b.sub.j) denotes a position of the pixel (i, j).

    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: C ( m , n ) = R ( m , n ) C ( i , j ) ; wherein R.sub.(m,n) represents a spectrum of the pixel (m, n) of the sample.

    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.2 of the first standard whiteboard in the hyperspectral image B, and taking an average spectrum R.sub.B.sub.1 of the second standard whiteboard around the first standard whiteboard; S6.2: performing fitting using points [R.sub.B.sub.1(s), 60] and [R.sub.B.sub.2(s), 20] to obtain a linear fitting formula: y=e.sub.sx+f.sub.s, wherein s(0, t], tN, t represents the number of bands; R.sub.B.sub.1 (s) represents a digital number (DN) value of R.sub.B.sub.1 when the band is s, X represents reflectance, e.sub.s and f.sub.s are coefficients; and S6.3: substituting a light field correction result C.sub.(m,n)(s) of the pixel (m, n) into formula y=e.sub.sx+f.sub.s to obtain a reflectance correction result of the pixel (m, n), wherein C.sub.(m,n)(s) represents the light field correction result of the pixel (m, n) when the band is s.

    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: C ( i , j ) = R ( i , j ) A v e , to obtain the spatial distribution characteristics of the light field; wherein Ave = .Math. i ( 0 , g ] , j ( 0 , k ] , i , j N R ( i , j ) ( g k ) , R.sub.(i,j) represents a spectrum of the pixel (i, j), and g, k represents a size of a sample detection area; and S3.3: recording 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, wherein (a.sub.i, b.sub.j) denotes a position of the pixel (i, j).

    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: C ( m , n ) = R ( m , n ) C ( i , j ) ; wherein R.sub.(m,n) represents a spectrum of the pixel (m, n) of the sample.

    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.2 of the first standard whiteboard in the hyperspectral image B, and taking an average spectrum R.sub.B.sub.1 of the second standard whiteboard around the first standard whiteboard; S6.2: performing fitting using points [R.sub.B.sub.1(s), 60] and [R.sub.B.sub.2(s), 20] to obtain a linear fitting formula: y=e.sub.sx+f.sub.s, wherein s(0, t], tN, t represents the number of bands; R.sub.B.sub.1(s) represents a digital number (DN) value of R.sub.B.sub.1 when the band is s, X represents reflectance, e.sub.s and f.sub.s are coefficients; and S6.3: substituting a light field correction result C.sub.(m,n)(s) of the pixel (m, n) into formula y=e.sub.sx+f.sub.s to obtain a reflectance correction result of the pixel (m, n), wherein C.sub.(m,n)(s) represents the light field correction result of the pixel (m, n) when the band is s.

    Description

    BRIEF DESCRIPTION OF THE DRAWINGS

    [0030] FIG. 1 is a structural diagram of a correction system according to the present disclosure;

    [0031] FIG. 2 is a flowchart of a correction method according to the present disclosure;

    [0032] FIG. 3 is an image of a sample detection area in hyperspectral images A according to the present disclosure;

    [0033] FIG. 4 is an image of a sample detection area in a hyperspectral image B according to the present disclosure;

    [0034] FIG. 5 is an image of a sample after light field correction according to the present disclosure;

    [0035] FIG. 6A is a schematic diagram of comparison between an original spectrum DN value and a DN value after light field correction at 550 nm for the sample;

    [0036] FIG. 6B is a schematic diagram of comparison between an original spectrum DN value and a DN value after light field correction at 680 nm for the sample;

    [0037] FIG. 6C is a schematic diagram of comparison between an original spectrum DN value and a DN value after light field correction at 750 nm for the sample;

    [0038] FIG. 7A is a schematic diagram of fitting at 550 nm;

    [0039] FIG. 7B is a schematic diagram of fitting at 680 nm;

    [0040] FIG. 7C is a schematic diagram of fitting at 750 nm;

    [0041] FIG. 8A is a schematic diagram of comparison between reflectance after single correction and reflectance after fitting correction at 550 nm;

    [0042] FIG. 8B is a schematic diagram of comparison between reflectance after single correction and reflectance after fitting correction at 680 nm;

    [0043] FIG. 8C is a schematic diagram of comparison between reflectance after single correction and reflectance after fitting correction at 750 nm;

    [0044] FIG. 9 illustrates a statistical analysis of an original spectral line DN value and a DN value after light field correction at 550 nm for the sample;

    [0045] FIG. 10 illustrates a statistical analysis of an original spectral line DN value and a DN value after light field correction at 680 nm for the sample;

    [0046] FIG. 11 illustrates a statistical analysis of an original spectral line DN value and a DN value after light field correction at 750 nm for the sample;

    [0047] FIG. 12 illustrates a statistical analysis of reflectance after single correction and reflectance after fitting correction at 550 nm for the sample;

    [0048] FIG. 13 illustrates a statistical analysis of reflectance after single correction and reflectance after fitting correction at 680 nm for the sample; and

    [0049] FIG. 14 illustrates a statistical analysis of reflectance after single correction and reflectance after fitting correction at 750 nm for the sample.

    [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 FIG. 1, a correction system for eliminating non-uniform distribution of a light field during hyperspectral image acquisition of the present disclosure includes a CCD camera 8, an imaging spectrometer 7, a light source 6, a lens 5, a first standard whiteboard 2, a second standard whiteboard 4, and a darkroom 1. The CCD camera 8 is disposed in an upper portion of the darkroom 1. The imaging spectrometer 7 is located under the CCD camera 8 with a top of the imaging spectrometer 7 connected to the CCD camera 8. The lens 5 is provided at a bottom of the imaging spectrometer 7. The lens 5 is a hyperspectral lens. The light source 6 is provided on left and right sides of the lens 5. The light source 6 is a halogen lamp light source. The second standard whiteboard 4 is disposed below the lens 5, and the first standard whiteboard 2 is placed on the second standard whiteboard 4. The first standard whiteboard 2 has a reflectance of 20%, and the second standard whiteboard 4 has a reflectance of 60%. A sample detection area 3 is marked at the center of the second standard whiteboard 4, and the sample is placed in the sample detection area 3 during use.

    [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 FIG. 2, a correction method for eliminating non-uniform distribution of a light field during hyperspectral image acquisition includes the following steps:

    [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 FIG. 3. Due to the poor light uniformity of the halogen light source, the illumination distribution in the sample detection area in the hyperspectral images A is uneven, with parts highlighted in the image showing overexposure or underexposure.

    [0056] Step S2: Acquire a hyperspectral image B corresponding to a tea leaf sample under illumination of the same light source, as shown in FIG. 4.

    [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:

    [00002] C ( i , j ) = R ( i , j ) A v e ,

    to obtain the spatial distribution characteristics of the light field.

    [00003] Ave = .Math. i ( 0 , g ] , j ( 0 , k ] , i , j N R ( i , j ) ( g k ) ;

    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:

    [00004] C ( m , n ) = R ( m , n ) C ( i , j ) ,

    to obtain a light field correction result for the sample, as shown in FIG. 5. It can be seen from the figure that the overly bright and dark parts in the sample detection area 3 are corrected.

    [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 FIG. 6A, FIG. 6B, and FIG. 6C.

    [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 FIG. 9, FIG. 10, and FIG. 11. By comparing the results before and after light field correction, it is evident that the data distribution before correction is skewed, while after correction, the data distribution becomes normal, and the coefficient of variation decreases, indicating that the light field correction method provided 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.

    [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.2 of the first standard whiteboard 2 in the hyperspectral image B, and take an average spectrum R.sub.B.sub.1 of the second standard whiteboard 4 around the first standard whiteboard 2, where R.sub.B.sub.2 corresponds to a reflectance of 20%, and R.sub.B.sub.1 corresponds to a reflectance of 60%.

    [0073] S6.2: Perform fitting using points [R.sub.B.sub.1(s), 60] and [R.sub.B.sub.2(s), 20], to obtain a linear fitting formula: Re(s)=e.sub.sx+f.sub.s. [0074] where s(0, t], tN, and t is the number of bands; R.sub.B.sub.1(s) is a DN value of R.sub.B.sub.1 when the band is s; R.sub.B.sub.2(s) is a DN value of R.sub.B.sub.2 when the band is s, x represents reflectance, and e.sub.s and f.sub.s are coefficients.

    [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:

    [00005] R e = R ( m , n ) R ( i , j ) / 0.6 ,

    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:

    [00006] R ( m , n ) R ( i , j ) / 0.6 ,

    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 FIG. 6A, FIG. 6B, FIG. 6C, FIG. 7A, FIG. 7B, FIG. 7C, FIG. 8A, FIG. 8B, and FIG. 8C. The statistical analysis for the reflectance after single correction and the reflectance after fitting correction of the sample in the three bands is shown in FIG. 12, FIG. 13, and FIG. 14.

    [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.