Soil image brightness controllable enhancement method based on double Gaussian fitting

By using a method based on double Gaussian fitting, the brightness of soil images is enhanced in a controllable manner, which solves the problem of uneven image brightness caused by inconsistent lighting in the field and improves the quality of soil images to support soil species identification.

CN114757858BActive Publication Date: 2025-01-28CHONGQING NORMAL UNIVERSITY +2
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210264572.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-17
Publication Date
2025-01-28
Estimated Expiration
2042-03-17

AI Technical Summary

Technical Problem

In existing technologies, soil image acquisition is affected by inconsistent natural lighting conditions during field operations, resulting in uneven image brightness, which affects subsequent soil type identification and processing.

Method used

A method based on dual Gaussian fitting is adopted. By obtaining the histogram of the Y component of the soil image, Gaussian curve fitting and brightness transfer processing are performed. Combined with grayscale mapping and correction, controllable brightness enhancement is achieved.

Benefits of technology

It effectively improves the brightness uniformity of soil images, ensures image quality, and supports subsequent soil type identification processing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114757858B_ABST
    Figure CN114757858B_ABST
Patent Text Reader

Abstract

The present invention provides a soil image brightness controllable enhancement method based on double Gaussian fitting, comprising the following steps: taking the main peak point of the Y component histogram of the soil image as a segmentation point, dividing the Y component histogram of the soil image into a left histogram and a right histogram, taking a straight line passing through the main peak point and parallel to the longitudinal axis of the Y component histogram coordinate system as a symmetry axis, flipping the left histogram and the right histogram to obtain a symmetric polyline of the left histogram and the right histogram; and performing a polyline comparison on the original left histogram and the symmetric polyline corresponding to the original left histogram and the symmetric polyline corresponding to the original right histogram. Gaussian fitting is performed to form two Gaussian curves; the Gaussian curve segments corresponding to the original left histogram and the Gaussian curve segments corresponding to the original right histogram are taken from the two Gaussian curves to form a double Gaussian fitting curve of the Y component histogram of the soil image; the double Gaussian fitting curve is subjected to brightness migration processing and then grayscale mapping processing to obtain the brightness grayscale after brightness migration; the brightness grayscale is mapped and corrected to obtain the Y component of the soil image after brightness controllable enhancement, and the Y component of the soil image is fused with the U component and V component of the original soil image to obtain the final soil image with controllable brightness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an image processing method, and in particular to a soil image brightness controllable enhancement method based on double Gaussian fitting. Background Art

[0002] Soil image recognition is used to study and analyze soil. In the prior art, soil images are generally collected by machine vision. However, when collecting soil images, they are generally carried out in the field. Due to the influence of climate and location, it is impossible for field machine vision to collect soil images to maintain the same natural lighting conditions, which makes the lighting conditions reflected in the image inconsistent, seriously affecting the subsequent soil type identification process. At present, there is no effective means to solve the above problem. Summary of the invention

[0003] In view of this, the purpose of the present invention is to provide a soil image brightness controllable enhancement method based on double Gaussian fitting, which can perform brightness enhancement processing on soil images with inconsistent natural lighting conditions, so that the brightness of the final soil image can be controlled, which can effectively ensure the quality of the final image and facilitate subsequent soil type identification processing.

[0004] The present invention provides a soil image brightness controllable enhancement method based on double Gaussian fitting, comprising the following steps:

[0005] S1. Obtaining a Y component histogram of the soil image and extracting the main peak point of the Y component histogram of the soil image;

[0006] S2. Taking the main peak point of the Y component histogram of the soil image as the segmentation point, the Y component histogram of the soil image is divided into a left histogram and a right histogram, and a straight line passing through the main peak point and parallel to the vertical axis of the Y component histogram coordinate system is used as the symmetry axis to flip the left histogram and the right histogram to obtain a symmetrical polyline of the left histogram and the right histogram;

[0007] S3. Perform Gaussian fitting on the symmetrical broken line corresponding to the original left histogram and the symmetrical broken line corresponding to the original right histogram to form two Gaussian curves;

