Brightness controllable soil image enhancement method based on sigmoid curve fitting

By combining Sigmoid curve fitting and neighborhood information processing with Gaussian convolution kernel correction, precise and controllable enhancement of soil image brightness was achieved, solving the problems of low accuracy and color distortion in existing technologies and improving the soil image recognition effect.

CN116433510BActive Publication Date: 2026-05-29CHONGQING NORMAL UNIVERSITY +2

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
CHONGQING NORMAL UNIVERSITY
Filing Date
2023-03-20
Publication Date
2026-05-29

AI Technical Summary

Technical Problem

Existing methods for controlling the brightness of soil images are not very accurate and have significant color distortion, which affects the soil species identification effect in soil images.

Method used

A brightness-controllable soil image enhancement method based on Sigmoid curve fitting is adopted. By fitting the cumulative probability density (cdf) of the Y component of the soil image, a target brightness transfer model is constructed. Brightness transfer and color correction are performed by combining neighborhood information. Low-frequency components of U and V components are extracted using Gaussian convolution kernels to achieve controllable enhancement of brightness and color.

Benefits of technology

It achieves precise and controllable enhancement of soil image brightness, reduces color distortion, and improves image recognition performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116433510B_ABST
    Figure CN116433510B_ABST
Patent Text Reader

Abstract

The application discloses a luminance-controllable soil image enhancement method based on Sigmoid curve fitting, which comprises the following steps: S1, using Sigmoid to fit the cumulative probability density of a soil image Y component to obtain a Sigmoid fitting curve of the cumulative probability density; S2, performing luminance migration processing on the Sigmoid fitting curve to obtain a luminance-migrated Sigmoid fitting curve cdf tar ; S3, performing luminance sorting and migration processing on the soil image Y component according to the fitting curve cdf tar ; S4, correcting soil image U and V components to obtain corrected color components; S5, fusing the processed Y component and the corrected color components and converting back to an RGB color space to obtain an enhanced RGB image. The application can controllably enhance the luminance of a soil image, and has high enhancement precision and small distortion.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing, and more specifically to a brightness-controllable soil image enhancement method based on Sigmoid curve fitting. Background Technology

[0002] When identifying soil species in soil images collected in natural environments, the varying lighting conditions affect the identification of soil species, resulting in less than ideal identification results.

[0003] Currently, there are various methods to achieve accurate soil identification in images. Among these methods, the method of controllable image brightness enhancement is the most prominent. However, the current image brightness enhancement methods are not perfect. Although algorithms for controllable image brightness enhancement have been developed, the accuracy of these algorithms is not high, and the enhanced image color distortion is significant.

[0004] Therefore, a brightness-controllable soil image enhancement method based on Sigmoid curve fitting is needed to solve the above problems. Summary of the Invention

[0005] In view of this, the purpose of this invention is to overcome the defects in the prior art and provide a brightness-controllable soil image enhancement method based on Sigmoid curve fitting, which can controllably enhance the brightness of soil images with high enhancement accuracy and low distortion.

[0006] The present invention provides a brightness-controllable soil image enhancement method based on Sigmoid curve fitting, comprising the following steps:

[0007] S1. Use Sigmoid to fit the cumulative probability density cdf of the Y component of the soil image to obtain the Sigmoid fitting curve of the cumulative probability density cdf;

[0008] S2. Perform luminance shift processing on the Sigmoid fitting curve of the CDF to obtain the luminance-shifted Sigmoid fitting curve of the CDF. tar ;

[0009] S3. Based on the fitted curve cdf tar The Y component of the soil image is sorted and migrated by brightness to obtain the processed Y component.

[0010] S4. Correct the U and V components of the soil image to obtain the corrected color components;

[0011] S5. The processed Y component and the corrected color component are fused and converted back to the RGB color space to obtain an enhanced RGB image.

[0012] Furthermore, the Sigmoid fitting curve of the cumulative probability density function (cdf) is determined according to the following formula. fit (y):

[0013]

[0014] Where y is the brightness level of the Y component, u is the average brightness of the Y component, and a is the degree of inclination affecting the Sigmoid fitting curve.

[0015] The parameter a is determined using the following method:

[0016] Build an optimization model:

[0017]

