A color correction method and system for field rice images collected by UAV based on improved GPR

By improving the Gaussian process regression model and whale optimization algorithm, combined with the RGB mean of 24 color card images, the problem of overexposed rice images in the field is solved, and more accurate color correction is achieved, improving the image quality and subsequent processing are improved. Effect.

CN118657697BActive Publication Date: 2025-01-10SANYA NATIONAL INSTITUTE OF SOUTHERN BREEDING CHINESE ACADEMY OF AGRICULTURAL SCIENCES +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202411124845.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-16
Publication Date
2025-01-10
Estimated Expiration
2044-08-16

AI Technical Summary

Technical Problem

The field rice images collected by drones are prone to overexposed under strong sunlight, resulting in too bright highlight areas, loss of details, weakened texture, and limited effects of traditional color correction methods, affecting subsequent image processing and target recognition.

Method used

Using a color correction method based on improved Gaussian process regression (GPR), the improved whale optimization algorithm and modified fitness function are introduced, and the RGB mean of the color blocks of the 24-color card image is used for color correction. Automatically adjust nonlinear expressions to improve image color correction.

Benefits of technology

It significantly improves the color correction effect of the image collected in the field, reduces color aberration, enhances the authenticity and detail retention of the image, and improves the accuracy of image processing and target recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657697B_ABST
    Figure CN118657697B_ABST
Patent Text Reader

Abstract

The present invention discloses a color correction method and system for field rice images collected by unmanned aerial vehicles based on improved GPR, comprising the following steps: using unmanned aerial vehicles to shoot 24 color cards and rice images; based on the 24 color card images, extracting the mean of the three channels of R, G, and B in the regional color block; using the mean of the three channels of R, G, and B in the regional color block to train and optimize the Gaussian process regression model, and obtaining the color correction model improved based on Gaussian process regression; using the color correction model improved based on Gaussian process regression, color correction is performed on the 24 color cards and rice images to obtain the final field rice correction image. The present invention provides an improved color correction model based on Gaussian process regression (GPR), by introducing an improved whale optimization algorithm and modifying the fitness function, the model can automatically adjust the nonlinear expression based on GPR, thereby further improving the color correction effect of field collected images.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of image color correction, and in particular relates to a method and system for color correction of field rice images collected by an unmanned aerial vehicle based on an improved GPR. Background Art

[0002] In the agricultural field, drone remote sensing technology is widely used to monitor plant growth status, identify pests and diseases, and predict yields. However, since drones generally perform tasks in clear weather, they may encounter overexposure problems when photographing farmland rice, especially in strong sunlight, which causes the highlight area to be too bright, details to be lost, texture to be weakened, and the overall image to be distorted and unreal. This problem poses severe challenges to subsequent image processing, machine vision feature extraction, target recognition, and image understanding, and seriously affects the effect of the technology in practical applications. Therefore, it is crucial to perform color correction on farmland rice images taken by drones.

[0003] Although many drone-mounted lenses have exposure compensation functions, which can alleviate the overexposure problem to a certain extent, the effect is affected by factors such as environmental conditions, light intensity, and sensor quality. The lighting conditions at different time points vary significantly, and the exposure compensation effects vary. Therefore, for field rice images acquired by drones, color correction is usually required before subsequent analysis. There are currently a variety of image color correction methods, and with the rapid development of machine learning algorithms, machine learning algorithms have gradually emerged in the field of image processing in recent years. The combination of data analysis, image processing, and machine learning algorithms has become one of the hot research directions.

[0004] Traditional color correction methods have limited effect on rice field images collected by drones, and a large amount of color difference still exists after correction. Image color correction is particularly important in the open environment and uncontrollable light sources of field images. Summary of the invention

[0005] In view of the shortcomings of the prior art, the present invention proposes a color correction method and system for field rice images collected by UAV based on improved GPR, and provides a color correction model based on Gaussian process regression (GPR). By introducing an improved whale optimization algorithm and modifying the fitness function, the model can automatically adjust the nonlinear expression on the basis of GPR, thereby further improving the color correction effect of field collected images.

[0006] To achieve the above object, the present invention provides the following solutions:

[0007] A method for color correction of field rice images collected by UAV based on improved GPR includes the following steps:

[0008] Use drones to take 24 color cards and rice images;

[0009] Based on the 24-color card image, extract the mean of the three channels of R, G, and B in the regional color block;

[0010] The Gaussian process regression model is optimized by training the mean values ​​of the three channels R, G, and B in the regional color block to obtain a color correction model improved by Gaussian process regression.

[0011] The 24-color chart and rice image were color corrected using the improved color correction model based on Gaussian process regression to obtain the final field rice correction image.

[0012] Preferably, based on the 24-color card image, the method for extracting the mean of the three channels of R, G, and B in the regional color block includes:

[0013] After binarizing the 24-color card image, use the adaptive Wiener filter to filter the image;

[0014] The filtered image is subjected to edge detection using the Canny operator to obtain an edge image. Hough line detection is performed on the edge image to calculate the cumulative number of lines with an inclination angle greater than 170 degrees and collinear points greater than 120. The inclination angle of the maximum cumulative line is selected as the actual inclination angle to perform image tilt correction.

[0015] The accumulated integrals of the x-axis and y-axis are calculated for the image after tilt correction, the actual spacing of the color blocks is obtained according to the change of the accumulated integrals, and the color block area is obtained according to the actual spacing;

[0016] For each color block, 1 / 4 of the area is taken as the actual selected regional color block, and the average of the three channels of R, G, and B in the regional color block is taken as the measured data.

[0017] Preferably, the method of optimizing the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block includes:

[0018] The mean values ​​of the three channels of R, G, and B in the regional color block are converted into LAB values, and based on the LAB values, three optimized Gaussian process regression models are trained with the three channel values ​​of the standard colorimetric plate in the LAB space as targets.

[0019] Preferably, the optimization of the Gaussian process regression model includes: Represented as a combination of a single kernel function and the kernel function using the IWOA algorithm The hyperparameters and There are two parts to the optimization.

[0020] Preferably, the kernel function Methods that represent a combination of single kernel functions include:

[0021] ,

[0022] in, represents the kernel function to be combined, Represents the coefficient of the combined kernel function, which is used to control the sparsity of the combined kernel function and .

[0023] Preferably, the IWOA algorithm is used to calculate the kernel function The hyperparameters and The optimization methods include:

[0024] ,

[0025] in, is the model prediction value, is the actual target value, m represents the number of training samples, is the symbolic function, is the penalty factor for Sparsity of control.

[0026] The present invention also discloses a color correction system for field rice images collected by a UAV based on an improved GPR, comprising: a collection module, an extraction module, a training module and a correction module;

[0027] The acquisition module is used to use a drone to take 24 color cards and rice images;

[0028] The extraction module is used to extract the mean of the three channels of R, G and B in the regional color block based on the 24-color card image;

[0029] The training module is used to optimize the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block to obtain a color correction model improved based on the Gaussian process regression;

[0030] The correction module is used to perform color correction on the 24 color cards and the rice image using a color correction model improved based on Gaussian process regression to obtain a final field rice correction image.

[0031] Preferably, the extraction module includes: a filtering unit, a correction unit, a calculation unit and a selection unit;

[0032] The filtering unit is used to binarize the 24-color card image and then filter the image using an adaptive Wiener filter;

[0033] The correction unit is used to use the Canny operator to perform edge detection on the filtered image to obtain an edge image, perform Hough line detection on the edge image, calculate the cumulative number of lines with an inclination angle greater than 170 degrees and a collinear point greater than 120, and select the inclination angle of the maximum cumulative line as the actual inclination angle to perform inclination correction on the image;

[0034] The calculation unit is used to calculate the cumulative integrals of the x-axis and the y-axis for the image after tilt correction, obtain the actual spacing of the color blocks according to the change of the cumulative integrals, and obtain the color block area according to the actual spacing;

[0035] The selection unit is used to select, for each color block, 1 / 4 of the area of ​​the region as the actually selected regional color block, and use the average of the three channels R, G, and B in the regional color block as the measured data.

[0036] Preferably, the process of optimizing the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block includes:

[0037] The mean values ​​of the three channels of R, G, and B in the regional color block are converted into LAB values, and based on the LAB values, three optimized Gaussian process regression models are trained with the three channel values ​​of the standard colorimetric plate in the LAB space as targets.

[0038] Preferably, the optimization of the Gaussian process regression model includes: Represented as a combination of a single kernel function and the kernel function using the IWOA algorithm The hyperparameters and There are two parts to the optimization.

[0039] Compared with the prior art, the present invention has the following beneficial effects:

[0040] The present invention discloses a color correction method and system for field rice images collected by unmanned aerial vehicles based on improved GPR, by using unmanned aerial vehicles to shoot 24 color cards and rice images; based on the 24 color card images, extracting the mean of the three channels of R, G, and B in the regional color block; using the mean of the three channels of R, G, and B in the regional color block to train and optimize the Gaussian process regression model, and obtaining the color correction model improved based on Gaussian process regression; using the color correction model improved based on Gaussian process regression, color correction is performed on the 24 color cards and rice images to obtain the final field rice correction image. The present invention provides an improved color correction model based on Gaussian process regression (GPR), by introducing an improved whale optimization algorithm and modifying the fitness function, the model can automatically adjust the nonlinear expression based on GPR, thereby further improving the color correction effect of field collected images. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the embodiments. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.

[0042] Figure 1 24 color cards and rice images collected by the drone of an embodiment of the present invention;

[0043] Figure 2 This is a schematic diagram showing the effect of automatically extracting regional color blocks according to an embodiment of the present invention;

[0044] Figure 3 Schematic diagram of image chromatic aberration under different models according to an embodiment of the present invention;

[0045] Figure 4 Schematic diagram of image color correction effect under different models according to an embodiment of the present invention;

[0046] Figure 5 The present invention is a flowchart of a method for color correction of field rice images collected by a UAV based on an improved GPR according to an embodiment of the present invention. DETAILED DESCRIPTION

[0047] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0048] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0049] Embodiment 1

[0050] like Figure 5 As shown, the present invention provides a method for color correction of field rice images collected by a UAV based on an improved GPR, comprising the following steps:

[0051] Use drones to take 24 color cards and rice images;

[0052] Based on the 24-color card image, extract the mean of the three channels of R, G, and B in the regional color block;

[0053] The Gaussian process regression model is optimized by training the mean values ​​of the three channels R, G, and B in the regional color block to obtain a color correction model improved by Gaussian process regression.

[0054] The 24-color chart and rice image were color corrected using the improved color correction model based on Gaussian process regression to obtain the final field rice correction image.

[0055] In this embodiment, before the drone operation, it is preferred to shoot a horizontally placed standard 24-color card. At present, the mainstream calibration program of the 24-color card, such as Spyder Checkr, requires manual matching when extracting color blocks. For this reason, we redesigned the automatic color block extraction program. Based on the 24-color card image, the method of extracting the mean of the three channels of R, G, and B in the regional color block includes:

[0056] After binarizing the 24-color card image, use the adaptive Wiener filter to filter the image;

[0057] The filtered image is subjected to edge detection using the Canny operator to obtain an edge image. Hough line detection is performed on the edge image to calculate the cumulative number of lines with an inclination angle greater than 170 degrees and collinear points greater than 120. The inclination angle of the maximum cumulative line is selected as the actual inclination angle to perform image tilt correction.

[0058] The accumulated integrals of the x-axis and y-axis are calculated for the image after tilt correction, the actual spacing of the color blocks is obtained according to the change of the accumulated integrals, and the color block area is obtained according to the actual spacing;

[0059] For each color block, 1 / 4 of the area is taken as the actual selected regional color block, and the average of the three channels of R, G, and B in the regional color block is taken as the measured data.

[0060] In this embodiment, the method of optimizing the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block includes:

[0061] The measured RGB data are converted into LAB values, and based on the LAB values ​​of the measured samples, the three channel values ​​of the standard colorimetric plate in the LAB space are taken as targets. The hyperparameters are optimized by combining the kernel function and the IWOA algorithm to train three optimized Gaussian process regression models.