[0008] S4. Take the Gaussian curve segment corresponding to the original left histogram and the Gaussian curve segment corresponding to the original right histogram from the two Gaussian curves to form a double Gaussian fitting curve of the Y component histogram of the soil image;

[0009] S5. Performing brightness migration processing on the double Gaussian fitting curve and then performing grayscale mapping processing to obtain the brightness grayscale after brightness migration;

[0010] S6. Mapping and correcting the brightness grayscale to obtain the Y component of the soil image after brightness controllable enhancement, and fusing the Y component of the soil image with the U component and V component of the original soil image to obtain the final soil image with controllable brightness.

[0011] Further, in step S1, the main peak point of the Y component histogram of the soil image is obtained by the following method:

[0012]

[0013] Where H(y) is the frequency corresponding to the gray level y of the Y component of the soil image, and H(r) represents the frequency corresponding to the two gray levels r on the left and right of gray level y; N i ={y-2,y-1,y+1,y+2}.

[0014] Further, step S2 specifically includes:

[0015] The Y component histogram of the soil image is divided into the left histogram and the right histogram using the main peak point as the segmentation point:

[0016] H l ={H(y)min(Y)≤y≤peak}

[0017] Hr={H(y)peak<y≤max(Y)}

[0018] Among them, H l Represents the left histogram of the Y component of the soil image, H r Represents the left histogram of the Y component of the soil image;

[0019] Flip the left histogram and the right histogram to get the corresponding broken lines of the left histogram and the right histogram respectively:

[0020]

[0021] Hl' is the new left histogram, whose domain is [min(Y), 2·peak-min(Y)], H r ' is the new right histogram, whose domain is [2·peak-max(Y),max(Y)].

[0022] Further, in step S3, Gaussian fitting is performed by the following method:

[0023] Determine the Gaussian fit curve:

[0024]

[0025] Use the Gaussian fitting curve to perform Gaussian fitting on the symmetrical broken line corresponding to the left histogram and the symmetrical broken line corresponding to the right histogram, and use the following model to perform Gaussian fitting optimization:

[0026]

[0027] Further, the brightness migration process in step S5 includes:

[0028] The brightness migration curve is:

[0029]

[0030] Where peak' is the main peak point after brightness migration, a l 、b l and c l They represent the peak value, mean value and standard deviation of the broken line after the left histogram is reversed. r 、b r 、c r They respectively represent the peak value, mean value and standard deviation corresponding to the broken line after the histogram on the right is reversed;

[0031] The main peak point peak' of the Y component histogram of the soil image after brightness migration is:

[0032] peak'=t+(peak-m)

[0033]

[0034] Wherein, t is the set target brightness mean, and m is the brightness mean of the original image. Further, in step S5, the grayscale mapping process includes:

[0035] Calculate the probability density function of the brightness gray level of the double Gaussian fitting curve:

[0036]

[0037] Calculate the cumulative density function of the brightness grayscale based on the double Gaussian fitting curve:

[0038]

[0039] Calculate the probability density function of the brightness grayscale after brightness migration:

[0040]

[0041] Calculate the cumulative probability density function of the brightness grayscale after brightness migration:

[0042]

[0043] Construct a grayscale mapping model for brightness migration:

[0044]

[0045] Wherein, y' is the brightness level after brightness level y is mapped.

[0046] Furthermore, the grayscale mapping process also includes mapping correction, which specifically includes:

[0047] Construct a brightness grayscale mapping correction optimization model:

[0048]

[0049] Where: ε is the correction term, G(·) is the convolution operator, ⊙ is the Hadamard product operator, I t is the preliminary grayscale mapping result;

[0050] The following model is used to solve the correction optimization model:

[0051] I*(r,s)=It(r,s)+ε(r,s)=round[It(r,s)+α·sign(I(r,s)-G(I(r,s)))]

[0052] Where: I * (r,s) is the final grayscale mapping result of I(r,s), round is the rounding operator, and α is a hyperparameter ranging from 1 to 3.