[0018] Where cdf(y) is the cumulative probability density of the Y component of the soil image;

[0019] Solve the optimization model and calculate the parameter a.

[0020] Furthermore, step S2 specifically includes:

[0021] S21. Construct a target brightness mean optimization transfer model:

[0022]

[0023] in, The mean brightness of the target area for soil image migration; CDF after k migrations migrate_k The curve corresponds to the mean brightness of the image; cdf migrate_k The fitted curve of the Sigmoid function after k transitions;

[0024] S22. Set the average target brightness value An optimized transfer model is introduced to minimize the mean target brightness. The Sigmoid curve obtained when the minimum value is achieved is the CDF curve corresponding to the mean target brightness. tar .

[0025] Furthermore, step S22 specifically includes:

[0026] Initialization process:

[0027] The total migration amount after η1 performs the first migration. The target average brightness The original mean brightness value of the Y component of the soil image; the migration number k=1, the initial difference between the target mean brightness value and the mean brightness value of the image corresponding to the migrated Sigmoid fitting curve.

[0028] S221. Sigmoid fitting curve for CDF fit (y) is used for migration to obtain the Sigmoid fitting curve S after the k-th migration. move_k (y):

[0029]

[0030] Where, η k This represents the total migration amount after performing k migrations.

[0031] S222. Based on the Sigmoid fitting curve S move_k (y), calculate the CDF after the k-th migration. migrate_k The curve corresponds to the average brightness of the image.

[0032] S223. Calculate the average brightness of the target. with the mean The difference between

[0033] S224. Increment the migration count k by 1 to obtain the updated migration count k, and update the parameter η. k ;

[0034] S225. Judgment If the condition is met, proceed to step S226; otherwise, return to step S221.

[0035] S226. Mean The corresponding Sigmoid fitting curve is used as the curve CDF. tar .

[0036] Furthermore, the CDF after the k-th migration is determined according to the following formula. migrate_k The curve corresponds to the average brightness of the image.

[0037]

[0038] in,

[0039] cdf migrate_k (y)=S migrate_k (y);

[0040]

[0041] max(S move_k (y)) is S move_k The maximum value corresponding to (y), min(S)move_k (y)) is S move_k The minimum value corresponding to (y).

[0042] Furthermore, update the parameter η according to the following formula. k :

[0043]

[0044] Where, η k-1 This represents the total migration amount after performing k-1 migrations.

[0045] Furthermore, step S3 specifically includes:

[0046] S31. Based on the fitted curve cdf tar Calculate the number N pixels with brightness level t in the Y component of the enhanced target image. tar (t):

[0047] Wherein, brightness t is the minimum target brightness to be migrated; cdf tar (t) represents the fitted curve cdf corresponding to brightness t. tar W represents the width of the image, and H represents the height of the image.

[0048] S32. In the original soil image Y component cdf, find the minimum brightness y to be migrated, and calculate the number N of pixels with brightness y. org (y):

[0049] Among them, cdf org (y) is the Sigmoid fitting curve corresponding to the brightness y in the original image;

[0050] S33. If No rg (y)=N tar If (t), then migrate the brightness y to brightness t; update the minimum target brightness to be migrated t = t + 1, the original minimum target brightness to be migrated y = y + 1, and recalculate N. tar (t) and N org (y);

[0051] If N org (y) <N tar If (t), then the brightness y is migrated to the brightness t; the minimum target brightness to be migrated is still t, and N is updated. tar (t)=N tar (t)-N org (y); The minimum brightness of the soil to be migrated in the original image that has not been migrated is updated to y = y + 1, and N is recalculated. org (y);

[0052] If Norg (y)>N tar (t), neighborhood information is introduced to sort the pixels of brightness y of the Y component in the original soil image, and the top N tar The brightness y of (t) pixels is migrated to t; the minimum brightness to be migrated in the original soil image that has not been migrated remains y, and N is updated. org (y)=N org (y)-N tar (t); Update the minimum target brightness to be migrated t = t + 1, and recalculate N. tar (t);

[0053] S34. Judgment If the condition is met, the brightness migration process of the Y component is completed and the process ends; otherwise, the process returns to step S33.

[0054] Furthermore, neighborhood information is introduced to sort the pixels of the brightness y component of the original soil image, specifically including:

[0055] Introducing neighborhood information of the Y component from the original soil image, pixels with the same brightness are sorted, and the mean Y of the 3×3 neighborhood of pixels (i,j) with the same brightness y is calculated. org_avg (i,j):

[0056]

[0057] Among them, Y org_y (i+m,j+n) represents the pixel value of the pixel (i+m,j+n) corresponding to the brightness y of the Y component in the original soil image.

[0058] According to Y org_avg The value is used to sort the position information of the pixels with brightness y.

[0059]

[0060] Where, p y For sorted sets, Let Y be the coordinates of the nth pixel of brightness y. org_avgn Let be the average pixel value of the nth pixel of brightness y;

[0061] For sorted set p y For pixels with equal pixel mean, introduce 4-neighbor gradient information to calculate the neighborhood gradient value Y. org_grad :

[0062]

[0063] in, and These represent the gradients of pixel (i,j) in the horizontal and vertical directions, respectively.

[0064] According to Y org_grad The value is used to reorder the position information of the pixels with brightness y.

[0065]

[0066] in, Let Y be the coordinates of the m-th pixel of brightness y. org_gradm Let y be the gradient value of the m-th pixel of brightness y.

[0067] Furthermore, step S4 specifically includes:

[0068] The low-frequency component L of the U and V components of the original image is extracted using a Gaussian convolution kernel template θ. c :

[0069]

[0070] Where c∈{U,V} To represent convolution, θ = 1 / 16[1,4,6,4,1] = 1 / 4[1,2,1] * 1 / 4[1,2,1];

[0071] Based on the low-frequency component L c Calculate the high-frequency component H c :

[0072] H c =cL c ;

[0073] Calculate the enhancement ratio k of the Y component pixel by pixel:

[0074] k = Y tar / Y org ;

[0075] Among them, Y tar To enhance the Y component of the image, Y org The Y component of the original image;

[0076] Based on the principle of color ratio invariance, the low-frequency component L of the U and V components of each pixel is analyzed. c Perform color correction:

[0077] L new_c =k·(L c -L c_avg )+L c_avg ;

[0078] Among them, L c_avg For low-frequency component L c The mean of the neighborhood;

[0079] By controlling high frequencies based on low-frequency changes, the color components of the final enhanced image are calculated:

[0080]

[0081] Among them, c tar It is the corrected color component.

[0082] The beneficial effects of this invention are as follows: This invention discloses a brightness-controllable soil image enhancement method based on Sigmoid curve fitting. It applies a Sigmoid curve to fit the cumulative probability density (cdf) curve of the brightness (Y) component of the soil image; then, it constructs a target brightness approximation optimization model, and migrates the fitted Sigmoid curve to approximate the target brightness; furthermore, it sorts and migrates pixels with the same brightness based on the pixel's neighborhood information to achieve controllable brightness enhancement of the soil image; finally, it uses Gaussian convolution kernels to extract the low-frequency components of hue (U) and saturation (V), and enhances the high and low frequencies of the U and V components of the enhanced soil image based on the principle of color ratio invariance and the neighborhood information of the original soil image, completing color correction, and fusing the enhanced brightness components to obtain an enhanced color soil image. Attached Figure Description

[0083] The present invention will be further described below with reference to the accompanying drawings and embodiments:

[0084] Figure 1 This is a schematic diagram of the image enhancement method of the present invention;

[0085] Figure 2 This is a schematic diagram of the Y component PDF histogram of the present invention;

[0086] Figure 3 This is a schematic diagram of the CDF histogram of the Y component of the present invention;

[0087] Figure 4 This is the Sigmoid fitting curve of the CdF of the Y component of the soil image in this invention;

[0088] Figure 5 This is a schematic diagram of the block effect during migration in this invention. Detailed Implementation

[0089] The present invention will be further described below with reference to the accompanying drawings, as shown in the figures:

[0090] The present invention provides a brightness-controllable soil image enhancement method based on Sigmoid curve fitting, comprising the following steps:

[0091] S1. Use Sigmoid to fit the cumulative probability density cdf of the Y component of the soil image to obtain the Sigmoid fitting curve of the cumulative probability density cdf;

