A calibration method for hyperspectral reflectance data of tea ridges in the field

By constructing constraint functions and correction factor functions, the hyperspectral reflectance of tea ridges in the field is adaptively calibrated, which solves the problem of spectral reflectance deviation caused by factors such as shooting distance and angle, and achieves more accurate tea ridge hyperspectral data measurement and tea bud and leaf quality evaluation.

CN120558876BActive Publication Date: 2025-10-03SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511053751.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-07-30
Publication Date
2025-10-03
Estimated Expiration
2045-07-30

AI Technical Summary

Technical Problem

When using a hyperspectral camera in the field to obtain the hyperspectral reflectance of tea ridges, factors such as shooting distance, shooting angle and atmospheric conditions affect the spectral signal, resulting in a deviation between the measured spectral reflectance and the actual spectral reflectance, affecting the accuracy of tea bud and leaf quality assessment.

Method used

By constructing a constraint function, searching for the optimal distance modulation coefficient and angle modulation coefficient, the outdoor spectral reflectance is adaptively calibrated, and the spectral reflectance deviation is reduced by using cubic B-spline fitting and correction factor function.

Benefits of technology

It achieves more accurate measurement of hyperspectral data of tea ridges in the field, reduces the deviation of spectral reflectance, and improves the accuracy of tea bud and leaf quality assessment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120558876B_ABST
    Figure CN120558876B_ABST
Patent Text Reader

Abstract

The present invention provides a method for calibrating hyperspectral reflectance data of tea ridges in a field. The method includes collecting outdoor hyperspectral data and indoor hyperspectral data of the tea ridges in the field, performing cubic B-spline fitting on the indoor hyperspectral data, obtaining the reflectance of the corresponding band position in the indoor spectral reflectance curve based on the band position and number of the outdoor hyperspectral data, and obtaining an indoor standard reflectance curve. The method searches for a modulation coefficient for the kth iteration, conditional on the constraint function achieving a minimum value, calculates a correction factor function based on the modulation coefficient of the kth iteration, substitutes a training set and the correction factor function into the calibration formula, substitutes a validation set, the kth environmental interference error, and the correction factor function into the calibration formula, and terminates iterations if the kth residual matrix meets preset conditions. This method can search for the optimal modulation coefficient, thereby adaptively calibrating the outdoor spectral reflectance and more accurately measuring outdoor hyperspectral data of tea ridges in the field.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of hyperspectral data processing, and in particular to a method for calibrating hyperspectral reflectance data of tea ridges in a field. Background Art

[0002] Hyperspectral testing is a non-destructive testing method widely used in agriculture, including crop health testing, pest detection, and soil nutrient element detection. The spectral resolution of hyperspectral data collected by hyperspectral cameras is typically at the nanometer level, and the continuous spectrum can be subdivided into multiple bands, each with a narrow wavelength range. For example, common hyperspectral data may contain hundreds of bands, each with a wavelength range of only a few nanometers to a dozen nanometers. The high spectral resolution of hyperspectral data allows it to more accurately reflect the spectral characteristics of land objects and distinguish between land object types with subtle spectral differences. The bands of hyperspectral data are continuous and can fully record the changes in the spectral reflectance of land objects within the continuous spectral range.

[0003] Only by obtaining accurate and authentic field spectral reflectance can we accurately conduct quantitative and qualitative analysis of crops and other products. Fresh tea leaves, as the raw material for tea production, have a direct impact on the quality of the finished tea. However, when using a hyperspectral camera in the field to obtain hyperspectral reflectance from tea ridges for rapid assessment of tea bud and leaf quality, the camera's shooting distance, angle, atmospheric conditions, and other environmental factors can affect the spectral signal, leading to deviations between the measured and actual spectral reflectance. To reduce deviations in the hyperspectral reflectance of tea ridges in the field, adaptive outdoor spectral reflectance calibration is necessary. Summary of the Invention

[0004] In order to overcome the problems existing in the related art, the purpose of the present invention is to provide a calibration method for the hyperspectral reflectance data of field tea ridges. This method can search for the optimized distance modulation coefficient and angle modulation coefficient according to the shooting distance and shooting angle of the hyperspectral camera, thereby adaptively calibrating the outdoor spectral reflectance and more accurately measuring the outdoor hyperspectral data of field tea ridges.

[0005] A calibration method for hyperspectral reflectance data of tea ridges in a field, comprising:

[0006] S1: Collect outdoor hyperspectral data of tea ridges in the field, as well as indoor hyperspectral data.

[0007] S2: Performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve.