[0053] Beneficial effects of the present invention: Through the present invention, soil images with inconsistent natural lighting conditions can be enhanced with controllable brightness, so that the brightness of the final soil image can be controlled, the quality of the final image can be effectively ensured, and subsequent soil type identification processing is beneficial. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] The present invention will be further described below in conjunction with the accompanying drawings and embodiments:

[0055] Figure 1 It is a flow chart of the present invention.

[0056] Figure 2 The original image of a soil image for a specific example.

[0057] Figure 3 It is a Y component histogram of a specific example in the present invention.

[0058] Figure 4 for Figure 3 The symmetrical line graph is obtained after being processed in step S2.

[0059] Figure 5 for Figure 4 Schematic diagram of the Gaussian fit.

[0060] Figure 6 This is the double Gaussian fitting curve after Gaussian fitting.

[0061] Figure 7 Schematic diagram of brightness migration. DETAILED DESCRIPTION

[0062] The present invention is further described in detail below:

[0063] The present invention provides a soil image brightness controllable enhancement method based on double Gaussian fitting, comprising the following steps:

[0064] S1. Obtaining a Y component histogram of the soil image and extracting the main peak point of the Y component histogram of the soil image;

[0065] S2. Taking the main peak point of the Y component histogram of the soil image as the segmentation point, the Y component histogram of the soil image is divided into a left histogram and a right histogram, and a straight line passing through the main peak point and parallel to the vertical axis of the Y component histogram coordinate system is used as the symmetry axis to flip the left histogram and the right histogram to obtain a symmetrical polyline of the left histogram and the right histogram;

[0066] S3. Perform Gaussian fitting on the symmetrical broken line corresponding to the original left histogram and the symmetrical broken line corresponding to the original right histogram to form two Gaussian curves;

[0067] S4. Take the Gaussian curve segment corresponding to the original left histogram and the Gaussian curve segment corresponding to the original right histogram from the two Gaussian curves to form a double Gaussian fitting curve of the Y component histogram of the soil image;

[0068] S5. Performing brightness migration processing on the double Gaussian fitting curve and then performing grayscale mapping processing to obtain the brightness grayscale after brightness migration;

[0069] S6. Map and correct the brightness grayscale to obtain the Y component of the soil image after brightness controllable enhancement, and fuse the Y component of the soil image with the U component and V component of the original soil image to obtain the final soil image with controllable brightness. Through the above method, the soil image with inconsistent natural lighting conditions can be enhanced with controllable brightness, so that the brightness of the final soil image is controllable, which can effectively ensure the quality of the final image and facilitate the subsequent soil type identification process.

[0070] like Figure 2 As shown, Figure 2 What is given in FIG. 1 is a specific original soil image. The Y component histogram is extracted by processing the image (the processing method is the existing technology). Figure 3 ,exist Figure 3It can be seen that the histogram is composed of broken lines. After finding the main peak point, the symmetry axis is determined, that is, Figure 2 The dotted line in Figure 4 After flipping in the middle, we get two complete broken lines, namely Figure 4 As shown, Figure 4 The broken line at the bottom is formed by flipping the left histogram, and the broken line at the top is formed by flipping the right histogram. These two broken lines are approximately normal.

[0071] In this embodiment, in step S1, the main peak point of the Y component histogram of the soil image is obtained by the following method:

[0072]

[0073] Where H(y) is the frequency corresponding to the gray level y of the Y component of the soil image, and H(r) represents the frequency corresponding to the two gray levels r on the left and right of gray level y; N i ={y-2,y-1,y+1,y+2}. Through the above method, the peak point of the Y component histogram can be accurately determined, which provides a guarantee for the accuracy of subsequent processing.

[0074] In this embodiment, step S2 specifically includes:

[0075] The Y component histogram of the soil image is divided into the left histogram and the right histogram using the main peak point as the segmentation point:

[0076] H l ={H(y)min(Y)≤y≤peak}

[0077] Hr={H(y)peak<y≤max(Y)}

[0078] Among them, H l Represents the left histogram of the Y component of the soil image, H r Represents the left histogram of the Y component of the soil image;

[0079] Flip the left histogram and the right histogram to get the corresponding broken lines of the left histogram and the right histogram respectively:

[0080]

