A soil color determination method and system based on wet luster adaptive compensation

By marking specular candidate pixels in the HSV color space and calculating the wetness/gloss index by combining specular reflection and texture attenuation features, piecewise linear compensation is performed, which solves the problem of the influence of wetness/gloss in soil color determination and improves the consistency and accuracy of determination.

CN122312786APending Publication Date: 2026-06-30XUZHOU NORMAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-03-19
Publication Date
2026-06-30

AI Technical Summary

Technical Problem

Existing technologies cannot explicitly quantify and compensate for the effects of moisture/gloss, nor can they suppress the interference of reflective highlights, leading to inconsistent soil color determination.

Method used

By marking candidate pixels for highlights in the HSV color space and removing connected components, a set of effective pixels is obtained. Wetness/gloss index is calculated by combining specular reflection features and texture attenuation features. Piecewise linear compensation is performed to the CIELAB color space, and the Munsell soil color library is matched to output the judgment result.

Benefits of technology

Explicitly quantifies the effects of moisture/gloss, reduces specular reflection bias, improves the consistency of soil color determination under dry and wet conditions, and prompts for re-acquiring images when unreliable determinations are made, thereby reducing false positives.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122312786A_ABST
    Figure CN122312786A_ABST
Patent Text Reader

Abstract

This invention discloses a soil color determination method and system based on adaptive compensation for wetness and gloss, belonging to the field of computer vision and agricultural information technology. The method includes: 1) extracting the soil region of interest (ROI); 2) identifying highlights within the ROI based on HSV thresholds and removing highlights by combining connected component area constraints to obtain a set of effective pixels; 3) fusing highlight proportion and texture energy attenuation to construct a wetness / gloss index W; 4) converting the effective pixels to CIELAB and robustly statistically obtaining the observed color value; 5) performing piecewise linear compensation on L*, a*, and b* based on W to obtain the equivalent color value of dry soil; 6) performing ΔE matching between the equivalent color value of dry soil and a pre-set Munsell soil color library reference Lab to output Munsell encoding and confidence level; 7) prompting resampling if the highlight proportion or color difference exceeds the threshold, thereby solving the technical problems of existing technologies that cannot explicitly quantify and compensate for the influence of wetness / gloss, and cannot suppress reflective highlight interference.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the fields of computer vision and agricultural information technology, and in particular to a method and system for determining soil color based on adaptive compensation for wetness and luster. Background Technology

[0002] Soil color is widely used in soil classification, survey mapping, fertility diagnosis, and ecological monitoring. Traditional manual color determination relies on Munsell Soil Color Charts, which suffers from strong subjectivity and is greatly affected by light. Existing image-based color determination methods often convert soil images to RGB / HSV and directly calculate the mean for matching or classification. However, in real-world scenarios, soil moisture causes significant color shifts: on the one hand, moisture reduces brightness and changes chromaticity; on the other hand, surface water films and particle arrangement enhance specular reflection, creating localized highlight areas that cause color statistics to bias towards brighter and grayer areas, resulting in inconsistent Munsell codes for the same soil sample under wet and dry conditions. Therefore, there is an urgent need for a soil color determination method and system that can explicitly quantify and compensate for the effects of moisture / gloss while suppressing interference from reflected highlights. Summary of the Invention

[0003] This invention provides a soil color determination method and system based on adaptive compensation for moisture and gloss, in order to solve the technical problems of existing technologies that cannot explicitly quantify and compensate for the effects of moisture / gloss, and cannot suppress the interference of reflective highlights.