[0008] S3: According to the band position and number of the outdoor hyperspectral data, the reflectivity of the corresponding band position is obtained in the indoor spectral reflectivity curve to obtain an indoor standard reflectivity curve with the same band number and length as the outdoor spectral reflectivity curve.

[0009] S4: Constructing a constraint function, and searching for the modulation coefficient of the kth iteration under the condition that the constraint function obtains a minimum value, wherein the modulation coefficient includes a distance modulation coefficient and an angle modulation coefficient; wherein k≥1.

[0010] S5: Calculate the correction factor function according to the modulation coefficient of the kth iteration.

[0011] S6: Substitute the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error.

[0012] S7: Substitute the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance.

[0013] S8: Calculate the kth residual matrix between the kth calibration spectrum reflectance and the kth indoor standard reflectance, and stop iteration if the kth residual matrix meets a preset condition.

[0014] In a preferred technical solution of the present invention, the construction of the constraint function includes:

[0015] The constraint function is constructed according to the following formula:

[0016] ;

[0017] Among them, F is the constraint function, j is the sample number, and K is the total number of samples; is the kth indoor standard reflectance of the jth sample, is the jth measured distance d j , the jth measured angle The kth outdoor spectral reflectance, k is the number of iterations, . is the multiplication operator; cos is the cosine function, is the kth distance modulation coefficient, is the kth angle modulation coefficient, is the wavelength vector.

[0018] In a preferred technical solution of the present invention, the step of searching for the modulation coefficient of the kth iteration under the condition that the constraint function obtains a minimum value includes:

[0019] Get the minimum value and the maximum value of the distance modulation coefficient;

[0020] Obtain the minimum value and the maximum value of the angle modulation coefficient;

[0021] traversing the distance modulation coefficient and the angle modulation coefficient according to a preset step size, and recording the value of the constraint function during the traversal process;

[0022] The minimum value of the constraint function is screened out, and the kth distance modulation coefficient and the kth angle modulation coefficient corresponding to the minimum value of the constraint function are used as the modulation coefficients of the kth iteration.

[0023] In a preferred technical solution of the present invention, the step of calculating the correction factor function based on the modulation coefficient of the kth iteration includes:

[0024] The correction factor function is calculated according to the following formula:

[0025] ;

[0026] in, is the kth correction factor function, d j is the jth measurement distance, is the jth measurement angle; d0 is the minimum distance captured by the field hyperspectral camera, is the kth distance modulation coefficient, is the kth angle modulation coefficient, and cos is the cosine function.

[0027] In a preferred technical solution of the present invention, substituting the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error includes:

[0028] The kth environmental interference error is calculated according to the following formula:

[0029] ;

[0030] Among them, G k is the kth environmental interference error; is the kth training sample of the jth measured distance and the jth measured angle; is the kth indoor standard reflectivity.

[0031] In a preferred technical solution of the present invention, the step of substituting the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance comprises:

[0032] The kth calibration spectrum reflectance is calculated according to the following formula:

[0033] ;

[0034] in, is the kth calibration spectrum reflectance, j is the sample number, is the kth validation sample of the jth measured distance and the jth measured angle.

[0035] In a preferred technical solution of the present invention, after collecting outdoor hyperspectral data of tea ridges in the field and indoor hyperspectral data, the method further includes:

[0036] The outdoor hyperspectral data is subjected to black and white correction to reduce interference caused by illumination changes and equipment noise.

[0037] In a preferred technical solution of the present invention, performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve includes:

[0038] Select N control points;

[0039] According to the following formula, N control points are used to describe the indoor hyperspectral data and construct an indoor spectral reflectance curve:

[0040] ;

[0041] in, is the spectral reflectance of the indoor spectral reflectance curve, N1 is the total number of control points, and n is the serial number of the control point; c n is the nth control point, is the value of the nth cubic B-spline basis function.

[0042] In a preferred technical solution of the present invention, the step of collecting outdoor hyperspectral data of tea ridges in the field includes:

[0043] Place the marking circle on the tea ridge;

[0044] Align the lens of the depth camera with the marking circle;

[0045] Picking the tea buds and leaves in the marked circle, wherein the tea buds and leaves include one bud and one leaf and one bud and two leaves;

[0046] The tea buds and leaves are photographed using a hyperspectral camera to obtain outdoor hyperspectral data of tea ridges in the field.

[0047] In a preferred technical solution of the present invention, the wavelength range of the indoor hyperspectral data is 400nm-2500nm, and the wavelength range of the outdoor hyperspectral data is 400nm-1000nm.