[0092] S2. Perform luminance shift processing on the Sigmoid fitting curve of the CDF to obtain the luminance-shifted Sigmoid fitting curve of the CDF. tar ;

[0093] S3. Based on the fitted curve cdf tar The Y component of the soil image is sorted and migrated by brightness to obtain the processed Y component.

[0094] S4. Correct the U and V components of the soil image to obtain the corrected color components;

[0095] S5. The processed Y component and the corrected color component are fused and converted back to the RGB color space to obtain an enhanced RGB image.

[0096] This invention optimizes the Sigmoid curve parameters by constructing an optimization model to fit the CDF curve of soil image brightness. Then, a migration factor is introduced to migrate the Sigmoid-fitted CDF curve of the soil image, approximating the target brightness and completing the brightness migration, thus achieving precise and controllable brightness enhancement of the soil image. Finally, utilizing the principle of color ratio invariance, the brightness migration results and neighborhood information of the original soil image are applied to perform color correction on the U and V components of the enhanced soil image, reducing color distortion. The effective controllable brightness range of the algorithm in this invention is [-35, 35], enabling high-precision controllable brightness enhancement of soil images.

[0097] In this embodiment, soil core samples were taken from 34 species of purple soil belonging to 4 soil genera distributed in a certain area. 378 original soil images taken under natural lighting conditions at different brightness levels were segmented into 300*300 pixel sub-images. 500 sub-images were randomly selected, and the probability density (pdf) and cumulative probability density (cdf) histograms of the Y component were statistically analyzed. The results showed that the Y component pdf histograms of all 500 sub-images exhibited a unimodal shape, such as... Figure 2 As shown; the CDF histogram of the Y component exhibits an "S"-shaped curve distribution, displaying characteristics of a Sigmoid curve, such as... Figure 3 As shown.

[0098] Using Sigmoid to fit the cumulative probability density (cdf) of the Y component of a soil image:

[0099] The Sigmoid variant is:

[0100]

[0101] 'a' represents the degree of inclination of the Sigmoid curve, and 'u' represents the center of the curve.

[0102] Fitting the cdf curve of the Y component of the original soil image:

[0103]

[0104] Where y is the brightness level of the Y component, and u is the average brightness value of the Y component.

[0105] Establish an optimization model:

[0106]

[0107] Where cdf(y) is the cumulative probability density of the Y component of the soil image;

[0108] Let u be the mean brightness value of the Y component, and calculate the optimal parameter a, such as... Figure 4 As shown, the Sigmoid fitting curve of the Y component cdf of the soil image is obtained.

[0109] In this embodiment, the target brightness mean of soil image migration is introduced. The Sigmoid curve of the CDF of the Y component of the soil image is used to establish an optimized transfer model.

[0110]

[0111] in, CDF after k migrations migrate_k The curve corresponds to the average brightness of the image.

[0112] A migration factor is introduced into the Sigmoid fitting curve of the Y component cdf of the soil image:

[0113]

[0114] Where η is the adaptive transfer factor. Then, the Sigmoid fitting curve after the k-th transfer is:

[0115]

[0116] Where, η k This represents the total migration amount after performing k migrations.

[0117] S after k migrations move_k Normalization:

[0118]

[0119] Let CDF migrate_k =S migrate_k Calculate CDF migrate_k The curve corresponds to the average brightness of the image.

[0120]

[0121]

[0122] Calculate the average brightness of the target and mean difference

[0123]

[0124] like and satisfy At that time, stop the migration and obtain The corresponding curve is cdf tar .

[0125] Otherwise update η k As shown in equation (11). Repeat equations (6) to (10) until the condition is met.

[0126] Based on the above idea of ​​introducing target brightness for CDF curve migration, the mean target brightness of the soil image is introduced into equation (4). The algorithm for transferring the Sigmoid curve of the CDF (Central Data Function) component of the soil image is as follows:

[0127] Input: Y component of soil image, mean target brightness in Y component

[0128] Output: The CDF curve corresponding to the mean brightness of the Y component target;

[0129] initialization: The total migration amount after η1 performs the first migration. The target average brightness The original mean brightness value of the Y component of the soil image; the migration number k=1, the initial difference between the target mean brightness value and the mean brightness value of the image corresponding to the migrated Sigmoid fitting curve.

