An automatic material counting method and system based on visual detection

By acquiring fixture reference features and constructing an illumination reference field in visual inspection, image positioning correction and layer texture information extraction are performed, solving the problem of boundary response aliasing in automatic material counting and achieving more accurate and stable counting results.

CN122434838APending Publication Date: 2026-07-21SHAONENG GRP OASIS ECOLOGY (XINFENG) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SHAONENG GRP OASIS ECOLOGY (XINFENG) TECH CO LTD
Filing Date
2026-04-15
Publication Date
2026-07-21

AI Technical Summary

Technical Problem

In the automatic counting process of sheet or stacked materials, existing visual inspection methods suffer from boundary response aliasing due to fixture structure, unilateral supplemental lighting, and changes in placement posture, making it difficult to stably extract effective boundaries and resulting in poor counting accuracy and stability.

Method used

By acquiring the reference features of the fixture, establishing the reference coordinate system of the fixture, performing positioning correction and cropping on the original workstation image, constructing a feature shielding area and a single-sided illumination reference field, reducing background interference and brightness slope, extracting the main contour and layer texture reference information of the material side, constructing an unfolded coordinate field, and performing signed cumulative integration and integer quantization layering to generate a boundary response sequence set. Combined with double-ended hierarchical constraints, boundary correction is performed to generate automatic material counting results.

Benefits of technology

It improves the stability of boundary imaging and boundary determination in the counting area, enhances the accuracy and stability of automatic material counting results, and reduces the disturbance effect of local morphological fluctuations on the position and spacing distribution of interlayer boundaries.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122434838A_ABST
    Figure CN122434838A_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on visual inspection's material automatic counting method and system, belong to material automatic counting technical field;The method specifically includes: acquisition original station image, original station image is positioned correction and cutting, and counting area image is obtained;Based on counting area image, signed cumulative integration and integral quantization layering are carried out, and boundary response sequence set and corresponding boundary confidence sequence set are generated;Based on boundary response sequence set and boundary confidence sequence set, layer number estimation is carried out, and material automatic counting result is obtained;The application enhances the accuracy and stability of material automatic counting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of automatic material counting technology, specifically relating to an automatic material counting method and system based on visual detection. Background Technology

[0002] In the automatic counting process of sheet or stacked materials, visual inspection needs to obtain the interlayer boundary response in the side imaging area of ​​the stacked materials and make a quantity judgment accordingly. Such materials are usually fed in a nested or tightly stacked manner and placed in the counting fixture for positioning. Affected by factors such as compression, springback, warping and adhesion, they are prone to forming a non-uniform stacked structure with boundary occlusion, layer extrusion and side morphological undulation, resulting in a complex imaging background and difficulty in setting stable imaging conditions.

[0003] In existing technologies, visual detection-based automatic material counting methods typically acquire station images with limited imaging conditions and segment and determine suspected interlayer boundary regions through edge enhancement, threshold segmentation, or projection peak counting. However, the internal boundaries of stacked materials are easily obscured or attenuated, and changes in fixture structure, unilateral lighting, and placement posture can cause the boundary response to overlap in spatial position and intensity, making it difficult to stably extract the effective boundary components. This can easily lead to missed detections or jumps, resulting in poor accuracy and stability of automatic material counting. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for automatic material counting based on visual detection.

[0005] To solve the above-mentioned technical problems, the present invention provides the following technical solution:

[0006] On one hand, this invention provides a visual inspection-based automatic material counting method, applied to the counting station of a visual counting machine, comprising:

[0007] Acquire original workstation images, perform positioning correction and cropping on the original workstation images to obtain counting area images;

[0008] Based on the counting region image, signed cumulative integral and integer quantization are performed to generate a boundary response sequence set and a corresponding boundary confidence sequence set;

[0009] Based on the boundary response sequence set and the boundary confidence sequence set, the number of layers is estimated to obtain the automatic material counting results.

[0010] Specifically, the original workstation images are acquired, and the original workstation images are positioned, corrected, and cropped to obtain the counting region images, including:

[0011] Obtain the fixture reference features, determine the fixture reference coordinate system and the direction of unilateral supplementary lighting, and acquire the original workstation image;

[0012] Based on the fixture reference features, the reference position of the fixture in the original workstation image is determined, and the positioning relationship between the original workstation image and the fixture reference coordinate system is calculated.

[0013] Based on the positioning relationship, the original workstation image is positioned and corrected, and then cropped to obtain the counting area image.

[0014] Specifically, based on the counting region image, signed cumulative integration and integer quantization are performed to generate a boundary response sequence set and a corresponding boundary confidence sequence set, including:

[0015] Based on the counting region image, the reference feature region of the fixture is determined, and the feature shielding region and the unilateral illumination reference field are obtained;

[0016] Based on the feature shielding region and the unilateral illumination reference field, structural suppression and illumination compensation are performed on the counting region image to obtain the interference-suppressed image.

[0017] Based on the interference-suppressed image, the sidewall region is determined, the layer texture reference information is extracted, and the unfolded coordinate field is constructed to obtain the unfolded sidewall image;

[0018] Based on the sidewall unfolded image, signed cumulative integral and integer quantization are performed for layering, and boundary correction is performed on abnormal sequence segments to generate boundary response sequence sets and corresponding boundary confidence sequence sets.

[0019] Specifically, based on the counting region image, the reference feature region of the fixture is determined, and the feature shielding region and the unilateral illumination reference field are obtained, including:

[0020] The projection region of the fixture reference feature in the counting region image is determined to obtain the fixture reference feature region;

[0021] Based on the reference feature area of ​​the fixture, the marking is extended outward to generate the adjacent interference area, and the reference feature area of ​​the fixture and the adjacent interference area are merged and marked to obtain the feature shielding area;

[0022] The background region located outside the feature shielding region in the counting region image is identified. The brightness distribution of the background region along the unilateral illumination direction is extracted and fitted to obtain the unilateral illumination reference field.

[0023] Specifically, based on the feature-masked region and the unilateral illumination reference field, structural suppression and illumination compensation are performed on the counting region image to obtain an interference-suppressed image, including:

[0024] Identify the pixels in the counting region image that fall into the feature masking region, and mask the pixels to obtain a structure suppression image;

[0025] Based on a single-sided illumination reference field, the brightness of the structure suppression image is normalized to reduce the brightness slope and obtain an illumination compensation image.

[0026] Based on the illumination-compensated image, the brightness abrupt change region near the boundary of the feature shielding region is identified, and the brightness abrupt change region is smoothed to obtain the interference suppression image.

[0027] Specifically, based on the interference-suppressed image, the sidewall region is determined, layer texture reference information is extracted, and an unfolded coordinate field is constructed to obtain the unfolded sidewall image, including:

[0028] Based on the interference suppression image, the outer edge of the material is extracted, and the outer edge of the material is continuously screened and smoothly fitted to obtain the main contour of the material sidewall.

[0029] Based on the main contour of the material sidewall, the sidewall region is determined, and candidate responses of layer textures that repeatedly appear along the extension direction of the main contour of the material sidewall are extracted within the sidewall region to obtain layer texture reference information.

[0030] Based on the layer texture reference information, the layer texture distribution offset at each sampling position in the sidewall region is determined, and the unfolding correction is calculated to construct the unfolding coordinate field;

[0031] Based on the unfolded coordinate field, the sidewall region is resampled and unfolded, the layer spacing distribution at each sampling position after unfolding is extracted, and the layer spacing distribution is adjusted to be consistent to obtain the unfolded image of the sidewall.

[0032] Specifically, based on the sidewall unfolded image, signed cumulative integration and integer quantization are performed for layering, and boundary correction is applied to anomalous sequence segments to generate a boundary response sequence set and a corresponding boundary confidence sequence set, including:

[0033] Based on the unfolded image of the sidewall, the signed grayscale response at each sampling position is extracted along the main contour extension direction of the material sidewall to obtain a set of column response sequences;

[0034] Based on the column response sequence set, signed cumulative integration is performed to generate a single-layer cumulative scale, and integer quantization is performed to divide the data into layers to obtain the initial stratification position map.

[0035] Based on the initial sequence location map, abnormal sequence segments are identified to obtain a set of sequence segments to be corrected;

[0036] Based on the set of sequence segments to be corrected, a double-ended sequence constraint is constructed, and the segment correction quota is determined. The sequence segments to be corrected are then demarcated and the sequence values ​​are backfilled to obtain the corrected sequence location map.

[0037] Based on the modified sequence location map, the sequence boundary locations are determined, and boundary response mapping is performed to generate a boundary response sequence set and a corresponding boundary confidence sequence set.

[0038] Specifically, based on the column response sequence set, signed cumulative integration is performed to generate a single-layer cumulative scale, and integer quantization is performed to layer the data, resulting in an initial stratification position map, including:

[0039] Based on the column response sequence set, baseline elimination and signed cumulative integration are performed on each column response sequence to obtain the cumulative quantity curve set corresponding to each column;

[0040] Based on the cumulative quantity curve set, identify the smooth sections that are continuous in adjacent columns and have similar trends in cumulative quantity change, and obtain the boundary response stable sections.

[0041] Based on the stable boundary response segment, a single-layer candidate transition unit set is determined, and main class merging and alignment stacking are performed to construct a single-layer response unit cell and generate a single-layer cumulative quantity scale.

[0042] Based on a single-layer cumulative scale, the cumulative curve set is quantized into layers by integer stratification, generating stratum sequence values ​​corresponding to each sampling position, and determining the boundary positions between adjacent stratum sequence values ​​to obtain an initial stratum sequence position map.

[0043] Specifically, based on the stable boundary response segment, a single-layer candidate transition unit set is determined, and main class merging and alignment stacking are performed to construct a single-layer response unit cell and generate a single-layer cumulative scale, including:

[0044] Based on the stable boundary response section, the smooth sections adjacent to each other in the same cumulative curve and the transition sections between the smooth sections are determined to obtain a single-layer candidate transition unit set.

[0045] Based on the single-layer candidate transition unit set, the cumulative amount and transition width of each candidate transition unit are normalized to obtain the standardized transition unit set.

[0046] Based on the standardized transition unit set, the consistency representation of each candidate transition unit is extracted, and the main class is merged and anomalies are removed to obtain the main class transition unit set.

[0047] Based on the set of main class transition units, the main class transition units are superimposed in the same position, the single-layer cumulative scale constituent quantity is extracted, and a single-layer response unit is constructed.

[0048] Based on a single-layer response unit cell, the constituent quantities of the single-layer cumulative scale are mapped to single-layer cumulative scale parameters to generate a single-layer cumulative scale.

[0049] Specifically, based on the set of sequence segments to be corrected, double-ended sequence constraints are constructed, and segment correction quotas are determined. Boundary corrections and sequence value backfilling are performed on the sequence segments to be corrected, resulting in a corrected sequence location map, including:

[0050] Based on the set of sequence segments to be corrected, the sequence values ​​and boundary positions at both ends of each sequence segment to be corrected are extracted, and left and right double-end anchor points are constructed to obtain double-end sequence constraints.

[0051] Based on the two-end sequence constraints, the target number of each sequence segment to be corrected is determined, and the sequence completion amount, sequence split amount or sequence merging amount corresponding to the target number of sequence segments is calculated to obtain the segment correction quota.

[0052] Based on the segment correction quota, the target number of boundaries and the initial location of the boundaries of the sequence segments to be corrected are determined, and the sequence segments to be corrected are equally divided and the boundaries are optimized to obtain candidate sequence boundary groups.

[0053] Based on the candidate sequence boundary groups, missing boundaries are filled, overly dense boundaries are split, and redundant boundaries are removed from the sequence segments to be corrected, generating corrected boundary groups. Sequence values ​​are then backfilled for each sequence segment to be corrected to obtain a local corrected sequence sequence.

[0054] Based on the local corrected sequence sequence, the boundary positions at both ends of each sequence segment to be corrected are continuously spliced ​​to obtain the corrected sequence position map.

[0055] Specifically, based on the boundary response sequence set and the boundary confidence sequence set, layer number estimation is performed to obtain the automatic material counting results, including:

[0056] Based on the boundary confidence sequence set, continuous segments with stable confidence distributions are extracted to obtain stable counting segments;

[0057] Based on the boundary response sequence set, the cumulative evidence increment between adjacent boundary responses within the stable counting segment is calculated to obtain a single-layer candidate increment set.

[0058] Based on the single-layer candidate increment set, the single-layer increment center value and allowable fluctuation range are determined, and a unit-layer increment scale is generated.

[0059] Based on the unit layer increment scale, the cumulative evidence increment is accumulated and quantized to obtain the layer number estimate corresponding to the boundary response sequence set;

[0060] Based on the estimated number of layers, outliers are removed, and the estimated number of layers after outlier removal is fused for consistency to obtain the automatic material counting result.

[0061] On the other hand, the present invention provides an automatic material counting system based on vision detection, comprising:

[0062] The image acquisition module is used to acquire original workstation images, perform positioning correction and cropping on the original workstation images to obtain the counting area image;

[0063] The quantization layering module performs signed cumulative integration and integer quantization layering based on the count region image, generating a boundary response sequence set and a corresponding boundary confidence sequence set;

[0064] The layer number estimation module estimates the layer number based on the boundary response sequence set and the boundary confidence sequence set, and obtains the automatic material counting results.

[0065] Compared with existing technologies, the beneficial effects of this invention include: by acquiring the reference features of the fixture and establishing a reference coordinate system for the fixture, positioning correction and cropping of the original workstation image are performed. Simultaneously, a feature shielding region and a unilateral illumination reference field are constructed to perform structural suppression and illumination compensation on the counting region image. This reduces background interference and brightness gradient caused by the fixture's fixed structure and unilateral illumination, reduces boundary response aliasing caused by fixture occlusion and illumination fluctuations, and improves the stability of boundary imaging and boundary determination in the counting region. By extracting the main contour and layer texture reference information of the material side, an unfolding coordinate field is constructed, and the side region is resampled and unfolded with consistent layer texture spacing. This corrects the side region, which is bent and squeezed due to pressure and changes in placement posture, to a unified unfolding domain, reducing the disturbance effect of local morphological fluctuations on the position and spacing distribution of interlayer boundaries, and improving the consistency of layer sequence layering and boundary reconstruction. By performing signed cumulative integration and integer quantization layering on the side-expanded image, a single-layer cumulative scale is generated. Combined with double-ended stratification constraints, the stratification segment to be corrected is demarcated and the stratification value is backfilled. In the case of abnormal boundary response, missing stratification or merging of stratification, the stratification is completed, split and corrected by a unified scale, which enhances the accuracy and stability of the automatic material counting results. Attached Figure Description

[0066] Figure 1 A flowchart of an automatic material counting method based on vision detection provided by the present invention;

[0067] Figure 2 This is a schematic diagram of the single-layer response unit cell and cumulant scale provided by the present invention;

[0068] Figure 3 The flowchart for generating automatic material counting results provided by this invention;

[0069] Figure 4 This invention provides a structural diagram of an automatic material counting system based on vision detection. Detailed Implementation

[0070] The technical solution of the present invention will be described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments of the present invention and the specific features in the embodiments are detailed descriptions of the technical solution of the present invention, rather than limitations thereof. In the absence of conflict, the embodiments of the present invention and the technical features in the embodiments can be combined with each other.

[0071] Example 1:

[0072] See Figures 1-3 This embodiment provides a method for automatic material counting based on vision detection, applied to the counting station of a vision counting machine, including the following specific steps:

[0073] Step S1: Acquire the original workstation image, perform positioning correction and cropping on the original workstation image to obtain the counting area image.

[0074] The specific steps of step S1 are as follows:

[0075] Step S101: Obtain the fixture reference features, determine the fixture reference coordinate system and the direction of single-sided supplementary lighting, and acquire the original workstation image.

[0076] In this embodiment, the structural edge lines with stable positions and clear boundaries on the fixture are obtained to obtain the fixture reference feature set. The extension direction and intersection position of each feature edge line in the fixture reference feature set are extracted to determine the longitudinal reference direction, the transverse reference direction and the reference origin, and thus obtain the fixture reference coordinate system.

[0077] Obtain the fixed installation position of the supplementary lighting device and fixture, determine the position of the supplementary lighting incident side, and obtain the supplementary lighting incident edge.

[0078] Based on the incident edge of the supplementary light and the lateral reference direction in the reference coordinate system of the fixture, the direction of brightness change from high to low is determined, and the direction of single-sided supplementary light is obtained.

[0079] Based on the fixture reference coordinate system and the unilateral supplementary lighting direction, the exposure parameters and acquisition time of the industrial camera are set to obtain the image acquisition parameters.

[0080] Based on the image acquisition parameters, imaging acquisition is performed on the counting station to obtain the original station image.

[0081] Step S102: Based on the fixture reference features, determine the reference position of the fixture in the original workstation image, and calculate the positioning relationship between the original workstation image and the fixture reference coordinate system.

[0082] In this embodiment, based on the fixture reference feature set, the fixture edge region in the original workstation image is extracted to obtain the image fixture feature set. The image fixture feature set is the set of edges in the original workstation image that correspond to the fixture reference features. The set of edges includes the inner edge of the left side of the fixture, the inner edge of the bottom side, and the end transition edge.

[0083] Based on the correspondence between the image fixture feature set and the fixture reference feature set, the intersection position and extension direction of each image edge are determined, and the reference position of the fixture in the original workstation image is obtained.

[0084] Based on the reference position of the fixture in the original workstation image, the angle between the longitudinal direction of the image and the longitudinal reference direction of the fixture is calculated to obtain the rotation offset.

[0085] Calculate the coordinate difference between the image reference intersection point and the fixture reference origin to obtain the translation offset.

[0086] Based on rotation offset and translation offset, a rigid positioning relationship is constructed from the original workstation image to the fixture reference coordinate system, and the positioning relationship matrix is ​​obtained.

[0087] Based on the positioning relationship matrix, the reprojection position of the main edge lines of the fixture in the image is verified, and the deviation between the reprojected edge lines and the actual image edge lines is calculated to obtain the positioning deviation result.

[0088] Based on the positioning deviation results, the feature set of the image fixture is iteratively corrected until the reprojection deviation of each main edge is less than the preset deviation threshold. The iteration is then stopped, and the positioning relationship between the original workstation image and the fixture reference coordinate system is obtained. The deviation threshold is set by those skilled in the art according to the actual situation.

[0089] For example, the deviation threshold can be 2 pixels.

[0090] Step S103: Based on the positioning relationship, perform positioning correction on the original workstation image and crop it to obtain the counting area image.

[0091] In this embodiment, based on the original workstation image and the positioning relationship matrix, coordinate mapping is performed on the position of each pixel in the original workstation image to obtain a corrected coordinate grid.

[0092] Based on the calibration coordinate grid, the original workstation image is rotated and translated to obtain the positioning calibration image.

[0093] The counting area range in the reference coordinate system of the fixture is determined. Based on the positioning correction image and the counting area range, the four-sided boundary positions of the counting area are determined to obtain the counting clipping frame. The counting area range is the imaging area corresponding to the layer texture of the material sidewall inside the fixture. It covers the effective stacking section of the material in the longitudinal direction and the area where the layer texture response and boundary transition are located in the transverse direction.

[0094] Based on the counting cropping box, the positioning and correction image is cropped to obtain the counting region image.

[0095] Based on the counted region image, boundary checks are performed on the blank pixel areas at the cropped edges to obtain boundary integrity results.

[0096] Based on the boundary integrity results, the position and size of the counting clipping frame are corrected to obtain the corrected counting clipping frame.

[0097] Based on the corrected counting cropping box, the positioning correction image is re-cropped to obtain the counting region image.

[0098] Step S2: Based on the counting region image, perform signed cumulative integration and integer quantization layering to generate a boundary response sequence set and a corresponding boundary confidence sequence set.

[0099] The specific steps of step S2 are as follows:

[0100] Step S201: Based on the counting region image, determine the reference feature region of the fixture, and obtain the feature shielding region and the single-sided illumination reference field.

[0101] The specific steps of step S201 are as follows:

[0102] Step S2011: Determine the projection area of ​​the fixture reference feature in the counting area image to obtain the fixture reference feature area.

[0103] In this embodiment, based on the counting region image and the positioning relationship matrix, the position range of each feature edge line in the fixture reference feature set in the fixture reference coordinate system is mapped to the counting region image to obtain the image projection line segment corresponding to each fixture reference feature.

[0104] The boundary range of the counting region image is determined. Based on the projection line segments of each image and the boundary range of the counting region image, the line segments that exceed the boundary of the counting region image are truncated to obtain the image projection line segments with limited boundaries.

[0105] Based on the image projection line segments with limited boundaries, the start and end boundaries and lateral boundaries of each fixture reference feature in the counting region image are determined, and the fixture reference feature projection set is obtained.

[0106] Based on the fixture reference feature projection set, each projection boundary is expanded outward along the normal direction by a preset pixel width to obtain a feature strip region, and the union result of each feature strip region is determined to construct the fixture reference feature region.

[0107] Based on the reference feature region of the fixture, the relative positions of the region boundary and the image boundary of the counted region are checked to obtain the region integrity result.

[0108] Based on the results of regional integrity, the normal outward expansion width is corrected, and the feature strip region and the union region are reconstructed to obtain the reference feature region of the fixture.

[0109] Step S2012: Based on the fixture reference feature area, extend the marking outward to generate the adjacent interference area, and merge the marking of the fixture reference feature area and the adjacent interference area to obtain the feature shielding area.

[0110] In this embodiment, based on the reference feature area of ​​the fixture, the normal direction of the boundary of each area is determined to obtain the set of boundary expansion directions. The normal direction represents the direction that is perpendicular to the boundary of the reference feature area of ​​the fixture and points to the outside of the area. It is used to describe the expansion direction that is easily affected by edge reflection, brightness halo and structural proximity in the vicinity of the edge of the fixture.

[0111] Based on the boundary expansion direction set, the distance expansion of the fixture reference feature region is performed along the outer side of each boundary to obtain the neighboring expansion zone, and the connectivity range of the neighboring expansion zone is determined to generate the neighboring interference region.

[0112] The initial shielding area is obtained by performing a union fusion of the fixture reference feature area and the adjacent interference area.

[0113] Based on the initial shielded area, the continuity and integrity of the area boundary are checked to obtain the shielding check results.

[0114] Based on the shielding inspection results, connection correction rules, and widening correction rules, connection corrections are performed on local break locations, and widening corrections are performed on excessively narrow locations to obtain a characteristic shielding region. The connection correction rules include: when the interval between two adjacent shielding boundaries is less than a preset shielding interval threshold, the two boundaries are closed along the shortest connection path. The widening correction rules include: when the width of a local shielding band is less than a preset minimum shielding width, it continues to expand outward along the normal direction of the corresponding boundary until the local bandwidth reaches the minimum shielding width. The shielding interval threshold and the minimum shielding width are set by those skilled in the art according to the actual situation.

[0115] For example, the shielding interval threshold can be 8 pixels, and the minimum shielding width can be 14 pixels.

[0116] Step S2013: Determine the background region outside the feature shielding region in the counting region image, extract the brightness distribution of the background region along the unilateral supplementary lighting direction, and fit it to obtain the unilateral illumination reference field.

[0117] In this embodiment, based on the count region image and the feature shielding region, the pixel region not covered by the feature shielding region is determined to obtain the background region. The background region is the remaining region in the count region image that does not fall into the fixture reference feature region and the adjacent interference region. The background region mainly includes the blank band outside the material, the non-adjacent flat area inside the fixture, and the supplementary light transition area not occupied by the material boundary.

[0118] Based on the background area and the direction of unilateral illumination, the position of each pixel in the background area is projected according to the direction of unilateral illumination to obtain the background projection position sequence.

[0119] Determine the grayscale values ​​of the pixels corresponding to the background projection position sequence. Based on the background projection position sequence and grayscale values, extract the brightness distribution of the background region along the unilateral supplementary lighting direction to obtain the background brightness distribution sequence.