[0048] The beneficial effects of the present invention are:

[0049] The present invention provides a method for calibrating hyperspectral reflectance data of tea ridges in a field, including collecting outdoor hyperspectral data and indoor hyperspectral data of tea ridges in a field. A cubic B-spline fit is performed on the indoor hyperspectral data to obtain an indoor spectral reflectance curve. Based on the band position and number of the outdoor hyperspectral data, the reflectance at the corresponding band position is obtained from the indoor spectral reflectance curve, thereby obtaining an indoor standard reflectance curve having the same number and length of bands as the outdoor spectral reflectance curve. The wavelength range of the indoor hyperspectral data is 400nm-2500nm, and the wavelength range of the outdoor hyperspectral data is 400nm-1000nm. The data length and band of the outdoor spectral reflectance curve and the indoor standard reflectance curve are identical. A constraint function is constructed, and a modulation coefficient of the kth iteration is searched for under the condition that the constraint function achieves a minimum value, the modulation coefficient including a distance modulation coefficient and an angle modulation coefficient; wherein k ≥ 1. A preset step size is selected based on the range of the distance modulation coefficient and the angle modulation coefficient, and multiple distance modulation coefficients and angle modulation coefficients are substituted into the constraint function to search for the kth distance modulation coefficient and the kth angle modulation coefficient when the constraint function achieves a minimum value. The correction factor function is calculated based on the modulation coefficient of the kth iteration. The training set and the correction factor function are substituted into the calibration formula. Given the environmental interference error of the first iteration, the first training sample, and the correction factor function, the first calibration spectral reflectance is calculated. The first calibration spectral reflectance, the first validation sample, and the correction factor function are then substituted into the calibration formula to obtain the environmental interference error of the second iteration. Each iteration calculates the kth residual matrix between the kth calibration spectral reflectance and the kth indoor standard reflectance. This process is repeated until the kth residual matrix meets the preset conditions, at which point the iteration is terminated, achieving the optimization of the distance modulation coefficient and the angle modulation coefficient. Using the optimal distance modulation coefficient and angle modulation coefficient, the correction factor function is calculated in real time. Adaptive calibration using the correction factor function and outdoor spectral reflectance can reduce the deviation of outdoor spectral reflectance, thereby more accurately measuring outdoor hyperspectral data from tea ridges in the field. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a flow chart of the method for calibrating the hyperspectral reflectance data of tea ridges in the field of the present invention;

[0051] Figure 2 is a flow chart of searching for the modulation coefficient of the kth iteration of the present invention;

[0052] Figure 3 This is a flow chart of collecting outdoor hyperspectral data of tea ridges in the field according to the present invention;

[0053] Figure 4 It is a schematic diagram of collecting outdoor hyperspectral data of tea ridges in the field according to the present invention.

[0054] Figure 1: 1. Hyperspectral camera; 2. Hyperspectral camera lens; 3. Camera tripod; 4. Depth camera; 5. Tea ridges in the field; 6. Marking circle; 7. Standard whiteboard. DETAILED DESCRIPTION

[0055] The preferred embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although preferred embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments set forth herein. Rather, these embodiments are provided to make the present invention more thorough and complete and to fully convey the scope of the present invention to those skilled in the art.

[0056] Example 1

[0057] like Figure 1 As shown, this embodiment provides a method for calibrating hyperspectral reflectance data of tea ridges in a field, comprising:

[0058] S1: Collect outdoor hyperspectral data of tea ridges in the field, as well as indoor hyperspectral data.

[0059] S2: Performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve.

[0060] S3: According to the band position and number of the outdoor hyperspectral data, the reflectivity of the corresponding band position is obtained in the indoor spectral reflectivity curve to obtain an indoor standard reflectivity curve with the same band number and length as the outdoor spectral reflectivity curve.

[0061] S4: Constructing a constraint function, and searching for the modulation coefficient of the kth iteration under the condition that the constraint function obtains a minimum value, wherein the modulation coefficient includes a distance modulation coefficient and an angle modulation coefficient; wherein k≥1.

[0062] S5: Calculate the correction factor function according to the modulation coefficient of the kth iteration.

[0063] S6: Substitute the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error.

[0064] S7: Substitute the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance.

[0065] S8: Calculate the kth residual matrix between the kth calibration spectrum reflectance and the kth indoor standard reflectance, and stop iteration if the kth residual matrix meets a preset condition.

[0066] The construction constraint function includes:

[0067] The constraint function is constructed according to the following formula:

[0068] ; (1)