[0130] process:

[0131] Step 1: Calculate the PDF and CDF of the Y component of the original soil image;

[0132] Step 2: Use equations (2) and (3) to fit cdf and obtain its Sigmoid fitting curve;

[0133] Step 3: Establish the target brightness mean optimization transfer model of equation (4), and introduce...

[0134] Repeat{

[0135] Step 4: Place η k Substitute into equation (6) to obtain the Sigmoid fitting curve; calculate the cdf after the kth migration according to equations (7) to (9). migrate_k The curve corresponds to the average brightness of the image.

[0136] Step 5: Calculate using equation (10) k = k + 1; Update η using equation (11) k ;

[0137] until (satisfies) );

[0138] Step 6: Obtain The corresponding curve is cdf tar .

[0139] In this embodiment, typically, the CDF of the original image Y component and the CDF of the enhanced image Y component are used as the basis for comparison. tar Calculate the shift value t of the original luminance level y.

[0140]

[0141] This migration can result in a "blocking effect," where multiple different original brightness levels migrate to the same brightness level. For example... Figure 5 As shown, shifting brightness levels 2, 3, 4, and 5 to 6 will result in the loss of image gradient information.

[0142] To address the "blocking effect" problem during migration, neighborhood information of the Y component of the original image is introduced. Pixels with the same brightness in the original image are sorted before migration to avoid local "blocking effects" during migration.

[0143] Based on the migration target curve CDF tar Select the minimum target brightness t to be migrated, and calculate the number N of pixels with brightness level t in the Y component of the enhanced target image. tar (t):

[0144]

[0145] Among them, cdf tar (t) represents the fitted curve cdf corresponding to brightness t. tar W represents the width of the image, and H represents the height of the image.

[0146] In the original soil image's Y component CDF, find the minimum brightness y to be migrated and calculate its pixel count:

[0147]

[0148] Among them, cdf org (y) is the Sigmoid fitting curve corresponding to the brightness y in the original image;

[0149] If No rg (y)=N tar If (t), then migrate the brightness y to brightness t; update the minimum target brightness to be migrated t = t + 1, the original minimum target brightness to be migrated y = y + 1, and recalculate N. tar (t) and N org (y); then compare N tar (t) and N org (y) Execute the new migration.

[0150] If N org (y) <N tar If (t), then the brightness y is migrated to the brightness t; the minimum target brightness to be migrated is still t, and N is updated. tar (t)=N tar (t)-N org (y); The minimum brightness of the soil to be migrated in the original image that has not been migrated is updated to y = y + 1, and N is recalculated. org (y); then compare N tar (t) and N org (y) Execute the new migration.

[0151] If N org (y)>N tar (t), neighborhood information is introduced to sort the pixels of brightness y of the Y component in the original soil image, and the top N tar The brightness y of (t) pixels is migrated to t; the minimum brightness to be migrated in the original soil image that has not been migrated remains y, and N is updated. org (y)=N org (y)-N tar (t); Update the minimum target brightness to be migrated t = t + 1, and recalculate N. tar (t); then compare N tar (t) and N org (y) Execute the new migration.

[0152] The pixels of the Y component brightness y in the original soil image are sorted by introducing neighborhood information, including:

[0153] Incorporating neighborhood information from the Y component of the original soil image, pixels with the same brightness are sorted. The mean of the 3×3 neighborhood of pixels with the same brightness (y) is calculated:

[0154]

[0155] Among them, Y org_y(i+m,j+n) represents the pixel value of the pixel (i+m,j+n) corresponding to the brightness y of the Y component in the original soil image.

[0156] According to Y org_avg The value is used to sort the position information of the pixels with brightness y.

[0157]

[0158] Where, p y For a sorted set, p Yorg_avgn Let Y be the coordinates of the nth pixel of brightness y. org_avgn Let be the pixel mean of the nth pixel of brightness y;

[0159] For p y For pixels with equal mean values, introduce 4-neighbor gradient information to calculate their neighborhood gradient value Y. org_grad :

[0160]