[0081] Hl' is the new left histogram, whose domain is [min(Y), 2·peak-min(Y)], H r ' is the new right histogram, whose domain is [2·peak-max(Y),max(Y)]. The specific comparison before and after flipping is Figure 3 and Figure 4 shown.

[0082] In this embodiment, Gaussian fitting is performed in step S3 by the following method:

[0083] Determine the Gaussian fit curve:

[0084]

[0085] Use the Gaussian fitting curve to perform Gaussian fitting on the symmetrical broken line corresponding to the original left histogram and the symmetrical broken line corresponding to the original right histogram, and use the following model to perform Gaussian fitting optimization:

[0086]

[0087] like Figure 5 As shown, after Gaussian fitting is performed by the above method, the Gaussian curve segment corresponding to the original left histogram and the Gaussian curve segment corresponding to the original right histogram are taken from the two Gaussian curves to form a double Gaussian fitting curve of the Y component histogram of the soil image, as shown in Figure 6 As shown, that is, Figure 5 Of the two fitted Gaussian curves, the lower Gaussian curve takes the left part of the peak point (i.e., corresponding to the original left histogram), and the upper Gaussian curve takes the right part (i.e., corresponding to the original right histogram) to form the Gaussian curve of the Y component. Since the fitted Y component Gaussian curve is a partial curve segment extracted from the two Gaussian curves, the Gaussian curve of the Y component histogram is a double Gaussian fitting curve.

[0088] In this embodiment, the brightness migration process in step S5 includes:

[0089] The brightness migration curve is:

[0090]

[0091] Where peak' is the main peak point after brightness migration, a l 、b l and c l They represent the peak value, mean value and standard deviation of the broken line after the left histogram is reversed, ar, b r 、c r They respectively represent the peak value, mean value and standard deviation corresponding to the broken line after the histogram on the right is reversed;

[0092] The main peak point peak' of the Y component histogram of the soil image after brightness migration is:

[0093] peak'=t+ ( peak-m )

[0094]

[0095] Among them, t is the set target brightness mean, and m is the brightness mean of the original image. Figure 7 As shown, the original double Gaussian fitting curve (solid line) is subjected to brightness migration to achieve the target brightness (shown by the dotted line).

[0096] In this embodiment, in step S5, the grayscale mapping process includes:

[0097] Calculate the probability density function of the brightness gray level of the double Gaussian fitting curve:

[0098]

[0099] Calculate the cumulative density function of the brightness grayscale based on the double Gaussian fitting curve:

[0100]

[0101] Calculate the probability density function of the brightness grayscale after brightness migration:

[0102]

[0103] Calculate the cumulative probability density function of the brightness grayscale after brightness migration:

[0104]

[0105] Construct a grayscale mapping model for brightness migration:

[0106]

[0107] Wherein, y' is the brightness level after brightness level y is mapped.

[0108] In this embodiment, the grayscale mapping process also includes mapping correction, which specifically includes:

[0109] Construct a brightness grayscale mapping correction optimization model:

[0110]

[0111] Where: ε is the correction term, G(·) is the convolution operator, ⊙ is the Hadamard product operator, I t is the preliminary grayscale mapping result;

[0112] The following model is used to solve the correction optimization model:

[0113] I*(r,s)=It(r,s)+ε(r,s)=round[It(r,s)+α·sign(I(r,s)-G(I(r,s)))]

[0114] Where: I *(r,s) is the final grayscale mapping result of I(r,s), round is the rounding operator, and α is a hyperparameter ranging from 1 to 3.

[0115] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution of the present invention, which should be included in the scope of the claims of the present invention.

Claims