[0069] Among them, F is the constraint function, j is the sample number, and K is the total number of samples; is the kth indoor standard reflectance of the jth sample, is the jth measured distance d j , the jth measured angle The kth outdoor spectral reflectance, k is the number of iterations, . is the multiplication operator; cos is the cosine function, is the kth distance modulation coefficient, is the kth angle modulation coefficient, is the wavelength vector.

[0070] The constraint function F has a total of K items. The constraint function F comprehensively considers the distance error and angle error of each sample. In order to calibrate the spectral reflectance to be close to the indoor standard reflectance, it is necessary to find a set of and , so that the residual between the calibration spectrum reflectance and the indoor standard reflectance is minimized.

[0071] like Figure 2 As shown, the search for the modulation coefficient of the kth iteration under the condition that the constraint function obtains the minimum value includes:

[0072] S42: Obtain the minimum value and the maximum value of the range modulation coefficient.

[0073] S43: Obtain the minimum value and the maximum value of the angle modulation coefficient.

[0074] S44: traverse the distance modulation coefficient and the angle modulation coefficient according to a preset step size, and record the value of the constraint function during the traversal process.

[0075] S45: Filter out the minimum value of the constraint function, and use the kth distance modulation coefficient and the kth angle modulation coefficient corresponding to the minimum value of the constraint function as the modulation coefficient of the kth iteration.

[0076] Before step S42, step S41 is also included: constructing a constraint function, wherein the distance modulation coefficient is used to modulate the shooting distance, which is the distance between the lens of the hyperspectral camera and the marking circle; the angle modulation coefficient is used to modulate the shooting angle, which is the angle between the lens of the hyperspectral camera and the marking circle. The shooting distance and energy attenuation are positively correlated, so the distance modulation coefficient is a negative number. In this embodiment, the range of the distance modulation coefficient is set to , is the kth distance modulation coefficient. The shooting angle has little effect on energy attenuation. The shooting angle involves the pitch angle, so this embodiment sets the range of the angle modulation coefficient to , is the kth angle modulation coefficient.

[0077] The preset step size of this embodiment is 0.1 or 0.01. The distance modulation coefficient and the angle modulation coefficient are traversed according to the preset step size. First, fix , and then follow the preset step size from The minimum value of Reaching the maximum value, it increases once according to the preset step size , and then follow the preset step size from The minimum value of begins to increase gradually. Repeat the above process and traverse the range greater than or equal to -3 and less than 0. , traverse the range greater than or equal to -1 and less than or equal to 2 Each group and Corresponding to the value of a constraint function, traverse and , get the values ​​of multiple constraint functions, filter out the minimum value from all constraint function values, and use the kth distance modulation coefficient corresponding to the minimum value and the kth angle modulation coefficient as the modulation coefficient for the kth iteration.

[0078] The step of calculating the correction factor function according to the modulation coefficient of the kth iteration includes:

[0079] The correction factor function is calculated according to the following formula:

[0080] (2)

[0081] in, is the kth correction factor function, d j is the jth measurement distance, is the jth measurement angle; d0 is the minimum distance captured by the field hyperspectral camera, is the kth distance modulation coefficient, is the kth angle modulation coefficient, and cos is the cosine function.

[0082] d0 is the minimum distance for the hyperspectral camera to capture the complete marked area of ​​the tea ridge in the field. The range of d0 is 0.5m-0.9m. This embodiment takes d0 as 0.9m as an example. j is the distance from the hyperspectral camera to the marking circle when taking the jth sample, d jIt is measured by a depth camera, which is set next to the hyperspectral camera. The depth camera has the same height as the hyperspectral camera. By translating the depth camera, it can coincide with the hyperspectral camera. is the cosine function of the jth measured angle The effect of the measurement angle on the correction factor function is periodic, and the correction factor function is positively correlated with the measurement distance. That is, the larger the measurement distance, the larger the correction factor function. The correction factor function participates in the training and verification process of the spectral reflectance correction model of the present invention, thereby achieving adaptive calibration of outdoor spectral reflectance.