[0062] In this embodiment, compared with the traditional Gaussian process regression, the optimized Gaussian process regression can adaptively combine kernel functions and optimize hyperparameters. The optimized Gaussian process regression model includes: Represented as a combination of a single kernel function and the kernel function using the IWOA algorithm The hyperparameters and There are two parts to the optimization. Specifically, we optimize the kernel function of Gaussian process regression. It can be expressed as a combination of single kernel functions (RBF kernel function, linear kernel function, quadratic kernel function, Gaussian kernel function):

[0063] Among them, the kernel function Methods that represent a combination of single kernel functions include:

[0064] ,

[0065] in represents the kernel function to be combined, Represents the coefficient of the combined kernel function, which is used to control the sparsity of the combined kernel function and .

[0066] In order to prevent the introduction of too many kernel functions and increase the computational cost, it is necessary to ensure that the vector [ ] is sparse enough, and the kernel function hyperparameters need to be optimized to optimize the prediction results. Therefore, the IWOA algorithm is used to optimize the kernel function hyperparameters and To search for the best result, the fitness function is defined as:

[0067] ,

[0068] in, is the model prediction value, is the actual target value, m represents the number of training samples, is the symbolic function, is the penalty factor for Sparsity of control.

[0069] The final Gaussian process regression model is obtained through parameter optimization. For any image taken at the same time, after obtaining its LAB value, it is corrected using three Gaussian process regression models to obtain the corrected LAB value. The corrected LAB value is then converted to RGB value to obtain the final corrected image.

[0070] Embodiment 2

[0071] The present invention also discloses a color correction system for field rice images collected by a UAV based on an improved GPR, comprising: a collection module, an extraction module, a training module and a correction module;

[0072] The acquisition module is used to take 24 color cards and rice images using drones;

[0073] The extraction module is used to extract the mean of the three channels of R, G, and B in the regional color block based on the 24-color card image;

[0074] The training module is used to optimize the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block, and obtain a color correction model improved based on the Gaussian process regression;

[0075] The correction module is used to perform color correction on the 24 color cards and rice images using a color correction model improved based on Gaussian process regression to obtain the final field rice correction image.

[0076] In this embodiment, the extraction module includes: a filtering unit, a correction unit, a calculation unit and a selection unit;

[0077] The filtering unit is used to binarize the 24-color card image and then filter the image using an adaptive Wiener filter;

[0078] The correction unit is used to use the Canny operator to perform edge detection on the filtered image to obtain an edge image, perform Hough line detection on the edge image, calculate the cumulative number of lines with an inclination angle greater than 170 degrees and collinear points greater than 120, and select the inclination angle of the maximum cumulative line as the actual inclination angle to perform inclination correction on the image;

[0079] The calculation unit is used to calculate the cumulative integral of the x-axis and the y-axis for the image after tilt correction, obtain the actual spacing of the color blocks according to the change of the cumulative integral, and obtain the color block area according to the actual spacing;

[0080] The selection unit is used to select 1 / 4 of the area of ​​each color block as the actual selected regional color block, and take the average of the three channels R, G, and B in the regional color block as the measured data.

[0081] In this embodiment, the process of optimizing the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block includes:

[0082] The mean values ​​of the three channels of R, G, and B in the regional color block are converted into LAB values, and based on the LAB values, three optimized Gaussian process regression models are trained with the three channel values ​​of the standard colorimetric plate in the LAB space as targets.

[0083] In this embodiment, optimizing the Gaussian process regression model includes: Represented as a combination of a single kernel function and the kernel function using the IWOA algorithm The hyperparameters and There are two parts to the optimization.

[0084] Among them, the kernel function The process represented as a combination of a single kernel function consists of:

[0085] ,

[0086] in, represents the kernel function to be combined, Represents the coefficient of the combined kernel function, which is used to control the sparsity of the combined kernel function and .

[0087] Use IWOA algorithm to analyze kernel function The hyperparameters and The optimization process includes:

[0088] ,

[0089] in, is the model prediction value, is the actual target value, m represents the number of training samples, is the symbolic function, is the penalty factor for Sparsity of control.