1. A soil image brightness controllable enhancement method based on double Gaussian fitting, characterized by: The following steps are involved: S1. Obtaining a soil image Y component histogram and extracting the main peak point of the soil image Y component histogram; S2. Taking the main peak point of the Y component histogram of the soil image as the segmentation point, the Y component histogram of the soil image is divided into a left histogram and a right histogram, and a straight line passing through the main peak point and parallel to the vertical axis of the Y component histogram coordinate system is used as the symmetry axis to flip the left histogram and the right histogram to obtain a symmetrical polyline of the left histogram and the right histogram; S3. Perform Gaussian fitting on the symmetrical broken line corresponding to the original left histogram and the symmetrical broken line corresponding to the original right histogram to form two Gaussian curves; S4. Take the Gaussian curve segment corresponding to the original left histogram and the Gaussian curve segment corresponding to the original right histogram from the two Gaussian curves to form a double Gaussian fitting curve of the Y component histogram of the soil image; S5. Performing brightness migration processing on the double Gaussian fitting curve and then performing grayscale mapping processing to obtain the brightness grayscale after brightness migration; S6. Mapping and correcting the brightness grayscale to obtain the brightness-controllable enhanced soil image Y component, and fusing the soil image Y component with the U component and V component of the original soil image to obtain the final brightness-controllable soil image; In step S1, the main peak point of the Y component histogram of the soil image is obtained by the following method: Where H(y) is the frequency corresponding to the gray level y of the Y component of the soil image, and H(r) represents the frequency corresponding to the two gray levels r on the left and right of gray level y; N i ={y-2,y-1,y+1,y+2}; Step S2 specifically includes: The Y component histogram of the soil image is divided into the left histogram and the right histogram using the main peak point as the segmentation point: Hl={H(y)min(Y)≤y≤peak} Hr={H(y)peak<y≤max(Y)} Among them, H l Represents the left histogram of the Y component of the soil image, H r Represents the left histogram of the Y component of the soil image; Flip the left histogram and the right histogram to get the new left histogram and right histogram as follows: Hl' is the new left histogram, whose domain is [min(Y), 2·peak-min(Y)], H r ' is the new right histogram, whose domain is [2·peak-max(Y),max(Y)]; In step S3, Gaussian fitting is performed by the following method: Determine the Gaussian fit curve: Use the Gaussian fitting curve to perform Gaussian fitting on the symmetrical broken line corresponding to the original left histogram and the symmetrical broken line corresponding to the original right histogram, and use the following model to perform Gaussian fitting optimization: s.t.a l =a r 。 2. The soil image brightness controllable enhancement method based on double Gaussian fitting according to claim 1 is characterized in that: The brightness migration process in step S5 includes: The brightness migration curve is: Where peak' is the main peak point after brightness migration, a l 、b l and c l They represent the peak value, mean value and standard deviation of the broken line after the left histogram is reversed, ar, b r 、c r They respectively represent the peak value, mean value and standard deviation corresponding to the broken line after the histogram on the right is reversed; The main peak point of the Y component histogram of the soil image after brightness migration is: peak'=t+ ( peak-m ) Among them, t is the set target brightness mean, and m is the brightness mean of the original image.

3. The soil image brightness controllable enhancement method based on double Gaussian fitting according to claim 2 is characterized in that: In step S5, the grayscale mapping process includes: Calculate the probability density function of the brightness gray level of the double Gaussian fitting curve: Calculate the cumulative density function of the brightness grayscale based on the double Gaussian fitting curve: Calculate the probability density function of the brightness grayscale after brightness migration: Calculate the cumulative probability density function of the brightness grayscale after brightness migration: Construct a grayscale mapping model for brightness migration: Wherein, y' is the brightness level after brightness level y is mapped.

4. The soil image brightness controllable enhancement method based on double Gaussian fitting according to claim 3 is characterized in that: Grayscale mapping processing also includes mapping correction, including: Construct a brightness grayscale mapping correction optimization model: Where: ε is the correction term, G(·) is the convolution operator, ⊙ is the Hadamard product operator, I t is the preliminary grayscale mapping result; The following model is used to solve the correction optimization model: I*(r,s)=It(r,s)+ε(r,s)=round[It(r,s)+α·sign(I(r,s)-G(I(r,s)))] where: I * (r,s) is the final grayscale mapping result of I(r,s), round is the rounding operator, and α is a hyperparameter ranging from 1 to 3.

Citation Information

Patent Citations

  • License plate enhancement method and device and electronic equipment

    CN110390643A

  • Peak detection method

    WO2015033478A1