[0083] The method for calibrating hyperspectral reflectance data of tea ridges in a field provided in this embodiment includes collecting outdoor hyperspectral data and indoor hyperspectral data of tea ridges in a field. A cubic B-spline fit is performed on the indoor hyperspectral data to obtain an indoor spectral reflectance curve. Based on the band position and number of the outdoor hyperspectral data, the reflectance at the corresponding band position is obtained from the indoor spectral reflectance curve, resulting in an indoor standard reflectance curve with the same number and length of bands as the outdoor spectral reflectance curve. The wavelength range of the indoor hyperspectral data is 400nm-2500nm, and the wavelength range of the outdoor hyperspectral data is 400nm-1000nm. The data length and band of the outdoor spectral reflectance curve and the indoor standard reflectance curve are the same. A constraint function is constructed, and the modulation coefficient of the kth iteration is searched for under the condition that the constraint function achieves a minimum value. The modulation coefficient includes a distance modulation coefficient and an angle modulation coefficient; where k ≥ 1. A preset step size is selected based on the range of the distance modulation coefficient and the angle modulation coefficient. Multiple distance modulation coefficients and angle modulation coefficients are substituted into the constraint function, and the kth distance modulation coefficient and the kth angle modulation coefficient are searched for when the constraint function achieves a minimum value. The correction factor function is calculated based on the modulation coefficient of the kth iteration. The training set and the correction factor function are substituted into the calibration formula. Given the environmental interference error of the first iteration, the first training sample, and the correction factor function, the first calibration spectral reflectance is calculated. The first calibration spectral reflectance, the first validation sample, and the correction factor function are then substituted into the calibration formula to obtain the environmental interference error of the second iteration. Each iteration calculates the kth residual matrix between the kth calibration spectral reflectance and the kth indoor standard reflectance. This process is repeated until the kth residual matrix meets the preset conditions, at which point the iteration is terminated, achieving the optimization of the distance modulation coefficient and the angle modulation coefficient. Using the optimal distance modulation coefficient and angle modulation coefficient, the correction factor function is calculated in real time. Adaptive calibration using the correction factor function and outdoor spectral reflectance can reduce the deviation of outdoor spectral reflectance, thereby more accurately measuring outdoor hyperspectral data from tea ridges in the field.

[0084] Example 2

[0085] like Figure 1As shown, this embodiment provides a method for calibrating hyperspectral reflectance data of tea ridges in a field. This embodiment is based on Example 1 and describes the differences from Example 1. The method includes:

[0086] S1: Collect outdoor hyperspectral data of tea ridges in the field, as well as indoor hyperspectral data.

[0087] S2: Performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve.

[0088] S3: According to the band position and number of the outdoor hyperspectral data, the reflectivity of the corresponding band position is obtained in the indoor spectral reflectivity curve to obtain an indoor standard reflectivity curve with the same band number and length as the outdoor spectral reflectivity curve.

[0089] S4: Constructing a constraint function, and searching for the modulation coefficient of the kth iteration under the condition that the constraint function obtains a minimum value, wherein the modulation coefficient includes a distance modulation coefficient and an angle modulation coefficient; wherein k≥1.

[0090] S5: Calculate the correction factor function according to the modulation coefficient of the kth iteration.

[0091] S6: Substitute the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error.

[0092] S7: Substitute the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance.

[0093] S8: Calculate the kth residual matrix between the kth calibration spectrum reflectance and the kth indoor standard reflectance, and stop iteration if the kth residual matrix meets a preset condition.

[0094] The step of calculating the correction factor function according to the modulation coefficient of the kth iteration includes:

[0095] The correction factor function is calculated according to the following formula:

[0096] ; (2)

[0097] in, is the kth correction factor function, d j is the jth measurement distance, is the jth measurement angle; d0 is the minimum distance captured by the field hyperspectral camera, is the kth distance modulation coefficient, is the kth angle modulation coefficient, and cos is the cosine function.

[0098] Substituting the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error includes:

[0099] The kth environmental interference error is calculated according to the following formula:

[0100] ; (3)

[0101] Among them, G k is the kth environmental interference error; is the kth training sample of the jth measured distance and the jth measured angle; is the kth indoor standard reflectivity.

[0102] Substituting the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance includes:

[0103] The kth calibration spectrum reflectance is calculated according to the following formula:

[0104] ; (4)

[0105] in, is the kth calibration spectrum reflectance, j is the sample number, is the band vector, is the kth verification sample of the jth measurement distance, jth measurement angle, and band vector is the vector consisting of all bands.

[0106] Environmental interference errors include errors in the instrument itself, ambient temperature, and ambient humidity. Environmental interference errors do not include errors caused by shooting distance and shooting angle.

[0107] In the first iteration, traverse and , and When the constraint function F is known, search for the minimum value of the constraint function F and filter out the minimum value of the constraint function F of the first iteration. and . Represents the first indoor standard reflectance of the first sample, which corresponds to the first iteration. Indicates the first measured distance d1 and the first measured angle The first outdoor spectral reflectance, which corresponds to the first iteration.