[0161] in, and Let Y and Y represent the gradients of pixel (i,j) in the horizontal and vertical directions, respectively; pixel (i,j) can be considered as the pixel corresponding to coordinate (i,j); org (i+1,j) represents the pixel value of the pixel (i+1,j) corresponding to the brightness y of the Y component in the original soil image; Y org (i-1,j) represents the pixel value of the pixel corresponding to the brightness y of the Y component in the original soil image; Y org (i,j+1) represents the pixel value of the pixel (i,j+1) corresponding to the brightness y of the Y component in the original soil image; Y org (i,j-1) represents the pixel value of the pixel (i,j-1) corresponding to the brightness y of the Y component in the original soil image;

[0162] According to Y org_grad The value is used to reorder the position information of the pixels with brightness y, i.e.

[0163]

[0164] Where, p Yorg_gradm Let Y be the coordinates of the m-th pixel of brightness y. org_gradm Let y be the gradient value of the m-th pixel of brightness y.

[0165] Based on the above idea of ​​sorting and migrating the Y component of soil images by brightness, a brightness sorting and migration algorithm based on neighborhood information is designed as follows:

[0166] Input: Original soil image, Y component CDF, CDFtar ;

[0167] Output: Target brightness component Y tar

[0168] Initialization: t = 0, y = 0

[0169] process:

[0170] Step 1: Based on CDF tar The curve is used to calculate the number N of pixels with a brightness of t in the Y component of the enhanced target image using equation (13). tar (t);

[0171] Step 2: Based on the cdf of the Y component of the original soil image, calculate the number N of pixels to be migrated in y using equation (14). org (y);

[0172] Repeat{

[0173] Step 3: if N org (y)=N tar (t), (Brightness y migrates to t), update t = t + 1, y = y + 1;

[0174] Step 4: if N org (y) <N tar (t), Update N tar (t)=N tar (t)-N org (y), y = y + 1;

[0175] Step 5: if N org (y)>N tar (t), according to equations (15) to (18), neighborhood information is introduced to sort the pixels of the brightness y of the Y component in the original soil image, and the top N pixels are sorted. tar (t) pixels The original soil image that has not been migrated still has a brightness of y for the soil to be migrated; update N. org (y)=N org (y)-N tar (t), t = t + 1;

[0176] Step 6: Recalculate N tar (t) and N org (y);

[0177] until (satisfies) );

[0178] Step 7: Obtain the target brightness component Y tar .

[0179] In this embodiment, to address the color difference between the soil image and the real image after brightness enhancement, color correction is performed on the U and V components.

[0180] The low-frequency component L of the U and V components of the original image is extracted using a Gaussian convolution kernel template θ. c :

[0181]

[0182] Where c∈{U,V} To represent convolution, θ = 1 / 16[1,4,6,4,1] = 1 / 4[1,2,1] * 1 / 4[1,2,1];

[0183] Based on the low-frequency component L c Calculate the high-frequency component H c :

[0184] H c =cL c (20)

[0185] Calculate the enhancement ratio k of the Y component pixel by pixel:

[0186] k = Y tar / Y org (twenty one)

[0187] Among them, Y tar To enhance the Y component of the image, Y org This represents the Y component of the original image.

[0188] Based on the principle of color ratio invariance, the low-frequency component L of the U and V components of each pixel is analyzed. c Perform color correction:

[0189] L new_c =k·(L c -L c_avg )+L c_avg (twenty two)

[0190] Among them, L c_avg To calculate L using equation (15) c The mean after the neighborhood.

[0191] Based on the changes in low frequencies, control the high frequencies, and calculate the color component c of the final enhanced image. tar :

[0192]

[0193] Among them, c tar It is the corrected color component U tar With V tar .

[0194] Finally, the enhanced luminance component Y is fused. tar Color component U tar With V tar Convert back to the RGB color space to obtain an enhanced RGB image.

[0195] To better understand the soil image enhancement method of the present invention, the following analysis and explanation are provided in conjunction with experiments:

[0196] 1. Experimental results and analysis of the accuracy of sub-image conversion from low brightness to high brightness:

[0197] The algorithm presented in this paper produces image results with overall brightness that better matches the target image than the 1-D HS, 2-D HS and WGSF algorithms. It also exhibits less color difference and distortion, and retains more brightness structure information of the original image.

