A black soil thickness identification method and system based on color standard inversion
By using a color standard inversion method, the non-standardization problem caused by differences in shooting conditions in black soil color interpretation was solved, and the automatic identification of black soil layer boundaries and thickness was realized, improving the accuracy and consistency of interpretation.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- NORTHWEST UNIV
- Filing Date
- 2026-04-13
- Publication Date
- 2026-06-26
AI Technical Summary
In the existing technology for judging the color and thickness of black soil, the colors cannot be standardized for comparison due to differences in shooting conditions. Manual judgment is highly subjective and it is difficult to automatically and accurately identify the boundary and thickness of the black soil layer.
A color standard inversion method is adopted. By acquiring black soil sample images and reference color card images, the reference color card area and black soil sample area are identified, a color standardization inversion model is constructed, representative color values of depth units are extracted along the depth direction, and black soil interpretation rules are set to achieve automatic identification of black soil layer boundaries and thickness.
It achieves accuracy and consistency in black soil thickness identification, transforms it into an automated and repeatable computer processing flow, stably identifies black soil layer boundaries, and improves the accuracy and repeatability of interpretation.
Smart Images

Figure CN122289788A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of black soil thickness identification technology, and relates to a method and system for black soil thickness identification based on color standard inversion, especially an automatic black soil color identification method. Background Technology
[0002] Black soil color is a crucial parameter for black soil identification, stratification, and thickness estimation. In black soil surveys, black soil degradation assessments, farmland quality monitoring, and soil profile analysis, color remains one of the most commonly used, intuitive, and empirically significant indicators. Existing technologies primarily include manual visual comparison with standard soil color charts for color interpretation, measurement of soil sample color under laboratory conditions, and extraction of soil color features using image processing methods for classification, stratification, or property identification. Internationally, the Munsell soil color system is commonly used as the standard expression for soil color description. The FAO Guidelines for Soil Description and the WRB (World Reference Basic for Soil Resources) also use standardized soil color descriptions as important bases for soil morphology interpretation and diagnostic layer identification. Therefore, automatic black soil image identification based on standard color systems and standardized interpretation rules has a clear technical background and practical need.
[0003] Existing technologies still have significant shortcomings and deficiencies. First, manual colorimetric methods are greatly affected by the observer's experience, ambient lighting, shadows, reflections, shooting angles, and differences in imaging equipment, resulting in strong subjectivity and insufficient consistency and repeatability. Second, most existing image recognition methods are geared towards general soil color recognition, soil type identification, or simple color value extraction, lacking a color standardization inversion mechanism specifically for black soil interpretation, making it difficult to uniformly convert color results from different images into comparable and quantifiable standard parameters. Third, although existing standard systems have provided methods for describing soil color and some interpretation criteria, these standards mainly serve manual description and judgment, and have not yet formed an integrated computer implementation scheme suitable for automatic color card recognition, abnormal highlight suppression, perspective distortion correction, stable color block reading, and continuous black soil thickness identification under on-site image conditions. For complex situations such as buried black soil and broken yellow soil, existing methods often rely only on surface color or local color for judgment, which is prone to misjudgment or omission, making it difficult to accurately identify the start and end boundaries and thickness of the black soil layer.
[0004] Therefore, it is necessary to propose a new black soil color interpretation technology. Based on the internationally accepted soil color description standards and the experience of manual black soil interpretation, the original image color is standardized and inverted into a unified V / C parameter using a reference color card. Combined with the continuous color change pattern in the depth direction, the technology can automatically identify conventional black soil, buried black soil, and broken yellow soil, thereby stably determining the boundary of the black soil layer and calculating the thickness of the black soil, improving the accuracy, repeatability and automation of black soil interpretation. Summary of the Invention
[0005] The purpose of this invention is to solve the problems in the existing black soil color interpretation and thickness identification process, such as the inability to standardize color comparison due to differences in shooting conditions, the strong subjectivity of manual interpretation, and the difficulty in automatically and accurately identifying the boundary and thickness of black soil layers. The invention provides a black soil thickness identification method and system based on color standard inversion.
[0006] To achieve the above objectives, the present invention employs the following technical solution: A method for identifying black soil thickness based on color standard inversion includes the following steps: Acquire black soil sample images and reference color chart images, and identify the reference color chart region and black soil sample region based on the black soil sample images and reference color chart images respectively; Based on the reference color card area, the color values of multiple standard color blocks are extracted, and a color normalization inversion model is constructed based on the extracted color values of multiple standard color blocks and known standard color parameters. Based on the black soil sample area, it is divided into multiple continuous depth units along the depth direction. The representative color value of each depth unit is extracted, and the representative color value of each depth unit is sequentially input into the color normalization inversion model to output the normalized color parameter corresponding to the current depth, thereby obtaining the normalized color parameter sequence along the depth direction. A black soil interpretation rule is established, and a preliminary state judgment is performed on the standardized color parameter sequence based on the black soil interpretation rule. The preliminary state judgment results are then subjected to continuous optimization processing to identify continuous black soil depth intervals that continuously meet the black soil interpretation conditions. The black soil thickness is then determined based on the starting and ending boundaries of the depth interval.
[0007] A further improvement of the present invention is that: The reference color chart image identifies the reference color chart region, including: Construct multiple candidate masks based on the reference color chart image; Candidate color card frames are extracted based on multiple candidate masks. Each candidate color card frame is scored according to geometric features and brightness index. The candidate color card frame with the highest score is selected as the initial color card area. Perspective correction is performed on the initial color chart area. The contrast between the background and the color blocks is calculated based on the corrected image. The areas of the contrast candidate color chart frames are combined to form the final score. The reference color chart area is determined based on the score. The identification of black soil sample regions based on black soil sample images includes: When the reference color chart area is obtained, a search window is established based on the reference color chart area, the gradient and texture features within the search window are calculated, and the boundary response curve is constructed. Based on the boundary response curve, the left and right boundaries of the soil sample are determined by peak detection and constraint screening. The upper and lower boundaries of the soil sample are determined along the row direction based on the continuity of the left and right boundaries, horizontal structure and texture, thus obtaining the black soil sample area.
[0008] The process involves extracting color values from multiple standard color patches based on a reference color chart region, and constructing a color normalization inversion model based on the extracted color values of the multiple standard color patches and known standard color parameters, including: Perform circular hole detection in the reference color chart area to obtain global circular hole candidates. Combine the circumferential edge support and inner and outer grayscale contrast to filter the global circular hole candidates. Cluster the coordinates of the filtered circular holes to fit the center position of the regular grid. Assign each circular hole candidate to the nearest grid position and adjust the coordinates and radius of the missing grid positions in the local neighborhood to fill in the hole positions. Based on each hole, sampling windows are established on the upper and lower sides of the hole. After excluding the hole itself and the bright reflective pixels, the color value of each standard color block is calculated. Obtain known standard color parameters, and construct a color normalization inversion model based on the known standard color parameters and the color values of each standard color patch.
[0009] The established color normalization inversion model includes: Using the known standard color parameters of each standard color patch as independent variables, construct a quadratic basis function, and use the color values read from each standard color patch as dependent variables; Weighted least squares is used for iterative solution to obtain the color surface parameters of the current image. The color of any pixel in the image is then mapped to standard color parameters using the color surface parameters.
[0010] The established color normalization inversion model includes: The color values read from each standard color patch are converted to the Lab color space. A queryable color parameter grid is constructed based on the standard color parameters of each color patch. The color value of each node in the grid is estimated by the inverse distance weighted interpolation method to form a continuous color surface. Based on the color of the image to be mapped, the node with the smallest color difference is searched on the color surface, and the standard color parameter corresponding to the node is used as the mapping result.
[0011] The process of obtaining the standardized color parameter sequence in the depth direction includes: Within the identified black soil sample area, the main soil region was segmented. The soil mass is divided into multiple continuous depth units along the depth direction of the main region. For each depth cell, extract the color set of soil pixels within that cell, and determine the representative color value of that depth cell using either the median or clustering method; The representative color value of each depth unit is input into the color normalization inversion model to obtain the normalized color parameters corresponding to that depth unit. Arrange the normalized color parameters of all depth units in depth order to generate a normalized color parameter sequence along the depth direction.
[0012] The established black soil interpretation rules involve performing layer-by-layer initial state judgment on the standardized color parameter sequence based on these rules, continuously optimizing the results of the layer-by-layer initial state judgment, identifying continuous black soil depth intervals that continuously meet the black soil interpretation conditions, and determining the black soil thickness based on the start and end boundaries of these depth intervals. This includes: Based on the black soil color standard, a threshold for the chromaticity parameter used to determine the state of black soil is set. Traverse each depth position in the standardized color parameter sequence, compare the color parameter corresponding to each depth position with the chromaticity parameter threshold, determine whether the depth position belongs to the black soil state or the non-black soil state, and form an initial state sequence based on the determination result. The initial state sequence is subjected to continuity optimization processing, and the continuous black soil segment that meets the preset minimum support thickness is identified as the anchored black soil layer. The black soil thickness is calculated based on the starting depth and ending depth of the anchored black soil layer.
[0013] A black soil thickness identification system based on color standard inversion includes: The region recognition module is used to acquire black soil sample images and reference color chart images, and to identify the reference color chart region and the black soil sample region based on the black soil sample images and reference color chart images, respectively. The model building module is used to extract the color values of multiple standard color patches based on the reference color card area, and to build a color normalization inversion model based on the extracted color values of multiple standard color patches and known standard color parameters. The black soil sample color parameter extraction module is used to divide the black soil sample area into multiple continuous depth units along the depth direction, extract the representative color value of each depth unit, and input the representative color value of each depth unit into the color normalization inversion model to output the normalized color parameter corresponding to the current depth, thereby obtaining the normalized color parameter sequence along the depth direction. The black soil thickness identification module is used to set black soil interpretation rules, perform preliminary state judgment on the standardized color parameter sequence based on the black soil interpretation rules, perform continuous optimization processing on the preliminary state judgment results, identify continuous black soil depth intervals that continuously meet the black soil interpretation conditions, and determine the black soil thickness according to the start and end boundaries of the depth interval.
[0014] A terminal device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor, when executing the computer program, implements the steps of any of the methods described above.
[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of any of the methods described herein.
[0016] Compared with the prior art, the present invention has the following beneficial effects: This invention discloses a method for identifying black soil thickness based on color standard inversion. It acquires an image containing black soil samples and a reference color chart, identifying the reference color chart region and the black soil sample region. A color standardization inversion model is established based on the color values of standard color blocks in the reference color chart region and their known standard parameters, eliminating the influence of different shooting conditions on image color and providing a unified and comparable benchmark for subsequent color interpretation. By extracting color values at multiple depth locations along the depth direction of the black soil sample region and converting them into a standardized color parameter sequence using the inversion model, a continuous and quantitative expression of the soil profile color is achieved. Then, based on preset black soil interpretation rules, the sequence is analyzed depth-by-depth, and depth intervals that continuously meet the interpretation conditions are identified to determine the black soil thickness. This transforms the black soil thickness identification process, which relies on human experience and subjective judgment, into an automated and repeatable computer processing flow, enabling stable identification of black soil layer boundaries and improving the accuracy and consistency of black soil thickness interpretation. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation on the scope. For those skilled in the art, other related drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of the method disclosed in an embodiment of the present invention; Figure 2 This is a schematic diagram of image input disclosed in an embodiment of the present invention; Figure 3 This is a schematic diagram of the color card and soil sample automatic identification results disclosed in an embodiment of the present invention; Figure 4 This is a schematic diagram of the automatic color block recognition results in the color chart disclosed in an embodiment of the present invention; Figure 5 This is a schematic diagram of the automatic identification results of black soil thickness disclosed in an embodiment of the present invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, 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. The components of the embodiments of the present invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.
[0020] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.
[0021] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0022] In the description of the embodiments of the present invention, it should be noted that if terms such as "upper," "lower," "horizontal," or "inner" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship commonly used when the product of the invention is in use, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation, and therefore should not be construed as a limitation of the present invention. Furthermore, terms such as "first" and "second" are only used to distinguish descriptions and should not be construed as indicating or implying relative importance.
[0023] Furthermore, the use of the term "horizontal" does not imply that the component must be absolutely horizontal, but rather that it can be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal than "vertical," and does not mean that the structure must be completely horizontal, but can be slightly tilted.
[0024] In the description of the embodiments of the present invention, it should also be noted that, unless otherwise explicitly specified and limited, the terms "set," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection of two components. Those skilled in the art can understand the specific meaning of the above terms in the present invention according to the specific circumstances.
[0025] The present invention will now be described in further detail with reference to the accompanying drawings: First, we will continue to explain the technical features disclosed in this embodiment: Color standardization inversion refers to the process of converting the colors of black soil samples into standardized color parameters after calibrating the image colors using a reference color chart from the same black soil image. The standardized color parameters preferably use Value and Chroma under the 10YR hue in the Munsell soil color system to uniformly represent the black soil color results.
[0026] The criteria for black soil interpretation in this embodiment do not modify existing international standards themselves. Instead, they use soil color description and diagnostic layer identification rules such as FAO and WRB as references, and combine them with experience in manual black soil interpretation to transform them into interpretation rules and processes applicable to automatic black soil image processing.
[0027] The centimeter-by-centimeter color sequence refers to a continuous color sequence formed by extracting representative colors from each centimeter or equivalent fine-grained depth unit along the depth direction of the black soil sample and then performing standardized inversion. Black soil thickness identification is based on this continuous color sequence for overall judgment, rather than relying solely on the color of a single point on the surface.
[0028] Buried black soil refers to black soil that does not appear on the surface but still exists in the lower part, meeting the criteria for interpretation. "Broken-skin yellow" refers to a condition where the surface layer is yellowed or the parent material is exposed, and there is no black soil sequence that meets the required support thickness. In the case of broken-skin yellow, this embodiment of the invention outputs a judgment result indicating that there is no black soil layer or the black soil thickness is zero.
[0029] In the preferred embodiment, the automatic detection of the reference color card, reading of the standard color block, color standardization inversion, construction of the centimeter-by-centimeter color sequence, and identification of black soil thickness can all be performed automatically by a computer; in other embodiments, manual verification can also be introduced in some steps to improve the stability of results under complex sample conditions.
[0030] For details, see Figure 1This invention discloses a method for identifying black soil thickness based on color standard inversion. The method takes an original image containing black soil samples and a reference color chart as input. Through steps such as automatic target area detection, color chart perspective correction and color block reading, color standardization inversion, soil region segmentation, centimeter-by-centimeter color sequence construction, and black soil thickness identification, it outputs the black soil layer boundary, black soil thickness, average color of the top 20cm layer, and centimeter-by-centimeter V / C profile results. It should be noted that this invention does not modify existing soil color description standards such as FAO, WRB, or Munsell. Instead, it uses internationally accepted soil color expression and interpretation standards as the target reference and combines them with experience in manual black soil interpretation, transforming them into a computer-based implementation process suitable for automatic on-site image processing.
[0031] Specifically, the following steps are included: Step S1: Image Input and Quality Check The input image must contain at least a black soil sample and a reference color chart. After reading the original image, the system first records the image size, average brightness, grayscale dynamic range, and sharpness index, and checks for overexposure, severe underexposure, overall blur, or large-area localized bright reflections. When the image quality is below a preset threshold, the system may provide a retake prompt or enter manual verification mode; when the image quality meets the requirements, it enters the subsequent automatic processing flow, see [link to relevant documentation]. Figure 2 This is a schematic diagram illustrating how the method disclosed in this embodiment is implemented on a PC.
[0032] Step S2: Automatic detection of the target area See Figure 3 The system prioritizes rule-driven automatic detection of target areas, which includes two parts: detection of reference color chart areas and detection of black soil sample areas.
[0033] Step S2.1, for the color chart area Candidate masks are constructed based on grayscale images and HSV images, including a low-saturation, high-brightness white background mask, an Otsu threshold mask after Gaussian smoothing, and a Canny edge closing operation mask. Furthermore, the outer contour is extracted on each mask, and the minimum bounding rectangle and rectangularity are calculated for each contour. Candidate regions with too small an area, abnormal aspect ratio, and those that almost cover the entire image are screened out.
[0034] Furthermore, the candidate areas are scored: the score of the candidate color chart frame is composed of average brightness, outline rectangularity, area, and center position penalty, and the one with the highest score is selected as the candidate color chart frame.
[0035] Step S2.2, for the soil sample area After detecting the color chart, the system first establishes a search window on the right side of the color chart, calculates the Scharr horizontal gradient, Scharr vertical gradient, and local texture standard deviation for the search window, and constructs a one-dimensional boundary response curve:
[0036] Furthermore, the curve was smoothed using Gaussian and peak detection was performed, and the left and right peak pairs were used as candidate soil sample boundaries.
[0037] Furthermore, constraints are imposed based on width range, internal strong peak repulsion, mean center texture, and mean horizontal edge to eliminate cases where gaps between two samples are mistakenly identified as soil sample areas. Subsequently, the upper and lower boundaries are determined along the row direction using the continuity of left and right boundaries, horizontal structure, and texture, ultimately resulting in one or more soil sample frames.
[0038] Step S3: Perspective Correction and Candidate Selection after Color Card Area Detection The candidate color card regions obtained in step S2 are not used directly as the final result. Instead, perspective correction is performed on each region to map the candidate boxes to a uniform template size.
[0039] For the corrected candidate color chart, the system extracts the grayscale statistics of the white background area at the outer edge and several preset color block sampling areas, calculates the average brightness of the background, the average brightness of the color blocks and the background-color block contrast, and combines the contrast with the candidate box area to form the final score.
[0040] By combining multi-mask candidate generation, candidate box scoring, and perspective correction optimization, the reference color chart can be stably detected under conditions of uneven lighting, tilted shooting, local reflection, and complex background.
[0041] Step S4: Color card hole detection, regular grid fitting and color patch reading See Figure 4 The color chart reading module in the program uses a global recognition strategy, rather than thresholding each color block individually. Specifically: First, Gaussian smoothing is performed on the ordinary grayscale image and the CLAHE enhanced image respectively. Then, Hough circle detection is performed under multiple parameter thresholds to obtain global circular hole candidates.
[0042] For each candidate circular hole, calculate the circumferential edge support and the inner and outer grayscale contrast, and retain only the candidates circular holes whose edge support and contrast both reach the threshold.
[0043] Furthermore, after obtaining the global candidates, the system does not directly use the Hough circle results as the final pore locations. Instead, it performs clustering on the horizontal and vertical coordinates separately to fit a regular grid center of 6 columns × 7 rows (the layout of the Munsell soil color chart). Then, each circle candidate is assigned to the nearest regular grid position; for missing pore locations, the coordinates and radius are fine-tuned in the local neighborhood to fill in the pore locations that were not successfully detected.
[0044] Furthermore, for each hole, sampling windows are established on both the top and bottom sides of the hole, and the hole itself is excluded using an enlarged hole mask. Pixels close to the white background of the paper and bright reflective pixels are further removed from the pixels in the sampling windows. Finally, robust averages are used to calculate the RGB, HSV, and Lab values of the color block. At the same time, the program analyzes the continuous change patterns of color blocks in the same row or column, marks abnormally changing color blocks as abnormal color blocks, and removes or reduces their weight in subsequent color inversion.
[0045] Step S5: Black Soil Color Standardization Inversion After reading the valid color patches from the color chart, the system does not directly interpret the black soil using the original RGB values. Instead, it establishes a color standardization inversion model based on the current photograph conditions. The goal of this model is not to define a new color standard, but to map the colors in the image affected by lighting, equipment, and shooting posture to the internationally recognized Munsell soil color representation and its Value / Chroma parameter space. This allows for subsequent unified comparison and inference based on the color description rules under the FAO and WRB systems and the experience gained from manual interpretation of black soil.
[0046] The first implementation method is quadratic surface estimation with principal component priors, specifically including: Using the standard parameters V and C corresponding to the color patches on the color chart as independent variables, construct a quadratic basis function. The program uses Lab color as the dependent variable. It reads the average parameter vector, principal component matrix, and normalized parameters from the pre-trained model package to construct the prediction matrix. The Huber-IRLS weighted least squares algorithm is used for iterative solution: the point weights are updated each time based on the residual norm. Then, by combining the ridge regularization to estimate the new latent variable z, the color surface parameters of the current image are obtained. This method can suppress the influence of outlier color patches on the overall fit when there are a few anomalies at the anchor points.
[0047] The second implementation method is interpolation of color surfaces, specifically including: The program first converts all valid color patches to Lab color space, constructs a queryable V / C grid based on the maximum chroma in each row, and then uses inverse distance weighted interpolation (IDW) to estimate the Lab value of each grid point, forming a continuous color surface. For any soil sample color value... The prediction result is obtained by searching for the grid point with the smallest Euclidean distance on the entire V / C surface. Both methods can output. , , , and The current program actually retains both surface estimation and interpolation surface methods. For any black soil sample color value, the system converts it to Lab space and compares the color difference with each candidate point on the standard color surface. The Value and Chroma corresponding to the point with the smallest color difference are selected as the standardized inversion result of the sample.
[0048] Step S6: Soil segmentation and centimeter-by-centimeter color sequence construction For each soil sample, the program first performs inward cropping to remove borders and edge noise.
[0049] Furthermore, RGB, HSV, and grayscale features are calculated to construct candidate soil masks. When generating the mask, pixel brightness is required to not exceed the high-brightness threshold, and the color should not approach obvious green areas, while retaining low-saturation dark pixels that meet the soil color range. After opening and closing operations on the mask, connected regions are extracted, and the optimal connected region is selected as the main soil region based on the principle of larger area and closer to the center.
[0050] When extracting colors from a single layer, the program prioritizes extracting colors from the intersection of the central zone and the soil area; if the intersection is too small, it returns to the soil area; if it is still insufficient, it returns to the central zone.
[0051] For the candidate pixel set, pixels in the lower shadow quantile and upper highlight quantile are first filtered according to the luminance quantile, and then one of two representative color methods is used: The first method is to directly take the median of the RGB three channels.
[0052] The second step is to perform small-scale K-means clustering on the pixel colors and take the center of the cluster with the largest proportion as the representative color.
[0053] Next, the representative color of each depth zone is fed into the color normalization inversion model in step S5 to obtain the V / C sequence for each depth. The program supports dividing the soil area into segments of 1 cm or finer granularity to form centimeter-by-centimeter profile data, while retaining the average color parameter of the surface 20 cm.
[0054] Step S7: Black Soil Thickness Identification and Special Case Handling See Figure 5The system identifies black soil thickness based on centimeter-by-centimeter V / C sequences. This interpretation process is based on standardized, inverted V / C parameters, combined with soil color description methods from the FAO and WRB standard systems, and empirical rules for manual interpretation of black soil, for automatic inference. First, an initial color assessment is performed for each depth layer: In one implementation, soil is classified as strong black soil when V≤5 and C≤3; it is classified as marginal black soil when V is slightly above the hard threshold but still within the soft threshold range (V≤5.5 and C≤3.5); otherwise, it is classified as non-black soil.
[0055] The above threshold combinations can be adjusted based on actual local black soil experience samples, black soil moisture conditions, standard color chart systems, and interpretation needs, but all belong to the implementation method of automated judgment based on standard color expression. Subsequently, the effective area ratio of the soil and color matching error are considered. Dynamic planning optimization is performed on the continuity between upper and lower layers to reduce thickness jumps caused by misjudgment of a single layer.
[0056] Regarding thickness rules, the program considers black soil segments whose length reaches the minimum support thickness within a continuous black soil section as anchored black soil segments; the current minimum support thickness is 10cm. For short gaps between two adjacent anchored black soil segments, bridging corrections can be performed based on the black soil percentage. For cases with surface cover but underlying anchored black soil segments, the program allows identifying the thin surface cover layer as the cover layer for buried black soil, thereby outputting the burial depth and the thickness of the buried black soil.
[0057] For cases where the skin is broken and yellow, the embodiments of the present invention process the issue according to the following logic: "Broken-skin yellow" indicates that the surface yellowing or the parent material has been directly exposed to the surface, and the entire profile does not form a continuous black soil sequence that meets the minimum support thickness. In this case, the program does not automatically classify the surface yellowing as black soil, but instead judges based on whether there is an anchored black soil segment in the entire V / C sequence. If there is no anchored black soil segment, it is judged as having no black soil layer or a thickness of 0; if there is a black soil segment below the surface that meets the support thickness, it is judged as buried black soil, not broken-skin yellow. This achieves the distinction between the three types of cases: conventional black soil, buried black soil, and broken-skin yellow / no black soil layer.
[0058] Step S8: Output results and manual verification to close the loop. After interpretation, the system outputs the start and end depths of the black soil layer, total thickness, burial depth, burial black soil thickness, average V / C value of the top 20cm layer, and centimeter-by-centimeter profile. It also generates a marker map, statistical chart, and structured result file. The automatic recognition results can be entered into a manual verification module. After fine-tuning the color chart frame, soil sample frame, or key areas, color inversion and thickness determination are re-executed, forming a closed loop of automatic recognition—manual fine-tuning—recalculation.
[0059] Compared with the prior art, this embodiment has the following advantages: By using an integrated process of automatic identification, color standardization inversion, and thickness identification based on a reference color chart, the colors of images affected by shooting conditions can be converted into comparable standardized V / C parameters, improving the consistency of results between different images.
[0060] By using multi-mask candidate generation, candidate box scoring, perspective correction, global circular hole detection, and regular grid fitting, stable automatic recognition of reference color card areas and color block hole positions is achieved, reducing the recognition failure rate caused by tilting, occlusion, and reflection.
[0061] By using Huber-IRLS weighted quadratic surface estimation and IDW interpolation color surface, color normalization inversion can be stably completed even when abnormal color patches and local color shifts exist, thus improving the robustness of on-site images.
[0062] By segmenting the soil, constructing a centimeter-by-centimeter color sequence, making initial judgments on three states, optimizing the sequence, and identifying anchored black soil segments, it is possible to achieve unified thickness identification for conventional black soil, buried black soil, and cases without black soil layers.
[0063] By manually verifying the closed loop, the automatic detection results can be fine-tuned and recalculated under complex image conditions, thus balancing automation efficiency and result verifiability.
[0064] This embodiment also discloses a black soil thickness identification system based on color standard inversion, including: The region recognition module is used to acquire black soil sample images and reference color chart images, and to identify the reference color chart region and the black soil sample region based on the black soil sample images and reference color chart images, respectively. The model building module is used to extract the color values of multiple standard color patches based on the reference color card area, and to build a color normalization inversion model based on the extracted color values of multiple standard color patches and known standard color parameters. The black soil sample color parameter extraction module is used to divide the black soil sample area into multiple continuous depth units along the depth direction, extract the representative color value of each depth unit, and input the representative color value of each depth unit into the color normalization inversion model to output the normalized color parameter corresponding to the current depth, thereby obtaining the normalized color parameter sequence along the depth direction. The black soil thickness identification module is used to set black soil interpretation rules, perform preliminary state judgment on the standardized color parameter sequence based on the black soil interpretation rules, perform continuous optimization processing on the preliminary state judgment results, identify continuous black soil depth intervals that continuously meet the black soil interpretation conditions, and determine the black soil thickness according to the start and end boundaries of the depth interval.
[0065] A schematic diagram of a terminal device according to an embodiment of the present invention. The terminal device of this embodiment includes: a processor, a memory, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the steps in the various method embodiments described above. Alternatively, when the processor executes the computer program, it implements the functions of each module / unit in the various device embodiments described above.
[0066] The computer program can be divided into one or more modules / units, which are stored in the memory and executed by the processor to complete the present invention.
[0067] The terminal device can be a desktop computer, laptop computer, cloud server, or other device with strong computing power. The terminal device may include, but is not limited to, a processor and memory.
[0068] The optimal choice for the processor is a multi-core high-speed central processing unit (CPU).
[0069] The memory can be used to store the computer program and / or module. The processor implements various functions of the terminal device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory.
[0070] If the modules / units integrated into the terminal device are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.
[0071] The above are merely preferred embodiments of the present invention and are not intended to limit the present invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for identifying the thickness of black soil based on color standard inversion, characterized in that, Includes the following steps: Acquire black soil sample images and reference color chart images, and identify the reference color chart region and black soil sample region based on the black soil sample images and reference color chart images respectively; Based on the reference color card area, the color values of multiple standard color blocks are extracted, and a color normalization inversion model is constructed based on the extracted color values of multiple standard color blocks and known standard color parameters. Based on the black soil sample area, it is divided into multiple continuous depth units along the depth direction. The representative color value of each depth unit is extracted, and the representative color value of each depth unit is sequentially input into the color normalization inversion model to output the normalized color parameter corresponding to the current depth, thereby obtaining the normalized color parameter sequence along the depth direction. A black soil interpretation rule is established, and a preliminary state judgment is performed on the standardized color parameter sequence based on the black soil interpretation rule. The preliminary state judgment results are then subjected to continuous optimization processing to identify continuous black soil depth intervals that continuously meet the black soil interpretation conditions. The black soil thickness is then determined based on the starting and ending boundaries of the depth interval.
2. The method for identifying black soil thickness based on color standard inversion according to claim 1, characterized in that, The reference color chart image identifies the reference color chart region, including: Construct multiple candidate masks based on the reference color chart image; Candidate color card frames are extracted based on multiple candidate masks. Each candidate color card frame is scored according to geometric features and brightness index. The candidate color card frame with the highest score is selected as the initial color card area. Perspective correction is performed on the initial color chart area. The contrast between the background and the color blocks is calculated based on the corrected image. The areas of the contrast candidate color chart frames are combined to form the final score. The reference color chart area is determined based on the score. The identification of black soil sample regions based on black soil sample images includes: When the reference color chart area is obtained, a search window is established based on the reference color chart area, the gradient and texture features within the search window are calculated, and the boundary response curve is constructed. Based on the boundary response curve, the left and right boundaries of the soil sample are determined by peak detection and constraint screening. The upper and lower boundaries of the soil sample are determined along the row direction based on the continuity of the left and right boundaries, horizontal structure and texture, thus obtaining the black soil sample area.
3. The method for identifying black soil thickness based on color standard inversion according to claim 1, characterized in that, The process involves extracting color values from multiple standard color patches based on a reference color chart region, and constructing a color normalization inversion model based on the extracted color values of the multiple standard color patches and known standard color parameters, including: Perform circular hole detection in the reference color chart area to obtain global circular hole candidates. Combine the circumferential edge support and inner and outer grayscale contrast to filter the global circular hole candidates. Cluster the coordinates of the filtered circular holes to fit the center position of the regular grid. Assign each circular hole candidate to the nearest grid position and adjust the coordinates and radius of the missing grid positions in the local neighborhood to fill in the hole positions. Based on each hole, sampling windows are established on the upper and lower sides of the hole. After excluding the hole itself and the bright reflective pixels, the color value of each standard color block is calculated. Obtain known standard color parameters, and construct a color normalization inversion model based on the known standard color parameters and the color values of each standard color patch.
4. The method for identifying black soil thickness based on color standard inversion according to claim 3, characterized in that, The established color normalization inversion model includes: Using the known standard color parameters of each standard color patch as independent variables, construct a quadratic basis function, and use the color values read from each standard color patch as dependent variables; Weighted least squares is used for iterative solution to obtain the color surface parameters of the current image. The color of any pixel in the image is then mapped to standard color parameters using the color surface parameters.
5. The method for identifying black soil thickness based on color standard inversion according to claim 3, characterized in that, The established color normalization inversion model includes: The color values read from each standard color patch are converted to the Lab color space. A queryable color parameter grid is constructed based on the standard color parameters of each color patch. The color value of each node in the grid is estimated by the inverse distance weighted interpolation method to form a continuous color surface. Based on the color of the image to be mapped, the node with the smallest color difference is searched on the color surface, and the standard color parameter corresponding to the node is used as the mapping result.
6. The method for identifying black soil thickness based on color standard inversion according to claim 1, characterized in that, The process of obtaining the standardized color parameter sequence in the depth direction includes: Within the identified black soil sample area, the main soil region was segmented. The soil mass is divided into multiple continuous depth units along the depth direction of the main region. For each depth cell, extract the color set of soil pixels within that cell, and determine the representative color value of that depth cell using either the median or clustering method; The representative color value of each depth unit is input into the color normalization inversion model to obtain the normalized color parameters corresponding to that depth unit. Arrange the normalized color parameters of all depth units in depth order to generate a normalized color parameter sequence along the depth direction.
7. The method for identifying black soil thickness based on color standard inversion according to claim 1, characterized in that, The established black soil interpretation rules involve performing layer-by-layer initial state judgment on the standardized color parameter sequence based on these rules, continuously optimizing the results of the layer-by-layer initial state judgment, identifying continuous black soil depth intervals that continuously meet the black soil interpretation conditions, and determining the black soil thickness based on the start and end boundaries of these depth intervals. This includes: Based on the black soil color standard, a threshold for the chromaticity parameter used to determine the state of black soil is set. Traverse each depth position in the standardized color parameter sequence, compare the color parameter corresponding to each depth position with the chromaticity parameter threshold, determine whether the depth position belongs to the black soil state or the non-black soil state, and form an initial state sequence based on the determination result. The initial state sequence is subjected to continuity optimization processing, and the continuous black soil segment that meets the preset minimum support thickness is identified as the anchored black soil layer. The black soil thickness is calculated based on the starting depth and ending depth of the anchored black soil layer.
8. A black soil thickness identification system based on color standard inversion, characterized in that, include: The region recognition module is used to acquire black soil sample images and reference color chart images, and to identify the reference color chart region and the black soil sample region based on the black soil sample images and reference color chart images, respectively. The model building module is used to extract the color values of multiple standard color patches based on the reference color card area, and to build a color normalization inversion model based on the extracted color values of multiple standard color patches and known standard color parameters. The black soil sample color parameter extraction module is used to divide the black soil sample area into multiple continuous depth units along the depth direction, extract the representative color value of each depth unit, and input the representative color value of each depth unit into the color normalization inversion model to output the normalized color parameter corresponding to the current depth, thereby obtaining the normalized color parameter sequence along the depth direction. The black soil thickness identification module is used to set black soil interpretation rules, perform preliminary state judgment on the standardized color parameter sequence based on the black soil interpretation rules, perform continuous optimization processing on the preliminary state judgment results, identify continuous black soil depth intervals that continuously meet the black soil interpretation conditions, and determine the black soil thickness according to the start and end boundaries of the depth interval.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1-7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1-7.