[0108] Will 、 , d1 and Substitute the correction factor function into the calibration formula to calculate the correction factor function of the first iteration. Substitute the correction factor function of the first iteration, the first environmental interference error, and the first training sample into the calibration formula to calculate the corresponding R correct :

[0109] ; (5)

[0110] in, is the first validation sample, is the correction factor function of the first iteration, G1 is the first environmental interference error, and the present invention sets the first environmental interference error to 0.

[0111] The first validation sample Substituting into formula (5), when the correction factor function of the first iteration is known and G1=0, we can calculate .

[0112] ; (6)

[0113] After calculating G2, 、 , d2 and Substitute the constraint function and traverse the constraint function to obtain the minimum value and , we get α2 and β2, and then substitute α2 and β2 into formula (2) to get the second correction factor function . The second correction factor function Substituting into formula (4), we get , repeat the above process, continuously update the calibration spectrum reflectance, and in each iteration process, calculate the kth residual matrix between the kth calibration spectrum reflectance and the kth indoor standard reflectance, that is, , the total number of samples K = 300, and the △R is decentralized to eliminate the baseline offset between bands, that is, the elements of each column are subtracted from the mean of the elements in that column. The kth decentralized matrix is ​​recorded as: .

[0114] The following formula is used for the kth decentralized matrix Perform singular value decomposition:

[0115] ; (7)

[0116] Among them, G k is the kth environmental interference error, U k for The kth left singular vector matrix of is the first m rows of the kth left singular vector matrix; DIA k for The k-th diagonal matrix of DIA k The size is k×k and consists of k singular values composition,

[0117] DIA k [1:m,1:m] means The first m rows and first m columns of the k-th diagonal matrix; for The transpose matrix of the kth right singular vector matrix, is the first m rows of the transposed matrix of the k-th right singular vector matrix.

[0118] The band corresponding to the singular value is greatly affected by distance and angle, and the spectral reflectance is quite different from the indoor standard reflectance. When the judgment parameter ξ meets the following conditions, the iteration stops:

[0119] ; (8)

[0120] Among them, ξ is the judgment parameter, iter is the singular value number, m is the reference value, is the square of the iter-th singular value. When the judgment parameter ξ≥95%, stop the iteration and determine the final and .

[0121] This embodiment uses a preset step size to adjust the distance modulation coefficient and the angle modulation coefficient, minimizes the constraint function, and calculates a correction factor function using the distance modulation coefficient and the angle modulation coefficient corresponding to the minimum value of the constraint function. The correction factor function, the environmental interference error, and the training sample are then substituted into the calibration formula to calculate the calibrated spectral reflectance. The training sample, the indoor standard reflectance, and the correction factor function are then substituted into the calibration formula to update the environmental interference error. This cycle is repeated until the judgment parameter is greater than or equal to 95%, at which point the error between the spectral reflectance and the indoor standard reflectance is less than 5%.

[0122] Example 3

[0123] like Figure 1 As shown, this embodiment provides a method for calibrating hyperspectral reflectance data of tea ridges in a field. This embodiment is based on Example 1 and describes the differences from Example 1. The method includes:

[0124] S1: Collect outdoor hyperspectral data of tea ridges in the field, as well as indoor hyperspectral data.

[0125] S2: Performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve.

[0126] S3: According to the band position and number of the outdoor hyperspectral data, the reflectivity of the corresponding band position is obtained in the indoor spectral reflectivity curve to obtain an indoor standard reflectivity curve with the same band number and length as the outdoor spectral reflectivity curve.

[0127] S4: Constructing a constraint function, and searching for the modulation coefficient of the kth iteration under the condition that the constraint function obtains a minimum value, wherein the modulation coefficient includes a distance modulation coefficient and an angle modulation coefficient; wherein k≥1.

[0128] S5: Calculate the correction factor function according to the modulation coefficient of the kth iteration.

[0129] S6: Substitute the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error.

[0130] S7: Substitute the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance.

[0131] S8: Calculate the kth residual matrix between the kth calibration spectrum reflectance and the kth indoor standard reflectance, and stop iteration if the kth residual matrix meets a preset condition.

[0132] The performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve includes:

[0133] Select N control points;

[0134] According to the following formula, N control points are used to describe the indoor hyperspectral data to construct an indoor spectral reflectance curve:

[0135] ; (9)

[0136] in, is the spectral reflectance of the indoor spectral reflectance curve, N1 is the total number of control points, and n is the serial number of the control point; c n is the nth control point, is the value of the nth cubic B-spline basis function.