[0004] To achieve the above objectives, the technical solution adopted by the present invention is as follows: This invention provides a soil color determination method based on adaptive compensation for wet gloss, comprising: S1. Obtain an image containing the soil area; S2. Extract soil regions from the image to obtain the region of interest (ROI) for the soil. S3. Within the ROI, convert the pixels to the HSV color space, mark the candidate pixels for highlights according to the threshold conditions V≥τV and S≤τS, and perform connected component analysis on the candidate pixels for highlights to remove connected components with an area smaller than τA1 or greater than τA2, thereby obtaining the set of highlight pixels Ps. S4. Remove Ps from the pixels in the ROI to obtain the effective pixel set Pe; S5. Calculate the wetness / gloss index W based on the Pe. The W is determined by fusing the specular reflection feature H and the texture attenuation feature T. The specular reflection feature H includes at least the proportion of highlight pixels, and the texture attenuation feature T includes at least the Laplacian energy or gradient energy. S6. Convert the color of Pe to the CIELAB color space and use robust statistics to obtain the observed color value C_wet=(L_w,a_w,b_w); S7. Based on W, perform piecewise linear compensation on the observed color value to obtain the equivalent color value of dry soil C_dry=(L_d,a_d,b_d); S8. Calculate the color difference ΔE between C_dry and the reference Lab value corresponding to each Munsell code in the preset Munsell soil color library, output the Munsell color code corresponding to the smallest ΔE as the judgment result, and output the confidence level.

[0005] Furthermore, in S3, the threshold value of τV is 0.85 to 0.95, the threshold value of τS is 0.10 to 0.25, and V and S are HSV components normalized to 0 to 1; the connected component area threshold satisfies: τA1 is 0.01% to 0.10% of the total number of ROI pixels, and τA2 is 2% to 10% of the total number of ROI pixels.

[0006] Furthermore, in S5, the proportion of highlight pixels is defined as r_s = |Ps| / |ROI|, and r_s is used as at least one input to the specular reflection feature H; the texture attenuation feature T is calculated using one of the following methods: Laplacian energy: apply the Laplacian operator to the grayscale image of Pe, and take the absolute mean or square mean as the energy; gradient energy: calculate the Sobel gradient magnitude of Pe, and take the mean or square mean as the energy; W is determined by the following fusion method: first, normalize H and T respectively to obtain , The W satisfies W=α· +(1-α)·(1- ), where α ranges from 0.5 to 0.8.

[0007] Furthermore, in S6, the robust statistics are the median or the truncated mean; the truncated mean is the mean after removing the upper and lower 5% to 15% of pixels from each of the L*, a*, and b* components, where L*: brightness, representing the lightness or darkness of a color, with a value range of 0 to 100, the larger the value, the brighter the color, and the smaller the value, the darker the color; a*: red-green axis chromaticity component, representing the direction of change from green to red, a*<0 leans towards green, a*>0 leans towards red; b*: yellow-blue axis chromaticity component, representing the direction of change from blue to yellow, b*<0 leans towards blue, b*>0 leans towards yellow.

[0008] Furthermore, in S7, the piecewise linear compensation satisfies the following: when W≤W0, let C_dry=C_wet; when W>W0, let L_d=L_w+kL·(W-W0), a_d=a_w+ka·(W-W0), b_d=b_w+kb·(W-W0), where W0 is 0.20~0.35, kL, ka, and kb are compensation coefficients, and the compensation coefficients satisfy the following ranges: kL is 4~12, ka is 0.5~3.0, and kb is 0.5~4.0. The compensation coefficients are obtained by fitting paired samples of the same soil sample collected in dry and wet states, and the fitting objective is to minimize the ΔE between the compensated C_dry and the reference color in the dry state.

[0009] Furthermore, in S8, ΔE is calculated using CIELAB's ΔE*ab method or ΔE2000 method.

[0010] Furthermore, in S8, the confidence level is determined by at least the minimum color difference ΔE1 and the second smallest color difference ΔE2, and the confidence level increases as ΔE1 decreases, and the confidence level increases as (ΔE2-ΔE1) increases.

[0011] Furthermore, the method also includes, when r_s exceeds the threshold r_max, where r_max is between 0.08 and 0.20, outputting an undeterminable flag and prompting the user to re-acquire the image.

[0012] Furthermore, the method also includes outputting an undetermined marker and prompting the user to re-acquire the image when the minimum color difference ΔE1 is greater than the threshold E_max, where E_max is between 8 and 15.