[0120] Based on the background brightness distribution sequence, local mutation points and isolated bright spots near the material edge are identified and removed to obtain a purified brightness sample sequence. The local mutation point is a position where the brightness difference between adjacent positions along the unilateral supplementary lighting direction is greater than a preset mutation threshold. The isolated bright spot is a position where the brightness difference between the brightness within a local window and the window mean is greater than a preset isolation threshold, and the continuous length is less than a preset length threshold. The mutation threshold, isolation threshold, and length threshold are set by those skilled in the art according to the actual situation.

[0121] For example, the mutation threshold is set to 12 gray levels, the isolation threshold is set to 15 gray levels, and the length threshold is set to 5 projection positions.

[0122] Based on the purified brightness sample sequence, the continuity of the purified brightness sample sequence is checked according to the arrangement order of the background projection position sequence, resulting in n1 consecutive position segments.

[0123] Based on the sequential order of adjacent projection positions within each consecutive position segment, a smooth brightness sequence is obtained by performing a moving average on the brightness values ​​within each consecutive position segment.

[0124] Based on the smooth brightness sequence, the variation amplitude and number of bends of the brightness value in each continuous position segment with the change of projection position are statistically analyzed to obtain the variation characteristics within the segment.

[0125] Based on the intra-segment variation characteristics, the continuous position segments with near-linear brightness changes are set as linear functions, the continuous position segments with single-bending brightness changes are set as quadratic functions, and the continuous position segments with two-bending brightness changes are set as cubic functions, thus obtaining the target fitting function corresponding to each continuous position segment.

[0126] Based on the target fitting function corresponding to each continuous position segment, the smooth brightness value of each continuous position segment is fitted to obtain the fitted brightness sequence of each continuous position segment.

[0127] The fitted brightness sequences of each consecutive position segment are sequentially spliced ​​together to obtain a one-sided brightness trend curve.

[0128] Based on the unilateral brightness trend curve, the fitted brightness value corresponding to each projection position is mapped back to the pixel at the same projection position in the counting region image to obtain the unilateral illumination reference field.

[0129] Step S202: Based on the feature shielding region and the unilateral illumination reference field, perform structure suppression and illumination compensation on the counting region image to obtain the interference suppression image.

[0130] The specific steps of step S202 are as follows:

[0131] Step S2021: Determine the pixels in the counting region image that fall into the feature masking region, and perform masking processing on the pixels to obtain a structure suppression image.

[0132] In this embodiment, based on the counting region image and the feature shielding region, the spatial inclusion relationship between each pixel in the counting region image and the feature shielding region is determined to obtain the shielded pixel set. The shielded pixel set is a set of pixels whose pixel positions fall inside the feature shielding region. The pixel set includes pixels that fall into the fixture reference feature region and pixels that fall into the adjacent interference region.

[0133] Based on the set of masked pixels, each masked pixel in the counting region image is marked with a masking mark to obtain a masking mark map.

[0134] Based on the masking mark map, the grayscale value of each masked pixel is replaced with a preset masking value to obtain an initial structure suppression image. The masking value is used to weaken the influence of the fixture edge, adjacent reflective band and adjacent interference band in the subsequent boundary response calculation, so that pixels falling into the feature masking area no longer participate in the effective layer texture structure expression. The masking value is set by those skilled in the art according to the actual situation.

[0135] For example, the mask value is set to 0.

[0136] Based on the initial structure suppression image, the grayscale transition between the boundary of the shielded area and the boundary of the unshielded area is checked to obtain the boundary transition result.

[0137] Based on the boundary transition results, the grayscale values ​​inside the boundary of the shielded area are smoothed to obtain the boundary transition band.

[0138] Based on the boundary transition zone, the initial structure suppression image is corrected by boundary adjustment to obtain the structure suppression image.

[0139] Step S2022: Based on the single-sided illumination reference field, the brightness of the structure suppression image is normalized to reduce the brightness slope and obtain the illumination compensation image.

[0140] In this embodiment, based on the structure-suppressed image and the unilateral illumination reference field, the original grayscale value of each pixel in the structure-suppressed image and the reference brightness value at the corresponding position are determined to obtain the pixel brightness correspondence set. The reference brightness value is the fitted brightness value of the unilateral illumination reference field at the corresponding pixel position.

[0141] Based on the pixel brightness correspondence set, the ratio between the original grayscale value and the reference brightness value of each pixel is calculated to obtain the initial normalized brightness value.

[0142] Based on the initial normalized brightness value, the brightness amplitude of each pixel is constrained within a range to obtain the constrained normalized brightness value.

[0143] Based on the constrained normalized brightness value, the target gray value after illumination compensation is determined, and the initial illumination-compensated image is obtained.

[0144] Based on the initial illumination compensation image, the magnitude of the remaining brightness change along the unilateral illumination direction is calculated to obtain the compensation residual result.

[0145] Based on the compensation residual results, the target grayscale value is corrected on an overall amplitude basis to obtain an illumination-compensated image.

[0146] Step S2023: Based on the illumination compensation image, determine the brightness abrupt change region near the boundary of the feature shielding region, and perform smooth transition processing on the brightness abrupt change region to obtain the interference suppression image.

[0147] In this embodiment, based on the illumination-compensated image and the feature-masking region, the boundary lines of the feature-masking region are extracted to obtain the masking boundary set.

[0148] Based on the shielded boundary set, a preset normal width is extended inward and outward along both sides of the normal of each boundary line to obtain the boundary adjacency band. The normal width is set by those skilled in the art according to the actual situation.

[0149] For example, the normal width is 3 pixels.

[0150] Based on the boundary adjacency band, the pixel brightness values ​​at the relative positions on both sides of the boundary are extracted to obtain the adjacent brightness pair sequence.

[0151] Based on the adjacent brightness pair sequence, the brightness difference in the boundary normal direction at each relative position is calculated to obtain the boundary brightness difference sequence.

[0152] Based on the boundary brightness difference sequence, the positions where the brightness difference is greater than a preset mutation threshold are determined, and a set of brightness mutation points is obtained. The mutation threshold is set by those skilled in the art according to the actual situation.

[0153] For example, the mutation threshold is set to 16 gray levels.

[0154] Based on the set of brightness abrupt change points, adjacent brightness abrupt change points are connected along the extension direction of the shielding boundary to obtain the brightness abrupt change region.

[0155] Based on the brightness abrupt change regions, the inner transition range is determined inward along the normal direction of the corresponding boundary of each brightness abrupt change region, thus obtaining the inner transition zone.

[0156] Based on the brightness abrupt change regions, the outer transition range is determined outward along the normal direction of the corresponding boundary of each brightness abrupt change region, thus obtaining the outer transition zone.

[0157] Based on the inner and outer transition bands, the range of pixels participating in the smooth transition on both sides of the brightness abrupt change region is determined, thus obtaining the transition processing band.

[0158] Based on the transition processing band, the pixel brightness values ​​that do not fall into the feature shielding area are extracted to obtain the transition reference brightness sequence.

[0159] Based on the transition reference brightness sequence, the introduction ratio of the reference brightness is gradually reduced from the boundary position outward according to the normal distance of each pixel to the shielding boundary, thus obtaining the transition weight sequence.

[0160] Based on the transition weight sequence, the original compensated brightness and transition reference brightness in the brightness change region are weighted and smoothed to obtain the boundary smooth brightness sequence.

[0161] Based on the boundary smoothing brightness sequence, the pixel brightness of the corresponding positions in the brightness abrupt region and transition processing zone in the illumination compensation image is replaced to obtain the initial interference suppression image.

[0162] Based on the initial interference suppression image, the brightness continuity of adjacent positions is checked along the extension direction of the shielding boundary to obtain the transition continuity result.

[0163] Based on the transition continuity results, neighborhood smoothing is continued at locations where local jumps still exist until the brightness difference between adjacent locations is less than a preset continuity threshold. Smoothing then stops, resulting in an interference-suppressed image. The continuity threshold is set by those skilled in the art based on the actual situation.

[0164] For example, the continuity threshold is set to 6 gray levels.

[0165] Step S203: Based on the interference suppression image, determine the sidewall region, extract the layer texture reference information, and construct the unfolded coordinate field to obtain the sidewall unfolded image.

[0166] The specific steps of step S203 are as follows:

[0167] Step S2031: Based on the interference suppression image, extract the outer edge of the material, and perform continuity screening and smooth fitting on the outer edge of the material to obtain the main contour of the material sidewall.

[0168] In this embodiment, based on the interference suppression image and the feature shielding region, the effective pixels that do not fall into the feature shielding region are determined, and the effective pixel set is obtained.

[0169] Based on the effective pixel set, the number of effective pixels in each image row is counted to obtain the row effective pixel count sequence.

[0170] Based on the row effective pixel count sequence, image rows with a number of effective pixels greater than a preset effective pixel count threshold are determined to obtain a candidate sidewall image row set. The effective pixel count threshold is set by those skilled in the art according to the actual situation.

[0171] Based on the candidate sidewall image row set, image rows with consecutive row numbers are merged to obtain the candidate sidewall height segment set.

[0172] Based on the candidate sidewall height segment set, the continuous length of each candidate sidewall height segment is determined, and candidate sidewall height segments with a continuous length greater than a preset continuous length threshold are retained to obtain the material sidewall height range. The continuous length threshold is set by those skilled in the art according to the actual situation.

[0173] Based on the jig reference feature projection set, the lateral reference position of the jig's inner boundary on each image row within the height range of the material sidewall is determined, thus obtaining the boundary reference sequence.

[0174] Based on the boundary reference sequence, a lateral search interval is set on each image row from the inner boundary of the fixture toward the outer side of the material to obtain the edge search area. The lateral search interval is the pixel interval between a preset start distance and a preset end distance on the outer side of the inner boundary of the fixture. The start distance and end distance are set by those skilled in the art according to the actual situation.

[0175] Based on the edge search region, the pixel gray values ​​of each image row are extracted from the inside to the outside within the horizontal search interval to obtain the row gray value sequence.

[0176] Based on the row grayscale sequence, the horizontal grayscale difference between adjacent pixels is calculated to obtain the row difference sequence.

[0177] Based on the row difference sequence, the position where the absolute value of the gray difference is greater than a preset edge threshold and the length of consecutive identical signs is greater than a preset hold length is determined to obtain the edge response position. The edge threshold and hold length are set by those skilled in the art according to the actual situation.

[0178] Based on the edge response location, the distance between each edge response location and the corresponding lateral reference location of the inner boundary of the image row fixture is calculated to obtain the boundary spacing sequence.

[0179] Based on the boundary spacing sequence, edge response positions that fall within a preset distance interval are retained to obtain candidate edge points on the outer side of the material in each image row. The distance interval is set by those skilled in the art according to the actual situation.

[0180] Based on the candidate edge points on the outer side of the material in each image row, they are sorted in ascending order of image row number to obtain the candidate edge point sequence.

[0181] Based on the candidate edge point sequence, the row number difference and horizontal coordinate difference between candidate edge points in adjacent image rows are calculated to obtain the inter-point connection parameter sequence.

[0182] Based on the sequence of connection parameters between points, candidate edge points with consecutive row numbers and horizontal coordinate changes less than a preset jump threshold are connected row by row to obtain a set of candidate edge segments. The jump threshold is set by those skilled in the art according to the actual situation.

[0183] Based on the candidate edge segment set, the continuous length, row coverage ratio, and local direction variation of each candidate edge segment are statistically analyzed to obtain the edge segment feature set.

[0184] Based on the edge segment feature set, candidate edge segments with a continuous length greater than a preset edge continuous length threshold, a row coverage ratio greater than a preset edge row coverage threshold, and a local direction change less than a preset edge local direction threshold are retained to obtain a retained edge segment set. The edge continuous length threshold, edge row coverage threshold, and edge local direction threshold are set by those skilled in the art according to the actual situation.

[0185] Based on the set of preserved edge segments, the inter-segment row spacing and endpoint lateral difference of adjacent preserved edge segments are calculated to obtain the inter-segment splicing parameters.

[0186] Based on the inter-segment splicing parameters, adjacent retained edge segments with inter-segment row spacing less than a preset inter-segment splicing interval threshold and endpoint lateral difference less than a preset inter-segment splicing threshold are supplemented and connected to obtain a filtered edge point sequence. The supplemented connection is as follows: between the end point of the previous retained edge segment and the beginning point of the next retained edge segment, connection points with progressively changing lateral coordinates are inserted in ascending order of image row numbers to restore the break position to a continuous edge trajectory. The inter-segment splicing interval threshold and the inter-segment splicing threshold are set by those skilled in the art according to the actual situation.

[0187] Based on the filtered edge point sequence, the horizontal coordinates corresponding to each image row are extracted to obtain the edge horizontal coordinate sequence.

[0188] Based on the edge horizontal coordinate sequence, the median horizontal coordinate of each window is statistically analyzed within a preset median window to obtain a median reference sequence. The median window is set by those skilled in the art according to the actual situation.

[0189] Based on the edge horizontal coordinate sequence and the median reference sequence, edge points whose difference between the horizontal coordinate and the corresponding median reference value is greater than a preset outlier threshold are determined, and outlier edge points are obtained. The outlier threshold is set by those skilled in the art according to the actual situation.

[0190] Based on outlier edge points, the corresponding horizontal coordinates are replaced with the median of the corresponding median window to obtain a deburred edge point sequence.

[0191] Based on the deburred edge point sequence, a weighted average of each horizontal coordinate is performed within a preset smoothing window to obtain a smoothed edge point sequence. The smoothing window is set by those skilled in the art according to the actual situation.

[0192] Based on the smooth edge point sequence, the image row number is used as the vertical position variable and the corresponding horizontal coordinate is used as the side wall position variable. Local quadratic fitting is performed on the smooth edge points on the continuous image rows to obtain the fitted contour point sequence. The local quadratic fitting is as follows: within each local fitting window, a quadratic curve is determined that minimizes the sum of the squares of the horizontal deviations of each smooth edge point in the window to the target curve, and the fitted horizontal coordinates corresponding to the center image row of each window are taken as the main contour position of the image row.

[0193] Based on the fitted contour point sequence, the main contour of the material sidewall is obtained by connecting the points one by one in the order of the image row numbers.

[0194] For example, the effective pixel count threshold is 60 pixels, the continuous length threshold is 120 rows, the starting distance of the horizontal search interval is 24 pixels, the ending distance is 168 pixels, the edge threshold is 14 gray levels, the hold length is 3 consecutive differences, the distance interval is 24 pixels to 168 pixels, the jump threshold is 5 pixels, the edge continuous length threshold is 180 rows, the edge row coverage threshold is 0.85, the edge local direction threshold is 12 degrees, the inter-segment stitching interval threshold is 10 rows, the inter-segment stitching threshold is 4 pixels, the median window is 9 rows, the outlier threshold is 4 pixels, the smoothing window is 11 rows, and the local fitting window is 31 rows.

[0195] The size of the counting region image is 898 by 1682.

[0196] The pixels that do not fall into the feature shielding area are counted by image row. The number of effective pixels in image row 118 is 83, the number of effective pixels in image row 800 is 127, and the number of effective pixels in image row 1564 is 81. The number of effective pixels in image rows 118 to 1564 is greater than 60 pixels, thus obtaining the candidate sidewall image row set.

[0197] The consecutive image rows in the candidate sidewall image row set are merged to obtain the candidate sidewall height segment from image row 118 to 1564.

[0198] The continuous length of image lines 118 to 1564 is 1447 lines, which is greater than 120 lines, thus obtaining the range of material sidewall height.

[0199] The lateral reference position of the inner boundary of the fixture on image lines 118 to 1564 is between 49 and 52 pixels.

[0200] The lateral reference position of the fixture inner boundary of image line 800 is 51 pixels.

[0201] Based on a starting distance of 24 pixels and an ending distance of 168 pixels, the horizontal search range is determined to be 75 pixels to 219 pixels on image line 800.

[0202] For image row 800, extract pixel gray values ​​from the inside out within the horizontal search range. The gray values ​​at horizontal positions 121 to 127 are 182, 179, 176, 160, 142, 124, and 122, respectively.

[0203] The difference between the gray values ​​of adjacent pixels is calculated, and the row difference values ​​at horizontal positions 121 to 126 are -3, -3, -16, -18, -18, and -2, respectively.

[0204] The absolute values ​​of the three consecutive differences corresponding to horizontal positions 123 to 125 are all greater than 14 gray levels, and the signs of the differences are consistent, thus determining that horizontal position 124 is the edge response position.

[0205] The distance between the lateral position 124 and the lateral reference position 51 of the inner boundary of the fixture is calculated, and the boundary spacing is 73 pixels. 73 pixels fall within the distance range of 24 pixels to 168 pixels, and the lateral position 124 corresponding to the image line 800 is determined to be the candidate edge point of the outer side of the material.

[0206] In the same manner, rows 118 to 1564 of the image were extracted one by one to obtain 1453 candidate edge points, forming a candidate edge point sequence.

[0207] Calculate the row number difference and horizontal coordinate difference of candidate edge points in adjacent image rows in the candidate edge point sequence. Connect the candidate edge points with a row number difference of 1 and a horizontal coordinate difference of no more than 5 pixels one by one to obtain 5 candidate edge segments.

[0208] The continuous lengths of the five candidate edge segments are 712, 719, 14, 5 and 3 lines, respectively, with row coverage ratios of 0.98, 0.97, 0.21, 0.08 and 0.05, respectively, and local directional changes of 7 degrees, 9 degrees, 23 degrees, 31 degrees and 36 degrees, respectively.

[0209] Candidate edge segments with a continuous length greater than 180 rows, a row coverage ratio greater than 0.85, and a local directional change of less than 12 degrees are retained to obtain the first two retained edge segments. The end of the first retained edge segment is located at image row 833 with a horizontal coordinate of 154 pixels, and the beginning of the second retained edge segment is located at image row 842 with a horizontal coordinate of 157 pixels. The row spacing between the two segments is 8 rows, and the horizontal difference between the endpoints is 3 pixels.

[0210] For rows 8 to 10, and pixels 3 to 4, insert 8 connection points in ascending order of row number between rows 834 and 841 of the image. The corresponding horizontal coordinates are 154, 154, 155, 155, 156, 156, 157, and 157, respectively. This results in a sequence of filtered edge points covering rows 122 to 1560 of the image, totaling 1439 edge points.

[0211] Extract the horizontal coordinates corresponding to each image row in the filtered edge point sequence to obtain the edge horizontal coordinate sequence. Taking the 9-row window near image row 800 as an example, the 9 horizontal coordinates are as follows: 156, 157, 156, 158, 166, 157, 156, 158, 157. Calculate the median of the horizontal coordinates of the 9-row window and obtain the median reference value as 157.

[0212] Calculate the difference between the horizontal coordinate 166 and the median reference value 157, which is 9 pixels. Since 9 pixels is greater than 4 pixels, the edge point corresponding to line 804 of the image is identified as an outlier edge point. Replace the horizontal coordinate 166 with 157 to obtain the deburred edge point sequence.

[0213] The deburred edge point sequence is weighted and averaged within an 11-row smoothing window. Within the 11-row window centered on image row 800, the horizontal coordinates are 155, 156, 156, 157, 157, 158, 157, 157, 156, 156, 155, with corresponding weights of 1, 2, 3, 4, 5, 6, 5, 4, 3, 2, 1. The horizontal coordinates and weights are weighted and summed to obtain a weighted sum of 5644 and a weighted sum of 36. Dividing 5644 by 36 gives 156.8, thus determining the smoothed horizontal coordinate corresponding to image row 800 as 156.8. The smoothing process is then applied to each image row in the same way to obtain the smoothed edge point sequence.

[0214] Centered on image row 800, a local quadratic fitting was performed on 31 smooth edge points from image rows 785 to 815. Using the image row number as the vertical position variable and the corresponding horizontal coordinate as the sidewall position variable, the coefficient of the quadratic term was found to be 0.00012, the coefficient of the linear term was -0.146, and the constant term was 196.4.

[0215] Substituting line 800 of the image into the fitting result, the corresponding fitted horizontal coordinate is 156.4.

[0216] Perform local quadratic fitting on each row of the image from line 122 to line 1560 in the same manner to obtain the fitted contour point sequence.

[0217] The fitted contour point sequence is connected point by point in the order of the image row number to obtain the main contour of the material sidewall.

[0218] Step S2032: Based on the main contour of the material sidewall, determine the sidewall region, and extract the candidate responses of the layer texture that recur along the extension direction of the main contour of the material sidewall within the sidewall region to obtain the layer texture reference information.

[0219] In this embodiment, based on the main contour of the material sidewall, the main contour points corresponding to each image row are extracted according to the image row number to obtain the main contour point sequence.

[0220] Based on the sequence of main contour points and the reference position of the inner boundary of the fixture, the direction of each main contour point from the outer edge of the material to the inside of the material is determined, thus obtaining the inner direction sequence.

[0221] Based on the inner direction sequence, at each main contour point, the sidewall sampling band is obtained by extending from the preset start offset position to the preset end offset position along the inner direction of the material. The start offset position and the end offset position are set by those skilled in the art according to the actual situation.

[0222] For example, the starting offset position is 6 pixels and the ending offset position is 58 pixels.

[0223] The sidewall sampling bands corresponding to each image row are combined to obtain the sidewall region.

[0224] Based on the sidewall region, the pixel gray values ​​of each image row arranged from the outside to the inside within the sidewall sampling band are extracted to obtain the sidewall grayscale profile sequence.

[0225] Based on the sidewall grayscale profile sequence, edge transition pixels near the outer edge of the material and weak response pixels near the inner end of the material are filtered out to obtain an effective grayscale profile sequence.

[0226] Based on the effective grayscale profile sequence, the grayscale values ​​in each image row are weighted and aggregated to obtain the sidewall response value corresponding to each image row.

[0227] Based on the sidewall response values ​​corresponding to each image row, the image row numbers are arranged in ascending order to obtain the sidewall longitudinal response sequence.

[0228] Based on the longitudinal response sequence of the sidewalls, the response values ​​of adjacent image rows are smoothed to obtain a smoothed response sequence.

[0229] Based on the smooth response sequence, the response difference between adjacent positions is calculated to obtain the response difference sequence.

[0230] Based on the response difference sequence, the position where the difference changes from positive to negative is determined, and the peak candidate position is obtained.

[0231] Based on the response difference sequence, the position where the difference changes from negative to positive is determined, and the candidate position of the valley value is obtained.

[0232] Based on the peak candidate position and the valley candidate position, the response amplitude of each candidate position and its adjacent positions is calculated to obtain the candidate response amplitude sequence.

[0233] Based on the candidate response amplitude sequence, candidate positions with response amplitudes greater than a preset candidate response amplitude threshold are retained to obtain initial ripple candidate response points. The candidate response amplitude threshold is set by those skilled in the art according to the actual situation.

[0234] For example, the candidate response amplitude threshold is set to 8 gray levels.

[0235] Based on the initial layer texture candidate response points, the spacing between adjacent candidate response points in the image row direction is calculated to obtain the candidate spacing sequence.

[0236] Based on the candidate spacing sequence, the median of adjacent spacings is calculated within a local image row window to obtain a local reference spacing sequence.

[0237] Based on the local reference spacing sequence, initial layer pattern candidate response points are retained where the difference between the adjacent spacing and the corresponding local reference spacing is not greater than a preset adjacent spacing deviation threshold, thus obtaining repeated layer pattern candidate response points. The adjacent spacing deviation threshold is set by those skilled in the art according to the actual situation.

[0238] For example, the adjacent spacing deviation threshold is set to 4 pixels.

[0239] Based on the candidate response points of the repeating ridge pattern, the image row number, response position, response polarity, response amplitude and adjacent response spacing of each candidate response point are extracted to obtain the ridge pattern reference information.

[0240] Step S2033: Based on the layer texture reference information, determine the layer texture distribution offset at each sampling position in the sidewall region, calculate the unfolding correction amount, and construct the unfolding coordinate field.