[0137] The cubic B-spline curve is a piecewise cubic polynomial curve with good local controllability and shape retention. The cubic B-spline curve is a type of B-spline curve with an order of 4, and each segment of the curve is a cubic polynomial. In this embodiment, the cubic B-spline curve is used to fit the indoor hyperspectral data to obtain the indoor spectral reflectance curve. The wavelength range of the indoor hyperspectral data is 400nm-2500nm, and the interpolation condition of the cubic B-spline curve is to pass through all the indoor hyperspectral data. The wavelength range of the outdoor hyperspectral data is 400nm-1000nm. The outdoor hyperspectral data is substituted into the indoor spectral reflectance curve to obtain the outdoor spectral reflectance curve. The coordinates of the nth control point are multiplied by the value of the nth cubic B-spline basis function to obtain multiple curve sampling points. All the curve sampling points are connected to obtain the indoor spectral reflectance curve.

[0138] After collecting the outdoor hyperspectral data of the tea ridges in the field and the indoor hyperspectral data, the method further includes:

[0139] The outdoor hyperspectral data is subjected to black and white correction to reduce interference caused by illumination changes and equipment noise.

[0140] The outdoor hyperspectral data is corrected for black and white according to the following formula:

[0141] ; (10)

[0142] Among them, I0 is the spectrum data after black and white correction, lg is the logarithmic function, I 外 For outdoor hyperspectral data, I D is the blackboard image, I W This is a whiteboard image. The blackboard image was acquired by covering the hyperspectral camera's lens cap, while the whiteboard image was acquired by scanning a standard Teflon white calibration plate with a reflectivity close to 99.99%. Black-white correction of outdoor hyperspectral data can reduce the effects of uneven lighting, equipment noise, and environmental factors on spectral reflectance.

[0143] like Figure 3 As shown, the outdoor hyperspectral data of tea ridges in the field are collected, including:

[0144] S11: Place the marking circle on the tea ridge.

[0145] S12: Align the lens of the depth camera with the marking circle.

[0146] S13: picking the tea buds and leaves in the marked circle, wherein the tea buds and leaves include one bud and one leaf and one bud and two leaves.

[0147] S14: photographing the tea buds and leaves with a hyperspectral camera to obtain outdoor hyperspectral data of tea ridges in the field.

[0148] like Figure 4 As shown, the present invention uses a hyperspectral camera 1 to photograph tea ridges 5 in a field. A depth camera 4 is positioned near the hyperspectral camera 1. The hyperspectral camera 1 is translated to coincide with the depth camera 4. The depth camera 4 is used to measure the distance between the hyperspectral camera's lens 2 and the marking circle 6. The distance between the depth camera 4 and the marking circle 6 is L4. Combining L4 with the distance between the depth camera 4 and the hyperspectral camera's lens 2, the distance between the hyperspectral camera's lens 2 and the marking circle 6 can be calculated. The horizontal distance between the hyperspectral camera's lens 2 and the depth camera 4 is L1. The heights of both the hyperspectral camera's lens 2 and the depth camera 4 above the ground are L2. The height of the tea ridges in the field above the ground is L3. The angle between the line connecting the depth camera 4 and the marking circle 6 and the vertical direction is θ.

[0149] The picked tea buds are attached to the lens of an indoor hyperspectral camera, and contact measurement is used to measure indoor hyperspectral data, which includes indoor standard reflectance.

[0150] The marking circle 6 of this embodiment is used to mark the tea ridge. The marking circle 6 is placed on the first tea ridge, and the depth camera 4 is aimed at the marking circle 6. One bud and one leaf and one bud and two leaves in the marking circle 6 are picked respectively and attached to the lens 2 of the indoor hyperspectral camera to obtain indoor hyperspectral data. Indoor hyperspectral data is standard data that is not affected by angle and distance.

[0151] Example 4

[0152] The present application also provides a computer device in an embodiment, which may be a server, wherein the computer device includes a processor, memory, a network interface, and a database connected via a system bus. The processor of the computer design is used to provide computing and control capabilities, and the memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal via a network connection.

[0153] This embodiment also provides a computer-readable storage medium having a computer program stored thereon. When executed by a processor, the computer program implements a method for calibrating hyperspectral reflectance data of tea ridges in a field. It is understood that the computer-readable storage medium in this embodiment can be either a volatile or non-volatile readable storage medium.

[0154] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, apparatus, article, or method comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, apparatus, article, or method. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, apparatus, article, or method comprising the element.