[0090] Embodiment 3

[0091] The color correction method for field rice images collected by drones based on improved GPR provided in Example 1 is used to correct the color of field rice images. The specific implementation process is as follows:

[0092] (1) Color card and rice image acquisition: Select clear weather and use a drone to take 24 color cards and rice images. Figure 1 shown.

[0093] (2) 24-color card automatic extraction results: For the collected 24-color card image, you first need to select each standard color block area, and then extract the mean of the three channels of R, G, and B in the area block. The effect of automatic area block selection is as follows: Figure 2 shown.

[0094] (3) Improved Gaussian process regression model training results: In order to compare the traditional model with the improved model of this study, the color card values ​​extracted in step 2 were input into the traditional Lasso, SVR and GPR, as well as the improved GPR (EGPR). Figure 3 As shown in the figure, by comparing the color difference values ​​under each model, the image color correction effect of EGPR is significantly better than that of the traditional model, and the color difference value is controlled within 5.

[0095] (4) Color correction using improved Gaussian regression model: EGPR is used to perform color correction on the 24-color card and rice images, as shown in Figure 4 As shown in the figure, EGPR can effectively improve the color of images collected by UAVs in the field.

[0096] The embodiments described above are only descriptions of the preferred embodiments of the present invention and are not intended to limit the scope of the present invention. Without departing from the design spirit of the present invention, various modifications and improvements made to the technical solutions of the present invention by ordinary technicians in this field should all fall within the protection scope determined by the claims of the present invention.

Claims

1. A color correction method for field rice images collected by UAV based on improved GPR, characterized in that: The following steps are involved: Use drones to take 24 color cards and rice images; Based on the 24-color card image, extract the mean of the three channels of R, G, and B in the regional color block; The Gaussian process regression model is optimized by training the mean values ​​of the three channels R, G, and B in the regional color block to obtain a color correction model improved by Gaussian process regression. The color correction model improved by Gaussian process regression was used to perform color correction on the 24 color cards and rice images to obtain the final field rice correction image. The optimization of the Gaussian process regression model includes: Represented as a combination of a single kernel function and the kernel function using the IWOA algorithm The hyperparameters and Conduct optimization in two parts; The kernel function Methods that represent a combination of single kernel functions include: , in, represents the kernel function to be combined, Represents the coefficient of the combined kernel function, which is used to control the sparsity of the combined kernel function and ; Use IWOA algorithm to analyze kernel function The hyperparameters and The optimization methods include: , in, is the model prediction value, is the actual target value, m represents the number of training samples, is the symbolic function, is the penalty factor for Sparsity of control.

2. The color correction method for field rice images collected by unmanned aerial vehicles based on improved GPR according to claim 1 is characterized in that: Based on the 24-color card image, the method of extracting the mean of the three channels of R, G, and B in the regional color block includes: After binarizing the 24-color card image, use the adaptive Wiener filter to filter the image; The filtered image is subjected to edge detection using the Canny operator to obtain an edge image. Hough line detection is performed on the edge image to calculate the cumulative number of lines with an inclination angle greater than 170 degrees and collinear points greater than 120. The inclination angle of the maximum cumulative line is selected as the actual inclination angle to perform image tilt correction. The accumulated integrals of the x-axis and y-axis are calculated for the image after tilt correction, the actual spacing of the color blocks is obtained according to the change of the accumulated integrals, and the color block area is obtained according to the actual spacing; For each color block, 1 / 4 of the area is taken as the actual selected regional color block, and the average of the three channels of R, G, and B in the regional color block is taken as the measured data.

3. The color correction method for field rice images collected by unmanned aerial vehicles based on improved GPR according to claim 1, characterized in that: Methods for optimizing the Gaussian process regression model by training the mean values ​​of the three channels R, G, and B in the regional color block include: The mean values ​​of the three channels of R, G, and B in the regional color block are converted into LAB values, and based on the LAB values, three optimized Gaussian process regression models are trained with the three channel values ​​of the standard colorimetric plate in the LAB space as targets.

Citation Information

Patent Citations

  • Image color real-time correction method, device and system

    CN111355941A