[0241] In this embodiment, based on the ridge reference information, the image row number, the response position within the sidewall sampling band, and the spacing between adjacent responses corresponding to each ridge candidate response point are extracted to obtain the ridge anchor point sequence.

[0242] Based on the layer texture anchor point sequence, the image row numbers are arranged in ascending order to obtain an ordered layer texture anchor point sequence.

[0243] Calculate the difference in image row number between adjacent layer anchor points in the ordered layer anchor point sequence, and calculate the actual layer spacing based on the difference in image row number to obtain the actual layer spacing sequence.

[0244] Based on the actual layer spacing sequence, the median of the spacing between adjacent layers is calculated within a local image row window to obtain the reference layer spacing sequence.

[0245] Based on the image row number of the first layer anchor point in the ordered layer anchor point sequence and the reference layer spacing sequence, the reference layer spacing is accumulated segment by segment along the image row direction to obtain the reference layer position sequence corresponding to each layer anchor point.

[0246] Based on the sidewall region, the image row number and the offset position within the sidewall sampling band corresponding to each sampling position are extracted to obtain the sampling position sequence.

[0247] Based on the image row number of each sampling position in the sampling position sequence, the forward and backward ridge anchor points located on both sides of the image row number are determined in the ordered ridge anchor point sequence, thus obtaining the sampling position adjacent anchor point sequence.

[0248] Based on the sequence of adjacent anchor points at the sampling locations, the relative position ratio of each sampling location between the forward and backward layer anchor points is calculated to obtain the sampling location ratio sequence.

[0249] Based on the reference texture positions corresponding to the forward texture anchor points and backward texture anchor points, linear interpolation is performed according to the sampling position ratio sequence to obtain the reference unfolding position sequence corresponding to each sampling position.

[0250] Based on the actual image row number in the sampling position sequence and the reference image row number in the reference unfolding position sequence, the position difference of each sampling position in the image row direction is calculated to obtain the layer texture distribution offset sequence.

[0251] Based on the layer distribution offset sequence, a smooth offset sequence is obtained by performing a moving average within a local smoothing window according to the image row number order.

[0252] Based on the smooth offset sequence, the offset of each sampling position in the image row direction is reversed to obtain the expanded correction sequence.

[0253] Subtract the initial offset position of the sidewall sampling band from the offset position within the sidewall sampling band in the sampling position sequence to obtain the lateral unfolded coordinates of each sampling position in the unfolded plane.

[0254] Based on the actual image row number and unfolding correction sequence in the sampling position sequence, the longitudinal unfolding coordinates of each sampling position in the unfolding plane are calculated to obtain the unfolding mapping point sequence.

[0255] Based on the unfolded mapping point sequence, the sampling positions and corresponding unfolded plane coordinates within the sidewall region are registered to construct the unfolded coordinate field.

[0256] For example, the image row numbers corresponding to 8 consecutive layer anchor points in the layer anchor point sequence are 423, 455, 488, 520, 553, 586, 619, and 651, respectively, and the corresponding adjacent response spacings are 32, 33, 32, 33, 33, 33, and 32, respectively.

[0257] Five adjacent spacings were taken as local image row windows, and the median of the above adjacent response spacings was statistically analyzed to obtain a reference layer spacing of 33.

[0258] Using the ridge anchor point corresponding to image row 423 as the starting ridge anchor point, its reference ridge position is set to 423. The reference ridge spacing is accumulated segment by segment along the image row direction, and the reference ridge positions corresponding to the above 8 ridge anchor points are obtained as follows: 423, 456, 489, 522, 555, 588, 621, 654, thus obtaining the reference ridge position sequence.

[0259] The sidewall region covers image rows from 122 to 1560, with the starting offset position of the sidewall sampling band set to 6 pixels and the ending offset position set to 58 pixels.

[0260] Taking the sampling position of image line 470, offset by 18 pixels within the side wall sampling band as an example, the forward ridge anchor point and the backward ridge anchor point located on both sides of it are image line 455 and image line 488, respectively, and the corresponding reference ridge positions are 456 and 489, respectively.

[0261] The relative position ratio of image row 470 to image rows 455 and 488 is 15 divided by 33, which gives 0.455.

[0262] Based on the relative position ratio, linear interpolation is performed on the reference texture positions 456 and 489 to obtain the reference unfolding position corresponding to the sampling position as 471.

[0263] Based on the actual image row number 470 and the reference unfolding position 471, the layer texture distribution offset is calculated to be -1. Taking the opposite of this offset, the unfolding correction is 1. Subtracting the starting offset position from the offset position of 6 pixels within the sidewall sampling band of 18 pixels, the horizontal unfolding coordinate is 12. Adding the actual image row number 470 and the unfolding correction 1, the vertical unfolding coordinate is 471, thus obtaining the unfolding mapping point corresponding to this sampling position.

[0264] Taking the sampling position of image row 521 and the offset position of 28 pixels in the side wall sampling band as an example, the forward ridge anchor point and the backward ridge anchor point located on both sides of it are image row 520 and image row 553, respectively, and the corresponding reference ridge positions are 522 and 555, respectively.

[0265] The relative position ratio of image row 521 to image rows 520 and 553 is 1 divided by 33, which gives 0.030.

[0266] Based on the relative position ratio, linear interpolation is performed on the reference texture positions 522 and 555 to obtain the reference unfolding position 523 corresponding to the sampling position.

[0267] Based on the actual image row number 521 and the reference unfolding position 523, the layer texture distribution offset is calculated to be -2. Taking the opposite of this offset, the unfolding correction is 2.

[0268] Subtracting the initial offset position from the offset position of 6 pixels by 28 pixels within the sidewall sampling band, we get a horizontal expansion coordinate of 22.

[0269] Add the actual image row number 521 and the expansion correction amount 2 to obtain the vertical expansion coordinate 523, and obtain the expansion mapping point corresponding to this sampling position.

[0270] The same method is used to calculate the layer texture distribution offset and unfolding correction of all sampling positions corresponding to image rows 122 to 1560 and offset positions 6 to 58 pixels within the sidewall sampling band. Each sampling position and its corresponding horizontal unfolding coordinates and vertical unfolding coordinates are then registered to construct an unfolding coordinate field.

[0271] Step S2034: Based on the unfolded coordinate field, the sidewall region is resampled and unfolded, the layer spacing distribution at each sampling position after unfolding is extracted, and the layer spacing distribution is uniformly adjusted to obtain the unfolded sidewall image.

[0272] In this embodiment, based on the unfolded coordinate field, the original gray values, horizontal unfolded coordinates, and vertical unfolded coordinates corresponding to each sampling position within the sidewall region are extracted to obtain the unfolded mapping sample set.

[0273] Based on the horizontal and vertical expansion coordinates in the expansion mapping sample set, the horizontal and vertical ranges in the expansion plane are determined, and the expansion grid range is obtained.

[0274] Based on the expanded grid range, the integer coordinate positions in the expanded plane are traversed to obtain the target expanded grid.

[0275] Based on the target unfolded grid, the nearest valid sampling position in the horizontal and vertical distances around each integer coordinate position is found in the unfolded mapping sample set to obtain the neighboring mapping sample.

[0276] Determine the original grayscale value corresponding to the neighboring mapped samples and the coordinate distance from each neighboring mapped sample to the current integer coordinate position. Perform distance-weighted aggregation on the original grayscale values ​​to obtain the expanded grayscale value at the current integer coordinate position.

[0277] An initial sidewall unfolded image is constructed based on the unfolded grayscale values ​​at each integer coordinate position.

[0278] Based on the initial sidewall unfolded image, the vertical grayscale sequence corresponding to each horizontal unfolded coordinate is extracted to obtain the unfolded column response sequence.

[0279] Based on the expanded column response sequence, the gray values ​​of adjacent vertical positions are smoothed to obtain a smoothed column response sequence.

[0280] Based on the smooth column response sequence, the grayscale difference between adjacent vertical positions is calculated to obtain the column difference sequence.

[0281] Based on the column difference sequence, the position where the difference changes from positive to negative is determined to obtain the peak candidate position, and the position where the difference changes from negative to positive is determined to obtain the valley candidate position.

[0282] Based on the peak candidate position and the valley candidate position, the gray level difference between each candidate position and its adjacent positions is calculated to obtain the candidate response amplitude sequence.

[0283] Based on the candidate response amplitude sequence, candidate positions with response amplitudes greater than the candidate response amplitude threshold are retained to obtain the layer response points corresponding to each horizontal unfolding coordinate.

[0284] Based on the layer response points corresponding to each lateral unfolding coordinate, the distance between adjacent layer response points of the same polarity in the longitudinal unfolding direction is calculated to obtain the layer spacing sequence corresponding to each lateral unfolding coordinate.

[0285] Based on the layer spacing sequence corresponding to each horizontal unfolding coordinate, the layer spacing distribution at each sampling position after unfolding is obtained.

[0286] Based on the distribution of layer spacing, the median of the layer spacing corresponding to each longitudinal segment is statistically analyzed within the horizontal local window to obtain a local reference spacing sequence.

[0287] Based on the layer response points corresponding to each lateral expansion coordinate, the actual layer position sequence of each longitudinal segment is determined.

[0288] Based on the local reference spacing sequence and the first lamella position of each longitudinal segment, the local reference spacing is accumulated segment by segment along the longitudinal unfolding direction to obtain the target lamella position sequence of each longitudinal segment.

[0289] Based on the actual laminar texture position sequence and the target laminar texture position sequence, the segment stretching and segment compression of each longitudinal segment are calculated to obtain the longitudinal consistency correction sequence.

[0290] Based on the longitudinal uniformity correction sequence, the longitudinal grayscale sequence corresponding to each lateral unfolding coordinate in the initial sidewall unfolding image is segmented and remapped. During segmented remapping, the actual longitudinal segment between two adjacent texture response points is first determined, and then the target longitudinal segment corresponding to the actual longitudinal segment is determined. When the length of the actual longitudinal segment is greater than the length of the target longitudinal segment, the grayscale value in the actual longitudinal segment is compressed and mapped. When the length of the actual longitudinal segment is less than the length of the target longitudinal segment, the grayscale value in the actual longitudinal segment is stretched and mapped. When the length of the actual longitudinal segment is the same as the length of the target longitudinal segment, the position of the grayscale value in the actual longitudinal segment remains unchanged. The compression or stretching mapping is completed segment by segment for each longitudinal segment to obtain the uniform column image sequence.

[0291] Based on a uniform column image sequence, the sidewall unfolded image is obtained by combining the horizontal unfolded coordinates from smallest to largest.

[0292] Step S204: Based on the sidewall unfolded image, perform signed cumulative integration and integer quantization layering, and perform boundary correction on abnormal sequence segments to generate boundary response sequence set and corresponding boundary confidence sequence set.

[0293] The specific steps of step S204 are as follows:

[0294] Step S2041: Based on the sidewall unfolded image, extract the signed grayscale response at each sampling position along the main contour extension direction of the material sidewall to obtain a column response sequence set.

[0295] In this embodiment, based on the sidewall unfolded image, the gray values ​​of each column in the vertical unfolded direction are extracted according to the horizontal unfolded coordinates to obtain the column gray value sequence set.

[0296] The upper and lower boundaries of the sidewall unfolded image are determined. Based on the upper and lower boundaries of the sidewall unfolded image, the sampling positions of the forward and backward neighborhoods with lengths satisfying the preset neighborhood window length are determined, and the effective sampling positions of each column are obtained. The neighborhood window length is set by those skilled in the art according to the actual situation.

[0297] For example, the neighborhood window length is 3 pixels.

[0298] Based on the column grayscale sequence set, at each effective sampling position in each column, the forward neighborhood grayscale value before the sampling position and the backward neighborhood grayscale value after the sampling position are extracted along the vertical expansion direction to obtain the forward grayscale subsequence and the backward grayscale subsequence.

[0299] Based on the forward grayscale subsequence and the backward grayscale subsequence, the forward grayscale mean and the backward grayscale mean are calculated respectively to obtain the forward mean sequence and the backward mean sequence.

[0300] Based on the forward mean sequence and the backward mean sequence, the difference between the backward mean and the forward mean is calculated to obtain the signed gray-level response sequence at each effective sampling position.

[0301] Based on the signed grayscale response sequences of each column, the columns are organized according to the horizontal coordinates to obtain the column response sequence set.

[0302] Step S2042: Based on the column response sequence set, perform signed cumulative integration to generate a single-layer cumulative scale, and perform integer quantization layering to obtain the initial stratification position map.

[0303] The specific steps of step S2042 are as follows:

[0304] Step S20421: Based on the column response sequence set, perform baseline elimination and signed cumulative integration on each column response sequence to obtain the cumulative quantity curve set corresponding to each column.

[0305] In this embodiment, based on the column response sequence set, the signed grayscale response values ​​of each column in the vertical expansion direction are extracted according to the horizontal expansion coordinates to obtain the column response sample set.

[0306] Based on the response sample sets of each column, the mean response of the sampling positions near each sampling position is statistically analyzed within the vertical sliding window to obtain the local baseline sequence.

[0307] Based on the response sample sets of each column and the local baseline sequence, the signed gray response value at each sampling position is subtracted from the corresponding local baseline value to obtain the baseline-de-baseline response sequence.

[0308] Based on the baseline-removed response sequence, the response values ​​of consecutive preset baseline-removed response lengths at the starting positions of each column are extracted, and the initial mean is calculated to obtain the initial bias value. The baseline-removed response length is set by those skilled in the art according to the actual situation.

[0309] For example, the baseline response length is taken at 5 sampling locations.

[0310] Based on the baseline-debasement response sequence and the initial bias value, the baseline-debasement response values ​​of each column are further shifted and corrected to obtain the zero baseline response sequence.

[0311] Based on the zero reference response sequence, signed accumulation is performed point by point from top to bottom in the vertical expansion direction. The zero reference response value at the current sampling position is added to the cumulative value at the previous sampling position to calculate the cumulative value at the current sampling position, thus obtaining the cumulative value sequence.

[0312] Based on the cumulative quantity sequence of each column, extract the horizontal expansion coordinates corresponding to each cumulative quantity sequence to construct an initial cumulative quantity curve set.

[0313] Based on the initial cumulative curve set, the difference between the first and last cumulative values ​​of each cumulative value sequence is calculated to obtain the endpoint offset result.

[0314] Based on the endpoint offset results, drift columns with a difference between the first and last cumulative amounts greater than a preset endpoint offset threshold are determined, thus obtaining a set of columns to be called back. The endpoint offset threshold is set by those skilled in the art according to the actual situation.

[0315] For example, the endpoint offset threshold is set to 12.

[0316] Based on the set of columns to be called back, a linear callback is performed on the cumulative quantity sequence of the corresponding column to obtain the corrected cumulative quantity sequence.

[0317] Based on the corrected cumulative quantity sequence and the cumulative quantity sequence that does not fall into the column set to be called back, the cumulative quantity curve set is reconstructed to obtain the cumulative quantity curve set corresponding to each column.

[0318] Step S20422: Based on the cumulative quantity curve set, identify the smooth sections that are continuous in adjacent columns and have similar trends in cumulative quantity change, and obtain the boundary response stable section.

[0319] In this embodiment, based on the cumulative quantity curve set, the cumulative quantity sequences corresponding to two adjacent columns are extracted according to the horizontal expansion coordinates from small to large to obtain the adjacent column curve pair set.

[0320] Based on the set of adjacent column curve pairs, the cumulative difference between adjacent sampling positions of the cumulative quantity sequence of each column is calculated along the vertical expansion direction to obtain the column slope sequence.

[0321] Based on the column slope sequence, the mean of the slope and the number of times the slope sign changes within each window are statistically analyzed within the vertical sliding window to obtain the window smoothing feature sequence.

[0322] Based on the window smooth feature sequence, vertical windows with an absolute value of the mean slope not greater than a preset smooth slope threshold and a number of slope sign changes not greater than a preset sign change threshold are retained to obtain the smooth window set corresponding to each column. The smooth slope threshold and sign change threshold are set by those skilled in the art according to the actual situation.

[0323] For example, the threshold for a gentle slope is set to 1.8, and the threshold for a sign change is set to 2.

[0324] Based on the set of smooth windows corresponding to each column, smooth windows that are continuous and overlapping in the vertical position are merged to obtain the set of smooth segments corresponding to each column.

[0325] Based on the adjacent smooth sections in the adjacent column curve pair set, the difference in center position and the overlap length of the adjacent smooth sections are calculated to obtain the position continuity parameter.

[0326] Based on the column slope sequence within two adjacent smooth sections, the difference in the mean slope and the difference in the cumulative increment of the two smooth sections are calculated to obtain the trend approximation parameter.

[0327] Based on the position continuity parameter and trend proximity parameter, adjacent column smooth sections are retained where the center position difference is not greater than a preset position continuity threshold, the overlap length is not less than a preset minimum overlap length, the slope mean difference is not greater than a preset trend difference threshold, and the cumulative increment difference is not greater than a preset increment difference threshold. This results in column matching smooth section pairs. The position continuity threshold, minimum overlap length, trend difference threshold, and increment difference threshold are set by those skilled in the art according to the actual situation.

[0328] For example, the positional continuity threshold is set to 4 pixels, the minimum overlap length is set to 12 pixels, the trend difference threshold is set to 0.8, and the incremental difference threshold is set to 3.0.

[0329] Based on the pairs of smooth sections matched between columns, the smooth sections that can be connected column by column are horizontally spliced ​​according to the horizontal expansion coordinate direction to obtain horizontally continuous segments.

[0330] Based on the horizontal continuous segments, the number of columns covered and the vertical coverage length of each horizontal continuous segment are counted to obtain the segment continuity feature.

[0331] Based on the segment continuity feature, horizontally continuous segments with a coverage number not less than a preset minimum column coverage number and a vertical coverage length not less than a preset minimum vertical length are retained to obtain boundary response stable segments. The minimum column coverage number and minimum vertical length are set by those skilled in the art according to the actual situation.

[0332] For example, the minimum column coverage is 4 columns and the minimum vertical length is 20 pixels.

[0333] like Figure 2 As shown, step S20423: Based on the boundary response stable segment, determine the single-layer candidate transition unit set, and perform main class merging and alignment superposition to construct a single-layer response unit cell and generate a single-layer cumulative scale.

[0334] The specific steps of step S20423 are as follows:

[0335] Step S204231: Based on the stable segment of the boundary response, determine the smooth segments that are adjacent to each other in the same cumulative quantity curve and the transition segments between the adjacent smooth segments to obtain a single-layer candidate transition unit set.

[0336] In this embodiment, based on the stable boundary response segments, the horizontal and vertical expansion coordinate ranges corresponding to each stable boundary response segment are extracted to obtain the stable segment location set.

[0337] Based on the set of stable segment locations and the set of cumulative quantity curves, the position where each boundary response stable segment falls in each cumulative quantity curve is determined, resulting in a set of curve stable segment markers. The set of curve stable segment markers is a set of smooth position markers on each cumulative quantity curve that intersect with the boundary response stable segment.

[0338] Based on the stable segment marker set of the curve, the smooth segments in each cumulative curve are extracted according to the vertical expansion coordinate from small to large, resulting in a single-column smooth segment sequence.

[0339] Based on the sequence of single-column smooth sections, the longitudinal positional order of two adjacent smooth sections in the same cumulative curve is compared to obtain the forward smooth section and the backward smooth section. The forward smooth section is the smooth section that is earlier in the longitudinal position, and the backward smooth section is the smooth section that is later in the longitudinal position.

[0340] Based on the end position of the forward smooth section and the beginning position of the backward smooth section, the cumulative curve segment between the two is extracted to obtain the inter-segment curve segment.

[0341] Based on the curve segments between segments, all sampling positions between the end position of the forward smooth segment and the beginning position of the backward smooth segment are determined to obtain the transition segment.

[0342] Based on the forward smooth section, the backward smooth section, and the transition section, a pair of adjacent smooth sections is obtained. The pair of adjacent smooth sections is a pair of adjacent smooth sections in the same cumulative curve in which no other smooth section is inserted.

[0343] Based on adjacent smooth sections, the cumulative values ​​of each sampling position within the forward smooth section are extracted, and the section mean and section length of the forward smooth section are calculated to obtain the forward smooth feature.

[0344] Based on the pairs of adjacent smooth sections, the cumulative values ​​of each sampling position in the backward smooth section are extracted, and the section mean and section length of the backward smooth section are calculated to obtain the backward smooth feature.

[0345] Based on the transition section, the cumulative values ​​of each sampling position within the transition section are extracted, and the section length, the difference between the first and last cumulative values, the range of cumulative values, and the direction of change of cumulative values ​​are calculated to obtain the transition characteristics. The direction of change of cumulative values ​​is determined according to the relationship between the cumulative values ​​at the end and the beginning of the transition section. When the cumulative value at the end is greater than the cumulative value at the beginning, it is determined to be an upward transition, and when the cumulative value at the end is less than the cumulative value at the beginning, it is determined to be a downward transition.

[0346] Based on forward smoothness features, backward smoothness features, and transition features, the mean difference between the forward and backward smoothness sections and the cumulative change range of the transition section are calculated to obtain the unit discrimination features.

[0347] Based on the unit discrimination features, pairs of adjacent smooth sections are retained if the mean difference between the preceding and following smooth sections is greater than a preset mean difference threshold, the cumulative change in the transition section is greater than a preset transition amplitude threshold, the length of the transition section falls within a preset length range, and the proportion of the cumulative change direction of the transition section maintaining consistency within the section is greater than a preset directional consistency threshold. These are used to obtain initial candidate transition units. The directional consistency proportion is the ratio of the number of sampling positions within the transition section that are consistent with the overall change direction of the cumulative amount to the total number of sampling positions in the transition section. The mean difference threshold, transition amplitude threshold, length range, and directional consistency threshold are set by those skilled in the art according to the actual situation.

[0348] Based on the initial candidate transition units, the longitudinal positional overlap relationship of the forward smooth section, backward smooth section and transition section of adjacent initial candidate transition units is compared to obtain the unit overlap relationship.

[0349] Based on the unit overlap relationship, initial candidate transition units with a mean difference greater than a preset retention mean difference threshold and a directional consistency ratio greater than a preset directional consistency overlap ratio threshold are retained. The remaining units with an overlap ratio greater than a preset overlap threshold with the retained units in the transition section are removed to obtain a single-layer candidate transition unit set. The directional consistency overlap ratio threshold and overlap threshold are set by those skilled in the art according to the actual situation.

[0350] Based on the set of single-layer candidate transition units, the following parameters are extracted for each single-layer candidate transition unit: horizontal expansion coordinates, starting position of the forward smooth section, ending position of the forward smooth section, starting position of the transition section, ending position of the transition section, starting position of the backward smooth section, ending position of the backward smooth section, mean value of the forward smooth section, mean value of the backward smooth section, direction of change of cumulative amount of transition section, and magnitude of change of cumulative amount of transition section, thus obtaining the single-layer candidate transition unit record.

[0351] Based on the single-layer candidate transition unit record, the candidate units corresponding to each horizontal expansion coordinate are organized to obtain the single-layer candidate transition unit set.

[0352] For example, the mean difference threshold is set to 6.0, the transition amplitude threshold is set to 8.0, the lower limit of the transition segment length is set to 8 sampling positions, the upper limit of the transition segment length is set to 36 sampling positions, the directional consistency threshold is set to 0.75, the mean difference retention threshold is set to 9.0, the directional consistency overlap ratio threshold is set to 0.80, and the overlap threshold is set to 0.60.

[0353] The initial candidate transition units are sorted from largest to smallest by the difference in mean. If the difference in mean is the same, they are sorted from largest to smallest by the proportion of directional consistency. Then, according to the sorting results, they are retained and removed in turn.

[0354] In the cumulative curve corresponding to the horizontal expansion coordinate 12, there are 3 smooth segments that fall into the stable segment of the boundary response, with the vertical positions being: 424 to 434, 456 to 466, and 489 to 499.