[0013] The present invention also provides a soil color determination system based on adaptive compensation for wet gloss, comprising: Acquisition module: Used to acquire images containing soil areas; Extraction module: used to extract soil regions from the image to obtain the region of interest (ROI) for the soil. The marking module is used to convert pixels within the ROI to the HSV color space, mark specular candidate pixels according to the threshold conditions V≥τV and S≤τS, and perform connected component analysis on the specular candidate pixels to remove connected components with an area smaller than τA1 or greater than τA2, thereby obtaining the specular pixel set Ps. Elimination module: used to remove Ps from the pixels in the ROI to obtain the effective pixel set Pe; Calculation module: used to calculate the wetness / gloss index W based on the Pe, wherein W is determined by fusing specular reflection feature H and texture attenuation feature T, wherein the specular reflection feature H includes at least the proportion of highlight pixels, and the texture attenuation feature T includes at least Laplacian energy or gradient energy; Conversion module: used to convert the color of Pe to CIELAB color space, and use robust statistics to obtain the observed color value C_wet=(L_w,a_w,b_w); Compensation module: used to perform piecewise linear compensation on the observed color value based on W to obtain the dry soil equivalent color value C_dry=(L_d,a_d,b_d); Output module: used to calculate the color difference ΔE between the C_dry and the reference Lab value corresponding to each Munsell code in the preset Munsell soil color library, output the Munsell color code corresponding to the smallest ΔE as the judgment result, and output the confidence level.

[0014] Compared with the prior art, the technical solution disclosed in this invention has the following beneficial effects: Compared with the prior art, the present invention has the following advantages: 1) It reduces the color bias caused by specular reflection by removing specular highlights; 2) It constructs W by fusing the specular highlight ratio and texture attenuation energy, so that the effects of wetness / gloss are explicitly quantified and participate in compensation; 3) It obtains the equivalent color value of dry soil by performing piecewise linear compensation in the CIELAB standard color space, thereby improving the consistency of Munsell output for the same soil sample in both dry and wet states; 4) It prompts resampling when a reliable judgment cannot be made through ΔE minimum matching and confidence gating mechanism, thereby reducing misjudgment. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0016] Figure 1 This is a schematic diagram of the soil color determination method based on adaptive compensation for wet gloss provided in an embodiment of the present invention. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] To make the above-mentioned objects, features and advantages of the present invention more apparent and understandable, the present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0019] This invention provides a method and system for determining soil color based on adaptive compensation for moisture and gloss, which can solve the technical problems of existing technologies that cannot explicitly quantify and compensate for the effects of moisture / gloss, and cannot suppress the interference of reflective highlights.

[0020] The correspondence between the terms and symbols involved in this invention is as follows: ROI: Region of Interest in Soil; Ps: Set of Highlight Pixels; Pe: Set of Effective Pixels; CIELAB: Standard Color Space; C_wet=(L_w,a_w,b_w): Observed Color Value; W: Moisture / Gloss Index; C_dry=(L_d,a_d,b_d): Equivalent Color Value of Dry Soil; ΔE: Color Difference Measure.

[0021] like Figure 1 As shown, this embodiment of the invention provides a soil color determination method based on adaptive compensation for wet gloss, including: S1. Obtain an image containing soil regions; S2. Extract soil regions from the image to obtain the region of interest (ROI) for soil.

[0022] In this embodiment of the invention, soil regions are extracted from the input image to obtain the Region of Interest (ROI). ROI extraction can be achieved by semantic segmentation to obtain a soil mask, followed by morphological opening and closing operations to remove small connected components; or by using joint constraints of color consistency and texture consistency to remove vegetation, rocks, and root regions, ultimately obtaining the ROI.

[0023] S3. Convert the pixels within the ROI to the HSV color space. Mark the candidate pixels for highlights according to the threshold conditions V≥τV and S≤τS. Perform connected component analysis on the candidate pixels for highlights and remove connected components with an area smaller than τA1 or greater than τA2 to obtain the set of highlight pixels Ps. S4. Remove the pixels Ps from the ROI to obtain the set of effective pixels Pe.