[0198] When there are differences between the brightness conversion and color restoration images and the target image, the algorithm in this paper achieves the smallest difference between the converted image and the target image, resulting in the highest accuracy. Therefore, the algorithm in this paper can achieve controllable brightness and color correction when converting low-brightness sub-images to high-brightness images, with high accuracy and greater efficiency.

[0199] 2. Experimental results and analysis of the accuracy of high-brightness to low-brightness conversion in sub-images:

[0200] The algorithm in this paper is effective because converting high-brightness subimages to low-brightness subimages leads to the same conclusion as converting low-brightness subimages to high-brightness subimages.

[0201] 3. Experimental results and analysis of the effective range of brightness change during the transition from low to high brightness in a sub-image:

[0202] Starting from base point +35, a situation arises where two people consider a converted image to be distorted; starting from base point +45, a situation arises where more than two people consider a converted image to be distorted. Therefore, the effective range of brightness change for sub-images transitioning from low to high brightness is [0, 35].

[0203] 4. Experimental results and analysis of the effective range of brightness change during the transition from high brightness to low brightness in a sub-image:

[0204] Starting from base point -35, a situation arises where one person considers a converted image to be distorted; starting from base point -45, a situation arises where two or more people consider a converted image to be distorted. Therefore, the effective range of brightness change for sub-images transitioning from low to high brightness is [-35, 0].

[0205] 5. Experimental Results and Analysis of Target Brightness Accuracy for Controllable Enhancement of Soil Image Brightness:

[0206] Within a luminance enhancement transformation range of +35 from the base point, the 1-D HS algorithm, 2-D HS algorithm, and WGSF algorithm exhibit visible distortion, while the algorithm presented in this paper has the lowest distortion.

[0207] As the enhancement amplitude increases, the difference in accuracy between the mean brightness of the enhanced image results and the target brightness increases for all four algorithms. The difference in accuracy between the mean brightness of the enhanced image results and the target brightness for the algorithm in this paper is smaller than that for the 1-D HS, 2-D HS and WGSF algorithms. Therefore, the algorithm in this paper can achieve a high-precision controllable brightness transformation within the effective range [0,35] of the transformation from low-brightness sub-image to high-brightness sub-image.

[0208] The algorithm presented in this paper can still achieve high-precision controllable brightness transformation within the effective range of [-35,0] for subgraphs transitioning to lower brightness.

[0209] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the technical solutions of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.

Claims

1. A brightness-controllable soil image enhancement method based on Sigmoid curve fitting, characterized in that: Includes the following steps: S1. Fit the cumulative probability density of the Y component of the soil image using Sigmoid. To obtain the cumulative probability density The Sigmoid fitting curve; S2. To The sigmoid fitting curve is subjected to luminance shift processing to obtain the luminance shifted curve. Sigmoid fitting curve ; S3. Based on the fitted curve The Y component of the soil image is sorted and migrated by brightness to obtain the processed Y component. Step S3 specifically includes: S31. Based on the fitted curve Calculate the number of pixels with brightness level t in the Y component of the enhanced target image. : ; Wherein, brightness t is the minimum brightness of the target to be migrated; The fitted curve corresponding to brightness t; Indicates the width of the image. Indicates the height of the image; S32. In the original soil image Y component cdf, find the minimum brightness y to be migrated, and calculate the number of pixels of brightness y. : ; in, The Sigmoid fitting curve corresponding to the brightness y in the original image; S33. If = Then, the brightness y is migrated to the brightness t; the minimum target brightness to be migrated is updated to t=t+1, and the original minimum target brightness to be migrated is y=y+1, and the calculation is repeated. and ; if < Then the brightness y is migrated to the brightness t; the minimum target brightness to be migrated remains t, and the value is updated. = - The minimum brightness of the soil to be migrated in the original image that has not been migrated is updated to y=y+1, and the calculation is repeated. ; if > By introducing neighborhood information to sort the pixels of the brightness y component of the original soil image, the previous... The brightness y of each pixel is migrated to t; the minimum brightness to be migrated in the original soil image that was not migrated remains y, updated. = - Update the minimum target brightness to be migrated t=t+1, and recalculate. ; S34. Judgment If the condition is met, the brightness migration process of the Y component is completed and the process ends; otherwise, the process returns to step S33. S4. Correct the U and V components of the soil image to obtain the corrected color components; S5. The processed Y component and the corrected color component are fused and converted back to the RGB color space to obtain an enhanced RGB image.

2. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 1, characterized in that: The Sigmoid fitting curve of the cumulative probability density function (cdf) is determined using the following formula. : ; in, For the Y component brightness level, The average brightness value of the Y component. To influence the slope of the Sigmoid fitting curve; Parameters are determined using the following method. : Build an optimization model: ; in, The cumulative probability density of the Y component of the original soil image; Solve the optimization model and calculate the parameters. .

3. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 1, characterized in that: Step S2 specifically includes: S21. Construct a target brightness mean optimization transfer model: ; in, The mean brightness of the target area for soil image migration; After k migrations The curve corresponds to the average brightness of the image; The fitted curve of the Sigmoid function after k transitions; S22. Set the average target brightness value An optimized transfer model is introduced to minimize the mean target brightness. The Sigmoid fitting curve obtained at the minimum value is the CDF curve corresponding to the mean target brightness.

4. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 3, characterized in that: Step S22 specifically includes: Initialization process: , Total migration amount after performing the first migration. The target average brightness The original mean brightness value of the Y component of the soil image; number of migrations. The initial difference between the target brightness mean and the image brightness mean corresponding to the migrated Sigmoid fitted curve. =10 8 ; S221. To Sigmoid fitting curve Perform the transfer operation to obtain the Sigmoid fitting curve after the k-th transfer. : ; in, This represents the total migration amount after performing k migrations. S222. Based on the Sigmoid fitting curve Calculate the value after the k-th migration. The curve corresponds to the average brightness of the image. ; S223. Calculate the average brightness of the target. with the mean The difference between : ; S224. Increment the migration count k by 1 to obtain the updated migration count k, and update the parameters. ; S225. Judgment If the condition is met, proceed to step S226; otherwise, return to step S221. S226. Mean The corresponding Sigmoid fitting curve is used as the curve .

5. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 4, characterized in that: The k-th migration result is determined using the following formula. The curve corresponds to the average brightness of the image. : ; in, ; ; ; for The corresponding maximum value, for The corresponding minimum value.

6. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 4, characterized in that: Update parameters according to the following formula : ; in, To execute Total migration amount after each migration.

7. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 1, characterized in that: The pixels of the Y component brightness y in the original soil image are sorted by introducing neighborhood information, specifically including: By incorporating neighborhood information of the Y component of the original soil image, pixels with the same brightness are sorted, and the number of pixels with the same y component is calculated. Mean of a 3×3 neighborhood : ; in, The brightness y of the original soil image corresponds to the pixel points. Pixel values; in accordance with The value is used to sort the position information of the pixels with brightness y. ; in, For sorted sets, Let be the coordinates of the nth pixel of the brightness y. Let be the pixel mean of the nth pixel of brightness y; For sorted sets For pixels with equal pixel mean, introduce 4-neighbor gradient information to calculate the neighborhood gradient value. : ; in, and Representing pixels Gradients in the horizontal and vertical directions; The brightness y of the original soil image corresponds to the pixel points. Pixel values; The brightness y of the original soil image corresponds to the pixel points. Pixel values; The brightness y of the original soil image corresponds to the pixel points. Pixel values; The brightness y of the original soil image corresponds to the pixel points. Pixel values; in accordance with The value is used to reorder the position information of the pixels with brightness y. ; in, Let be the coordinates of the m-th pixel of the brightness y. Let y be the gradient value of the m-th pixel of brightness y.

8. The brightness-controllable soil image enhancement method based on Sigmoid curve fitting according to claim 1, characterized in that: Step S4 specifically includes: Using Gaussian convolution kernel template Extracting the low-frequency components of the U and V components of the original image : ; in, , Represents convolution. ; Based on low-frequency components Calculate high-frequency components : ; Calculate the enhancement ratio k of the Y component pixel by pixel: ; in, To enhance the Y component of the image, The Y component of the original image; Based on the principle of color ratio invariance, the low-frequency components of the U and V components of each pixel are analyzed. Perform color correction: ; in, Low-frequency components The mean of the neighborhood; By controlling high frequencies based on low-frequency changes, the color components of the final enhanced image are calculated: ; in, It is the corrected color component.