[0355] The longitudinal positions 424 to 434 are defined as the forward gentle section, and the longitudinal positions 456 to 466 are defined as the backward gentle section.

[0356] The cumulative values ​​corresponding to the longitudinal positions 424 to 434 are as follows: 18.2, 18.3, 18.4, 18.5, 18.6, 18.6, 18.7, 18.8, 18.9, 19.0, and 18.6. The sum of these 11 values ​​is 204.6, and the average value of the forward flat section is 18.6.

[0357] The cumulative values ​​corresponding to the vertical positions 456 to 466 are 29.7, 29.8, 29.9, 30.0, 30.1, 30.1, 30.2, 30.3, 30.4, 30.5, and 30.1, respectively. The sum of these 11 values ​​is 331.1, and the average value of the subsequent flat section is 30.1.

[0358] The difference in mean between the two flat sections is 30.1 minus 18.6, which gives 11.5.

[0359] Based on the end position 434 of the forward smooth section and the start position 456 of the backward smooth section, the cumulative curve segment from the longitudinal position 435 to 455 is extracted to obtain the transition section.

[0360] The cumulative values ​​corresponding to the vertical positions 435 to 455 are as follows: 19.2, 19.4, 19.6, 20.0, 20.5, 21.0, 21.6, 22.1, 22.7, 23.3, 24.0, 24.6, 25.1, 25.7, 26.2, 26.8, 27.3, 27.9, 28.5, 29.0, and 29.4. The length of the transition section is 21. The cumulative value at the beginning of the transition section is 19.2, and the cumulative value at the end is 29.4. The change range of the cumulative value in the transition section is: 29.4 minus 19.2, resulting in 10.2.

[0361] If the cumulative amount at the end is greater than the cumulative amount at the beginning, the direction of change in the cumulative amount is determined to be an upward transition.

[0362] The cumulative differences between adjacent sampling positions within the vertical range of 435 to 455 were statistically analyzed, resulting in 20 adjacent differences: 0.2, 0.2, 0.4, 0.5, 0.5, 0.6, 0.5, 0.6, 0.6, 0.7, 0.6, 0.5, 0.6, 0.5, 0.6, 0.5, 0.6, 0.6, 0.5, 0.4. All 20 adjacent differences are positive, and the number of adjacent differences consistent with the overall upward direction is 20. The total number of adjacent differences is 20, and the percentage of consistent direction is 20 divided by 20, which equals 1.000.

[0363] 11.5 is greater than 6.0, 10.2 is greater than 8.0, 21 falls between 8 and 36, and 1.000 is greater than 0.75. The adjacent smooth sections before and after are retained to obtain the first initial candidate transition unit.

[0364] In the cumulative curve corresponding to the horizontally expanded coordinate 12, the vertical positions 456 to 466 are defined as the forward smooth section, and the vertical positions 489 to 499 are defined as the backward smooth section. The cumulative values ​​corresponding to the vertical positions 489 to 499 are 19.9, 20.0, 20.1, 20.2, 20.3, 20.4, 20.5, 20.6, 20.7, 20.8, and 20.9, respectively. The sum of these 11 values ​​is 224.4. The average value of the backward smooth section is 20.4, and the average value of the forward smooth section remains 30.1. The difference between the average values ​​of the forward and backward smooth sections is 30.1 minus 20.4, which gives 9.7.

[0365] Based on the end position 466 of the forward smooth section and the start position 489 of the backward smooth section, the cumulative quantity curve segment from the longitudinal position 467 to 488 is extracted to obtain the transition section. The cumulative quantity values ​​corresponding to the longitudinal positions 467 to 488 are as follows: 29.7, 29.4, 29.0, 28.5, 28.1, 27.6, 27.2, 26.8, 26.3, 25.9, 25.5, 25.0, 24.6, 24.1, 23.7, 23.2, 22.8, 22.4, 21.9, 21.5, 21.0, 20.5. The length of the transition section is 22. The cumulative quantity at the beginning of the transition section is 29.7, and the cumulative quantity at the end is 20.5. The change range of the cumulative quantity in the transition section is 29.7 minus 20.5, which equals 9.2. The cumulative quantity at the end is less than the cumulative quantity at the beginning, so the direction of change of the cumulative quantity is determined to be a downward transition.

[0366] The cumulative difference between adjacent sampling positions within the vertical range of 467 to 488 was statistically analyzed, and 21 adjacent differences were found to be negative. The number of adjacent differences that are consistent with the overall downward direction is 21. The total number of adjacent differences is 21, and the percentage of consistent direction is 21 divided by 21, which is 1.000.

[0367] 9.7 is greater than 6.0, 9.2 is greater than 8.0, 22 falls between 8 and 36, and 1.000 is greater than 0.75. The adjacent smooth sections before and after are retained to obtain the second initial candidate transition unit.

[0368] In the cumulative curve corresponding to the horizontal expansion coordinate 13, the gentler sections that fall into the stable boundary response range are 425 to 435, 457 to 467, and 490 to 500.

[0369] The longitudinal positions from 425 to 435 are defined as the forward gentle section, and the longitudinal positions from 457 to 467 are defined as the backward gentle section.

[0370] The cumulative values ​​corresponding to the longitudinal positions 425 to 435 are: 18.0, 18.1, 18.2, 18.3, 18.4, 18.4, 18.5, 18.6, 18.7, 18.8, and 18.4, with a sum of 11 values ​​of 202.4. The average value for the forward smooth section is 18.4. The cumulative values ​​corresponding to the longitudinal positions 457 to 467 are: 27.8, 27.9, 28.0, 28.1, 28.2, 28.2, 28.3, 28.4, 28.5, 28.6, and 28.2, with a sum of 11 values ​​of 310.2. The average value for the backward smooth section is 28.2. The difference between the average values ​​for the forward and backward smooth sections is 28.2 minus 18.4, which equals 9.8.

[0371] Based on the end position 435 of the forward smooth section and the start position 457 of the backward smooth section, the cumulative curve segment from the longitudinal position 436 to 456 is extracted to obtain the transition section.

[0372] The cumulative values ​​corresponding to the vertical positions 436 to 456 are as follows: 18.8, 19.0, 19.4, 19.9, 20.3, 20.8, 21.2, 21.7, 22.1, 22.6, 23.0, 23.4, 23.9, 24.4, 24.8, 25.3, 25.8, 26.2, 26.7, 27.3, 28.0. The length of the transition section is 21. The cumulative value at the beginning of the transition section is 18.8, and the cumulative value at the end is 28.0. The change range of the cumulative value in the transition section is 28.0 minus 18.8, which equals 9.2. The cumulative value at the end is greater than the cumulative value at the beginning, so the direction of the cumulative value change is upward transition.

[0373] The cumulative difference between adjacent sampling positions in the longitudinal position from 436 to 456 was statistically analyzed, and 20 adjacent differences were found to be positive. The directional consistency ratio was: 20 divided by 20, which gives 1.000, 9.8 is greater than 6.0, 9.2 is greater than 8.0, 21 falls between 8 and 36, and 1.000 is greater than 0.75. The adjacent smooth sections before and after this were retained, and the third initial candidate transition unit was obtained.

[0374] The overlap relationship of the transition segments of the first initial candidate transition unit and the third initial candidate transition unit is compared. The transition segment of the first initial candidate transition unit is from 435 to 455, with a length of 21; the transition segment of the third initial candidate transition unit is from 436 to 456, with a length of 21; the overlap segment of the two is from 436 to 455, with an overlap length of 20.

[0375] Based on the overlap length 20 and the transition segment length 21 of the first initial candidate transition unit, the overlap ratio is calculated by dividing 20 by 21, resulting in 0.952.

[0376] The mean difference of the first initial candidate transition unit is 11.5, and the directional consistency ratio is 1.000. Since both are greater than 9.0 and 0.80, the first initial candidate transition unit is retained.

[0377] The overlap ratio between the third initial candidate transition unit and the retained units is 0.952, which is greater than 0.60, and the mean difference of 9.8 is less than that of the retained units (11.5). Therefore, the third initial candidate transition unit is removed.

[0378] The transition segment of the second initial candidate transition unit is from 467 to 488, which does not overlap with the transition segment of the first initial candidate transition unit from 435 to 455. The overlap length is 0 and the overlap ratio is 0. The second initial candidate transition unit is retained.

[0379] Based on the retained units, the following coordinates are extracted: horizontal expansion coordinate 12, starting position of the forward smooth section 424, ending position of the forward smooth section 434, starting position of the transition section 435, ending position of the transition section 455, starting position of the backward smooth section 456, ending position of the backward smooth section 466, average value of the forward smooth section 18.6, average value of the backward smooth section 30.1, upward transition direction of cumulative change in the transition section, and amplitude of cumulative change in the transition section 10.2, thus obtaining the first single-layer candidate transition unit record.

[0380] Extract the horizontal expansion coordinates 12, the starting position of the forward smooth section 456, the ending position of the forward smooth section 466, the starting position of the transition section 467, the ending position of the transition section 488, the starting position of the backward smooth section 489, the ending position of the backward smooth section 499, the average value of the forward smooth section 30.1, the average value of the backward smooth section 20.4, the direction of the cumulative change of the transition section decreasing, and the amplitude of the cumulative change of the transition section 9.2 to obtain the second single-layer candidate transition unit record.

[0381] The cumulative curves corresponding to the horizontal expansion coordinates from 0 to 52 are processed column by column in the same way to obtain a set of single-layer candidate transition units.

[0382] Step S204232: Based on the single-layer candidate transition unit set, the cumulative amount and transition width of each candidate transition unit are normalized to obtain the standardized transition unit set.

[0383] In this embodiment, based on the single-layer candidate transition unit set, the mean of the forward smooth section, the mean of the backward smooth section, the start position of the transition section, the end position of the transition section, the direction of change of the cumulative amount of the transition section, and the cumulative amount of each sampling position in the transition section are extracted for each single-layer candidate transition unit to obtain the original dataset of the transition unit.

[0384] Based on the original dataset of the transition unit, the absolute value of the mean difference between the smooth sections before and after each single-layer candidate transition unit is calculated to obtain the cumulative normalized scale sequence.

[0385] Based on the cumulative normalized scale sequence, single-layer candidate transition units with an absolute value of mean difference greater than zero are identified, thus obtaining the effective normalized unit set.

[0386] Based on the effective normalized unit set, for single-layer candidate transition units with an upward transition direction of cumulative change, the cumulative value of each sampling position in the transition segment is extracted point by point. The cumulative value of each sampling position is subtracted from the mean of the forward smooth segment, and the difference is divided by the absolute value of the difference between the mean of the forward and backward smooth segments to obtain the upward transition normalized cumulative value sequence.

[0387] Based on the effective normalized unit set, for single-layer candidate transition units with a decreasing cumulative change direction, the cumulative value of each sampling position in the transition segment is extracted point by point. The cumulative value of each sampling position is subtracted from the mean of the forward smooth segment, and the difference is divided by the absolute value of the difference between the mean of the forward and backward smooth segments to obtain the decreasing transition normalized cumulative value sequence.

[0388] Based on the normalized cumulative value sequence of the rising transition and the normalized cumulative value sequence of the falling transition, the forward smooth section of each single-layer candidate transition unit is uniformly mapped to the low value end, and the backward smooth section is uniformly mapped to the high value end, thus obtaining the normalized cumulative value sequence.

[0389] Based on the normalized cumulative quantity sequence, the transition fluctuation pattern of each single-layer candidate transition unit under the same cumulative quantity scale is determined, and the cumulative quantity normalization result is obtained.

[0390] Based on the effective normalized unit set, the difference between the end position and the start position of the transition segment of each single-layer candidate transition unit is calculated and incremented by one to calculate the sampling length of the transition segment, thus obtaining the transition width sequence.

[0391] Based on the transition width sequence, the actual positions of each sampling position within the transition section of each single-layer candidate transition unit are extracted. According to the order from the start position to the end position of the transition section, the distance between each sampling position and the start position of the transition section is divided by the value of the transition section sampling length minus one, to obtain the width-normalized position sequence.

[0392] Based on the width normalized position sequence, the standard width position sequence corresponding to the preset standard width sampling number is extracted. The standard width sampling number is set by those skilled in the art according to the actual situation.

[0393] Based on the standard width position sequence, the adjacent normalized positions are found point by point in the width normalized position sequence of each single-layer candidate transition unit, and the corresponding normalized cumulative values ​​are linearly interpolated to obtain the standard width cumulative value sequence.

[0394] Based on the standard width cumulative quantity sequence, the horizontal expansion coordinates, the start position of the transition section, the end position of the transition section, the direction of cumulative quantity change, and the standard width cumulative quantity sequence corresponding to each single-layer candidate transition unit are extracted to obtain the standardized transition unit record.

[0395] Based on the standardized transition unit records, the standardized transition unit sets are obtained by organizing them from smallest to largest according to the horizontal expansion coordinates.

[0396] For example, the standard width sampling number is 11. The first single-layer candidate transition unit record corresponding to the horizontal expansion coordinate 12 is processed. The average value of the forward smooth section is 18.6, the average value of the backward smooth section is 30.1, the absolute value of the difference between the average values ​​of the forward and backward smooth sections is 11.5, the starting position of the transition section is 435, the ending position of the transition section is 455, and the sampling length of the transition section is 21.

[0397] This unit is an upward transition, and the cumulative values ​​at vertical positions 435 to 455 are as follows: 19.2, 19.4, 19.6, 20.0, 20.5, 21.0, 21.6, 22.1, 22.7, 23.3, 24.0, 24.6, 25.1, 25.7, 26.2, 26.8, 27.3, 27.9, 28.5, 29.0, 29.4.

[0398] Subtract the average value of the forward smooth section (18.6) from each of the above cumulative values, and then divide by 11.5 to obtain the normalized cumulative value sequence. The normalized cumulative values ​​corresponding to the vertical positions 435, 437, 439, 441, 443, 445, 447, 449, 451, 453, and 455 are 0.052, 0.087, 0.165, 0.261, 0.357, 0.470, 0.565, 0.661, 0.757, 0.861, and 0.939, respectively.

[0399] The 21 sampling positions corresponding to the vertical positions 435 to 455 are normalized in width from the start position 435 to the end position 455, resulting in the width-normalized position sequence: 0.00, 0.05, 0.10, 0.15, 0.20, 0.25, 0.30, 0.35, 0.40, 0.45, 0.50, 0.55, 0.60, 0.65, 0.70, 0.75, 0.80, 0.85, 0.90, 0.95, 1.00.

[0400] The standard width sampling number is 11, and the standard width position sequence is determined as follows: 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00.

[0401] Based on the standard width position sequence and the width normalized position sequence, the corresponding normalized cumulative values ​​are extracted to obtain the standard width cumulative value sequence 0.052, 0.087, 0.165, 0.261, 0.357, 0.470, 0.565, 0.661, 0.757, 0.861, 0.939, resulting in one standardized transition unit record.

[0402] The second single-layer candidate transition unit record corresponding to the horizontal expansion coordinate 12 is processed. The mean value of the forward smooth section is 30.1, the mean value of the backward smooth section is 20.4, the absolute value of the difference between the mean values ​​of the forward and backward smooth sections is 9.7, the starting position of the transition section is 467, the ending position of the transition section is 488, and the sampling length of the transition section is 22.

[0403] This unit is a descending transition. The cumulative values ​​at vertical positions 467 to 488 are as follows: 29.7, 29.4, 29.0, 28.5, 28.1, 27.6, 27.2, 26.8, 26.3, 25.9, 25.5, 25.0, 24.6, 24.1, 23.7, 23.2, 22.8, 22.4, 21.9, 21.5, 21.0, and 20.5. Subtracting each of the above cumulative values ​​from the average of the forward smooth section of 30.1, and then dividing each by 9.7, yields the normalized cumulative value sequence for the descending transition.

[0404] The normalized cumulative values ​​corresponding to the vertical positions 467, 469, 471, 473, 475, 477, 479, 481, 483, 485, and 488 are 0.041, 0.113, 0.206, 0.258, 0.392, 0.474, 0.567, 0.649, 0.742, 0.825, and 0.990, respectively.

[0405] The 22 sampling positions corresponding to the vertical positions 467 to 488 are normalized in width from the start position 467 to the end position 488 to obtain a width-normalized position sequence from zero to one room.

[0406] Based on the standard width position sequence, linear interpolation is performed on the descending transition normalized cumulative quantity sequence to obtain the standard width cumulative quantity sequence corresponding to the cell.

[0407] The cumulative amount and transition width of all single-layer candidate transition unit records are normalized in the same way to obtain a standardized transition unit set.

[0408] Step S204233: Based on the standardized transition unit set, extract the consistency representation of each candidate transition unit, and perform main class merging and anomaly removal to obtain the main class transition unit set.

[0409] In this embodiment, based on the standardized transition unit set, the standard width cumulative quantity sequence corresponding to each candidate transition unit is extracted to obtain the unit standard sequence set.

[0410] Based on the standard sequence set of units, the cumulative values ​​of each candidate transition unit at the start, middle and end positions of the standard width are extracted to obtain the unit position feature set.

[0411] Based on the standard sequence set of units, the standard width cumulative sequence of each candidate transition unit is subtracted from each adjacent sequence to obtain the unit difference sequence set.

[0412] Based on the unit difference sequence set, the proportion of adjacent difference values ​​of each candidate transition unit that are greater than zero is counted to obtain the unit change feature set.

[0413] Based on the unit location feature set and the unit change feature set, a consistency characterization set for each candidate transition unit is obtained.

[0414] Based on the consistent representation set, the consistent representation quantities of adjacent candidate transition units are extracted from small to large according to the horizontal expansion coordinates to obtain the adjacent unit representation pair set.

[0415] Based on the neighboring unit characterization set, the differences between adjacent candidate transition units in terms of initial cumulative value, intermediate cumulative value, final cumulative value, and differential positive value ratio are calculated to obtain the neighboring unit difference set.

[0416] Based on the difference set of adjacent units, the initial cumulative value difference, the intermediate cumulative value difference, the final cumulative value difference, and the difference in the proportion of positive differential values ​​are summed to obtain the consistency difference between adjacent units.

[0417] Based on the consistency difference between adjacent units, adjacent candidate transition unit pairs with a consistency difference not greater than a preset adjacent unit consistency threshold are retained to obtain a set of locally consistent unit pairs. The adjacent unit consistency threshold is set by those skilled in the art according to the actual situation.

[0418] Based on the set of locally consistent units, candidate transition units that can be connected column by column along the horizontal expansion coordinate are spliced ​​together to obtain a set of unit connection fragments.

[0419] Based on the unit connection fragment set, the number of candidate transition units and the lateral continuity length contained in each unit connection fragment are counted to obtain the fragment aggregation feature set.

[0420] Based on the fragment aggregation feature set, unit connection fragments with a candidate transition unit number not less than a preset main class number threshold and a horizontal continuous length not less than a preset main class length threshold are retained to obtain a main class candidate fragment set. The main class number threshold and the main class length threshold are set by those skilled in the art according to the actual situation.

[0421] Based on the main class candidate fragment set, extract the standard width cumulative quantity sequence corresponding to each candidate transition unit within the fragment, and calculate the median of the cumulative quantity at the same standard width position to obtain the main class reference sequence.

[0422] Based on the main class reference sequence, the cumulative difference between each candidate transition unit at each standard width position and the corresponding position in the main class reference sequence is extracted to obtain the unit reference difference sequence.

[0423] Based on the unit reference difference sequence, the average difference and maximum difference between each candidate transition unit and the main class reference sequence are statistically analyzed to obtain the unit deviation feature set.

[0424] Based on the unit deviation feature set, candidate transition units with an average difference not greater than a preset average deviation threshold and a maximum difference not greater than a preset maximum deviation threshold are retained to obtain the main class retained unit set. The average deviation threshold and the maximum deviation threshold are set by those skilled in the art according to the actual situation.

[0425] Based on the main class retained unit set, candidate transition units with a differential positive value ratio less than the preset direction consistency retention threshold are filtered out to obtain the main class transition unit set. The direction consistency retention threshold is set by those skilled in the art according to the actual situation.

[0426] For example, the adjacent unit consistency threshold is set to 0.15, the main class number threshold is set to 3, the main class length threshold is set to 3 columns, the average deviation threshold is set to 0.04, the maximum deviation threshold is set to 0.10, and the direction consistency retention threshold is set to 0.90.

[0427] The cumulative standard width sequences of the four candidate transition units corresponding to the horizontal expansion coordinates 12, 13, 14, and 15 are as follows: The sequence corresponding to the horizontal expansion coordinate 12 is: 0.052, 0.087, 0.165, 0.261, 0.357, 0.470, 0.565, 0.661, 0.757, 0.861, 0.939; the sequence corresponding to the horizontal expansion coordinate 13 is: 0.041, 0.113, 0.206, 0.258, 0.392, 0.474, 0.567, 0. The values ​​649, 0.742, 0.825, and 0.990 correspond to the following sequences when horizontally expanded to coordinate 14: 0.060, 0.101, 0.188, 0.274, 0.366, 0.481, 0.579, 0.672, 0.768, 0.872, and 0.951. The values ​​0.030, 0.062, 0.095, 0.210, 0.480, 0.760, 0.910, 0.955, 0.970, 0.982, and 0.995.

[0428] Based on the corresponding sequence of horizontally expanded coordinates 12, the cumulative values ​​of the starting, middle and ending positions of the standard width are extracted, yielding 0.052, 0.470 and 0.939.

[0429] The sequence is subtracted from each other, resulting in the following values: 0.035, 0.078, 0.096, 0.096, 0.113, 0.095, 0.096, 0.096, 0.104, and 0.078. All 10 difference values ​​are greater than zero, resulting in a positive difference ratio of 1.000. This yields the consistency representation corresponding to the horizontal expansion coordinate 12.

[0430] The sequences corresponding to the horizontally expanded coordinates 13, 14, and 15 are processed in the same way, and the cumulative values ​​at the starting position, the middle position, the ending position, and the proportion of the differential positive values ​​are obtained as follows: 0.041, 0.474, 0.990, and 1.000 for horizontally expanded coordinate 13; 0.060, 0.481, 0.951, and 1.000 for horizontally expanded coordinate 14; and 0.030, 0.760, 0.995, and 1.000 for horizontally expanded coordinate 15, thus obtaining the set of consistent characterization quantities.

[0431] Based on the consistency representation quantities corresponding to the horizontal expansion coordinates 12 and 13, the initial cumulative value difference of 0.011, the intermediate cumulative value difference of 0.004, the final cumulative value difference of 0.051, and the difference in positive differential value ratio of 0 are calculated. The above four differences are summed to obtain the consistency difference between adjacent units of 0.066.

[0432] Based on the consistency representation values ​​corresponding to the horizontally expanded coordinates 13 and 14, the consistency difference between adjacent units is calculated in the same way, resulting in a value of 0.065.

[0433] Based on the consistency representation values ​​corresponding to the horizontally expanded coordinates 14 and 15, the consistency difference between adjacent units is calculated in the same way, resulting in a value of 0.353.

[0434] 0.066 is no greater than 0.15, and the adjacent candidate transition unit pairs formed by the horizontal expansion coordinates 12 and 13 are retained.

[0435] 0.065 is no greater than 0.15, and the adjacent candidate transition unit pairs formed by the horizontal expansion coordinates 13 and 14 are retained.

[0436] 0.353 is greater than 0.15. The adjacent candidate transition unit pairs formed by the horizontal expansion coordinates 14 and 15 are removed to obtain the set of locally consistent unit pairs.

[0437] Based on the locally consistent unit pair set, the candidate transition units corresponding to the horizontally expanded coordinates 12, 13, and 14 are connected column by column to obtain the unit connection fragment. This unit connection fragment contains 3 candidate transition units with a horizontal continuous length of 3 columns, satisfying the main class number threshold of 3 and the main class length threshold of 3, thus obtaining the main class candidate fragment set.

