Soil image enhancement method based on brightness migration and local information fusion
By combining asymmetric generalized Gaussian fitting and brightness transfer with local information fusion, the problems of controllable brightness and loss of local gradient characteristics in soil images are solved, achieving high-precision soil image enhancement.
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-01
AI Technical Summary
Existing soil image enhancement methods have shortcomings in maintaining the distribution characteristics of brightness histograms and the algorithmic complexity of fitting brightness histograms. They also ignore local information in soil images, resulting in a loss of image brightness controllability and local gradient characteristics.
Asymmetric generalized Gaussian fitting of the V component histogram of soil image is adopted. Combined with brightness transfer and local information fusion, brightness transfer is performed by fitting brightness transfer with asymmetric generalized Gaussian curve, and target transfer amount and local illumination weight are introduced to enhance the brightness of soil image. Image color is corrected by color ratio invariance.
It achieves controllable enhancement of soil image brightness, reduces the impact of block effect, maintains the local illumination information and color authenticity of the image, and improves image recognition accuracy.
Smart Images

Figure CN116363003B_ABST
Abstract
Description
Soil Image Enhancement Method Based on Brightness Transfer and Local Information Fusion Technical Field
[0001] This invention relates to the field of image processing, and specifically to a method for enhancing soil images based on brightness transfer and local information fusion. Background Technology
[0002] In the natural environment of the field, varying lighting conditions can lead to inconsistent soil information characteristics represented by images of the same soil type acquired by machine vision. If different soil images could be transformed to represent soil information characteristics under the same conditions, the accuracy of machine vision in identifying soil types would undoubtedly be improved. To reduce the impact of differences in imaging environment conditions, soil images acquired under different lighting conditions need to be adjusted to closely approximate real soil images with rated brightness acquired under certain specific natural lighting conditions; this is essentially soil image enhancement.
[0003] Current image enhancement methods mainly include nonlinear enhancement, histogram equalization, and histogram specification. Among these, histogram specification is a crucial image enhancement technique, which involves converting the input image histogram into a pre-specified or desired histogram shape using a grayscale mapping function. Histogram specification techniques can effectively improve image visual quality by enhancing image brightness and contrast, but they cannot precisely enhance image brightness. For controllable brightness enhancement of soil images, existing techniques have certain shortcomings in maintaining the distribution characteristics of the brightness histogram and the algorithmic complexity of fitting the brightness histogram, and both ignore local information in the soil image. Furthermore, the mapping algorithm in histogram specification may produce severe block artifacts, resulting in the loss of local gradient characteristics of the soil image.
[0004] Therefore, a soil image enhancement method based on brightness transfer and local information fusion 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 soil image enhancement method based on brightness transfer and local information fusion, which can achieve high-precision brightness transfer, controllable brightness enhancement of soil images with high accuracy, and the enhanced image is close to the target image collected in the real environment.
[0006] The soil image enhancement method based on brightness migration and local information fusion of the present invention includes the following steps:
[0007] S1. Fit the V component of the soil image using an asymmetric generalized Gaussian curve to obtain the fitted asymmetric generalized Gaussian curve;
[0008] S2. Perform brightness transfer on the fitted asymmetric generalized Gaussian curve to obtain the brightness-transferred soil image V component transfer result;
[0009] S3. Perform local brightness enhancement processing on the V component of the soil image to obtain the enhanced V component of the soil image after local enhancement;
[0010] S4. The soil image V component migration result and the soil image V component enhancement result are fused to obtain the fused soil image V component;
[0011] S5. Based on the color information and the proportional invariance of the three-component relationship in the original soil image, the V component of the fused soil image is processed to obtain an enhanced RGB image after color restoration.
[0012] Furthermore, step S1 specifically includes:
[0013] S11. Construct an optimization model for the V-component histogram of the soil image fitted by an asymmetric generalized Gaussian:
[0014]
[0015] Among them, pdf(v) i ) = n i / (w·h); v i It is the i-th brightness level, v i ∈[v1,v k ], n i The brightness level in the image is v i The number of pixels, w represents the width of the image, and h represents the height of the image; V = [v1, v2, ..., v3] k [ ] represents the brightness distribution domain of the V component in the soil image; AGG l (v i ) represents the left-hand side of the asymmetric generalized Gaussian, AGG r (v i () represents the right-hand side of the asymmetric generalized Gaussian;
[0016] The
[0017] The
[0018] p is an asymmetric generalized Gaussian in V = [v1, v2] k The coordinates of the peak within the range, where α is the shape parameter and σ is the peak coordinates. l σ is the scaling parameter for the left side. r This refers to the scaling parameters for the right side;
[0019] S12. By adjusting the parameter values in the optimization model, the optimization model obtains a minimum value, and the parameter values set when the minimum value is obtained are used as the optimal parameter values for the asymmetric generalized Gaussian fitting. Using the optimal parameter values for the asymmetric generalized Gaussian fitting, the fitted asymmetric generalized Gaussian curve is generated.
[0020] Furthermore, step S2 specifically includes:
[0021] Initialize the iteration count t = 0, and set the initial offset p′0 = μ v -μ target Set the threshold θ = 0.1; where μ v The mean value of the V component brightness, μ target Target brightness;
[0022] S21. Construct a brightness migration model:
[0023]
[0024] Where, μ target p represents the target brightness; p is the asymmetric generalized Gaussian luminance before brightness migration in V = [v1, v2, v3]. k The peak coordinates within the range; p′ is the offset of the brightness shift; AGG l (v′ j ) represents the left-hand side of the asymmetric generalized Gaussian, AGG r (v′ j ) represents the asymmetric generalized Gaussian right-hand side; v′ j It is the j-th brightness level after brightness shift, v′ j ∈[v′1,v′ l V′=[v′1,v′];V′=[v′1,v′] l [ ] represents the asymmetric generalized Gaussian curve luminance distribution domain after luminance transfer;
[0025] Adjust the values of each parameter in the brightness migration model to achieve the minimum value, and take the brightness migration offset set when the minimum value is achieved as the optimal brightness migration offset.
[0026] S22. Calculate the V component histogram of the soil image after brightness migration (pdf(v′)). j ), and according to the pdf(v′ j ), calculate the cumulative distribution cdf(v′) j );
[0027] in, AGG(v′ j ) is v′ j The corresponding asymmetric generalized Gaussian curve brightness migration histogram; For pdf(v′)j The corresponding cumulative distribution;
[0028] S23. Based on the single mapping law in histogram specification, using the cumulative distribution cdf(v) i ) and cdf(v′ j ) The brightness v of the input image i ∈[v1,v k ] The brightness v′ of the output image is transferred to the output image j ∈[v′1,v′ l After single mapping, the migrated luminance component V is obtained. sml V sml The corresponding histogram is in PDF format. sml (v′ j ); where v is determined according to the following formula i and v′ j :
[0029] cdf(v i ) for pdf(v i The corresponding cumulative distribution;
[0030] S24. Transfer Histogram (pdf) sml (v′ j After correction processing, the brightness-shifted soil image V component migration result V1 and the mean brightness value are obtained.
[0031] S25. Increase the iteration count by 1 to obtain the updated iteration count;
[0032] S26. Update the offset, the updated offset p′ t This is the offset corresponding to the iteration number t;
[0033] S27. Judgment | |p′ t |-|p′ t-1 | | If θ is true, the process ends; otherwise, it returns to step S21.
[0034] Furthermore, regarding the migration histogram PDF sml (v′ j The correction process includes:
[0035] From histogram PDF sml (v′ j The system counts zero points and outliers, identifies the coordinates of outliers in the mapping relationship, and remaps the outliers to zero points based on the principle of minimum distance until all outliers are corrected.
[0036] Furthermore, histogram PDF sml (v′ j The set L consisting of zero points in ()
[0037] L={v′ j |pdf sml (v′ j )=0,j∈(1,l)}.
[0038] Furthermore, histogram PDF sml (v′ j An ordered set A consisting of outliers in the data:
[0039]
[0040] Where, n′ j ≥2 indicates that at least two brightness levels in the original image are mapped to brightness levels v′ in the output image. j .
[0041] Furthermore, step S3 specifically includes:
[0042] S31. Using local and global illumination information, estimate the illumination weight D(i,j) of the image in the region with respect to pixel (i,j):
[0043] D(i,j)=1-|μ v -V m (i,j)| / (max(V m )-min(V m ),D(i,j)∈(0,1);
[0044] in, μ v V is the global mean of the V component of the soil image. m The result of mean filtering the V component using a 3×3 sliding window is max(V m ) and min(V m ) respectively represent V m The maximum and minimum values;
[0045] S32. Calculate the local increment V based on the illumination weight information. add (i,j):
[0046]
[0047] Where, μ target Indicates target brightness, μ v is the global mean of the V component of the soil image, w represents the width of the image, and h represents the height of the image;
[0048] S33. The local increment V add Superimposed on the original component, the enhanced V component of the soil image is obtained as V2(i,j) after local enhancement:
[0049] V2(i,j)=V(i,j)+V add (i,j);
[0050] Where V(i,j) is the original component in the region of pixel (i,j), V add (i,j) represents the local increment in the region of pixel (i,j).
[0051] Furthermore, the V component V3(i,j) of the fused soil image is determined according to the following formula:
[0052] V3(i,j)=(1-ω)V1(i,j)+ωV2(i,j);
[0053] Where V1(i,j) represents the V component migration result of the soil image after brightness migration, and V2(i,j) represents the V component enhancement result of the soil image after local enhancement. E norm (i,j)=(E(i,j)-min(E)) / (max(E)-min(E)); E(i,j)=|V2(i,j)-V1(i,j)|, max(E) and min(E) represent the maximum and minimum values in E, respectively; w represents the width of the image, and h represents the height of the image.
[0054] Furthermore, the enhanced RGB image after color restoration is determined according to the following formula:
[0055]
[0056] in, This represents an enhanced RGB image after color restoration. V3 represents the original RGB soil image; V3 is the V component of the fused soil image; V is the original component of the soil image.
[0057] The beneficial effects of this invention are as follows: The soil image enhancement method based on brightness migration and local information fusion disclosed in this invention maintains the skewed distribution characteristics of the soil image brightness histogram and reduces the complexity of histogram fitting by using an asymmetric generalized Gaussian to fit the V component histogram of the soil image; by introducing the target migration amount into the fitting curve and using it as the target histogram in the specification, the brightness of the soil image is controlled.
[0058] The migration histogram with outliers generated by the histogram specification mapping algorithm is corrected to reduce the impact of block effect on soil image quality. The local illumination weight is estimated using the brightness information of the V component of the soil image, the target brightness is introduced, the local brightness increment is determined according to its weight, and the local brightness increment is superimposed on the original V component to make the local illumination information of the enhanced image consistent with the original image, thus realizing controllable enhancement of soil image brightness based on local increment.
[0059] The global brightness enhancement result obtained by asymmetric generalized Gaussian brightness transfer is fused with the brightness enhancement result based on local increment. While ensuring that the soil image reaches the target brightness, the local brightness of the enhanced image is made closer to the soil image collected in the real environment. In terms of image color, the R, G and B components of the image are corrected by using the principle of color ratio invariance, which can better restore the color of the soil image. Attached Figure Description
[0060] The present invention will be further described below with reference to the accompanying drawings and embodiments:
[0061] Figure 1 is a schematic diagram of the enhancement method of the present invention;
[0062] Figure 2(a) is a schematic diagram of the soil sub-map of the present invention;
[0063] Figure 2(b) is a schematic diagram of the V component of the soil image according to the present invention;
[0064] Figure 2(c) is a schematic diagram of the V component histogram of the soil image according to the present invention;
[0065] Figure 2(d) is a schematic diagram of the V component histogram of the asymmetric generalized Gaussian fitted soil image of the present invention;
[0066] Figure 3 is a schematic diagram of the histogram after single mapping according to the present invention;
[0067] Figure 4 is a schematic diagram of the soil image histogram of brightness migration and local information fusion according to the present invention. Detailed Implementation
[0068] The present invention will be further described below with reference to the accompanying drawings, as shown in the figures:
[0069] The soil image enhancement method based on brightness migration and local information fusion of the present invention includes the following steps:
[0070] S1. Fit the V component of the soil image using an asymmetric generalized Gaussian curve to obtain the fitted asymmetric generalized Gaussian curve;
[0071] S2. Perform brightness transfer on the fitted asymmetric generalized Gaussian curve to obtain the brightness-transferred soil image V component transfer result;
[0072] S3. Perform local brightness enhancement processing on the V component of the soil image to obtain the enhanced V component of the soil image after local enhancement;
[0073] S4. The soil image V component migration result and the soil image V component enhancement result are fused to obtain the fused soil image V component;
[0074] S5. Based on the color information and the proportional invariance of the three-component relationship in the original soil image, the V component of the fused soil image is processed to obtain an enhanced RGB image after color restoration.
[0075] This invention uses an asymmetric generalized Gaussian curve to fit the histogram of the V component of a soil image, and introduces a target migration amount into the fitted curve to complete image brightness migration, achieving controllable global brightness enhancement of the soil image. Then, it estimates the illumination weights of the image in local regions using global and local information, introduces the target brightness, determines the local increment based on its weight, and superimposes the local increment onto the original V component to achieve soil image brightness enhancement based on local increments. Finally, it fuses the global brightness enhancement result obtained from the asymmetric generalized Gaussian curve brightness migration with the brightness enhancement result based on local increments to obtain controllable brightness enhancement of the soil image. Finally, based on the principle of color ratio invariance, color correction is performed on the R, G, and B components of the original soil image respectively.
[0076] In this embodiment, in order to maintain the skewed distribution characteristics of the soil image brightness histogram and reduce the complexity of histogram fitting, this paper introduces an asymmetric generalized Gaussian curve to fit the V component histogram of the soil image.
[0077] Forty-six soil images were captured under different natural lighting conditions. A 300×300 soil sub-image (excluding background) was cropped from different locations in each soil image (Figure 2(a)). Ninety-five hundred soil sub-images were randomly selected and converted from the RGB color space to the HSV color space to obtain the luminance V component (Figure 2(b)). Histogram analysis revealed that its luminance level distribution (Figure 2(c)) is continuous and generally approximates a skewed Gaussian distribution.
[0078] The brightness distribution domain of the V component in the soil image is V = [v1, v2]. k ], where v1 = v min v k =v max v min and v max Let be the minimum and maximum values of the brightness distribution domain, respectively. Then, the histogram of the V component of the soil image (pdf) is... i ) is represented as:
[0079] pdf(v i ) = n i / (w·h) (1)
[0080] Among them, v i It is the i-th brightness level, v i ∈[v1,v k ], n i The brightness level in the image is v i The number of pixels, w represents the width of the image, and h represents the height of the image. Actually, pdf represents probability density, which will not be elaborated upon here.
[0081] In the image brightness distribution domain V=[v1,v2] k Below, the V-component histogram of the soil image is fitted with an asymmetric generalized Gaussian (AGG) (as shown in Figure 2(d)). The optimization model of the V-component histogram of the soil image fitted with an asymmetric generalized Gaussian (AGG) is as follows:
[0082]
[0083] Among them, AGG l (v i ) represents the left-hand side of the asymmetric generalized Gaussian, AGG r (v i () represents the right-hand side of the asymmetric generalized Gaussian;
[0084]
[0085]
[0086]
[0087] p is an asymmetric generalized Gaussian in V = [v1, v2] k The peak coordinates, α, σ, within the range l ,σ r The parameters are the asymmetric generalized Gaussian function parameters; α is the shape parameter, and σ is the shape parameter. l σ is the scaling parameter for the left side. r This refers to the scaling parameter on the right side.
[0088] By adjusting the parameter values in the optimization model, the optimization model is made to reach its minimum value. The parameter values set when the minimum value is reached are used as the optimal parameter values for the asymmetric generalized Gaussian fitting. Using the optimal parameter values for the asymmetric generalized Gaussian fitting, the fitted asymmetric generalized Gaussian curve is generated.
[0089] In this embodiment, the fitted asymmetric generalized Gaussian curve is subjected to brightness shifting:
[0090]
[0091] Where, μ target Let p be the target brightness, and p′ be the offset for brightness migration. During migration, p+p′ replaces p in formula (2), that is, the peak point of the asymmetric generalized Gaussian curve migrates from p to p+p′, thus realizing the asymmetric generalized Gaussian curve migration.
[0092] The brightness distribution domain of the asymmetric generalized Gaussian curve after brightness transfer is V′=[v′1,v′ l ], its histogram pdf(v′ j ):
[0093]
[0094] Where, v′ j It is the j-th brightness level after brightness shift, v′ j ∈[v′1,v′ l ].
[0095] Based on the single mapping theorem in histogram specification, using the cumulative probability density distribution cdf(v) i ) and cdf(v′ j ) The brightness v of the input image i ∈[v1,v k ] The brightness v′ of the output image is transferred to the output image j ∈[v′1,v′ l ]:
[0096]
[0097] The image luminance component after single mapping is represented as V. sml Its histogram probability density is pdf sml (v′ j Histogram (pdf) sml (v′ j (As shown in Figure 3) There are abnormal increases and missing values. Analysis revealed that this is because the mapping algorithm maps multiple brightness values in the input image to a single brightness value in the output image. This causes severe blockiness in the brightness migration of the soil image, resulting in a loss of local gradient characteristics, requiring remapping correction.
[0098] To reduce the difference between the mean brightness of V1 after remapping and the mean brightness of the target image, the brightness offset p′ is iteratively adjusted to gradually approximate the target brightness of the output image. An asymmetric generalized Gaussian curve brightness transfer algorithm is used to transfer the brightness of the fitted asymmetric generalized Gaussian curve, resulting in the brightness-transferred V component of the soil image. The asymmetric generalized Gaussian curve brightness transfer algorithm is as follows:
[0099] Input: 1. Soil image V component, where v i ∈[v1,v k ]; 2. Mean value of V component brightness μ v 3. Target mean μ target .
[0100] Initialization: 1. Iteration count t = 0; 2. Set offset p′0 = μ v -μ target To reduce the number of iterations; 3. Set the threshold θ = 0.1.
[0101] Execution process: 1. Calculate the histogram of the V component and its cumulative distribution, i.e.: pdf(v i ) = n i / (w·h) and
[0102] 2. Calculate the fitted curve:
[0103] 3. repeat{
[0104] 3.1 Brightness migration:
[0105] 3.2 Calculation: and
[0106] 3.3 Perform a single mapping Obtain the migrated luminance component V sml and its histogram PDF sml (v′ j );
[0107] 3.4 Algorithm 1 was used to analyze the migration brightness histogram (pdf). sml (v′ j After correction, V1 and the mean luminance are obtained.
[0108] 3.5 Update t = t + 1;
[0109] 3.6 Update
[0110] }until(||p′t |-|p′ t-1 ||<θ)
[0111] Final output: Luminance component V1.
[0112] Algorithm 1 is a migration histogram correction algorithm. This algorithm first counts zero points and outliers from the migration histogram; then, it finds the position coordinates of outliers in the mapping relationship; finally, it remaps the outliers to zero points according to the principle of minimum distance, until all outliers are corrected.
[0113] The migration histogram correction algorithm is as follows:
[0114] Input: 1. Mapping hierarchy M = {(v1, v′1), ..., (v i ,v′ j ),...,(v k ,v′ l ),v i =v1,...,v k ,v′ j ∈[v′1,v′ l ]};
[0115] 2. Migration brightness histogram (pdf) sml (v′ j ),v′ j ∈[v′1,v′ l ].
[0116] Execution process: 1.pdf sml (v′ j The set L consists of zero points in the )
[0117] L={v′ j |pdf sml (v′ j )=0,j∈(1,l)},n L =Size(L);
[0118] 2. Detection of migration brightness histogram (PDF) sml (v′ j Anomalies:
[0119] From histogram PDF sml (v′ j ) Filter out the outlier v′ j outlier v′ j Simultaneously satisfying: 1. Histogram PDF sml (v′ j In the diagram, the outlier is v′. j The corresponding PDF sml (v′ j1. The value is greater than the mean of its neighborhood; 2. In the mapping, multiple original brightness levels v i Mapped to the same brightness level v′ j Before performing anomaly detection, the PDF was reviewed. sml (v′ j Perform a "zero removal" operation to eliminate the impact of zero data on histogram smoothing.
[0120] Obtain the set A consisting of outliers:
[0121] n A =Size(A); where n′ j ≥2 indicates that at least two brightness levels in the original image are mapped to brightness levels v′ in the output image. j ;
[0122] 3. for s=1:n A {
[0123] while(n′ s >1){
[0124] Where, n′ s The number of anomaly mappings corresponding to the s-th element in the anomaly set A is n′ mentioned above. j , indicating that there are n′ j Each pixel is mapped to the same v′ j It is based on the ordered pairs (v) in the mapping relation set M. i ,v′ j It was directly calculated, and n′ j ≥2 indicates that at least two brightness levels are mapped to the same v′. j Here, since s represents the s-th element in set A, n′ is used during algorithm execution. j Using n′ s express.
[0125] 3.1 Find the s-th element A(s) in set A and its corresponding element in set M (v i ,v′ j The position q:
[0126] for v i =v1:v k {if(v′ j =A(s)), then: q = i;}
[0127] 3.2 The outlier A(s) corresponds to v′ in M j Correct from position q to a zero point in L:
[0128] 3.2.1 if (A(s)>L(n) L)) then: repeat { v′ q = v′ q - 1; q = q - 1;} until (v′ q = L(n L ));
[0129] 3.2.2 if (A(s) < L(1)) then: repeat { v′ q = v′ q + 1; q = q + 1;} until (v′ q = L(1));
[0130] 3.2.3 if (A(s) > L(b) && A(s) < L(c)) then:
[0131] if (A(s) - L(b) > L(c) - A(s)) then: repeat { v′ q = v′ q + 1; q = q + 1;} until (v′ q = L(c));
[0132] if (A(s) - L(b) < L(c) - A(s)) then: repeat { v′ q = v′ q - 1; q = q - 1;} until (v′ q = L(b));
[0133] 3.2.4 if (|A(s) - L(b)| = |A(s) - L(c)|) then:
[0134] then:
[0135] repeat { v′ q = v′ q + 1; q = q + 1;} until (v′ q = L(c));
[0136] then:
[0137] repeat { v′ q = v′ q - 1; q = q - 1;} until (v′ q = L(b));
[0138] 3.3 n′ s = n′ s - 1;
[0139] 3.4 Update L;
[0140] }
[0141] }
[0142] Final output: Luminance component V1.
[0143] In this embodiment, the asymmetric generalized Gaussian brightness transfer only achieves overall control of the target brightness of the output soil image. In order to maintain the consistency between the local brightness difference of the enhanced soil image and the original soil image, local illumination information of the soil image is introduced to achieve local brightness enhancement of the soil image.
[0144] Using local and global illumination information, estimate the illumination weight D(i,j) of the image with respect to the region of pixel (i,j):
[0145] D(i,j)=1-|μ v -V m (i,j)| / (max(V m )-min(V m ),D(i,j)∈(0,1) (10)
[0146]
[0147] Where, μ v V is the global mean of the V component of the soil image. m The result of mean filtering the V component using a 3×3 sliding window is max(V m ) and min(V m ) respectively represent V m The maximum and minimum values.
[0148] To preserve the local illumination distribution characteristics of the image, the local increment V is obtained based on the local illumination weight information. add (i,j), as shown in the following formula:
[0149]
[0150] Where, μ target Indicates target brightness, μ v represents the global mean of the original V component, w represents the width of the image, and h represents the height of the image.
[0151] To achieve the target brightness in the image, the local increment V is... add Superimposed on the original V component, the enhanced V component of the soil image is obtained as V2(i,j) after local enhancement:
[0152]
[0153] Where V(i,j) is the original component in the region of pixel (i,j), V add (i,j) represents the local increment in the region of pixel (i,j).
[0154] In this embodiment, the optimization model of the asymmetric generalized Gaussian fitted histogram achieves the overall transfer of soil image brightness, while the local information soil image enhancement maintains the local brightness differences. The brightness transfer results of the asymmetric generalized Gaussian curve and the enhanced V component of the soil image are then fused together:
[0155] V3(i,j)=(1-ω)V1(i,j)+ωV2(i,j) (14)
[0156] in,
[0157] θ is adaptively obtained from the global average difference between V1 and V2, as shown in the following equation:
[0158] E(i,j)=|V2(i,j)-V1(i,j)| (16)
[0159] E norm (i,j)=(E(i,j)-min(E)) / (max(E)-min(E)) (17)
[0160]
[0161] Where max(E) and min(E) represent the maximum and minimum values of E, respectively. The fused luminance component V3 retains the local illumination information of the soil image and makes the target brightness of the output image (as shown in Figure 4) controllable.
[0162] In this embodiment, based on the color information and the proportional invariance of the three-component relationship in the original soil image, the enhanced RGB soil image is linearly recovered, and the enhanced RGB image after color recovery is determined according to the following formula:
[0163]
[0164] in, This represents an enhanced RGB image after color restoration. V3 represents the original RGB soil image; V3 is the V component of the fused soil image; V is the original component of the soil image.
[0165] To better understand the soil image enhancement method of the present invention, the following analysis and explanation are provided in conjunction with experiments:
[0166] 1. Experimental results and analysis of soil image migration from low to high brightness:
[0167] The algorithm presented in this paper achieves a visual effect in enhancing the brightness of the soil image that more closely resembles the target soil image than the 2-DHS and WGSF algorithms. This algorithm improves upon the shortcomings of the single-mapping algorithm in histogram specification and integrates local information from the soil image, preserving more brightness structure information of the original soil image. Therefore, the resulting image from this algorithm has a better visual effect than 2-DHS and WGSF. In the brightness transfer accuracy experiment, the brightness-transferred image from this algorithm has the smallest mean pixel difference at the same position in the V component compared to the target image, and its global mean brightness is closer to the target brightness. In the RGB color correction accuracy experiment, since both the algorithm in this paper and the WGSF algorithm use the principle of color ratio invariance to correct the soil image color, the difference in color correction accuracy between the two algorithms is not significant. However, the 2-DHS algorithm only enhances the V brightness component of the HSV three components of the image, and its average color accuracy is lower than that of the algorithm in this paper and the WGSF algorithm.
[0168] 2. Experimental results and analysis of soil image migration from high to low brightness:
[0169] When migrating from high to low brightness, the proposed algorithm still achieves a visual effect closer to the target soil image than the enhanced soil images produced by the 2-DHS algorithm and WGSF. In the brightness migration accuracy experiment, the average pixel difference between the enhanced image and the target image produced by the proposed algorithm at the same location remains the smallest. In the RGB color correction accuracy experiment, the color correction accuracy of the proposed algorithm is not significantly different from that of the WGSF algorithm, and both are superior to the 2-DHS algorithm.
[0170] 3. Experiment on the effective range of soil image brightness adjustment:
[0171] When the origin is +10 to +20, all images score 1, and no one judges the image color to be distorted. Starting from the origin +30, some images score 0.8, indicating that one person judges the image color to be distorted. Starting from the origin +40, some images are judged to be distorted by two or more people. At the origin +50, all images are judged to be distorted by at least three people. Therefore, the effective brightness range for the soil image to migrate from low to high brightness is [0,30].
[0172] From the origin -10 to -20, all images score 1, indicating no one has judged the image to be distorted. Starting from the origin -30, some images score 0.8, meaning one person has judged the image to be distorted. At the origin -40, some images have two or more people judging the image to be distorted. At the origin -50, all images have at least three people judging the image to be distorted. Therefore, the effective brightness range for the soil image to migrate from high to low brightness is [-30, 0].
[0173] 4. Accuracy experiment of soil image to target brightness migration:
[0174] During the brightness migration within the range of -30 to +30 from the origin, the 2-DHS algorithm resulted in a significantly distorted image; the WGSF algorithm also showed excessive enhancement of the resulting image as the brightness level difference increased, while the algorithm presented in this paper showed almost no distortion.
[0175] The mean value of the image migrated to high brightness using the algorithm in this paper is closer to the target brightness than that of the 2-DHS and WGSF algorithms, indicating that the algorithm in this paper has higher brightness migration accuracy within the effective range of brightness migration and outperforms the comparison algorithms. Similarly, the mean value of the image migrated to low brightness using the algorithm in this paper is closer to the target brightness than that of the 2-DHS and WGSF algorithms, indicating that the algorithm in this paper has higher brightness migration accuracy within the effective range of brightness migration and outperforms the comparison algorithms.
[0176] 5. Comparison experiment of average number of iterations and running time of the algorithm:
[0177] Using a sample set, the migration is performed within the effective brightness range. The number of iterations per image in this paper's algorithm ranges from 3 to 5, while the number of iterations per image in the WGSF algorithm ranges from 6 to 8.
[0178] Using a sample set for migration within the effective brightness range, the algorithm in this paper takes 4–7 seconds per image, with an average running time of 5.54 seconds on the sample set; the WGSF algorithm takes 4–6 seconds per image, with an average running time of 4.73 seconds on the sample set. The WGSF algorithm fits the soil image histogram using multiple Gaussian curves through a stepwise subtraction method. It only needs to fit the left part of the one-dimensional histogram repeatedly, requiring more fitting iterations but less subsequent computation after fitting, resulting in low overall time complexity.
[0179] The algorithm in this paper reduces the number of fitting iterations and increases subsequent outlier correction, achieving a time complexity of O(n^2). 3 Although the average running time of the WGSF algorithm is better than that of the algorithm in this paper, the method in this paper is more effective in solving the mapping block effect problem; while the 2-DHS algorithm is more complex due to the use of two-dimensional histogram specification and the large number of gray-level mapping combinations, with a running time of 5 to 8 seconds per image and an average running time of 6.53 seconds.
[0180] 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 soil image enhancement method based on brightness transfer and local information fusion, characterized in that: The process includes the following steps: S1. Fitting the V component of the soil image using an asymmetric generalized Gaussian curve to obtain the fitted asymmetric generalized Gaussian curve; S2. Performing brightness shifting on the fitted asymmetric generalized Gaussian curve to obtain the brightness shifted V component shifting result of the soil image; Step S2 specifically includes: initializing the number of iterations. Set the initial offset Set threshold ;in, The mean value of the V component brightness. For the target brightness; S21. Construct a brightness transfer model: ;in, Target brightness; For brightness transfer, the asymmetric generalized Gaussian in Peak coordinates within the range; This represents the offset for brightness migration; For the left-hand side of the asymmetric generalized Gaussian, This is the right-hand side of the asymmetric generalized Gaussian; It is the first after brightness shift One brightness level, ; S22. Calculate the histogram of the V component of the soil image after brightness transfer. The parameters in the brightness transfer model are adjusted to their minimum values, and the offset used to achieve this minimum value is taken as the optimal offset. and according to the Calculate the cumulative distribution ;in, ; for The corresponding asymmetric generalized Gaussian curve; for The corresponding cumulative distribution; S23. According to the single mapping law in histogram specification, using the cumulative distribution and Brightness of the input image brightness transferred to the output image After single mapping, the migrated luminance component is obtained. , The corresponding histogram is The formula is as follows: arrive Mapping: ; for The corresponding cumulative distribution; S24. For the migration histogram After correction processing, the V component migration result of the soil image after brightness migration is obtained. and average brightness S25. Increment the iteration count by 1 to obtain the updated iteration count; S26. Update the offset, the updated offset. ; Number of iterations Corresponding offset; S27. Judgment If the condition is met, the process ends; otherwise, the process returns to step S21. S3. Local brightness enhancement processing is performed on the V component of the soil image to obtain the enhanced V component of the soil image. S4. The migration result of the V component of the soil image and the enhanced V component of the soil image are fused to obtain the fused V component of the soil image. S5. Based on the color information and the proportional invariance of the three-component relationship in the original soil image, the fused V component of the soil image is processed to obtain the enhanced RGB image after color restoration.
2. The soil image enhancement method based on brightness transfer and local information fusion according to claim 1, characterized in that: Step S1 specifically includes: S11. Constructing an optimization model of the V component histogram of the soil image fitted by an asymmetric generalized Gaussian: ;in, ; It is the first One brightness level, , The brightness level in the image is The number of pixels, Indicates the width of the image. Indicates the height of the image; The brightness distribution domain of the V component in the soil image; For the left-hand side of the asymmetric generalized Gaussian, It is the right-hand side of the asymmetric generalized Gaussian; the stated The ; ; ; For asymmetric generalized Gaussian in Peak coordinates within the range For shape parameters, For left-side scaling parameters, S12. By adjusting the values of each parameter in the optimization model, the optimization model obtains the minimum value, and the parameter value set when the minimum value is obtained is used as the optimal parameter value for the asymmetric generalized Gaussian fitting. Using the optimal parameter value for the asymmetric generalized Gaussian fitting, the fitted asymmetric generalized Gaussian curve is generated.
3. The soil image enhancement method based on brightness transfer and local information fusion according to claim 1, characterized in that: migration histogram The correction process includes: adjusting the histogram... The system counts zero points and outliers, identifies the coordinates of outliers in the mapping relationship, and remaps the outliers back to the zero points based on the principle of minimum distance until all outliers are corrected.
4. The soil image enhancement method based on brightness transfer and local information fusion according to claim 3, characterized in that: Histogram The set of zero points : 。 5. The soil image enhancement method based on brightness transfer and local information fusion according to claim 3, characterized in that: Histogram An ordered set of outliers : ;in, This means that at least two brightness levels in the original image are mapped to brightness levels in the output image. 。 6. The soil image enhancement method based on brightness transfer and local information fusion according to claim 1, characterized in that: Step S3 specifically includes: S31. Using local and global illumination information, estimating the image relative to pixels. Illumination weights in regions : ;in, , The global mean of the V component of the soil image. This is the result of mean filtering the V component using a 3×3 sliding window. and They represent Maximum and minimum values; S32. Calculate the local increment based on the illumination weight information. : ;in, Indicates the target brightness. The global mean of the V component of the soil image. Indicates the width of the image. Indicates the height of the image; S33. Increments the local area. The V-component of the soil image is superimposed onto the original component to obtain the locally enhanced soil image. : ;in, For pixels The original components on the region, For pixels Local increments in the region.
7. The soil image enhancement method based on brightness transfer and local information fusion according to claim 1, characterized in that: The V component of the fused soil image is determined according to the following formula. : ;in, The result of V component migration in the soil image after brightness migration. This is the result of V-component enhancement of the soil image after local enhancement. , , ; , and They represent The maximum and minimum values; Indicates the width of the image. Indicates the height of the image.
8. The soil image enhancement method based on brightness transfer and local information fusion according to claim 1, characterized in that: The enhanced RGB image after color restoration is determined using the following formula: ;in, This represents an enhanced RGB image after color restoration. Represents the original RGB soil image; The V component of the fused soil image; This represents the original component of the soil image.
Citation Information
Patent Citations
Soil image brightness controllable enhancement method based on double Gaussian fitting
CN114757858A