[0024] In this embodiment of the invention, the ROI is converted to HSV (V and S are normalized to 0-1), and pixels satisfying V≥τV and S≤τS are marked as specular candidate pixels, where τV can be 0.90 (0.85-0.95) and τS can be 0.18 (0.10-0.25). Connectivity analysis is performed on the specular candidate pixels. Let the total number of ROI pixels be N_ROI, and the connected component area threshold τA1 can be 0.05%·N_ROI (0.01%-0.10%), and τA2 can be 5%·N_ROI (2%-10%). Connected components with an area smaller than τA1 and a area larger than τA2 are removed, and the remaining pixels constitute Ps. The effective pixel set Pe = ROI\Ps.

[0025] S5. Calculate the wetness / gloss index W based on Pe. W is determined by fusing the specular reflection feature H and the texture attenuation feature T. The specular reflection feature H includes at least the proportion of highlight pixels, and the texture attenuation feature T includes at least the Laplacian energy or gradient energy.

[0026] In this embodiment of the invention, wetness and gloss are typically manifested as enhanced specular reflection and decreased texture contrast. In this embodiment: the specular reflection feature H at least includes a highlight ratio r_s = |Ps| / |ROI|; the texture attenuation feature T at least includes Laplacian energy or gradient energy. Normalizing H and T yields... and According to W=α· +(1-α)·(1- The blending factor is α, which can be 0.65 (0.5-0.8). The more highlights and the weaker the texture energy, the larger W is, indicating a more moist / glossy appearance.

[0027] S6. Convert the color of Pe to the CIELAB color space and use robust statistics to obtain the observed color value C_wet=(L_w,a_w,b_w).

[0028] In this embodiment of the invention, the effective pixel set Pe is converted to CIELAB space, and the observed color values ​​are obtained by truncating the mean of L*, a*, and b* respectively: after removing the upper and lower 10% (5% to 15%) of pixels, the mean is calculated to obtain C_wet=(L_w,a_w,b_w).

[0029] S7. Based on W, piecewise linear compensation is performed on the observed color values ​​to obtain the equivalent color value of dry soil C_dry=(L_d,a_d,b_d).

[0030] In this embodiment of the invention, the threshold W0 is set to 0.28 (0.20~0.35). When W≤W0, it is considered close to dry soil, and C_dry=C_wet; when W>W0, compensation is performed: L_d=L_w+kL·(W-W0), a_d=a_w+ka·(W-W0), b_d=b_w+kb·(W-W0). Example coefficients: kL=8 (4~12), ka=1.6 (0.5~3.0), kb=2.2 (0.5~4.0). The compensation coefficients are preferably obtained by fitting paired samples of the same soil sample in dry and wet conditions, so that the ΔE between C_dry after compensation and the dry reference color is minimized.

[0031] S8. Calculate the color difference ΔE between C_dry and the reference Lab value corresponding to each Munsell code in the preset Munsell soil color library, output the Munsell color code corresponding to the smallest ΔE as the judgment result, and output the confidence level.

[0032] In this embodiment of the invention, a Munsell soil color library is pre-set. Each record in the library contains a Munsell code and its corresponding reference Lab value under standard lighting conditions. ΔE is calculated between the dry soil equivalent color value C_dry and the reference Lab in the library. The Munsell code corresponding to the smallest ΔE is output as the determination result. The minimum color difference ΔE1 and the second smallest color difference ΔE2 are calculated, and the confidence level is calculated by combining the highlight ratio r_s and W. Example: The confidence level increases as ΔE1 decreases and (ΔE2-ΔE1) increases. When r_s exceeds the threshold r_max (0.08~0.20) or ΔE1 is greater than the threshold E_max (8~15), an undeterminable marker is output and a resampling prompt is given, for example, by changing the shooting angle to avoid reflection, blocking direct light, or waiting for the surface water film to recede.

[0033] Furthermore, in S3, the threshold for τV is 0.85–0.95, the threshold for τS is 0.10–0.25, and V and S are HSV components normalized to 0–1; the connected region area threshold satisfies: τA1 is 0.01%–0.10% of the total number of ROI pixels, and τA2 is 2%–10% of the total number of ROI pixels.

[0034] Furthermore, in S5, the proportion of specular pixels is defined as r_s = |Ps| / |ROI|, and r_s is used as at least one input to the specular reflection feature H; the texture attenuation feature T is calculated using one of the following methods: Laplacian energy: apply the Laplacian operator to the grayscale image of Pe, and take the absolute mean or square mean as the energy; gradient energy: calculate the Sobel gradient magnitude for Pe, and take the mean or square mean as the energy; W is determined by the following fusion method: first, normalize H and T respectively to obtain , W satisfies W=α· +(1-α)·(1- ), where α ranges from 0.5 to 0.8.

[0035] Furthermore, in S6, robust statistics are the median or truncated mean. The truncated mean is the average of the L*, a*, and b* components after removing the upper and lower 5% to 15% of pixels respectively. Among them, L*: lightness, representing the brightness of the color, with a value range of 0 to 100. The larger the value, the brighter the color, and the smaller the value, the darker the color. a*: red-green axis chromaticity component, representing the direction of change from green to red. a*<0 leans towards green, and a*>0 leans towards red. b*: yellow-blue axis chromaticity component, representing the direction of change from blue to yellow. b*<0 leans towards blue, and b*>0 leans towards yellow.

[0036] Furthermore, in S7, the piecewise linear compensation satisfies the following: when W≤W0, let C_dry=C_wet; when W>W0, let L_d=L_w+kL·(W-W0), a_d=a_w+ka·(W-W0), b_d=b_w+kb·(W-W0), where W0 takes values ​​from 0.20 to 0.35, and kL, ka, and kb are compensation coefficients. The compensation coefficients satisfy the following ranges: kL takes values ​​from 4 to 12, ka takes values ​​from 0.5 to 3.0, and kb takes values ​​from 0.5 to 4.0. The compensation coefficients are obtained by fitting paired samples of the same soil sample collected in both dry and wet states. The fitting objective is to minimize the ΔE between the compensated C_dry and the reference color in the dry state.

[0037] Furthermore, in S8, ΔE is calculated using CIELAB's ΔE*ab method, or using the ΔE2000 method.

[0038] Furthermore, in S8, the confidence level is determined by at least the minimum color difference ΔE1 and the second smallest color difference ΔE2, and the confidence level increases as ΔE1 decreases and as (ΔE2-ΔE1) increases.

[0039] Furthermore, the method also includes outputting an undetermined flag and prompting the user to reacquire the image when r_s exceeds the threshold r_max, where r_max is between 0.08 and 0.20.

[0040] Furthermore, the method also includes outputting an undetermined marker and prompting the user to re-acquire the image when the minimum color difference ΔE1 is greater than the threshold E_max, where E_max is between 8 and 15.

[0041] Based on the same idea, this invention also provides a soil color determination system based on adaptive compensation for wet gloss, comprising: Acquisition module: Used to acquire images containing soil areas; Extraction module: Used to extract soil regions from images to obtain the region of interest (ROI) for the soil. The labeling module is used to convert pixels within the ROI to the HSV color space, label candidate specular pixels based on the threshold conditions V≥τV and S≤τS, and perform connected component analysis on the candidate specular pixels to remove connected components with an area smaller than τA1 or greater than τA2, thus obtaining the set of specular pixels Ps. The removal module is used to remove pixels Ps from the ROI to obtain the effective pixel set Pe; Calculation module: used to calculate the wetness / gloss index W based on Pe. W is determined by fusing specular reflection feature H and texture attenuation feature T, where specular reflection feature H includes at least the proportion of highlight pixels, and texture attenuation feature T includes at least Laplacian energy or gradient energy. Conversion module: Used to convert the color of Pe to the CIELAB color space and obtain the observed color value C_wet=(L_w,a_w,b_w) using robust statistics; Compensation module: Used to perform piecewise linear compensation on the observed color value based on W, to obtain the equivalent color value of dry soil C_dry=(L_d,a_d,b_d); Output module: Used to calculate the color difference ΔE between C_dry and the reference Lab value corresponding to each Munsell code in the preset Munsell soil color library, output the Munsell color code corresponding to the smallest ΔE as the judgment result, and output the confidence level.

[0042] The basic principles of the present invention have been described above with reference to specific embodiments. However, it should be noted that the advantages, benefits, and effects mentioned in the present invention are merely examples and not limitations, and should not be considered as essential features of each embodiment of the present invention. Furthermore, the specific details disclosed above are for illustrative and facilitative purposes only, and are not limitations. These details do not limit the present invention to the necessity of employing the aforementioned specific details.

[0043] The block diagrams of devices, apparatuses, devices, and systems involved in this invention are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, or configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, devices, and systems can be connected, arranged, and configured in any manner. Words such as “comprising,” “including,” “having,” etc., are open-ended terms meaning “including but not limited to,” and are used interchangeably with them. The terms “or” and “and” as used herein refer to the terms “and / or,” and are used interchangeably with them unless the context clearly indicates otherwise. The term “such as” as used herein refers to the phrase “such as but not limited to,” and is used interchangeably with it.

[0044] It should also be noted that in the apparatus, device, and method of the present invention, the components or steps can be disassembled and / or recombined. These disassemblies and / or recombinations should be considered as equivalent solutions of the present invention.

[0045] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the invention. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of the invention. Therefore, the invention is not intended to be limited to the aspects shown herein, but rather to be carried out within the widest scope consistent with the principles and novel features disclosed herein.

[0046] It should be understood that the qualifying terms "first", "second", "third", "fourth", "fifth" and "sixth" used in the description of the embodiments of the present invention are only used to more clearly illustrate the technical solutions and are not intended to limit the scope of protection of the present invention.

[0047] The above description has been given for purposes of illustration and description. Furthermore, this description is not intended to limit the embodiments of the invention to the forms disclosed herein. Although numerous exemplary aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, alterations, additions, and sub-combinations therein.

Claims

1. A soil color determination method based on wet shine adaptive compensation, characterized by, include: S1. Obtain an image containing the soil area; S2. Extract soil regions from the image to obtain the region of interest (ROI) for the soil. S3. Within the ROI, convert the pixels to the HSV color space, mark the candidate pixels for highlights according to the threshold conditions V≥τV and S≤τS, and perform connected component analysis on the candidate pixels for highlights to remove connected components with an area smaller than τA1 or greater than τA2, thereby obtaining the set of highlight pixels Ps. S4. Remove Ps from the pixels in the ROI to obtain the effective pixel set Pe; S5. Calculate the wetness / gloss index W based on the Pe. The W is determined by fusing the specular reflection feature H and the texture attenuation feature T. The specular reflection feature H includes at least the proportion of highlight pixels, and the texture attenuation feature T includes at least the Laplacian energy or gradient energy. S6. Convert the color of Pe to the CIELAB color space and use robust statistics to obtain the observed color value C_wet=(L_w,a_w,b_w); S7. Based on W, perform piecewise linear compensation on the observed color value to obtain the equivalent color value of dry soil C_dry=(L_d,a_d,b_d); S8. Calculate the color difference ΔE between C_dry and the reference Lab value corresponding to each Munsell code in the preset Munsell soil color library, output the Munsell color code corresponding to the smallest ΔE as the judgment result, and output the confidence level.

2. The soil color determination method based on adaptive compensation for wet gloss as described in claim 1, characterized in that, In S3, the threshold value of τV is 0.85 to 0.95, the threshold value of τS is 0.10 to 0.25, and V and S are HSV components normalized to 0 to 1; the connected region area threshold satisfies: τA1 is 0.01% to 0.10% of the total number of ROI pixels, and τA2 is 2% to 10% of the total number of ROI pixels.

3. The soil color determination method based on adaptive compensation for wet gloss as described in claim 1, characterized in that, In step S5, the proportion of highlight pixels is defined as r_s = |Ps| / |ROI|, and r_s is used as at least one input to the specular reflection feature H; the texture attenuation feature T is calculated using one of the following methods: Laplacian energy: apply the Laplacian operator to the grayscale image of Pe, and take the absolute mean or square mean as the energy; gradient energy: calculate the Sobel gradient magnitude of Pe, and take the mean or square mean as the energy; W is determined by the following fusion method: first, normalize H and T respectively to obtain , The W satisfies W=α· +(1-α)·(1- ), where α ranges from 0.5 to 0.

8.

4. The soil color determination method based on adaptive compensation for wet gloss as described in claim 1, characterized in that, In S6, the robust statistics are the median or the truncated mean; the truncated mean is the average of the L*, a*, and b* components after removing the upper and lower 5% to 15% of pixels respectively. Here, L*: brightness, representing the lightness or darkness of a color, with a value ranging from 0 to 100; a larger value indicates brighter lightness, and a smaller value indicates darker lightness. a*: red-green axis chromaticity component, representing the direction of change from green to red; a* < 0 leans towards green, a* > 0 leans towards red. b*: yellow-blue axis chromaticity component, representing the direction of change from blue to yellow; b* < 0 leans towards blue, b* > 0 leans towards yellow.

5. The soil color determination method based on adaptive compensation for wet gloss as described in claim 1, characterized in that, In step S7, the piecewise linear compensation satisfies the following: when W≤W0, let C_dry=C_wet; when W>W0, let L_d=L_w+kL·(W-W0), a_d=a_w+ka·(W-W0), b_d=b_w+kb·(W-W0), where W0 is 0.20~0.35, and kL, ka, and kb are compensation coefficients. The compensation coefficients satisfy the following ranges: kL is 4~12, ka is 0.5~3.0, and kb is 0.5~4.

0. The compensation coefficients are obtained by fitting paired samples of the same soil sample collected in dry and wet states. The fitting objective is to minimize the ΔE between the compensated C_dry and the reference color in the dry state.

6. The soil color determination method based on adaptive compensation for wet gloss as described in claim 1, characterized in that, In S8, ΔE is calculated using CIELAB's ΔE*ab method or ΔE2000 method.

7. The soil color determination method based on adaptive compensation for wet gloss as described in claim 1, characterized in that, In step S8, the confidence level is determined by at least the minimum color difference ΔE1 and the second smallest color difference ΔE2, and the confidence level increases as ΔE1 decreases, and the confidence level increases as (ΔE2-ΔE1) increases.

8. The soil color determination method based on adaptive compensation for wet gloss as described in claim 3, characterized in that, The method further includes: when r_s exceeds the threshold r_max, where r_max is between 0.08 and 0.20, outputting an undeterminable flag and prompting to re-acquire the image.

9. The soil color determination method based on adaptive compensation for wet gloss as described in claim 7, characterized in that, The method further includes: when the minimum color difference ΔE1 is greater than the threshold E_max, where E_max is between 8 and 15, an undeterminable marker is output and a prompt is made to re-acquire the image.

10. A soil color determination system based on adaptive compensation for wet gloss, characterized in that, include: Acquisition module: Used to acquire images containing soil areas; Extraction module: used to extract soil regions from the image to obtain the region of interest (ROI) for the soil. The marking module is used to convert pixels within the ROI to the HSV color space, mark specular candidate pixels according to the threshold conditions V≥τV and S≤τS, and perform connected component analysis on the specular candidate pixels to remove connected components with an area smaller than τA1 or greater than τA2, thereby obtaining the specular pixel set Ps. Elimination module: used to remove Ps from the pixels in the ROI to obtain the effective pixel set Pe; Calculation module: used to calculate the wetness / gloss index W based on the Pe, wherein W is determined by fusing specular reflection feature H and texture attenuation feature T, wherein the specular reflection feature H includes at least the proportion of highlight pixels, and the texture attenuation feature T includes at least Laplacian energy or gradient energy; Conversion module: used to convert the color of Pe to CIELAB color space, and use robust statistics to obtain the observed color value C_wet=(L_w,a_w,b_w); Compensation module: used to perform piecewise linear compensation on the observed color value based on W to obtain the dry soil equivalent color value C_dry=(L_d,a_d,b_d); Output module: used to calculate the color difference ΔE between the C_dry and the reference Lab value corresponding to each Munsell code in the preset Munsell soil color library, output the Munsell color code corresponding to the smallest ΔE as the judgment result, and output the confidence level.