[0438] Based on the three standard width cumulative quantity sequences corresponding to the horizontal expansion coordinates 12, 13, and 14, the median of the cumulative quantity is calculated at each of the 11 standard width positions to obtain the main class reference sequence: 0.052, 0.101, 0.188, 0.261, 0.366, 0.474, 0.567, 0.661, 0.757, 0.861, and 0.951.

[0439] Based on the horizontally expanded coordinate 12 corresponding sequence and the main class reference sequence, the cumulative difference value is calculated point by point, resulting in: 0, 0.014, 0.023, 0, 0.009, 0.004, 0.002, 0, 0, 0, 0.012. The average value of the 11 differences is 0.0058, and the maximum value is 0.023.

[0440] Based on the sequence corresponding to the horizontally expanded coordinate 13 and the main class reference sequence, the cumulative difference was calculated point by point, and the average difference was 0.0156, and the maximum difference was 0.039.

[0441] Based on the sequence corresponding to the horizontally expanded coordinate 14 and the main class reference sequence, the cumulative difference was calculated point by point, and the average difference was 0.0066, and the maximum difference was 0.013.

[0442] Based on the sequence corresponding to the horizontally expanded coordinate 15 and the main class reference sequence, the cumulative difference was calculated point by point, and the average difference was 0.1473, and the maximum difference was 0.343.

[0443] Compare the average difference and the maximum difference. The candidate transition units corresponding to the horizontally expanded coordinates 12, 13, and 14 satisfy the condition that the average difference is no greater than 0.04 and the maximum difference is no greater than 0.10, and are retained. The candidate transition unit corresponding to the horizontally expanded coordinate 15 does not satisfy the condition that the average difference is no greater than 0.04 and the maximum difference is no greater than 0.10, and is removed.

[0444] Based on the fact that the positive difference ratios of the candidate transition units corresponding to the horizontal expansion coordinates 12, 13, and 14 are all 1.000 and all greater than 0.90, the candidate transition units corresponding to the horizontal expansion coordinates 12, 13, and 14 are retained to obtain the main class transition unit set.

[0445] Step S204234: Based on the set of main class transition units, superimpose each main class transition unit in the same position, extract the single-layer cumulative scale composition quantity, and construct a single-layer response unit.

[0446] In this embodiment, based on the set of main class transition units, the standard width position sequence and standard width cumulative quantity sequence corresponding to each main class transition unit are extracted to obtain the main class superimposed sample set.

[0447] Based on the main class overlay sample set, the cumulative values ​​corresponding to all main class transition units are aggregated at each standard width position to obtain the corresponding cumulative value sample group at each standard width position.

[0448] Based on the corresponding cumulative value sample group at each standard width position, the cumulative value is sorted from smallest to largest, and the cumulative value in the middle position after sorting is extracted to obtain the corresponding representative cumulative value at each standard width position.

[0449] Based on the cumulative amount of the corresponding counterparts at each standard width position, the main class overlay reference sequence is obtained by arranging them from front to back according to the standard width position.

[0450] Based on the main class superimposed reference sequence, standard width positions with cumulative amounts not exceeding a preset front cumulative amount threshold are extracted to obtain a front reference position set. The front cumulative amount threshold is set by those skilled in the art according to the actual situation.

[0451] Based on the previous reference position set, extract the corresponding representative cumulative amount at the corresponding position and calculate the mean to obtain the previous reference cumulative amount.

[0452] Based on the main class superimposed reference sequence, the standard width position with a cumulative amount not less than the preset back cumulative amount threshold is extracted to obtain the back reference position set. The back cumulative amount threshold is set by those skilled in the art according to the actual situation.

[0453] Based on the set of rear reference positions, extract the corresponding representative cumulative values ​​at the corresponding positions and calculate the mean to obtain the rear reference cumulative values.

[0454] The difference between the cumulative amount of the rear reference and the cumulative amount of the front reference is calculated to obtain the increment of the single-layer cumulative amount.

[0455] Based on the cumulative amount of the front benchmark and the incremental amount of the single-layer cumulative amount, the cumulative amount of the half-width target is calculated to obtain the target amount of the transition center.

[0456] Based on the main class superimposed reference sequence, the positions of the corresponding cumulative quantities at two adjacent standard width positions on both sides of the transition center target quantity are determined, thus obtaining the transition center envelope position pair.

[0457] Based on the standard width position and the cumulative amount represented by the corresponding position of the transition center envelope position, the cumulative amount difference ratio is calculated, and linear positioning is performed according to the cumulative amount difference ratio to obtain the transition center position.

[0458] Based on the cumulative amount of the front baseline and the incremental amount of the single-layer cumulative amount, the cumulative amount of the front tenths target and the cumulative amount of the rear tenths target are calculated to obtain the target amount pair of the transition width.

[0459] Based on the main class superimposed reference sequence, the positions of the corresponding cumulative quantities at two adjacent standard width positions are determined on both sides of the target cumulative quantity at the tenth digit of the front side, thus obtaining the front width envelope position pair.

[0460] Based on the standard width position and the cumulative amount represented by the corresponding position of the front width envelope position, the cumulative amount difference ratio is calculated, and linear positioning is performed according to the cumulative amount difference ratio to obtain the front width position.

[0461] Based on the main class superimposed reference sequence, the positions of the corresponding representative cumulative quantities at two adjacent standard width positions are determined on both sides of the target cumulative quantity at the tenth digit of the rear side, thus obtaining the rear width envelope position pair.

[0462] Based on the rear width envelope position, the corresponding standard width position and the cumulative amount of the same position are used to calculate the cumulative amount difference ratio. Linear positioning is then performed according to the cumulative amount difference ratio to obtain the rear width position.

[0463] The effective transition width is obtained by subtracting the width positions of the rear and front sides.

[0464] Based on the cumulative amount of the front reference, the cumulative amount of the rear reference, the increment of the single-layer cumulative amount, the position of the transition center, and the effective transition width, the composition of the single-layer cumulative amount scale is obtained.

[0465] Based on the main class superimposed reference sequence, standard width position sequence and single-layer cumulative scale, the reference cumulative value corresponding to each standard width position is extracted, the relative position of each standard width position and the transition center position is calculated, the range of the front stable segment corresponding to the front reference position set is determined, the range of the rear stable segment corresponding to the rear reference position set is determined, and the single-layer response cell record is obtained.

[0466] A single-layer response unit cell is constructed based on a single-layer response unit cell record.

[0467] For example, the cumulative threshold for the front side is 0.20, and the cumulative threshold for the back side is 0.80.

[0468] The set of main class transition units contains three main class transition units corresponding to the horizontal expansion coordinates 12, 13, and 14. The standard width position sequence of the three main class transition units is: 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, and 1.00.

[0469] The cumulative standard width sequence corresponding to horizontal expansion coordinate 12 is: 0.052, 0.087, 0.165, 0.261, 0.357, 0.470, 0.565, 0.661, 0.757, 0.861, 0.939; the cumulative standard width sequence corresponding to horizontal expansion coordinate 13 is: 0.041, 0.113, 0.206, 0.258, 0.392, 0.474, 0.567, 0.649, 0.742, 0.825, 0.990; and the cumulative standard width sequence corresponding to horizontal expansion coordinate 14 is: 0.060, 0.101, 0.188, 0.274, 0.366, 0.481, 0.579, 0.672, 0.768, 0.872, 0.951.

[0470] Based on the cumulative values ​​of 0.052, 0.041, and 0.060 at the standard width position 0.00, sort them from smallest to largest to obtain 0.041, 0.052, and 0.060. Extract the cumulative value of 0.052 at the middle position to obtain the corresponding cumulative value at the standard width position 0.00.

[0471] Based on the cumulative values ​​of 0.087, 0.113, and 0.101 at the standard width position of 0.10, sort them from smallest to largest to obtain 0.087, 0.101, and 0.113. Extract the cumulative value of 0.101 at the middle position to obtain the corresponding cumulative value at the standard width position of 0.10.

[0472] The standard width positions from 0.20 to 1.00 are processed point by point in the same way to obtain the main class overlay reference sequence: 0.052, 0.101, 0.188, 0.261, 0.366, 0.474, 0.567, 0.661, 0.757, 0.861, 0.951.

[0473] Based on the main class superimposed reference sequence, the standard width positions 0.00, 0.10, and 0.20 with a cumulative amount not greater than 0.20 are extracted to obtain the front reference position set.

[0474] Based on the cumulative values ​​of the corresponding counterparts 0.052, 0.101, and 0.188 of the previous reference position set, summing them yields 0.341.

[0475] Dividing 0.341 by 3 yields the front baseline cumulative amount of 0.114.

[0476] Based on the main class superimposed reference sequence, the standard width positions 0.90 and 1.00 with a cumulative amount of not less than 0.80 are extracted to obtain the set of rear reference positions.

[0477] Based on the cumulative values ​​of 0.861 and 0.951 corresponding to the corresponding positions of the rear reference position set, the summation yields 1.812.

[0478] Dividing 1.812 by 2 yields the cumulative amount of the rear reference, 0.906.

[0479] Subtracting 0.114 from 0.906 yields a cumulative increment of 0.792 for a single layer.

[0480] Adding 0.5 to 0.114 and multiplying by 0.792, we get the transition center target value of 0.510.

[0481] Based on the main class overlay reference sequence, the cumulative amount at the standard width position 0.50 is determined to be 0.474, which is less than 0.510, and the cumulative amount at the standard width position 0.60 is determined to be 0.567, which is greater than 0.510, thus obtaining the transition center envelope position pair 0.50 and 0.60.

[0482] Subtracting 0.474 from 0.510 yields a cumulative difference of 0.036.

[0483] Subtracting 0.474 from 0.567 yields a cumulative difference of 0.093 within the envelope interval.

[0484] Dividing 0.036 by 0.093 yields a cumulative difference ratio of 0.387.

[0485] Add 0.387 to 0.10 to get the transition center position as 0.539.

[0486] Add 0.1 to 0.1 and multiply by 0.792 to get the cumulative amount of the target in the tenth place: 0.193.

[0487] Add 0.9 to 0.114 and multiply by 0.792 to get the cumulative amount of the target in the tenth place: 0.827.

[0488] Based on the main class overlay reference sequence, the cumulative amount at the standard width position 0.20 is determined to be 0.188, which is less than 0.193, and the cumulative amount at the standard width position 0.30 is determined to be 0.261, which is greater than 0.193, thus obtaining the front width envelope position pair 0.20 and 0.30.

[0489] Subtracting 0.188 from 0.193 yields a cumulative difference of 0.005.

[0490] Subtracting 0.188 from 0.261 yields a cumulative difference of 0.073 within the envelope interval.

[0491] Dividing 0.005 by 0.073 yields a cumulative difference ratio of 0.068.

[0492] Add 0.068 to 0.10 to get the front width position of 0.207.

[0493] Based on the main class overlay reference sequence, the cumulative amount at the standard width position 0.80 is determined to be 0.757, which is less than 0.827, and the cumulative amount at the standard width position 0.90 is determined to be 0.861, which is greater than 0.827, thus obtaining the back width envelope position pair 0.80 and 0.90.

[0494] Subtracting 0.757 from 0.827 yields a cumulative difference of 0.070.

[0495] Subtracting 0.757 from 0.861 yields a cumulative difference of 0.104 within the envelope interval.

[0496] Dividing 0.070 by 0.104 yields a cumulative difference ratio of 0.673.

[0497] Add 0.673 to 0.10 to get the rear width position of 0.867.

[0498] Subtracting 0.207 from 0.867 yields an effective transition width of 0.660.

[0499] Based on the cumulative amount of the front reference (0.114), the cumulative amount of the rear reference (0.906), the increment of the single-layer cumulative amount (0.792), the position of the transition center (0.539), and the effective transition width (0.660), the scale composition of the single-layer cumulative amount is obtained.

[0500] Based on the standard width position sequence 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00 and the main class superimposed reference sequence 0.052, 0.101, 0.188, 0.261, 0.366, 0.474, 0.567, 0.661, 0.757, 0.861, 0.951, the standard width position and reference cumulative value are extracted according to the position to obtain the corresponding sequence of reference position cumulative value.

[0501] Based on the cumulative sequence corresponding to the reference position, subtract 0.539 from the transition center position for each standard width position to obtain the relative position sequence corresponding to each standard width position. Subtracting 0.539 from 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, and 1.00, 1.00, yields the following relative position sequences: -0.539, -0.439, -0.339, -0.239, -0.139, -0.039, 0.061, 0.161, 0.261, 0.361, and 0.461.

[0502] Based on the front reference position set of 0.00, 0.10, and 0.20, the minimum standard width position of 0.00 and the maximum standard width position of 0.20 are extracted to obtain the front stable segment range of 0.00 to 0.20.

[0503] Based on the rear reference position set 0.90 and 1.00, the minimum standard width position 0.90 and the maximum standard width position 1.00 are extracted to obtain the rear stable segment range from 0.90 to 1.00.

[0504] Based on the reference position cumulative quantity corresponding sequence, relative position sequence, front stable segment range, back stable segment range, and single-layer cumulative quantity scale, the front reference cumulative quantity is 0.114, the back reference cumulative quantity is 0.906, the single-layer cumulative quantity increment is 0.792, the transition center position is 0.539, and the effective transition width is 0.660.

[0505] A single-layer response unit cell is constructed based on a single-layer response unit cell record.

[0506] Step S204235: Based on the single-layer response unit cell, map the single-layer cumulative scale constituent quantities to single-layer cumulative scale parameters to generate the single-layer cumulative scale.

[0507] In this embodiment, based on a single-layer response unit cell, the cumulative amount of the front reference, the cumulative amount of the back reference, the increment of the single-layer cumulative amount, the position of the transition center, the effective transition width, the range of the front stable segment, the range of the back stable segment, and the reference cumulative values ​​corresponding to each standard width position are extracted to obtain the unit cell scale composition data.

[0508] Based on the unit cell scale composition data, the cumulative amount of the front reference is mapped to the cumulative amount parameter of the front reference, the cumulative amount of the rear reference is mapped to the cumulative amount parameter of the rear reference, the increment of the single-layer cumulative amount is mapped to the increment of the single-layer cumulative amount parameter, the position of the transition center is mapped to the position parameter of the transition center, and the effective transition width is mapped to the effective transition width parameter, thus obtaining the basic scale parameter set.

[0509] Based on the cumulative parameters of the front reference and the incremental parameters of the single-layer cumulative parameters, the cumulative parameters of the transition center, the cumulative parameters of the front tenths digit, and the cumulative parameters of the rear tenths digit are calculated to obtain the cumulative position parameter set.

[0510] Based on the range of the front stable segment and the range of the rear stable segment, the upper boundary position of the front stable segment and the lower boundary position of the rear stable segment are extracted to obtain the set of boundary parameters of the stable segment.

[0511] Based on the basic scale parameter set, the cumulative quantity location parameter set, and the stable segment boundary parameter set, the single-layer cumulative quantity scale parameters are obtained.

[0512] Based on the reference cumulative values ​​and standard width position sequence corresponding to each standard width position, a one-to-one correspondence between position and cumulative value is established from front to back according to the standard width position to obtain the scale sample pair sequence.

[0513] Based on the scale sample pair sequence, sample pairs within the range of the front stable segment are extracted to obtain the front stable segment sample set.

[0514] Based on the sample set of the front stable section, the positions of each standard width in the front stable section are mapped to the stable cumulative range near the front reference cumulative parameter to obtain the front scale section.

[0515] Based on the scale sample pair sequence, sample pairs within the range of the back stable segment are extracted to obtain the back stable segment sample set.

[0516] Based on the sample set of the rear stable section, the position of each standard width in the rear stable section is mapped to the stable cumulative range near the rear reference cumulative parameter to obtain the rear scale section.

[0517] Based on the scale sample pair sequence, sample pairs located between the upper boundary of the front stable segment and the lower boundary of the rear stable segment are extracted to obtain the transition segment sample set.

[0518] Based on the transition section sample set, each standard width position is mapped to the cumulative range that changes continuously from the cumulative parameter of the front reference to the cumulative parameter of the rear reference, thus obtaining the transition scale section.

[0519] Based on the front scale segment, the transition scale segment, and the rear scale segment, a single-layer cumulative scale sequence is obtained.

[0520] Based on the single-layer cumulative scale parameters and single-layer cumulative scale sequence, the front reference cumulative parameter is used as the single-layer starting cumulative parameter, the rear reference cumulative parameter is used as the single-layer ending cumulative parameter, the single-layer cumulative increment parameter is used as the single-layer amplitude parameter, the transition center position parameter and the transition center cumulative parameter are used as the single-layer center positioning parameter, and the front tenths cumulative parameter, the rear tenths cumulative parameter, the front width position parameter, the rear width position parameter and the effective transition width parameter are used as the single-layer width positioning parameter, thus obtaining the parameterized scale record.

[0521] A single-layer cumulative scale is generated by organizing the parametric scale records and single-layer cumulative scale sequences.

[0522] For example, in the single-layer response cell obtained in step S204234, the front reference cumulative amount is 0.114, the rear reference cumulative amount is 0.906, the single-layer cumulative amount increment is 0.792, the transition center position is 0.539, the effective transition width is 0.660, the front stable segment range is 0.00 to 0.20, the rear stable segment range is 0.90 to 1.00, the standard width position sequence is 0.00, 0.10, 0.20, 0.30, 0.40, 0.50, 0.60, 0.70, 0.80, 0.90, 1.00, and the reference cumulative amount values ​​corresponding to each standard width position are 0.052, 0.101, 0.188, 0.261, 0.366, 0.474, 0.567, 0.661, 0.757, 0.861, 0.951.

[0523] Based on the cumulative amount of the front reference of 0.114, the cumulative amount parameter of the front reference is obtained by mapping 0.114. Based on the cumulative amount of the rear reference of 0.906, the cumulative amount parameter of the rear reference is obtained by mapping 0.906. Based on the single-layer cumulative amount increment of 0.792, the single-layer cumulative amount increment parameter is obtained by mapping 0.792. Based on the transition center position of 0.539, the transition center position parameter is obtained by mapping 0.539. Based on the effective transition width of 0.660, the effective transition width parameter is obtained by mapping 0.660.

[0524] Add 0.5 to 0.114 and multiply by 0.792 to get the cumulative parameter of the transition center as 0.510.

[0525] Add 0.1 to 0.1 and multiply by 0.792 to get the cumulative parameter of the tenths place: 0.193.

[0526] Add 0.9 to 0.114 and multiply by 0.792 to get the cumulative parameter of the tenths place: 0.827.

[0527] Based on the range of the front stable segment from 0.00 to 0.20, the upper boundary position parameter of the front stable segment, 0.20, is extracted.

[0528] Based on the range of the rear stable segment from 0.90 to 1.00, the lower boundary position parameter of the rear stable segment, 0.90, is extracted.

[0529] Based on the front width position 0.207 and rear width position 0.867 obtained in step S204234, the front width position parameter 0.207 and rear width position parameter 0.867 are mapped to obtain the single-layer cumulative quantity scale parameter.

[0530] The standard width position sequence and reference cumulative values ​​are mapped according to position to obtain the following correspondences: 0.00 corresponds to 0.052, 0.10 corresponds to 0.101, 0.20 corresponds to 0.188, 0.30 corresponds to 0.261, 0.40 corresponds to 0.366, 0.50 corresponds to 0.474, 0.60 corresponds to 0.567, 0.70 corresponds to 0.661, 0.80 corresponds to 0.757, 0.90 corresponds to 0.861, and 1.00 corresponds to 0.951, thus obtaining the scale sample pair sequence.

[0531] Based on the range of the front stable segment from 0.00 to 0.20, we determine that 0.00 corresponds to 0.052, 0.10 corresponds to 0.101, and 0.20 corresponds to 0.188, thus obtaining the front scale segment.

[0532] Based on the range of the rear stable segment from 0.90 to 1.00, we determine that 0.90 corresponds to 0.861 and 1.00 corresponds to 0.951, thus obtaining the rear scale segment.

[0533] Based on the upper limit position of the front stable segment (0.20) and the lower limit position of the rear stable segment (0.90), the values ​​corresponding to 0.30, 0.261, 0.40, 0.366, 0.50, 0.474, 0.60, 0.567, 0.70, and 0.80 are determined to be 0.757, thus obtaining the transition scale segment.

[0534] Based on the front scale segment, the transition scale segment, and the rear scale segment, the sequence is arranged to obtain the single-layer cumulative scale sequence.

[0535] Based on the cumulative parameters of the front reference (0.114), rear reference (0.906), single-layer cumulative increment (0.792), transition center position (0.539), transition center cumulative (0.510), front tenths cumulative (0.193), rear tenths cumulative (0.827), front width position (0.207), rear width position (0.867), effective transition width (0.660), and single-layer cumulative scale sequence, a single-layer cumulative scale is generated.

[0536] exist Figure 2In the diagram, the large left frame represents the candidate unit extraction region, corresponding to a set of candidate transition units extracted from the stable segment. The two thin horizontal lines inside the large left frame represent a unified upper and lower boundary constraint, indicating that the candidate units were obtained within the same extraction range and height interval, ensuring comparability. The four narrow rectangles side-by-side in the middle represent four independent candidate transition units, each representing a single-layer candidate unit extracted from different columns, local locations, or stable segments. The vertical curved lines inside each narrow rectangle represent the boundary transition response morphology within that candidate unit, i.e., each single-layer transition... The main response contour of the unit within the local area; the black solid dot inside each narrow rectangle represents the representative alignment position of the candidate unit, that is, the main positioning point, the center response point, or the reference anchor point for subsequent merging of the candidate unit, which is used to indicate that the candidate units will be merged and aligned according to their respective representative positions; the three diagonal lines converging on the right side of the large left box converge to a node in the middle, indicating that the candidate units are not output individually, but are concentrated in the same merging center, which is used to indicate the convergence of multiple units; the horizontal arrow pointing from the convergence node to the large middle box indicates that the candidate unit set on the left enters the middle area for alignment and superposition after merging and filtering.

[0537] The large central frame represents the construction region of a single-layer response unit cell. The tall, narrow rectangular frame in the middle represents the main region of unit cell construction, i.e., the unified alignment coordinate domain. All candidate transition units entering this region are superimposed within this unified domain. The three approximately parallel vertical curves inside the main region represent the superposition result of aligned candidate transition units at the same position, indicating that the main class of candidate units, after alignment and superposition, form a stable single-layer transition common structure. The m1 black dots within the central main region represent key structural anchor points in the unit cell, indicating that the unit cell does not have only one overall outline, but has m1 key positions in the vertical direction. These key positions are crucial in constructing the single layer. The cumulative scale can serve as a representative benchmark; the four small rectangles on either side of the center represent input units from different candidate locations; the short curves inside each small rectangle represent their respective local transition response patterns; the diagonal arrows from the four small rectangles to the central main region represent the input units moving towards the central main region for positional alignment and structural superposition; the three horizontal arrows on the right side of the central main region represent using the constructed single-layer response cells as a unified benchmark and outputting them to the right to generate the single-layer cumulative scale; the thick horizontal arrows from the large central frame to the large right frame represent the output of the single-layer response cells, used for cumulative scale construction and hierarchical quantization.

[0538] The large frame on the right represents the scale construction and hierarchical quantization area; the large rectangular area inside the right represents the effective area of ​​the single-layer cumulative scale, that is, the main area where scale expansion and hierarchical quantization occur; the stepped structure that rises from the bottom to the right inside the large rectangular area represents the progressively increasing structure of the single-layer cumulative scale, that is, each time a single-layer response cell is added, the cumulative increases by a fixed level, which is used to form a stable integer level division; the short curves and black dots on each step represent that the cells are repeatedly projected or mapped along each step to form corresponding unit levels, that is, the single-layer response cells are used as the basic unit of measurement and arranged hierarchically to obtain the scale used for integer quantization layering.

[0539] Step S20424: Based on the single-layer cumulative quantity scale, perform integer quantization layering on the cumulative quantity curve set, generate the stratification value corresponding to each sampling position, and determine the boundary position between adjacent stratification values ​​to obtain the initial stratification position map.