[0155] The above description is only a preferred embodiment of the present application and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A method for calibrating hyperspectral reflectance data of tea ridges in a field, characterized in that: include: S1: Collect outdoor hyperspectral data of tea ridges in the field, as well as indoor hyperspectral data; S2: performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve; S3: According to the band positions and number of the outdoor hyperspectral data, the reflectance of the corresponding band position is obtained in the indoor spectral reflectance curve to obtain an indoor standard reflectance curve with the same band number and length as the outdoor spectral reflectance curve; S4: constructing a constraint function, and searching for a modulation coefficient of the kth iteration under the condition that the constraint function obtains a minimum value, wherein the modulation coefficient includes a distance modulation coefficient and an angle modulation coefficient; wherein k ≥ 1; S5: Calculating a correction factor function according to the modulation coefficient of the kth iteration; S6: Substitute the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error; S7: Substitute the validation set, the kth environmental interference error and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance; S8: Calculating a kth residual matrix between the kth calibration spectrum reflectance and the kth indoor standard reflectance, and stopping iteration if the kth residual matrix meets a preset condition; The construction constraint function includes: The constraint function is constructed according to the following formula: ; Among them, F is the constraint function, j is the sample number, and K is the total number of samples; is the kth indoor standard reflectance of the jth sample, is the jth measured distance d j , the jth measured angle The kth outdoor spectral reflectance, k is the number of iterations, . is the multiplication operator; cos is the cosine function, is the kth distance modulation coefficient, is the kth angle modulation coefficient, is the wavelength vector; The step of calculating the correction factor function according to the modulation coefficient of the kth iteration includes: The correction factor function is calculated according to the following formula: ; in, is the kth correction factor function; d0 is the minimum distance captured by the field hyperspectral camera; Substituting the training set and the correction factor function into the calibration formula to obtain the kth environmental interference error includes: The kth environmental interference error is calculated according to the following formula: ; Among them, G k is the kth environmental interference error; is the kth training sample of the jth measured distance and the jth measured angle; Substituting the validation set, the kth environmental interference error, and the correction factor function into the calibration formula to obtain the kth calibration spectrum reflectance includes: The kth calibration spectrum reflectance is calculated according to the following formula: ; in, is the kth calibration spectral reflectance, is the kth verification sample of the jth measured distance and the jth measured angle; The performing cubic B-spline fitting on the indoor hyperspectral data to obtain an indoor spectral reflectance curve includes: Select N control points; According to the following formula, N control points are used to describe the indoor hyperspectral data to construct an indoor spectral reflectance curve: ; in, is the spectral reflectance of the indoor spectral reflectance curve, N1 is the total number of control points, and n is the serial number of the control point; c n is the nth control point, is the value of the nth cubic B-spline basis function.

2. The calibration method for field tea ridge hyperspectral reflectance data according to claim 1, wherein The step of searching for the k-th iteration modulation coefficient based on the condition that the constraint function obtains a minimum value includes: Get the minimum value and the maximum value of the distance modulation coefficient; Obtain the minimum value and the maximum value of the angle modulation coefficient; traversing the distance modulation coefficient and the angle modulation coefficient according to a preset step size, and recording the value of the constraint function during the traversal process; The minimum value of the constraint function is screened out, and the kth distance modulation coefficient and the kth angle modulation coefficient corresponding to the minimum value of the constraint function are used as the modulation coefficients of the kth iteration.

3. The calibration method for field tea ridge hyperspectral reflectance data according to claim 1, characterized in that, After collecting the outdoor hyperspectral data of the tea ridges in the field and the indoor hyperspectral data, the method further includes: The outdoor hyperspectral data is subjected to black and white correction to reduce interference caused by illumination changes and equipment noise.

4. The calibration method for field tea ridge hyperspectral reflectance data according to claim 1, wherein The outdoor hyperspectral data of tea ridges in the field are collected, including: Place the marking circle on the tea ridge; Align the lens of the depth camera with the marking circle; Picking the tea buds and leaves in the marked circle, wherein the tea buds and leaves include one bud and one leaf and one bud and two leaves; The tea buds and leaves are photographed using a hyperspectral camera to obtain outdoor hyperspectral data of tea ridges in the field.

5. The calibration method for field tea ridge hyperspectral reflectance data according to claim 1, characterized in that, The wavelength range of the indoor hyperspectral data is 400nm-2500nm, and the wavelength range of the outdoor hyperspectral data is 400nm-1000nm.

Citation Information

Patent Citations

  • Airborne hyperspectral soil information inversion method

    CN112378864A

  • Spectral imaging center wavelength incident angle offset calibration method and device

    CN115993187A