[0540] In this embodiment, based on a single-layer cumulative scale, the front reference cumulative parameters, the rear reference cumulative parameters, and the single-layer cumulative increment parameters are extracted to obtain the scale quantization parameters.

[0541] Based on the cumulative quantity curve set, the cumulative quantity values ​​corresponding to each sampling position in each column are extracted to obtain the cumulative quantity sample set.

[0542] Based on the cumulative sample set and the scale quantization parameter, the cumulative value at each sampling position is subtracted from the previous reference cumulative parameter and divided by the single-layer cumulative increment parameter to obtain the layer projection value.

[0543] Based on the hierarchical projection values, the hierarchical projection values ​​at each sampling location are rounded to integers to obtain the hierarchical sequence value corresponding to each sampling location.

[0544] Based on the stratum sequence values ​​corresponding to each sampling position in each column, the stratum sequence value distribution map is obtained by arranging them according to the horizontal and vertical expansion coordinates.

[0545] Based on the stratum sequence value distribution map, the stratum sequence values ​​corresponding to adjacent sampling positions in the same column are extracted to obtain adjacent stratum sequence pairs.

[0546] Based on adjacent sequence pairs, the locations where sequence values ​​change are determined, thus obtaining the inter-sequence jump locations.

[0547] Based on the interlayer transition location, the cumulative value and sequence value corresponding to the two sampling locations before and after the transition location are extracted to obtain the boundary calculation sample.

[0548] Based on the boundary calculation samples, the middle layer of the corresponding sequence values ​​of the two sampling positions is taken as the target boundary layer. The target boundary layer is multiplied by the single-layer cumulative increment parameter and the previous reference cumulative parameter is added to obtain the target boundary cumulative amount.

[0549] Based on the target boundary cumulative amount and the cumulative amount values ​​corresponding to the two sampling positions before and after, linear positioning is performed according to the ratio of the cumulative amount difference to obtain the boundary position between adjacent sequence values.

[0550] Based on the boundary positions in each column, the boundary positions are arranged from smallest to largest according to the horizontal expansion coordinates to obtain the boundary position set.

[0551] Based on the sequence value distribution map and the boundary location set, the sequence values ​​corresponding to each sampling location and the boundary locations between adjacent sequence values ​​are associated and recorded to obtain the initial sequence location map.

[0552] Step S2043: Based on the initial sequence location map, identify abnormal sequence segments to obtain a set of sequence segments to be corrected.

[0553] In this embodiment, based on the initial sequence location map, the sequence value sequence and boundary position sequence corresponding to each horizontal expansion coordinate are extracted to obtain a single-column sequence record set.

[0554] Based on a single-column hierarchical record set, the distance between adjacent boundary positions in the same column is calculated to obtain a single-column layer-thickness sequence.

[0555] Based on a single-column stratigraphic record set, the change in the boundary position of the same stratigraphic value on adjacent lateral expansion coordinates is calculated to obtain the stratigraphic boundary displacement sequence.

[0556] Based on the single-column layer thickness sequence and the layer boundary displacement sequence, a sequence detection feature set is obtained.

[0557] Based on the sequence detection feature set, the median thickness of the same sequence value within a horizontal local window is statistically analyzed to obtain a reference thickness sequence.

[0558] Based on the sequence detection feature set, the median of the boundary displacements of the same sequence value within the horizontal local window is statistically analyzed to obtain the reference boundary displacement sequence.

[0559] Based on the single-column layer thickness sequence and the reference layer thickness sequence, the layer thickness deviation is calculated to obtain the layer thickness deviation sequence.

[0560] Based on the boundary displacement sequence and the reference boundary displacement sequence, the boundary deviation is calculated to obtain the boundary deviation sequence.

[0561] Based on a single-column stratum sequence record set, we check whether adjacent stratum sequence values ​​change step by step to obtain the stratum sequence continuity result.

[0562] Based on a single-column hierarchical record set, we check whether each boundary position is arranged from smallest to largest according to its vertical position to obtain the hierarchical boundary ordering result.

[0563] Based on the layer thickness deviation sequence, the positions where the absolute value of the layer thickness deviation is greater than the preset layer thickness deviation threshold are determined, and layer thickness anomaly points are obtained. The layer thickness deviation threshold is set by those skilled in the art according to the actual situation.

[0564] For example, the layer thickness deviation threshold is set to 10 pixels.

[0565] Based on the boundary deviation sequence, the locations where the absolute value of the boundary deviation is greater than a preset boundary deviation threshold are determined, thus obtaining the boundary anomaly point. The boundary deviation threshold is set by those skilled in the art according to the actual situation.

[0566] For example, the layer boundary deviation threshold is set to 8 pixels.

[0567] Based on the sequence continuity results, the positions where the sequence value jump is greater than 1 or where a regression occurs are extracted to obtain the sequence jump anomaly points.

[0568] Based on the orderliness of the layer boundaries, the locations where the preceding and following boundaries intersect or are inverted are extracted to obtain the layer boundary intersection anomalies.

[0569] Anomalies based on layer thickness, layer boundary, sequence change, and layer boundary intersection are merged to obtain an anomaly set.

[0570] Based on the set of outliers, the horizontal spacing between adjacent outliers is checked from smallest to largest according to the horizontal expansion coordinates. Outliers with a horizontal spacing not greater than a preset segment interval threshold are continuously merged to obtain an outlier horizontal segment set. The segment interval threshold is set by those skilled in the art according to the actual situation.

[0571] For example, the segment interval threshold is set to 2 columns.

[0572] Based on the set of anomalous horizontal segments, the minimum and maximum sequence values ​​involved in each anomalous horizontal segment are extracted to obtain the range of anomalous sequence values.

[0573] Based on the abnormal horizontal fragment set and abnormal sequence range, the starting horizontal position, ending horizontal position, starting sequence value and ending sequence value corresponding to each abnormal horizontal fragment are extracted to generate sequence segment records to be corrected, thus obtaining the sequence segment set to be corrected.

[0574] Step S2044: Based on the set of sequence segments to be corrected, construct double-ended sequence constraints, determine the segment correction quota, perform boundary correction and sequence value backfilling on the sequence segments to be corrected, and obtain the corrected sequence location map.

[0575] The specific steps of step S2044 are as follows:

[0576] Step S20441: Based on the set of sequence segments to be corrected, extract the sequence values ​​and boundary positions at both ends of each sequence segment to be corrected, construct left and right double-end anchor points, and obtain double-end sequence constraints.

[0577] In this embodiment, based on the set of sequence segments to be corrected, the starting lateral position, ending lateral position, starting sequence value, and ending sequence value corresponding to each sequence segment to be corrected are extracted to obtain the segment boundary record set.

[0578] Based on the segment boundary record set, search the normal columns that do not fall into the set of segments to be corrected by searching horizontally to the left outside the starting horizontal position of each sequence segment to be corrected, and obtain the left candidate columns.

[0579] Based on the segment boundary record set, search the normal columns that do not fall into the set of segments to be corrected by searching horizontally to the right outside the end horizontal position of each sequence segment to be corrected, and obtain the right-end candidate columns.

[0580] Based on the left-end candidate columns and the right-end candidate columns, extract the stratum sequence value sequence and the boundary position sequence of the corresponding columns to obtain the left-end stratum sequence record and the right-end stratum sequence record.

[0581] Based on the left-end and right-end strata records, strata records whose strata values ​​fall between the starting strata value and the ending strata value are retained to obtain the valid strata records for both the left and right ends.

[0582] Based on the valid strata records at both ends, the boundary positions corresponding to each strata value at the left end are extracted in ascending order of strata value to obtain the left-end strata boundary sequence.

[0583] Based on the valid strata records at both ends, the boundary positions corresponding to each strata value at the right end are extracted in ascending order of strata value to obtain the right-end strata boundary sequence.

[0584] Based on the left-end sequence boundary sequence and the right-end sequence boundary sequence, the sequence values ​​that appear in both ends are extracted to obtain the common sequence value sequence.

[0585] Based on the common sequence value sequence, the left-end sequence boundary sequence and the right-end sequence boundary sequence are paired item by item according to the same sequence value to obtain corresponding sequence pairs at both ends.

[0586] Based on the corresponding bi-end sequence pairs, the boundary positions corresponding to each common sequence value on the left and on the right are extracted to obtain the bi-end anchor point pairs.

[0587] Based on the double-ended anchor point pairs, the left-end horizontal position, right-end horizontal position, left-end boundary position, and right-end boundary position corresponding to each common sequence value are extracted to obtain the double-ended anchor point records.

[0588] Based on the double-ended anchor point records, the left and right end anchor points of each sequence are organized in ascending order of sequence value to obtain the left and right double-ended anchor point sets.

[0589] Based on the left and right double-end anchor point sets, the difference in the boundary position of each sequence at the left and right ends is extracted to obtain the double-end boundary change sequence.

[0590] Based on the sequence of changes in the two-ended boundaries, the boundary connection direction and boundary extension range of each sequence within the sequence segment to be corrected are determined, thus obtaining the two-ended sequence constraints.

[0591] For example, the starting horizontal position of the sequence segment to be corrected is 14, the ending horizontal position is 16, the starting sequence value is 2, and the ending sequence value is 5.

[0592] Based on the initial horizontal position 14, the search proceeds column by column to the left. Horizontal position 13 does not fall into the set of sequence segments to be corrected, so horizontal position 13 is determined to be a candidate column on the left.

[0593] Based on the end of the horizontal position 16, the search proceeds column by column to the right. Horizontal position 17 does not fall into the set of sequence segments to be corrected, so horizontal position 17 is determined to be a candidate column on the right.

[0594] Based on the column corresponding to the horizontal position 13, extract the sequence values ​​0, 1, 2, 3, 4, 5 and the boundary position sequences 118.6, 154.2, 191.5, 227.9, 263.4.

[0595] Based on the column corresponding to the horizontal position 17, extract the sequence values ​​0, 1, 2, 3, 4, 5 and the boundary position sequences 120.1, 156.0, 192.8, 229.0, 265.2.

[0596] Based on the starting stratigraphic value 2 and the ending stratigraphic value 5, the stratigraphic records corresponding to stratigraphic values ​​2, 3, 4, and 5 are filtered and retained.

[0597] Based on the left boundary positions 191.5, 227.9, and 263.4 and the right boundary positions 192.8, 229.0, and 265.2 corresponding to sequence values ​​2, 3, 4, and 5, pairing is performed to obtain double-ended anchor point pairs 13 and 191.5, 17 and 192.8 corresponding to sequence value 2, 13 and 227.9, 17 and 229.0 corresponding to sequence value 3, and 13 and 263.4, 17 and 265.2 corresponding to sequence value 4.

[0598] Based on the pairs of double-ended anchor points corresponding to the sequence values ​​2, 3, and 4, we can obtain the left and right double-ended anchor point sets.

[0599] Subtracting 191.5 from 192.8, 227.9 from 229.0, and 263.4 from 265.2, we get the changes in the two-terminal boundaries as 1.3, 1.1, and 1.8.

[0600] Based on the left and right double-end anchor point sets and the double-end boundary changes, the double-end sequence constraints corresponding to the sequence segment to be corrected are obtained.

[0601] Step S20442: Based on the two-end sequence constraints, determine the target number of each sequence segment to be corrected, and calculate the sequence completion amount, sequence split amount, or sequence merging amount corresponding to the target number of sequence segments to obtain the segment correction quota.

[0602] In this embodiment, based on the double-ended sequence constraint, the common sequence anchor points and the lateral positions of the left and right ends of each sequence segment to be corrected are extracted to obtain the segment double-ended anchor point set.

[0603] Based on the segment's double-ended anchor point set, the boundary positions of each sequence boundary on the left and right are extracted according to the sequence value from smallest to largest, resulting in a double-ended boundary position sequence.

[0604] Based on the double-ended boundary position sequence, linear interpolation is performed on the left and right boundary positions of each sequence boundary according to the ratio of the lateral position from the start to the end of the sequence segment to be corrected, so as to obtain the target boundary position sequence corresponding to each lateral position in the segment.

[0605] Based on the target layer boundary position sequence, the regions between adjacent target layer boundaries are divided according to their vertical positions from smallest to largest, thus obtaining the target layer interval set.

[0606] Based on the target layer interval set, the number of target layer intervals corresponding to each horizontal position is counted to obtain the segment target layer number sequence.

[0607] Based on the target layer number sequence of the segment, the median number of the target layer corresponding to each horizontal position is statistically analyzed to obtain the target layer number of the segment to be corrected.

[0608] Based on the initial sequence location map, the actual stratigraphic boundary locations corresponding to the internal and lateral positions of each sequence segment to be corrected are extracted to obtain the actual stratigraphic boundary location sequence.

[0609] Based on the actual layer boundary position sequence, the regions between adjacent actual layer boundaries are divided according to their vertical position from smallest to largest, thus obtaining the actual layer interval set.

[0610] Based on the actual layer interval set, the number of actual layer intervals corresponding to each horizontal position is counted to obtain the actual layer number sequence of the segment.

[0611] Based on the actual layer number sequence of the segment, the median statistics of the actual layer number corresponding to each horizontal position are performed to obtain the current layer number of the segment to be corrected.

[0612] Based on the target layer interval set and the actual layer interval set, the vertical overlap length of each actual layer interval and each target layer interval is calculated to obtain the interval overlap matrix.

[0613] Based on the interval overlap matrix, check whether there is any overlap between the actual layer intervals and each target layer interval. For target layer intervals that do not have overlapping actual layer intervals, count the number of missing target layer intervals to obtain the layer order completion amount.

[0614] Based on the interval overlap matrix, check the number of target layer intervals covered by each actual layer interval, determine the actual layer intervals with a number of target layer intervals greater than 1, and calculate the result after subtracting 1 from the number of target layer intervals covered by each actual layer interval to obtain the stratification split quantity.

[0615] Based on the interval overlap matrix, check the number of actual layer intervals corresponding to each target layer interval, determine the target layer intervals whose actual layer intervals are greater than 1, and calculate the result after subtracting 1 from the number of actual layer intervals corresponding to each target layer interval to obtain the layer merging quantity.

[0616] Based on the current layer number, layer sequence completion amount, layer sequence split amount, and layer sequence merging amount, calculate the current layer number plus the layer sequence completion amount plus the layer sequence split amount and subtract the layer sequence merging amount to obtain the corrected layer number of the segment.

[0617] The corrected sequence number of the segment is compared with the target sequence number. For the sequence segments to be corrected where the difference between the two is not zero, the difference is added to the sequence completion amount to obtain the corrected sequence completion amount.

[0618] Based on the corrected sequence completion amount, sequence split amount, and sequence merging amount, the segment correction quota is obtained.

[0619] For example, the starting lateral position of a sequence segment to be corrected is 14, the ending lateral position is 16, the upper outer boundary positions of the left and right ends of the sequence segment to be corrected are 156.0 and 157.2, respectively, the common sequence boundary positions are 191.5, 227.9, 263.4 and 192.8, 229.0, 265.2, respectively, and the lower outer boundary positions are 300.4 and 301.0, respectively.

[0620] Based on the lateral position ratio of 0.5 between 14 and 16 for lateral position 15, linear interpolation is performed on 156.0 and 157.2 to obtain the upper target boundary position 156.6 corresponding to lateral position 15.

[0621] Based on 191.5 and 192.8, linear interpolation is performed to obtain the location of the first target layer boundary, 192.15.

[0622] Based on 227.9 and 229.0, linear interpolation was performed to obtain the location of the second target layer boundary at 228.45.

[0623] Based on 263.4 and 265.2, linear interpolation is performed to obtain the location of the third target layer boundary, 264.30.

[0624] Based on 300.4 and 301.0, linear interpolation is performed to obtain the lower target boundary position 300.70.

[0625] Based on 156.6, 192.15, 228.45, 264.30, and 300.70, the target layer intervals are obtained by dividing the vertical position from small to large: 156.6 to 192.15, 192.15 to 228.45, 228.45 to 264.30, and 264.30 to 300.70. The target layer number corresponding to the horizontal position 15 is 4.

[0626] The same method was used to calculate the target layer number sequence of the segment from position 14 to 16 column by column, resulting in the sequence 4, 4, 4.

[0627] Based on the median statistics of 4, 4, 4, the target layer number of the sequence segment to be corrected is 4.

[0628] Based on the initial sequence location map, the actual layer boundary locations 191.8 and 263.9 corresponding to the horizontal position 15 are extracted. Combined with the upper actual boundary location 156.6 and the lower actual boundary location 300.7, the actual layer intervals 156.6 to 191.8, 191.8 to 263.9 and 263.9 to 300.7 are obtained, and the actual layer number 3 corresponding to the horizontal position 15 is obtained.

[0629] By counting the horizontal positions 14 to 16 in the same way, the actual layer number sequence of the segment is obtained as 3, 3, 3.

[0630] Based on the median statistics of 3, 3, 3, the current layer number of the sequence segment to be corrected is 3.

[0631] Based on the target layer intervals 156.6 to 192.15, 192.15 to 228.45, 228.45 to 264.30, and 264.30 to 300.70, and the actual layer intervals 156.6 to 191.8, 191.8 to 263.9, and 263.9 to 300.7, the longitudinal overlap lengths are calculated. The overlap between the first actual layer interval and the first target layer interval is 35.2, the overlap between the second actual layer interval and the second target layer interval is 36.3, the overlap between the second actual layer interval and the third target layer interval is 35.9, and the overlap between the third actual layer interval and the fourth target layer interval is 36.4.

[0632] The target layer intervals all overlap with the actual layer intervals, resulting in a layer order completion of 0.

[0633] The second actual layer interval covers the second target layer interval and the third target layer interval, with a coverage quantity of 2. Subtracting 1 from 2, we get a layer sequence split quantity of 1.

[0634] The actual number of layer intervals corresponding to each target layer interval is no greater than 1, resulting in a layer sequence merging quantity of 0.

[0635] Add 0 to the current layer number 3, add 1 to the layer sequence splitting amount, and subtract 0 from the layer sequence merging amount to get the corrected layer number 4.

[0636] After the section correction, the layer number 4 is the same as the target layer number 4, so the layer order completion amount is not adjusted.

[0637] Based on the sequence completion amount of 0, the sequence split amount of 1, and the sequence merging amount of 0, the segment correction quota of the sequence segment to be corrected is obtained.

[0638] Step S20443: Based on the segment correction quota, determine the target number of boundaries and the initial position of the boundaries of the sequence segments to be corrected, and perform equal division and boundary optimization on the sequence segments to be corrected to obtain candidate sequence boundary groups.

[0639] In this embodiment, based on the segment correction quota, the sequence completion amount, sequence split amount and sequence merging amount corresponding to each sequence segment to be corrected are extracted to obtain the segment correction data.

[0640] Based on the initial sequence location map, the number of existing boundary locations within each sequence segment to be corrected is extracted to obtain the current number of boundaries.

[0641] Based on the current number of boundaries, the amount of sequence completion, the amount of sequence splitting, and the amount of sequence merging, add the amount of sequence completion to the current number of boundaries, add the amount of sequence splitting, and subtract the amount of sequence merging to obtain the target number of boundaries.

[0642] Based on the double-ended sequence constraints, the upper and lower outer boundary positions of each sequence segment to be corrected are extracted at each lateral position to obtain the effective segment division boundary.

[0643] Based on the effective segmentation boundary, the difference between the lower outer boundary position and the upper outer boundary position is calculated to obtain the effective segmentation height.

[0644] Based on the effective segmentation height and the number of target boundaries, the effective segmentation height is divided into the number of target boundaries plus an equal-length interval to obtain the equal segmentation spacing.

[0645] Based on the position of the upper outer boundary and the equal division interval, the initial position sequence of the boundary is obtained by accumulating the longitudinal positions from top to bottom.

[0646] Based on the initial position sequence of the boundaries, sampling positions within a preset search range are extracted on both sides of each initial boundary position to obtain a boundary search window. The search range is set by those skilled in the art according to the actual situation.

[0647] Based on the cumulative value curve set, the cumulative value within each boundary search window is extracted to obtain the local cumulative value sequence.

[0648] Based on the local cumulative quantity sequence, the absolute value of the cumulative quantity difference between the neighboring areas before and after each candidate sampling position is calculated to obtain the candidate boundary intensity.

[0649] Based on the candidate boundary intensity, candidate sampling positions with boundary intensity greater than a preset intensity threshold are retained to obtain a candidate boundary position set. The intensity threshold is set by those skilled in the art according to the actual situation.

[0650] Based on the candidate boundary position set, the distance between each candidate boundary position and the corresponding initial boundary position is calculated to obtain the candidate position offset. The candidate boundary position with the smallest offset is retained. When the offsets are the same, the candidate boundary position with the stronger boundary intensity is retained to obtain the optimized boundary position sequence.

[0651] Based on the optimized boundary position sequence, the spacing between adjacent optimized boundary positions is traversed from smallest to largest in the vertical position. Positions with a spacing smaller than the preset minimum boundary spacing are determined to obtain conflict boundary pairs. The minimum boundary spacing is set by those skilled in the art according to the actual situation.

[0652] Based on conflict boundary pairs, the distances between the two optimized boundary positions in the same conflict boundary pair and their respective initial boundary positions are calculated to obtain the first offset and the second offset. The first offset and the second offset are compared, and the optimized boundary position with the smaller offset is retained. When the first offset and the second offset are equal, the boundary strengths corresponding to the two optimized boundary positions are compared, and the optimized boundary position with the larger boundary strength is retained. For the discarded optimized boundary positions, their positions are backed up to their corresponding initial boundary positions to obtain an ordered sequence of boundary positions.

[0653] Candidate stratigraphic boundary groups are obtained based on the ordered boundary position sequence.

[0654] For example, the sequence completion amount corresponding to the sequence segment to be corrected is 0, the sequence split amount is 1, the sequence merging amount is 0, and the number of existing boundary positions within the sequence segment to be corrected in the initial sequence location map is 2.

[0655] Based on the current number of boundaries (2), the number of sequence completions (0), the number of sequence splits (1), and the number of sequence merges (0), add 0 to 2, add 1, and then subtract 0 to obtain the target number of boundaries (3).

[0656] Based on the double-ended hierarchical constraints, the upper outer boundary position 156.6 and the lower outer boundary position 300.7 corresponding to the horizontal position 15 are extracted to obtain the effective segmentation boundary.

[0657] Subtracting 156.6 from 300.7 yields an effective segment height of 144.1.

[0658] Dividing 144.1 by 3 and adding 1, we get an equal division interval of 36.025.

[0659] Based on the upper outer boundary position of 156.6, the initial boundary position sequence of 192.625, 228.650 and 264.675 is obtained by accumulating 36.025 segments from top to bottom along the longitudinal position.

[0660] The search range is set to 6 sampling positions on both sides of the initial position of each boundary, the intensity threshold is set to 6.0, and the minimum boundary spacing is set to 12 sampling positions.

[0661] Based on the initial boundary position of 192.625, sampling positions from vertical position 187 to 198 are extracted to obtain the first boundary search window.

[0662] Based on the cumulative quantity curve set, the cumulative quantity values ​​corresponding to each sampling position within the first boundary search window are extracted. The average cumulative quantity values ​​of the two sampling positions before and after each candidate sampling position are calculated. The difference between the average cumulative quantity values ​​of the two sampling positions before and after is taken as the absolute value. The candidate boundary intensities corresponding to the vertical positions 191.8, 192.2, 192.6, and 193.0 are 11.9, 12.6, 12.2, and 11.4, respectively.

[0663] Since 11.9, 12.6, 12.2 and 11.4 are all greater than 6.0, the vertical positions 191.8, 192.2, 192.6 and 193.0 are retained, resulting in the first candidate boundary position set.

[0664] Subtracting 192.625 from 191.8, 192.2, 192.6, and 193.0 respectively and taking the absolute value yields candidate position offsets of 0.825, 0.425, 0.025, and 0.375.

[0665] Based on the minimum offset of 0.025, the vertical position of 192.6 is retained, and the first optimized boundary position is obtained.

[0666] Based on the initial boundary position of 228.650, the sampling positions from the vertical position 223 to 234 are extracted to obtain the second boundary search window.

[0667] Based on the cumulative value curve set, the cumulative value corresponding to each sampling position within the second boundary search window is extracted. The candidate boundary intensities corresponding to the vertical positions 227.9, 228.4, 228.9 and 229.3 are calculated in the same way, and are 10.8, 12.1, 11.7 and 10.5 respectively.

[0668] Since 10.8, 12.1, 11.7 and 10.5 are all greater than 6.0, the vertical positions 227.9, 228.4, 228.9 and 229.3 are retained, resulting in the second set of candidate boundary positions.

[0669] Subtract 228.650 from 227.9, 228.4, 228.9 and 229.3 respectively, and take the absolute value to obtain the candidate position offsets of 0.750, 0.250, 0.250 and 0.650.

[0670] Based on the minimum offset of 0.250, and keeping the vertical positions 228.4 and 228.9 as candidate positions with the same offset, 12.1 is greater than 11.7, so the vertical position 228.4 is kept, resulting in the second optimized boundary position.

[0671] Based on the initial boundary position of 264.675, sampling positions from vertical position 259 to 270 are extracted to obtain the third boundary search window.

[0672] Based on the cumulative value curve set, the cumulative value corresponding to each sampling position within the third boundary search window is extracted. The candidate boundary intensities corresponding to the vertical positions 263.9, 264.3, 264.8 and 265.1 are calculated in the same way, and are 11.5, 12.3, 11.8 and 10.9 respectively.

[0673] Since 11.5, 12.3, 11.8 and 10.9 are all greater than 6.0, the vertical positions 263.9, 264.3, 264.8 and 265.1 are retained, resulting in the third candidate boundary position set.

[0674] Subtract 264.675 from 263.9, 264.3, 264.8 and 265.1 respectively, and take the absolute value to obtain the candidate position offsets of 0.775, 0.375, 0.125 and 0.425.

[0675] Based on the minimum offset of 0.125, and retaining the vertical position of 264.8, the third optimized boundary position is obtained.

[0676] Based on the optimized boundary position sequence 192.6, 228.4 and 264.8, the distance between adjacent optimized boundary positions is traversed from smallest to largest in the vertical position. 228.4 is subtracted from 192.6 to get 35.8, and 264.8 is subtracted from 228.4 to get 36.4.

[0677] Since both 35.8 and 36.4 are greater than 12, it is determined that there are no conflicting boundary pairs. The optimized boundary position sequences 192.6, 228.4 and 264.8 are retained unchanged, resulting in an ordered boundary position sequence.

[0678] Based on the ordered boundary position sequences 192.6, 228.4 and 264.8, the candidate sequence boundary groups corresponding to the sequence segment to be corrected are obtained.

[0679] Step S20444: Based on the candidate sequence boundary group, perform missing boundary completion, overly dense boundary splitting, and redundant boundary removal on the sequence segment to be corrected to generate a corrected boundary group, and backfill the sequence value of each sequence segment to be corrected to obtain a local corrected sequence sequence.

[0680] In this embodiment, based on the candidate sequence boundary group, the candidate boundary position sequence, upper outer boundary position, lower outer boundary position, start sequence value and end sequence value corresponding to each sequence segment to be corrected are extracted to obtain the segment candidate boundary data.

[0681] Based on the candidate boundary data of the segments, the candidate boundary positions are sorted in ascending order of vertical position to obtain an ordered candidate boundary sequence.

[0682] Based on the ordered candidate boundary sequence, the position of the upper outer boundary, and the position of the lower outer boundary, the segment length between adjacent boundaries is calculated to obtain the candidate interlayer spacing sequence.

[0683] Based on the segment correction quota, extract the sequence completion amount, sequence split amount and sequence merging amount corresponding to each sequence segment to be corrected to obtain the segment correction requirement.

[0684] Based on the candidate interlayer spacing sequence, candidate interlayer segments are extracted in descending order of segment length to obtain the complete candidate segment sequence.

[0685] Based on the hierarchical completion amount in the segment correction requirement, the first n2 candidate inter-layer segments are extracted sequentially from the candidate segment completion sequence to obtain the set of segments to be completed.

[0686] Based on the set of segments to be completed, sampling positions within a preset middle search range are extracted on both sides of the middle position of each segment to be completed to obtain a completion search window. The middle search range is set by those skilled in the art according to the actual situation.

[0687] Based on the cumulative quantity curve set, the cumulative quantity values ​​corresponding to each sampling position within each completion search window are extracted, and the absolute value of the cumulative quantity difference between the neighboring areas before and after each sampling position is calculated to obtain the completion boundary intensity.

[0688] Based on the completion boundary intensity, the sampling position with the highest intensity is retained to obtain the completion boundary position.

[0689] Based on the completed boundary positions and the ordered candidate boundary sequences, insertion and rearrangement are performed to obtain the completed boundary sequence.

[0690] Based on the completed boundary sequence, the sampling positions within the preset splitting windows on both sides of each candidate boundary position are extracted to obtain the splitting search window. The splitting window is set by those skilled in the art according to the actual situation.

[0691] Based on the cumulative quantity curve set, the cumulative quantity values ​​corresponding to each sampling position and within each split search window are extracted. The absolute value of the cumulative quantity difference between the neighborhoods before and after each sampling position is calculated to obtain the split boundary strength.

[0692] Based on the split boundary intensity, the local peak positions formed by the change in intensity from low to high and then from high to low are extracted to obtain the split peak position sequence.

[0693] Based on the number of sequence splits in the segment correction requirement, candidate boundary positions with no less than 2 peaks and an adjacent peak spacing of no less than the preset minimum inter-peak distance are extracted to obtain a set of boundary positions to be split. The minimum inter-peak distance is set by those skilled in the art according to the actual situation.

[0694] Based on the set of boundary positions to be split, the two peak positions with the strongest intensity are retained in the corresponding split peak position sequence to obtain the split boundary pair.

[0695] Based on the split boundary pairs, the original candidate boundary positions are replaced to obtain the split boundary sequence.

[0696] Based on the split boundary sequence, the distance between adjacent boundary positions is calculated to obtain the adjacent boundary spacing sequence.

[0697] Based on the hierarchical merging amount in the segment correction requirement, the positions where the adjacent boundary spacing is less than the preset minimum adjacent boundary spacing are extracted to obtain redundant boundary pairs. The minimum adjacent boundary spacing is set by those skilled in the art according to the actual situation.

[0698] Based on the redundant boundary pairs, the boundary strength corresponding to the two boundary positions in the redundant boundary pairs is calculated. The boundary positions with greater boundary strength are retained, and the boundary positions with less boundary strength are removed to obtain the deredundant boundary sequence.

[0699] Based on the redundancy-removed boundary sequence, the corrected boundary group is obtained by arranging the vertical positions from smallest to largest.

[0700] Based on the corrected boundary group, the position of the upper outer boundary, and the position of the lower outer boundary, the sequence intervals are divided according to the vertical position from smallest to largest, resulting in the corrected sequence interval set.

[0701] For the initial sequence value, the sampling positions between the upper outer boundary position and the first corrected boundary position are backfilled as the initial sequence value to obtain the first sequence interval.

[0702] For cases between the starting and ending sequence values, when the sequence value is the sequence value of the previous sequence interval plus 1, the sampling positions between two adjacent corrected boundary positions are backfilled with incremental sequence values ​​to obtain the intermediate sequence interval.

[0703] For the final sequence value, the sampling position between the last corrected boundary position and the lower outer boundary position is backfilled as the final sequence value to obtain the final sequence interval.

[0704] Based on the backfilling results corresponding to each sequence interval, a locally corrected sequence sequence is obtained.

[0705] For example, the central search range takes 6 sampling positions on each side of the central position of the segment to be completed, the split window takes 8 sampling positions on each side of the candidate boundary position, the minimum inter-peak distance takes 6 sampling positions, and the minimum adjacent boundary spacing takes 12 sampling positions.

[0706] The upper outer boundary of the first sequence segment to be corrected is 156.6, the lower outer boundary is 300.7, the starting sequence value is 2, the ending sequence value is 5, the candidate boundary position sequences are 192.6 and 264.8, the sequence completion amount is 1, the sequence split amount is 0, and the sequence merging amount is 0.

[0707] Sort 192.6 and 264.8 in ascending order of their vertical positions to obtain ordered candidate boundary sequences 192.6 and 264.8.

[0708] Based on 156.6, 192.6, 264.8 and 300.7, the segment lengths between adjacent boundaries are calculated to be 36.0, 72.2 and 35.9.

[0709] Since 72.2 is greater than 36.0 and 35.9, extract the range from 192.6 to 264.8 as the segment to be completed.

[0710] Add 264.8 to 192.6, then divide by 2 to get the middle position of the section to be completed, which is 228.7.

[0711] Based on 6 sampling positions on each side of 228.7, the vertical positions from 222.7 to 234.7 are extracted to obtain the completion search window.

[0712] Based on the cumulative values ​​corresponding to each sampling position within the completion search window, the completion boundary strengths corresponding to the vertical positions 227.9, 228.4, and 228.9 are calculated, yielding values ​​of 10.8, 12.1, and 11.7.

[0713] 12.1 is greater than 10.8 and 11.7, so the vertical position 228.4 is retained as the completion boundary position.

[0714] Insert 228.4 into the ordered candidate boundary sequences 192.6 and 264.8 to obtain the completed boundary sequences 192.6, 228.4, and 264.8. The stratification split is 0. Keep the completed boundary sequences unchanged to obtain the split boundary sequences 192.6, 228.4, and 264.8. The stratification merging is 0. Keep the split boundary sequences unchanged to obtain the corrected boundary group 192.6, 228.4, and 264.8.

[0715] Dividing 156.6, 192.6, 228.4, 264.8, and 300.7 according to their vertical position from smallest to largest, we obtain the sequence intervals 156.6 to 192.6, 192.6 to 228.4, 228.4 to 264.8, and 264.8 to 300.7.

[0716] Based on the initial sequence value 2, the sampling locations between 156.6 and 192.6 are backfilled with sequence value 2.

[0717] Adding 1 to 2 gives 3, and the sampling locations between 192.6 and 228.4 are backfilled with the sequence value 3.

[0718] Adding 1 to 3 gives 4, and the sampling locations between 228.4 and 264.8 are backfilled with the stratigraphic value 4.

[0719] Based on the ending sequence value 5, the sampling positions between 264.8 and 300.7 are backfilled with sequence value 5 to obtain the local corrected sequence sequence corresponding to the first sequence segment to be corrected.

[0720] The upper outer boundary of the second sequence segment to be corrected is 154.0, the lower outer boundary is 299.0, the starting sequence value is 2, the ending sequence value is 6, the candidate boundary position sequence is 191.8, 228.6, 264.9, the sequence completion amount is 0, the sequence split amount is 1, and the sequence merging amount is 0.

[0721] Sort 191.8, 228.6, and 264.9 in ascending order of their vertical positions to obtain the ordered candidate boundary sequence 191.8, 228.6, and 264.9. The hierarchical completion amount is 0. Keep the ordered candidate boundary sequence unchanged to obtain the completed boundary sequence 191.8, 228.6, and 264.9.

[0722] Based on the candidate boundary position 228.6 in the completed boundary sequence, the vertical positions from 220.6 to 236.6 are extracted to obtain the split search window.

[0723] Based on the cumulative values ​​corresponding to each sampling position within the split search window, the absolute value of the cumulative difference between the neighboring areas before and after each sampling position is calculated, and the split boundary strengths corresponding to the vertical positions 223.8, 228.4 and 232.9 are 11.2, 8.6 and 12.0, respectively.

[0724] Based on the variation relationship of 11.2, 8.6 and 12.0, the vertical positions 223.8 and 232.9 are extracted as local peak positions. Subtracting 223.8 from 232.9 yields a peak spacing of 9.1. Since 9.1 is greater than 6, the vertical positions 223.8 and 232.9 satisfy the splitting condition.

[0725] 12.0 is greater than 11.2, so the vertical position 232.9 is retained as the first split peak position.

[0726] 11.2 is another local peak intensity, retaining the longitudinal position. 223.8 is the second split peak position.

[0727] Based on the vertical positions 223.8 and 232.9, the original candidate boundary position 228.6 is replaced to obtain the split boundary sequence 191.8, 223.8, 232.9, and 264.9. The hierarchical merging amount is 0. Keeping the split boundary sequence unchanged, the corrected boundary group 191.8, 223.8, 232.9, and 264.9 is obtained.

[0728] Dividing 154.0, 191.8, 223.8, 232.9, 264.9, and 299.0 according to their vertical position from smallest to largest, we obtain the stratigraphic intervals 154.0 to 191.8, 191.8 to 223.8, 223.8 to 232.9, 232.9 to 264.9, and 264.9 to 299.0.

[0729] Based on the initial sequence value 2, the sampling locations between 154.0 and 191.8 are backfilled with sequence value 2.

[0730] Adding 1 to 2 gives 3, and the sampling locations between 191.8 and 223.8 are backfilled with the sequence value 3.

[0731] Adding 1 to 3 gives 4, and the sampling locations between 223.8 and 232.9 are backfilled with the stratigraphic value 4.

[0732] Adding 1 to 4 gives 5, and the sampling locations between 232.9 and 264.9 are backfilled with the sequence value 5.

[0733] Based on the ending sequence value 6, the sampling positions between 264.9 and 299.0 are backfilled with sequence value 6 to obtain the local corrected sequence sequence corresponding to the second sequence segment to be corrected.

[0734] The upper outer boundary of the third sequence segment to be corrected is 157.2, the lower outer boundary is 301.4, the starting sequence value is 2, the ending sequence value is 5, the candidate boundary position sequence is 191.9, 200.8, 228.7, 264.6, the sequence completion amount is 0, the sequence split amount is 0, and the sequence merging amount is 1.

[0735] Sort 191.9, 200.8, 228.7, and 264.6 in ascending order of their vertical positions to obtain the ordered candidate boundary sequence 191.9, 200.8, 228.7, 264.6. The stratum order completion amount is 0, the stratum order split amount is 0, and the ordered candidate boundary sequence remains unchanged to obtain the split boundary sequence 191.9, 200.8, 228.7, 264.6.

[0736] Based on 191.9, 200.8, 228.7 and 264.6, the distances between adjacent boundary positions are calculated, yielding 8.9, 27.9 and 35.9. Since 8.9 is less than 12, 191.9 and 200.8 are extracted to form a redundant boundary pair.

[0737] The boundary strengths corresponding to the two boundary positions in the redundant boundary pair are determined, and the boundary strength corresponding to the longitudinal position 191.9 is 7.9, and the boundary strength corresponding to the longitudinal position 200.8 is 11.3.

[0738] Since 11.3 is greater than 7.9, we retain the vertical position 200.8 and remove the vertical position 191.9 to obtain the redundant boundary sequence 200.8, 228.7, and 264.6.

[0739] The redundancy-removed boundary sequences 200.8, 228.7, and 264.6 are arranged in ascending order of vertical position to obtain the corrected boundary group 200.8, 228.7, and 264.6. The sequences 157.2, 200.8, 228.7, 264.6, and 301.4 are then divided in ascending order of vertical position to obtain the sequence intervals 157.2 to 200.8, 200.8 to 228.7, 228.7 to 264.6, and 264.6 to 301.4.

[0740] Based on the initial sequence value 2, the sampling locations between 157.2 and 200.8 are backfilled with sequence value 2.

[0741] Adding 1 to 2 gives 3, and the sampling locations between 200.8 and 228.7 are backfilled with the sequence value 3.

[0742] Adding 1 to 3 gives 4, and the sampling locations between 228.7 and 264.6 are backfilled with the sequence value 4.

[0743] Based on the ending sequence value 5, the sampling positions between 264.6 and 301.4 are backfilled with sequence value 5 to obtain the local corrected sequence sequence corresponding to the third sequence segment to be corrected.

[0744] Based on the local corrected sequence sequences corresponding to the first, second, and third sequence segments to be corrected, the local corrected sequence sequences corresponding to each sequence segment to be corrected are obtained.

[0745] Step S20445: Based on the local corrected sequence sequence, the boundary positions at both ends of each sequence segment to be corrected are continuously spliced ​​to obtain the corrected sequence position map.

[0746] In this embodiment, based on the local corrected sequence sequence, the sequence value sequences corresponding to the internal and lateral positions of each sequence segment to be corrected are extracted to obtain the segment corrected sequence record set.

[0747] Based on the segment-corrected stratograph record set, the stratograph value changes of adjacent sampling positions are traversed from small to large along the vertical position at the same horizontal position. The position pairs where the stratograph value changes from a lower stratograph to a higher stratograph are extracted to obtain the stratograph jump positions within the segment.

[0748] Based on the sequence jump positions within the segment, the median of the longitudinal positions of two adjacent sampling positions is taken to obtain the corrected boundary position sequence within the segment.

[0749] Based on the internal modified boundary position sequence of the segment, the internal modified boundary group is obtained by organizing it according to the horizontal position and stratigraphic value.

[0750] Based on the set of sequence segments to be corrected, the starting and ending lateral positions corresponding to each sequence segment are extracted to obtain the set of segment boundary positions.

[0751] Based on the two-end sequence constraints, the boundary positions corresponding to the left end anchor points and the right end anchor points of each sequence segment to be corrected are extracted to obtain the left and right end anchor point boundary groups.

[0752] Based on the left and right end anchor point boundary groups and the segment internal correction boundary groups, the boundary positions of the same sequence boundary at the left end anchor point, the segment internal and the right end anchor point are arranged in ascending order of horizontal position to obtain the original splicing boundary sequence.

[0753] Based on the original splicing boundary sequence, the lateral position within a preset left-end splicing width range is extracted inside the left end of each sequence segment to be corrected, and the lateral position within a preset right-end splicing width range is extracted inside the right end of each sequence segment to be corrected, thus obtaining the left-end splicing area and the right-end splicing area. The left-end splicing width range and the right-end splicing width range are set by those skilled in the art according to the actual situation.

[0754] Based on the left-end splicing area, calculate the difference between each horizontal position and the starting horizontal position, add one to the difference, and then divide by the left-end splicing width plus one to obtain the left-end splicing ratio.

[0755] Based on the left-end splicing ratio, determine a value that is one minus the left-end splicing ratio. Multiply the left-end anchor point boundary position by the value that is one minus the left-end splicing ratio. Then multiply the corrected boundary position within the segment by the left-end splicing ratio. Summate the two results to obtain the sequence of continuous left-end boundary positions.

[0756] Based on the right-end splicing area, calculate the difference between the ending horizontal position and each horizontal position, add one to the difference, and then divide by the right-end splicing width plus one to obtain the right-end splicing ratio.

[0757] Based on the right-end splicing ratio, determine a value that is one minus the right-end splicing ratio. Multiply the right-end anchor point boundary position by the value that is one minus the right-end splicing ratio. Then multiply the corrected boundary position within the segment by the right-end splicing ratio. Summate the two results to obtain the sequence of continuous right-end boundary positions.

[0758] Based on the continuous boundary position sequence at the left end, the corrected boundary position sequence within the segment, and the continuous boundary position sequence at the right end, a continuous boundary group is obtained.

[0759] Based on the continuous boundary group, the upper outer boundary position, the sequence boundary position and the lower outer boundary position corresponding to each horizontal position are extracted and arranged in ascending order of vertical position to obtain the modified sequence interval set.

[0760] Based on the modified sequence interval set, the sampling positions between the upper outer boundary position and the first continuous boundary position are backfilled as the starting sequence value, the sampling positions between two adjacent continuous boundary positions are backfilled as incremental sequence values ​​segment by segment, and the sampling positions between the last continuous boundary position and the lower outer boundary position are backfilled as the ending sequence value, thus obtaining the continuous sequence sequence.

[0761] The corrected sequence location map is obtained by merging the continuous sequence sequence and the original sequence location map that does not fall into the sequence segment to be corrected.

[0762] For example, the width range of the left-end splicing is 1 column, and the width range of the right-end splicing is 1 column.

[0763] The starting lateral position of the sequence segment to be corrected is 14, the ending lateral position is 16, the left anchor point is 13, the right anchor point is 17, the starting sequence value is 2, and the ending sequence value is 5.

[0764] Based on the locally corrected sequence sequence, the sequence value sequences corresponding to horizontal positions 14, 15, and 16 were extracted. The corrected boundary positions within the segment corresponding to horizontal position 14 were 192.6, 228.4, and 264.8; the corrected boundary positions within the segment corresponding to horizontal position 15 were 192.8, 228.6, and 264.9; and the corrected boundary positions within the segment corresponding to horizontal position 16 were 193.0, 228.9, and 265.1. These were used to obtain the corrected boundary groups within the segments.

[0765] Based on the double-ended hierarchical constraint, the boundary positions 191.5, 227.9, and 263.4 corresponding to the horizontal position 13 of the left anchor point are extracted, and the boundary positions 192.8, 229.0, and 265.2 corresponding to the horizontal position 17 of the right anchor point are extracted, thus obtaining the boundary group of the left and right anchor points.

[0766] Based on the left and right end anchor point boundary groups and the segment internal correction boundary groups, the boundary positions of the same sequence boundary at horizontal positions 13, 14, 15, 16, and 17 are arranged in ascending order of horizontal position to obtain the original splicing boundary sequence.

[0767] Based on the starting horizontal position 14 and the left end splicing width range of column 1, the horizontal position 14 is extracted and used as the left end splicing area.

[0768] The difference between the horizontal position 14 and the initial horizontal position 14 is calculated to be 0. The difference is then incremented by one to obtain 1.

[0769] Divide 1 by the left-end splicing width 1 plus one to get a left-end splicing ratio of 0.5.

[0770] Based on the first sequence boundary, multiply 191.5 by the difference of -0.5 and add the product of 192.6 multiplied by 0.5 to obtain the left continuous boundary position 192.05 corresponding to the horizontal position 14.

[0771] Based on the second sequence boundary, multiply 227.9 by the difference of -0.5 and add the product of 228.4 multiplied by 0.5 to obtain the left continuous boundary position 228.15 corresponding to the horizontal position 14.

[0772] Based on the third sequence boundary, multiply 263.4 by the difference of 1 minus 0.5, and then add the product of 264.8 multiplied by 0.5 to obtain the left-end continuous boundary position 264.10 corresponding to the horizontal position 14, resulting in the left-end continuous boundary position sequence 192.05, 228.15, 264.10 corresponding to the horizontal position 14.

[0773] Based on the ending horizontal position 16 and the right-end splicing width range of column 1, extract the horizontal position 16 and use it as the right-end splicing area.

[0774] The difference between the end horizontal position 16 and the horizontal position 16 is 0. Add one to the difference to get 1.

[0775] Divide 1 by the sum of the right-end splicing width 1 and 1 to get the right-end splicing ratio of 0.5.

[0776] Based on the first sequence boundary, multiply 192.8 by the difference of -0.5 and add the product of 193.0 multiplied by 0.5 to obtain the right-end continuous boundary position 192.90 corresponding to the horizontal position 16.

[0777] Based on the second sequence boundary, multiply 229.0 by the difference of 1 minus 0.5, and then add the product of 228.9 multiplied by 0.5 to obtain the right-end continuous boundary position 228.95 corresponding to the horizontal position 16.

[0778] Based on the third sequence boundary, multiply 265.2 by the difference of -0.5 and add the product of 265.1 multiplied by 0.5 to obtain the right-end continuous boundary position 265.15 corresponding to the horizontal position 16, resulting in the right-end continuous boundary position sequence 192.90, 228.95, 265.15 corresponding to the horizontal position 16.

[0779] Since the horizontal position 15 does not fall into the left and right splicing areas, the internal correction boundary positions 192.8, 228.6, and 264.9 corresponding to the horizontal position 15 remain unchanged.

[0780] Based on the continuous left-end boundary position sequence 192.05, 228.15, 264.10 corresponding to horizontal position 14, the segment internal corrected boundary position sequence 192.8, 228.6, 264.9 corresponding to horizontal position 15, and the continuous right-end boundary position sequence 192.90, 228.95, 265.15 corresponding to horizontal position 16, a continuous boundary group is obtained. In this continuous boundary group, the boundary positions corresponding to horizontal position 14 are 192.05, 228.15, 264.10, the boundary positions corresponding to horizontal position 15 are 192.8, 228.6, 264.9, and the boundary positions corresponding to horizontal position 16 are 192.90, 228.95, 265.15.

[0781] Based on the continuous boundary group, the upper and lower outer boundary positions corresponding to the horizontal positions 14, 15, and 16 are extracted.

[0782] The upper outer boundary position corresponding to the horizontal position 14 is 156.6, and the lower outer boundary position is 300.7.

[0783] The upper outer boundary position corresponding to the horizontal position 15 is 156.8, and the lower outer boundary position is 300.9.

[0784] The upper outer boundary position corresponding to the horizontal position 16 is 157.0, and the lower outer boundary position is 301.1.

[0785] Based on the upper outer boundary position 156.6, the continuous boundary positions 192.05, 228.15, 264.10 and the lower outer boundary position 300.7 corresponding to the horizontal position 14, arranged in ascending order of vertical position, the sequence intervals 156.6 to 192.05, 192.05 to 228.15, 228.15 to 264.10 and 264.10 to 300.7 are obtained.

[0786] Based on the initial sequence value 2, the sampling locations between 156.6 and 192.05 were backfilled with sequence value 2.

[0787] Adding 1 to 2 gives 3, and the sampling locations between 192.05 and 228.15 are backfilled with the sequence value 3.

[0788] Adding 1 to 3 gives 4, and the sampling locations between 228.15 and 264.10 are backfilled with the sequence value 4.

[0789] Based on the ending sequence value 5, the sampling locations between 264.10 and 300.7 are backfilled with sequence value 5.

[0790] The same method was used to backfill horizontal positions 15 and 16 to obtain a continuous stratification sequence.

[0791] The continuous sequence sequence and the original sequence location map that do not fall into the sequence segment to be corrected are merged to obtain the corrected sequence location map.

[0792] Step S2045: Based on the modified sequence location map, determine the sequence boundary location, perform boundary response mapping, and generate a boundary response sequence set and a corresponding boundary confidence sequence set.

[0793] In this embodiment, based on the modified strata location map, the strata value sequence corresponding to each lateral position is extracted to obtain the modified strata record set.

[0794] Based on the modified stratograph record set, the stratograph value changes of adjacent sampling positions are traversed from small to large along the vertical position at the same horizontal position. The position pairs where the stratograph value changes from a lower stratograph to a higher stratograph are extracted to obtain the stratograph jump position pairs.

[0795] Based on the sequence jump position pairs, the median of the longitudinal positions of two adjacent sampling positions is taken to obtain the sequence boundary position.

[0796] Based on the stratigraphic boundary locations, the stratigraphic boundary locations are organized according to their horizontal positions and stratigraphic numbers to obtain the stratigraphic boundary location set.

[0797] Based on the set of hierarchical boundary locations, the horizontal position, vertical position, and hierarchical number corresponding to each hierarchical boundary location are extracted to obtain the boundary mapping index set.

[0798] Based on the column response sequence set, the signed grayscale response values ​​corresponding to each boundary mapping index are extracted to obtain the original boundary response values.

[0799] Based on the original response value of the boundary and the signed grayscale response values ​​in the pre-set boundary neighborhood before and after the boundary position, the absolute mean of the neighborhood response is calculated to obtain the local response intensity. The boundary neighborhood is set by those skilled in the art according to the actual situation.

[0800] For example, the boundary neighborhood takes three sampling positions before and after the boundary position.

[0801] Based on the boundary original response value and the local response intensity, the absolute value of the boundary original response value is taken, and then the absolute value of the boundary original response value is divided by the local response intensity to obtain the normalized response ratio.

[0802] Based on the sign of the normalized response ratio and the original boundary response value, the positive and negative directions of the normalized response ratio are retained to obtain the boundary response value.

[0803] Based on the boundary response values, the boundary response sequence sets are obtained by organizing them in ascending order of their hierarchical numbers.

[0804] Based on the boundary response value, the absolute value of the response difference at adjacent lateral positions of the same sequence boundary is extracted to obtain the response continuity quantity.

[0805] Based on the stratigraphic boundary location, the absolute value of the positional difference between adjacent lateral positions of the same stratigraphic boundary is extracted to obtain the positional continuity quantity.

[0806] Based on the local response intensity, the local response intensity is normalized by dividing the local response intensity by the upper limit of the response intensity normalization to obtain the initial normalized value. The initial normalized value is then clipped by upper and lower limits, setting the initial normalized value greater than 1 to 1 and the initial normalized value less than 0 to 0, thus obtaining the response intensity normalized value.

[0807] Boundary confidence values ​​are obtained based on the response continuity quantity, the location continuity quantity, and the response intensity normalization value.

[0808] Based on the boundary confidence values, the sequence is organized in ascending order of the stratum number to obtain the boundary confidence sequence set.

[0809] Step S3: Based on the boundary response sequence set and the boundary confidence sequence set, perform layer number estimation to obtain the automatic material counting result.

[0810] The specific steps of step S3 are as follows:

[0811] Step S301: Based on the boundary confidence sequence set, extract continuous segments with stable confidence distributions to obtain stable counting segments.

[0812] In this embodiment, based on the boundary confidence sequence set, the boundary confidence value sequence of each layer boundary in the lateral unfolding direction is extracted according to the layer sequence number to obtain a single boundary confidence sequence set.

[0813] Based on a single-boundary confidence sequence set, the mean and fluctuation range of the boundary confidence values ​​within each window are statistically analyzed within a horizontal sliding window to obtain a confidence-stable feature sequence.

[0814] Based on the confidence-stable feature sequence, horizontal windows with boundary confidence mean greater than a preset confidence mean threshold and fluctuation amplitude less than a preset fluctuation threshold are retained to obtain a candidate stable window set. The confidence mean threshold and fluctuation threshold are set by those skilled in the art according to the actual situation.

[0815] For example, the confidence mean threshold is set to 0.75 and the fluctuation threshold is set to 0.12.

[0816] Based on the candidate stable window set, candidate stable windows that are horizontally continuous and overlap each other are merged to obtain the candidate stable segment set.

[0817] Based on the candidate stable segment set, the horizontal continuous length of each candidate stable segment is counted, and candidate stable segments with a continuous length greater than the preset minimum segment length are retained to obtain stable counting segments. The minimum segment length is set by those skilled in the art according to the actual situation.

[0818] For example, the minimum segment length is 4 columns.

[0819] Step S302: Based on the boundary response sequence set, calculate the cumulative evidence increment between adjacent boundary responses within the stable counting segment to obtain a single-layer candidate increment set.

[0820] In this embodiment, based on the stable counting segments, the starting and ending lateral positions corresponding to each stable counting segment are extracted to obtain the stable segment position set.

[0821] Based on the boundary response sequence set and the stable segment location set, the boundary response values ​​corresponding to each stable counting segment and each sequence boundary are extracted to obtain the segment boundary response sequence.

[0822] Based on the segment boundary response sequence, the boundary response values ​​corresponding to the two adjacent sequence boundaries are extracted in ascending order of the stratigraphic sequence number to obtain adjacent boundary response pairs.

[0823] Based on adjacent boundary response pairs, the boundary response value of the next sequence boundary is subtracted from the boundary response value of the previous sequence boundary to obtain the response difference sequence corresponding to each lateral position.

[0824] Based on the response difference sequence, the mean value is calculated according to the horizontal position within the same stable counting segment to obtain the cumulative evidence increment between adjacent boundary responses.

[0825] Based on the cumulative evidence increment, the corresponding stable counting segment number, the previous layer sequence number, and the next layer sequence number are extracted to obtain a single-layer candidate increment set.

[0826] Step S303: Based on the single-layer candidate increment set, determine the single-layer increment center value and allowable fluctuation range, and generate the unit layer increment scale.

[0827] In this embodiment, based on the single-layer candidate increment set, the cumulative evidence increment value corresponding to each single-layer candidate increment record is extracted to obtain the candidate increment value sequence.

[0828] Based on the candidate increment value sequence, sort the increment values ​​from smallest to largest to obtain an ordered increment sequence.

[0829] Based on the ordered incremental sequence, the incremental value corresponding to the middle position is extracted to obtain the single-layer incremental center value.

[0830] Based on the single-layer increment center value, the absolute value of the difference between each candidate increment value and the single-layer increment center value is calculated to obtain the increment deviation sequence.

[0831] Based on the incremental deviation sequence, the deviation values ​​are sorted from smallest to largest, and the deviation values ​​corresponding to the middle positions are extracted to obtain the baseline deviation values.

[0832] Based on the benchmark deviation value and the preset fluctuation amplification coefficient, the allowable fluctuation range is calculated to obtain the allowable fluctuation range corresponding to the single-layer incremental center value. The fluctuation amplification coefficient is set by those skilled in the art according to the actual situation.

[0833] For example, the fluctuation amplification factor is set to 2.

[0834] Based on the single-layer increment center value and the allowable fluctuation range, the lower and upper boundary values ​​of the unit layer increment are determined, thus obtaining the unit layer increment interval.

[0835] A unit layer increment scale is generated based on the unit layer increment interval, the single layer increment center value, and the allowable fluctuation range.

[0836] Step S304: Based on the unit layer increment scale, accumulate the cumulative evidence increment and perform integer quantization to obtain the layer number estimate corresponding to the boundary response sequence set.

[0837] In this embodiment, based on the boundary response sequence set, the boundary response values ​​in each stable counting segment are extracted and arranged in ascending order of layer number to obtain the segment boundary response sequence.

[0838] Based on the segment boundary response sequence, the cumulative evidence increment between adjacent boundary responses is extracted to obtain the segment increment sequence.

[0839] Based on the segment increment sequence, the cumulative increment sequence of the segment is obtained by accumulating each item from front to back in the hierarchical direction.

[0840] Based on the unit layer increment scale, the lower boundary value, upper boundary value, and center value of the single layer increment are extracted to obtain the unit layer quantization parameters.

[0841] Based on the unit layer quantization parameter, the unit layer increment lower boundary value and the unit layer increment upper boundary value are multiplied by the layer number index to obtain the multi-layer increment lower boundary value and multi-layer increment upper boundary value corresponding to each layer number.

[0842] Based on the cumulative increment sequence of the segment, the lower boundary value of the multi-layer increment corresponding to each cumulative increment and each layer number is compared with the upper boundary value of the multi-layer increment to determine the multi-layer increment interval into which the cumulative increment falls, and the layer number estimate corresponding to each cumulative increment is obtained.

[0843] For positions where the cumulative increment does not fall within any multi-layer increment interval, the cumulative increment is divided by the single-layer increment center value, and the result is taken as the nearest integer to obtain the supplementary layer number estimate.

[0844] Based on the layer number estimate and the supplementary layer number estimate, the layer number estimate corresponding to the boundary response sequence set is obtained.

[0845] Step S305: Based on the estimated number of layers, outliers are removed, and the estimated number of layers after outlier removal is fused to obtain the automatic material counting result.

[0846] In this embodiment, based on the layer number estimate, the layer number estimate corresponding to each stable counting segment is extracted to obtain the layer number estimate sequence.

[0847] Based on the layer number estimation sequence, the layer number estimates are sorted from smallest to largest to obtain an ordered layer number sequence.

[0848] Based on the ordered layer sequence, the layer estimate corresponding to the middle position is extracted to obtain the reference layer value.

[0849] Based on the reference layer values, the absolute value of the difference between the estimated layer number and the reference layer value is calculated to obtain the layer number deviation sequence.

[0850] Based on the layer deviation sequence, the estimated number of layers with a layer deviation greater than a preset abnormal deviation threshold is determined, and the abnormal layer value is obtained. The abnormal deviation threshold is set by those skilled in the art according to the actual situation.

[0851] For example, the abnormal deviation threshold is set to 1.

[0852] Based on the layer number estimation sequence and the values ​​of outlier layers, the values ​​of outlier layers are removed to obtain the retained layer number sequence.

[0853] Based on the preserved layer number sequence, the frequency sequence of each layer number is obtained by counting the occurrences of the corresponding values.

[0854] Based on the frequency sequence of layers, the layer value that appears most frequently is extracted to obtain the candidate count value.

[0855] Based on the number of candidate count values, when there is only one candidate count value, that candidate count value is used as the result of the fusion layer number.

[0856] Based on the number of candidate counts, when there is more than one candidate count, the mean of the retained layer sequence is calculated to obtain the layer mean.

[0857] Based on the average number of layers, the absolute value of the difference between each candidate count value and the average number of layers is calculated, and the candidate count value with the smallest absolute value of the difference is extracted to obtain the fused layer result.

[0858] Based on the fusion layer results, the automatic material counting results are obtained.

[0859] Example 2:

[0860] See Figure 4 This embodiment provides an automatic material counting system based on visual inspection, including: an image acquisition module, a quantization and stratification module, and a stratification estimation module.

[0861] The image acquisition module is used to acquire the original workstation image, perform positioning correction and cropping on the original workstation image to obtain the counting area image.

[0862] The quantization layering module performs signed cumulative integration and integer quantization layering based on the counting region image to generate a boundary response sequence set and a corresponding boundary confidence sequence set.

[0863] The layer number estimation module estimates the layer number based on the boundary response sequence set and the boundary confidence sequence set, and obtains the automatic material counting result.

[0864] The specific functions of each module described above are explained in the relevant content of the method in Embodiment 1, and will not be repeated here.

[0865] In addition, the parts of the technical solutions provided in the embodiments of this application that are consistent with the implementation principles of the corresponding technical solutions in the prior art have not been described in detail, so as to avoid excessive elaboration.

[0866] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above descriptions are merely specific embodiments of the present invention and are not intended to limit the invention. Any modifications, equivalent substitutions, or improvements 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 automatic material counting based on vision detection, applied to the counting station of a vision counting machine, characterized in that, The counting station is equipped with a counting fixture for positioning materials, including: Acquire original workstation images, perform positioning correction and cropping on the original workstation images to obtain counting area images; Based on the counting region image, signed cumulative integral and integer quantization are performed to generate a boundary response sequence set and a corresponding boundary confidence sequence set; Based on the boundary response sequence set and the boundary confidence sequence set, the number of layers is estimated to obtain the automatic material counting results.

2. The method for automatic material counting based on vision detection according to claim 1, characterized in that, The process of acquiring the original workstation image, performing positioning correction and cropping on the original workstation image to obtain the counting region image includes: Obtain the fixture reference features, determine the fixture reference coordinate system and the direction of unilateral supplementary lighting, and acquire the original workstation image; Based on the fixture reference features, the reference position of the fixture in the original workstation image is determined, and the positioning relationship between the original workstation image and the fixture reference coordinate system is calculated. Based on the positioning relationship, the original workstation image is positioned and corrected, and then cropped to obtain the counting area image.

3. The automatic material counting method based on vision detection according to claim 2, characterized in that, The process of generating a boundary response sequence set and a corresponding boundary confidence sequence set based on the count region image, involving signed cumulative integration and integer quantization layering, includes: Based on the counting region image, the reference feature region of the fixture is determined, and the feature shielding region and the unilateral illumination reference field are obtained; Based on the feature shielding region and the unilateral illumination reference field, structural suppression and illumination compensation are performed on the counting region image to obtain the interference-suppressed image. Based on the interference-suppressed image, the sidewall region is determined, the layer texture reference information is extracted, and the unfolded coordinate field is constructed to obtain the unfolded sidewall image; Based on the sidewall unfolded image, signed cumulative integral and integer quantization are performed for layering, and boundary correction is performed on abnormal sequence segments to generate boundary response sequence sets and corresponding boundary confidence sequence sets.

4. The automatic material counting method based on vision detection according to claim 3, characterized in that, The process of determining the fixture reference feature region based on the counted region image, and obtaining the feature shielding region and the unilateral illumination reference field, includes: The projection region of the fixture reference feature in the counting region image is determined to obtain the fixture reference feature region; Based on the reference feature area of ​​the fixture, the marking is extended outward to generate the adjacent interference area, and the reference feature area of ​​the fixture and the adjacent interference area are merged and marked to obtain the feature shielding area; The background region located outside the feature shielding region in the counting region image is identified. The brightness distribution of the background region along the unilateral illumination direction is extracted and fitted to obtain the unilateral illumination reference field.

5. The automatic material counting method based on vision detection according to claim 4, characterized in that, The method of performing structural suppression and illumination compensation on the counting region image based on the feature shielding region and the unilateral illumination reference field to obtain an interference-suppressed image includes: Identify the pixels in the counting region image that fall into the feature masking region, and mask the pixels to obtain a structure suppression image; Based on a single-sided illumination reference field, the brightness of the structure suppression image is normalized to reduce the brightness slope and obtain an illumination compensation image. Based on the illumination-compensated image, the brightness abrupt change region near the boundary of the feature shielding region is identified, and the brightness abrupt change region is smoothed to obtain the interference suppression image.

6. The method for automatic material counting based on vision detection according to claim 5, characterized in that, The process of determining the sidewall region based on the interference-suppressed image, extracting layer texture reference information, and constructing an unfolded coordinate field to obtain the unfolded sidewall image includes: Based on the interference suppression image, the outer edge of the material is extracted, and the outer edge of the material is continuously screened and smoothly fitted to obtain the main contour of the material sidewall. Based on the main contour of the material sidewall, the sidewall region is determined, and candidate responses of layer textures that repeatedly appear along the extension direction of the main contour of the material sidewall are extracted within the sidewall region to obtain layer texture reference information. Based on the layer texture reference information, the layer texture distribution offset at each sampling position in the sidewall region is determined, and the unfolding correction is calculated to construct the unfolding coordinate field; Based on the unfolded coordinate field, the sidewall region is resampled and unfolded, the layer spacing distribution at each sampling position after unfolding is extracted, and the layer spacing distribution is adjusted to be consistent to obtain the unfolded image of the sidewall.

7. The automatic material counting method based on vision detection according to claim 6, characterized in that, The process of unfolding the image based on the sidewalls, performing signed cumulative integration and integer quantization for layering, and correcting the boundaries of anomalous sequence segments to generate a set of boundary response sequences and a corresponding set of boundary confidence sequences includes: Based on the unfolded image of the sidewall, the signed grayscale response at each sampling position is extracted along the main contour extension direction of the material sidewall to obtain a set of column response sequences; Based on the column response sequence set, signed cumulative integration is performed to generate a single-layer cumulative scale, and integer quantization is performed to divide the data into layers to obtain the initial stratification position map. Based on the initial sequence location map, abnormal sequence segments are identified to obtain a set of sequence segments to be corrected; Based on the set of sequence segments to be corrected, a double-ended sequence constraint is constructed, and the segment correction quota is determined. The sequence segments to be corrected are then demarcated and the sequence values ​​are backfilled to obtain the corrected sequence location map. Based on the modified sequence location map, the sequence boundary locations are determined, and boundary response mapping is performed to generate a boundary response sequence set and a corresponding boundary confidence sequence set.

8. The automatic material counting method based on vision detection according to claim 7, characterized in that, The process of performing signed cumulative integration based on the column response sequence set to generate a single-layer cumulative scale, followed by integer quantization for layering, yields an initial hierarchical position map, including: Based on the column response sequence set, baseline elimination and signed cumulative integration are performed on each column response sequence to obtain the cumulative quantity curve set corresponding to each column; Based on the cumulative quantity curve set, identify the smooth sections that are continuous in adjacent columns and have similar trends in cumulative quantity change, and obtain the boundary response stable sections. Based on the stable boundary response segment, a single-layer candidate transition unit set is determined, and main class merging and alignment stacking are performed to construct a single-layer response unit cell and generate a single-layer cumulative quantity scale. Based on a single-layer cumulative scale, the cumulative curve set is quantized into layers by integer stratification, generating stratum sequence values ​​corresponding to each sampling position, and determining the boundary positions between adjacent stratum sequence values ​​to obtain an initial stratum sequence position map.

9. The automatic material counting method based on vision detection according to claim 8, characterized in that, The process of determining a single-layer candidate transition unit set based on the boundary response stable segment, performing main class merging and alignment stacking, constructing a single-layer response unit cell, and generating a single-layer cumulative scale includes: Based on the stable boundary response section, the smooth sections adjacent to each other in the same cumulative curve and the transition sections between the adjacent smooth sections are determined to obtain a single-layer candidate transition unit set. Based on the single-layer candidate transition unit set, the cumulative amount and transition width of each candidate transition unit are normalized to obtain the standardized transition unit set. Based on the standardized transition unit set, the consistency representation of each candidate transition unit is extracted, and the main class is merged and anomalies are removed to obtain the main class transition unit set. Based on the set of main class transition units, the main class transition units are superimposed in the same position, the single-layer cumulative scale constituent quantity is extracted, and a single-layer response unit is constructed. Based on a single-layer response unit cell, the constituent quantities of the single-layer cumulative scale are mapped to single-layer cumulative scale parameters to generate a single-layer cumulative scale.

10. The automatic material counting method based on vision detection according to claim 9, characterized in that, The process involves constructing double-ended sequence constraints based on the set of sequence segments to be corrected, determining segment correction quotas, performing boundary correction and sequence value backfilling on the sequence segments to be corrected, and obtaining a corrected sequence location map, including: Based on the set of sequence segments to be corrected, the sequence values ​​and boundary positions at both ends of each sequence segment to be corrected are extracted, and left and right double-end anchor points are constructed to obtain double-end sequence constraints. Based on the two-end sequence constraints, the target number of each sequence segment to be corrected is determined, and the sequence completion amount, sequence split amount or sequence merging amount corresponding to the target number of sequence segments is calculated to obtain the segment correction quota. Based on the segment correction quota, the target number of boundaries and the initial location of the boundaries of the sequence segments to be corrected are determined, and the sequence segments to be corrected are equally divided and the boundaries are optimized to obtain candidate sequence boundary groups. Based on the candidate sequence boundary groups, missing boundaries are filled, overly dense boundaries are split, and redundant boundaries are removed from the sequence segments to be corrected, generating corrected boundary groups. Sequence values ​​are then backfilled for each sequence segment to be corrected to obtain a local corrected sequence sequence. Based on the local corrected sequence sequence, the boundary positions at both ends of each sequence segment to be corrected are continuously spliced ​​to obtain the corrected sequence position map.

11. The automatic material counting method based on vision detection according to claim 10, characterized in that, The process of estimating the number of layers based on the boundary response sequence set and the boundary confidence sequence set to obtain the automatic material counting results includes: Based on the boundary confidence sequence set, continuous segments with stable confidence distributions are extracted to obtain stable counting segments; Based on the boundary response sequence set, the cumulative evidence increment between adjacent boundary responses within the stable counting segment is calculated to obtain a single-layer candidate increment set. Based on the single-layer candidate increment set, the single-layer increment center value and allowable fluctuation range are determined, and a unit-layer increment scale is generated. Based on the unit layer increment scale, the cumulative evidence increment is accumulated and quantized to obtain the layer number estimate corresponding to the boundary response sequence set; Based on the estimated number of layers, outliers are removed, and the estimated number of layers after outlier removal is fused for consistency to obtain the automatic material counting result.

12. A visual detection-based automatic material counting system, used to implement the visual detection-based automatic material counting method according to any one of claims 1-11, characterized in that, include: The image acquisition module is used to acquire original workstation images, perform positioning correction and cropping on the original workstation images to obtain the counting area image; The quantization layering module performs signed cumulative integration and integer quantization layering based on the count region image, generating a boundary response sequence set and a corresponding boundary confidence sequence set; The layer number estimation module estimates the layer number based on the boundary response sequence set and the boundary confidence sequence set, and obtains the automatic material counting results.