A composite image measurement method and system based on AI subpixel edge detection

By employing an AI-based composite image measurement method, edge gradients are analyzed hierarchically and a contour offset propagation chain is constructed. This solves the problem of edge gradient offset under complex industrial imaging conditions and achieves high-precision contour reconstruction and dimensional measurement.

CN122493073APending Publication Date: 2026-07-31SUZHOU JINDISEN PRECISION INSTRUMENT TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
SUZHOU JINDISEN PRECISION INSTRUMENT TECHNOLOGY CO LTD
Filing Date
2026-05-13
Publication Date
2026-07-31

AI Technical Summary

Technical Problem

Existing subpixel edge detection methods cannot effectively suppress edge gradient offset under complex industrial imaging conditions, leading to decreased contour geometric consistency and dimensional measurement deviations.

Method used

By employing an AI-based composite image measurement method, gradient changes within the edge neighborhood are analyzed hierarchically, a contour offset propagation chain is constructed, and a contour association structure is generated by combining stable edge response components and offset perturbation response components. Inverse tracking and feedback correction are then performed to dynamically adjust edge fitting and contour reconstruction parameters.

Benefits of technology

It significantly improves the stability of contour reconstruction and sub-pixel positioning accuracy in complex environments, avoids contour breakage and dimensional drift, and improves the reliability of dimensional measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122493073A_ABST
    Figure CN122493073A_ABST
Patent Text Reader

Abstract

This invention relates to the field of machine vision technology and discloses a composite image measurement method and system based on AI sub-pixel edge detection. The method includes multi-directional edge scanning of an image of a component to be measured, generating stable edge response components and offset perturbation response components; constructing a contour offset propagation chain based on the offset perturbation response components, and combining it with the stable edge response components to form a continuous contour association structure; jointly calculating the edge connection offset between adjacent contour segments, the degree of local curvature imbalance, and the contour continuity deviation to generate contour association residual parameters; reverse-tracking the propagation relationship between the overall contour error and local edge offset to form a contour feedback constraint mechanism; and dynamically adjusting the local edge fitting parameters, contour connection parameters, and global contour reconstruction parameters to output the size measurement results of the target component. This invention has the advantage of improving the stability of contour reconstruction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of machine vision technology, specifically to a composite image measurement method and system based on AI subpixel edge detection. Background Technology

[0002] In industrial vision measurement and precision assembly inspection, existing subpixel edge detection methods can achieve subpixel-level edge fitting within a local window when extracting the high-precision dimensions of the edge contours of metal parts. However, under complex industrial imaging conditions, due to differences in microscopic reflection on the surface of the parts, local contamination, and unstructured grayscale disturbances caused by multi-angle illumination on curved surfaces, the edge gradient exhibits a continuous but insignificant micro-shift in the local neighborhood. This type of shift does not trigger anomaly recognition mechanisms in the pixel-level edge detection and local subpixel fitting stages, but it gradually accumulates during contour stitching and global reconstruction, resulting in a latent shift in the overall edge geometry at the subpixel scale, thus causing non-closure errors in closed contours and dimensional measurement deviations.

[0003] Therefore, the implicit micro-offsets generated during the local sub-pixel edge fitting process in the existing technology cannot be effectively suppressed in the global contour reconstruction stage, resulting in cumulative offsets that lead to a decrease in contour geometric consistency and dimensional measurement deviations. Summary of the Invention

[0004] To address the shortcomings of existing technologies, this invention provides a composite image measurement method and system based on AI subpixel edge detection, which has the advantage of improving the stability of contour reconstruction and solves the problems mentioned in the background technology.

[0005] To achieve the aforementioned goal of improving the stability of contour reconstruction, this invention provides the following technical solution: a composite image measurement method based on AI sub-pixel edge detection, comprising the following steps: Multi-directional edge scanning is performed on the image of the component under test. By combining the regional reflection change state, surface gray-scale disturbance intensity and local illumination shift distribution, the gradient continuous change process in the edge neighborhood is analyzed in layers to generate stable edge response components and shift disturbance response components. Based on the offset perturbation response components, the offset direction sequence, curvature change gradient and grayscale transition stable interval of different contour segments during the edge extension process are extracted to construct the contour offset propagation chain, and a continuous contour association structure is formed by combining the stable edge response components. Based on the continuous contour association structure, the edge connection offset, local curvature imbalance and contour continuity deviation between adjacent contour segments are jointly calculated, and the cumulative intensity and diffusion trend of the offset in the contour propagation path are combined to generate contour association residual parameters. Based on the contour-related residual parameters, the propagation relationship between the overall contour error and the local edge offset is traced in reverse, and the sub-pixel offset of the corresponding edge segment is pulled back and corrected according to the contour offset propagation chain, forming a contour feedback constraint mechanism. Based on the contour feedback constraint mechanism, the local edge fitting parameters, contour connection parameters, and global contour reconstruction parameters are dynamically adjusted in conjunction with each other, and the dimensional measurement results of the target parts are output based on the corrected contour continuity and consistency.

[0006] Preferably, the process of generating stable edge response components and offset disturbance response components is as follows: Multi-directional convolutional scanning and gradient extraction are performed on the input component images to obtain edge responses in each direction and spatial aggregation is performed to form candidate edge response regions. Stability is determined based on the local reflection consistency of candidate edge response regions, and regions that meet the continuous response condition are divided into stable response components. The disturbance characteristics of the remaining edge response regions are identified based on the grayscale change amplitude to obtain candidate disturbance response regions; The candidate regions for disturbance response are subjected to illumination uniformity normalization. Consistency analysis is performed on the processed disturbance response based on the stable response components to obtain the stable edge response components, the offset disturbance response components, and the offset disturbance response components.

[0007] Preferably, the process of constructing the contour offset propagation chain is as follows: The offset perturbation response components are decomposed into a direction field to obtain the offset direction vector of the contour edge in the local neighborhood. Based on the offset direction vector, adjacent contour segments are continuously matched according to the consistency of direction to establish a connection relationship between contour segments with spatial adjacency. Based on the connectivity, the curvature change rate is introduced to enhance the difference in the contour transition area; By combining the stability of grayscale changes at the turning points, discontinuous disturbances and offsets between contour segments are eliminated. Based on the connection relationship of the selected contour segments, the connection path is corrected by combining the constraints of directional consistency, curvature continuity and grayscale stability to form a contour offset propagation chain.

[0008] Preferably, the process of forming a continuous contour association structure by combining stable edge response components is as follows: Structural confidence assessment is performed on stable edge response components to screen for highly reliable edge response point sets; Based on spatial neighborhood consistency, a topological connection is performed on the set of highly reliable edge response points to construct an initial contour skeleton structure; Map the contour offset propagation chain to the initial contour skeleton structure and align the offset nodes with the corresponding skeleton nodes; By combining the stable edge response intensity to constrain and correct the skeleton connection relationship, a continuous contour association structure supported by a stable skeleton structure and incorporating offset propagation information is formed.

[0009] Preferably, the process of jointly calculating the edge connection offset, local curvature imbalance, and contour continuity deviation between adjacent contour segments is as follows: Based on the continuous contour association structure, the connection edges of adjacent segments are extracted along the connection relationship of contour segments, and sub-pixel level offset estimation is performed to obtain the corresponding spatial position offset. Perform curvature variation analysis on adjacent contour segments in a continuous contour-related structure and calculate the curvature difference; Detect locations of continuous changes along the contour connection path and identify information on contour break sections; The spatial position offset, curvature difference and fracture section information are uniformly fused and calculated to generate a consistency error index to characterize the local structural distortion of the contour.

[0010] Preferably, the process of generating contour-related residual parameters is as follows: The consistency error index is used as the initial weight input for each offset node in the offset propagation chain. Based on the initial weight input, the offset propagation chain is carried out node by node to accumulate the offset, forming a path-level offset accumulation. Using the directional distribution of path-level offset accumulation as a constraint, the diffusion trend of directional consistency in the offset propagation chain is modeled to obtain the directional consistency constraint term. Under the combined effect of path-level offset accumulation and directional consistency constraint, the weight distribution of local structural distortion nodes in the propagation path is reconstructed and corrected to generate structural offset error. Using the structural offset error as the function input, the contour-related residual parameters are mapped to obtain the parameters.

[0011] Preferably, the process of reverse tracing the propagation relationship between the overall contour error and the local edge offset is as follows: The source interval of error propagation is determined by using nodes in the contour correlation residual parameters that exceed a preset threshold. Construct a backpropagation path in the contour structure based on the source interval; The contribution decomposition of local edge offset is performed along the back propagation path, and the error influence weight of each propagation node is output. The propagation nodes are sorted based on the error impact weight, and the nodes with the highest ranking are identified as key propagation nodes.

[0012] Preferably, the process of forming the contour feedback constraint mechanism is as follows: For key propagation nodes, gradient pullback calculation is performed on sub-pixel offsets to generate corresponding local correction values; The local correction amount is mapped to the corresponding node of the profile offset propagation chain, and the correction is passed down step by step along the propagation chain. By combining stable edge response components to apply consistency constraints to the chain correction results, a contour feedback constraint mechanism is formed.

[0013] Preferably, the process of outputting the dimensional measurement results of the target component is as follows: Based on the contour feedback constraint mechanism, the local edge fitting parameters, contour connection parameters and global contour reconstruction parameters are dynamically adjusted to generate a stable and consistent contour geometry. Based on the contour geometry, extract the contour feature points of the target component and calculate the corresponding sub-pixel level size parameters; The dimensional measurement results are verified by combining the continuity and consistency of the contour, and the dimensional measurement results of the target part are output.

[0014] A composite image measurement system based on AI subpixel edge detection includes: Response decomposition module: performs hierarchical analysis on the continuous gradient change process to generate stable edge response components and offset perturbation response components; Propagation building module: Based on the analysis of the offset perturbation response components, the offset continuity and curvature correlation of the contour segment are analyzed, the contour offset propagation chain is constructed, and the continuous contour correlation structure is formed by combining the stable edge response components; The residual calculation module performs joint calculations on edge connection offsets, curvature imbalances, and continuous deviations between contour segments to generate contour-related residual parameters. Feedback correction module: Based on the residual parameters, the edge offset propagation path is traced in reverse, and the sub-pixel level offset is pulled back to correct, forming a feedback constraint mechanism; Linked reconstruction module: Dynamically and collaboratively adjusts edge fitting, contour connection and global reconstruction parameters, and outputs corrected high-precision dimensional measurement results.

[0015] Compared with existing technologies, the present invention provides a composite image measurement method and system based on AI sub-pixel edge detection, which has the following advantages: This invention does not merely perform single-point sub-pixel fitting on local edges, but rather treats edge offsets generated in complex industrial imaging environments as a structural perturbation that propagates continuously along the contour. By performing hierarchical analysis of stable edge information and offset perturbation information, it establishes the propagation correlation between contour offsets in different edge segments. This transforms the random pseudo-edges originally caused by metallic reflections, variations in curved surface illumination, local contamination, and grayscale fluctuations into a traceable, constrainable, and reversibly correctable contour offset propagation process. Furthermore, it imposes overall constraints on the cumulative offset trend through a continuous contour correlation structure and utilizes contour correlation residual parameters. The algorithm performs reverse feedback correction on the overall contour error to local edge segments, preventing the local sub-pixel edge offset from continuously spreading during contour extension. This effectively avoids the contour breakage, connection distortion, and size drift problems caused by the gradual amplification of local errors in traditional edge detection. At the same time, the contour feedback constraint mechanism dynamically links the edge fitting, contour connection, and global contour reconstruction processes, enabling the local edge accuracy and overall contour continuity to converge synergistically. This significantly improves the contour reconstruction stability, sub-pixel positioning accuracy, and size measurement reliability of complex parts in high-reflection, multi-curvature, and complex lighting scenarios. Attached Figure Description

[0016] Figure 1 This is a schematic diagram of the method of the present invention; Figure 2 This is a schematic diagram of the structure of the present invention. Detailed Implementation

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

[0018] Example 1: Please refer to Figure 1 The composite image measurement method based on AI sub-pixel edge detection described in this embodiment of the invention includes the following steps: S1: Perform multi-directional edge scanning on the image of the component to be tested. Combine the regional reflection change state, surface gray-scale disturbance intensity and local illumination shift distribution to perform layered analysis on the gradient continuous change process in the edge neighborhood, and generate stable edge response components and shift disturbance response components.

[0019] The process of generating stable edge response components and offset disturbance response components in S1 is as follows: The input component image is subjected to multi-directional convolution scanning and gradient extraction to obtain edge responses in each direction and perform spatial aggregation to form candidate edge response regions. The input component image is first converted to grayscale and then preprocessed for size unification and noise suppression. Multi-directional convolution kernels are used to scan the image, including gradient operators in the 0, 45, 90 and 135 directions. The gradient response value in the corresponding direction is calculated for each pixel. The gradient responses in different directions are weighted and fused to form a multi-directional gradient response matrix. Furthermore, the gradient response is spatially aggregated based on the local neighborhood window. Pixel regions that are spatially continuous and whose gradient response amplitude exceeds a preset threshold are divided into candidate edge response regions. Stability is determined based on the local reflection consistency of candidate edge response regions. Regions that meet the continuous response condition are divided into stable response components. For candidate edge response regions, a sliding window method is used to extract the local neighborhood pixel set, and the gradient direction difference and response amplitude dispersion of each neighboring pixel are calculated. A local consistency index is defined based on reflection consistency and is obtained by statistically analyzing the standard deviation of the gradient direction and the variance of the response intensity within the neighborhood. When a region satisfies the condition that the direction difference is less than a preset angle threshold and the response fluctuation is lower than a set threshold in multiple adjacent windows, the region is marked as a continuous response region. The continuous response regions are spatially expanded and connected by a connected component merging method to form stable response components. The remaining edge response regions are identified based on the gray-level change amplitude to obtain perturbation response candidate regions. Gray-level statistical analysis is performed on the candidate edge response regions that are not classified into stable response components. The gray-level change amplitude in the neighborhood of each pixel is calculated, including the absolute value of the gray-level gradient and the local standard deviation. The change amplitude is normalized. If the gray-level change amplitude of a certain region exceeds the preset perturbation threshold, it is marked as a perturbation sensitive region. Spatially adjacent pixel sets with similar perturbation characteristics are clustered to form perturbation response candidate regions. Illumination consistency normalization is performed on the candidate regions of the perturbation response. For the candidate regions of the perturbation response, the background decomposition of the image is performed by the local illumination estimation method. The local illumination distribution map is obtained by Gaussian low-pass filtering or local mean filtering. The illumination intensity coefficient of each perturbation response region is calculated based on the illumination distribution map. The original edge response intensity is divided by the corresponding illumination coefficient for normalization. During the normalization process, abnormal highlight or shadow regions are truncated to limit the influence of extreme illumination on the gradient response, thereby obtaining the illumination-corrected perturbation response data. Consistency analysis is performed on the processed perturbation response based on the stable response component to obtain the stable edge response component, the offset perturbation response component, and the offset perturbation response component. The stable response component and the candidate perturbation response after illumination normalization are mapped to the same spatial coordinate system. The gradient direction sequence and response intensity sequence of the two types of regions in the local neighborhood are extracted. By calculating the gradient continuity difference and response change consistency in the neighborhood, the correlation between the two types of regions is matched and analyzed. Response regions that meet the continuity constraint are assigned to the stable edge response component, and response regions that do not meet the continuity constraint and show direction offset characteristics are assigned to the offset perturbation response component, thus completing the edge response separation process.

[0020] S2: Based on the offset perturbation response components, the offset direction sequence, curvature change gradient and grayscale transition stable interval of different contour segments during the edge extension process are extracted to construct the contour offset propagation chain, and a continuous contour association structure is formed by combining the stable edge response components.

[0021] The process of constructing the contour offset propagation chain in S2 is as follows: The offset perturbation response components are decomposed into orientation fields to obtain the offset orientation vector of the contour edge in the local neighborhood. The input offset perturbation response components are calculated at the pixel level. By setting a fixed window size in the local neighborhood, the gradient components of each pixel in the horizontal and vertical directions are calculated, and the orientation angle is calculated based on the gradient components. The orientation angle of each pixel is subtracted from the average direction of its neighborhood to obtain the orientation offset. The orientation offset is vectorized to form an offset orientation vector field containing amplitude and orientation information, which is used to characterize the orientation change features of the contour edge in the local space. Based on the offset direction vector, adjacent contour segments are continuously matched according to directional consistency to establish spatial adjacency connections between contour segments. Based on the offset direction vector field, contour pixels are segmented, and spatially adjacent pixels with an angular difference less than a preset threshold are grouped into the same candidate contour segment. The spatial connection relationship between each contour segment is recorded using an adjacency matrix, and the connection relationship is scored based on directional consistency, including angular difference, spatial distance, and gradient continuity. For segments that meet the consistency conditions, connection edges are established, thereby constructing a spatial adjacency connection graph structure for contour segments. Based on the connectivity, the curvature change rate is introduced to enhance the difference in the contour transition region. In the constructed contour segment connectivity graph, the local curvature value is calculated for each contour node. The curvature is obtained by calculating the geometric relationship of three adjacent sampling points. The curvature change rate is further calculated, which is the absolute value of the curvature difference between adjacent contour segments. The curvature change rate is normalized. In the transition region where the curvature change rate exceeds the set threshold, the weight of its connecting edge is enhanced or recalibrated to highlight the region with significant contour structure changes, so that the transition node has a higher weight priority in path construction. By combining the stability of grayscale changes at the turning points, discontinuous disturbance offsets between contour segments are eliminated. For the contour turning point region, the local pixel grayscale sequence is extracted, and the grayscale mean, variance, and gradient fluctuation amplitude are calculated. By setting grayscale stability judgment conditions, it is determined whether the turning point is a stable structure point. For connection edges that do not meet the grayscale stability conditions and exhibit abrupt changes or abnormal fluctuations, they are considered to be discontinuous disturbance offset paths, and they are deleted or weighted down in the connection relationship graph, thereby eliminating unreliable contour connection relationships. Based on the selected contour segment connection relationships, the connection paths are corrected by combining directional consistency, curvature continuity, and grayscale stability constraints to form contour offset propagation. After completing the connection relationship selection, the remaining contour segment connection paths are subjected to multi-constraint joint optimization. By constructing a path evaluation function, directional consistency deviation, curvature continuity deviation, and grayscale stability deviation are weighted and combined as constraint terms. The connection paths are reconstructed using a path optimization strategy so that the overall path satisfies the conditions of minimum directional offset, minimum curvature abrupt change, and maximum grayscale stability. Finally, a continuous contour connection path structure that satisfies the constraints is obtained, which is defined as the contour offset propagation chain to characterize the propagation relationship of offset disturbance in the contour structure.

[0022] The process of forming a continuous contour association structure by combining stable edge response components in S2 is as follows: Structural confidence assessment is performed on stable edge response components to screen for highly reliable edge response point sets; The stable edge response components of the input are subjected to pixel-level structural confidence calculation. The confidence is determined by the local gradient magnitude, directional consistency and neighborhood response continuity. The mean and standard deviation of the gradient magnitude of each edge point are statistically analyzed within a fixed-size neighborhood window, and the consistency angle deviation with the main direction of the neighborhood is calculated. When the gradient magnitude is higher than a set threshold and the directional deviation is less than a preset angle range, the edge point is marked as a high-confidence candidate point. The high-confidence candidate points are spatially clustered through connected component analysis. Only the set of points with continuous distribution and a mean confidence value exceeding the set threshold is retained to form a high-reliability edge response point set. Based on spatial neighborhood consistency, a topological connection is performed on the set of highly reliable edge response points to construct an initial contour skeleton structure. A spatial adjacency relationship model is established for the set of highly reliable edge response points. With Euclidean distance as the basic constraint, neighboring edge points are searched within a set radius. For each pair of neighboring points, the consistency of their gradient direction and the difference in curvature change are calculated. When the direction difference is less than a preset threshold and the curvature change is continuous, a connection edge is established. Through continuous iterative connection process, all edge points that meet the consistency constraint are connected into a topological network structure. The nodes and edges are stored using a graph structure representation method to form the initial contour skeleton structure. The contour offset propagation chain is mapped to the initial contour skeleton structure, and the offset nodes are aligned with the corresponding skeleton nodes. Based on the constructed contour offset propagation chain, the spatial coordinates and orientation attributes of the offset nodes are extracted, and nearest neighbor matching is performed in the initial contour skeleton structure. During the matching process, the spatial distance is minimized and the orientation consistency is maximized as constraints. A weighted matching strategy is used to determine the correspondence between the offset nodes and the skeleton nodes. For nodes with one-to-many or many-to-one matching, an optimal matching optimization strategy is introduced to perform uniqueness constraint processing, thereby achieving accurate alignment between the offset propagation nodes and the skeleton structure nodes. By combining the stable edge response intensity to constrain and correct the skeleton connection relationship, a continuous contour association structure supported by a stable skeleton structure and incorporating offset propagation information is formed. The weights of the connecting edges in the initial contour skeleton structure are calculated. The weights are determined by the average stable edge response intensity, directional consistency, and curvature continuity of the nodes at both ends of the connecting edge. Based on the weights, the connecting edges are screened and adjusted. When the weight is lower than a set threshold, its connection strength is reduced or the corresponding connection relationship is removed. When the weight meets the threshold condition, its connection relationship is retained and strengthened. At the same time, the contour offset propagation information is mapped to the node and connecting edge attributes of the skeleton structure to realize the association expression of offset information and skeleton structure, and finally form a continuous contour association structure.

[0023] S3: Based on the continuous contour association structure, the edge connection offset, local curvature imbalance and contour continuity deviation between adjacent contour segments are jointly calculated, and the cumulative intensity and diffusion trend of the offset in the contour propagation path are combined to generate contour association residual parameters.

[0024] The process of jointly calculating the edge connection offset, local curvature imbalance, and contour continuity deviation between adjacent contour segments in S3 is as follows: Based on the continuous contour association structure, the connecting edges of adjacent segments are extracted along the contour segment connection relationship, and sub-pixel level offset estimation is performed to obtain the corresponding spatial position offset. In the continuous contour association structure, adjacent segment pairs are traversed according to the pre-established contour segment connection relationship map, and their corresponding connecting edges are extracted. Sub-pixel positioning is performed on each connecting edge based on the local gray-level gradient distribution of its two end nodes. The edge position is finely estimated by interpolation method to obtain high-precision edge coordinates. The geometric position difference of adjacent segments under the same reference coordinate system is further calculated to obtain the corresponding spatial position offset, which is used as the basic input parameter for error calculation. Curvature variation analysis is performed on adjacent contour segments in a continuous contour association structure to calculate curvature differences. For each contour segment in the continuous contour association structure, sampling point sequences are extracted according to equal arc length or equal spacing, and local curvature values ​​are calculated based on three adjacent sampling points. By comparing the curvature sequences of adjacent contour segments point by point, curvature variation differences are calculated, including average curvature difference and maximum curvature deviation. For regions with directional changes, curvature sign consistency correction is further introduced to ensure that curvature difference calculation is carried out under unified directional constraints, thereby obtaining stable curvature imbalance characterization results. The system detects continuous change locations along the contour connection path and identifies contour breakage sections. It performs continuous scanning of the node sequence along the contour connection path, calculates the distance change rate and direction change rate between adjacent nodes, and marks the location as a continuous change point when the node spacing of a certain segment exceeds a set threshold or the direction change rate changes abruptly. It then performs cluster analysis on the continuous change points, grouping spatially adjacent points with consistent change characteristics into the same breakage section, thereby identifying the breakage area in the contour. The spatial offset, curvature difference, and fracture segment information are uniformly fused and calculated to generate a consistency error index for characterizing the local structural distortion of the contour. The spatial offset, curvature difference, and fracture segment information are uniformly mapped to the same evaluation space and normalized separately to construct a multi-factor fusion calculation model. Geometric weights are assigned to spatial offsets, morphological weights to curvature differences, and structural penalty weights to fracture segment information. A weighted summation method is used for comprehensive calculation to obtain the evaluation value of local structural distortion. The evaluation values ​​of all adjacent contour segments are summarized and processed to generate a consistency error index for characterizing the local structural distortion of the contour.

[0025] The process of generating contour-related residual parameters in S3 is as follows: The consistency error index is used as the initial weight input for each offset node in the offset propagation chain. The consistency error index is processed by node-level mapping and allocated according to the spatial correspondence of each node in the contour offset propagation chain. Based on the position index of each offset node in the contour structure, the local error value corresponding to its adjacent contour segment is extracted from the consistency error index and the local error value is used as the initial weight input for the node. Based on the initial weight input, the offset propagation chain is accumulated node by node to form the path-level offset accumulation. In the offset propagation chain structure, the initial weight input is traversed and calculated node by node according to the node connection order. For any node, its initial weight is superimposed with the accumulated weight of the previous node, and an attenuation coefficient is introduced to correct the long-distance propagation effect, thereby realizing the step-by-step transmission and accumulation of weight on the path. By traversing the complete propagation path, the weight accumulation result corresponding to each path is obtained to form the path-level offset accumulation, which is used to characterize the propagation intensity distribution of the offset in the contour structure. Using the directional distribution of path-level offset accumulation as a constraint, a diffusion trend model is performed on the directional consistency in the offset propagation chain to obtain directional consistency constraint terms. directional statistical analysis is conducted on the path-level offset accumulation to extract its directional distribution characteristics in the spatial coordinate system, including the principal direction angle and directional dispersion. Based on this directional distribution, a directional consistency evaluation model is constructed. The directional deviation of adjacent nodes in the propagation chain is calculated, and the deviation is modeled for diffusion, allowing the directional consistency constraint to propagate step-by-step in the propagation path. This diffusion process generates directional consistency constraint terms, which are used to constrain the directional stability during the weight correction process. Under the combined effect of path-level offset accumulation and directional consistency constraint, the weight distribution of nodes with local structural distortion in the propagation path is reconstructed and corrected to generate structural offset error. In the propagation path, path-level offset accumulation and directional consistency constraint are introduced into each node to construct a dual-constraint correction model. The original weights of the nodes are adjusted and calculated. The path-level offset accumulation is used to characterize the intensity of local error, and the directional consistency constraint is used to limit the degree of directional deviation. By performing joint weighted correction on the two, the weights of nodes with structural abrupt changes or abnormal offsets are redistributed to form the corrected structural offset error. Using the structural offset error as a function input, the contour-related residual parameters are mapped to obtain the parameters. The structural offset error is introduced as an input variable into a preset mapping function model. This function model is constructed based on a nonlinear mapping relationship and is used to convert node-level errors into an overall structural residual expression. By solving and aggregating the structural offset errors on all propagation paths, corresponding contour-related residual parameters are generated to uniformly characterize the degree of overall structural offset in the contour offset propagation chain.

[0026] S4: Based on the contour association residual parameters, the propagation relationship between the overall contour error and the local edge offset is traced in reverse, and the sub-pixel offset of the corresponding edge segment is pulled back and corrected according to the contour offset propagation chain, forming a contour feedback constraint mechanism.

[0027] The process of reverse tracing the propagation relationship between the overall contour error and the local edge offset in S4 is as follows: The source interval of error propagation is determined by using nodes in the contour correlation residual parameters that exceed a preset threshold. Node-level traversal analysis is performed on the contour correlation residual parameters, and a preset threshold range is set as an anomaly judgment criterion. When the residual parameter value of a node exceeds the threshold, the node is marked as a high residual node. Spatially adjacent and continuously distributed high residual nodes are clustered and merged into several high residual segments by connected component analysis. The source interval of error propagation is determined based on their topological position in the contour structure. Based on the source interval, a back propagation path is constructed in the contour structure. Taking the nodes of the source interval as the starting point, the path is backtracked in the direction of the preorder node according to the topological relationship of the contour connection. The path construction is limited to meet the constraints of spatial adjacency and directional consistency. For cases with multiple branch connections, the shortest path principle or the maximum residual priority principle is adopted for path selection, thereby generating a back propagation path from the source interval to the upstream of the contour structure. The contribution decomposition of local edge offsets along the back propagation path is performed, and the error influence weight of each propagation node is output. On the constructed back propagation path, the local edge offset of each propagation node is decomposed and calculated node by node. By decomposing the local offset of the node into directional components and amplitude components, and combining them with their positional relationship in the path, the contribution coefficient is calculated. The contribution coefficient is determined by the node's own residual value, the offset difference with adjacent nodes, and the propagation distance of the path. By normalizing the contribution coefficient of each node, the error influence weight corresponding to each propagation node is obtained, and it is output as the quantitative characterization result of the error propagation intensity. The propagation nodes are sorted based on the error impact weight, and the nodes at the top of the sort are identified as key propagation nodes. All nodes in the back propagation path are sorted in descending order according to the error impact weight, and a set of nodes with higher weights is selected according to the set screening ratio or threshold range. For nodes with similar weights, a secondary sorting correction is performed based on their propagation depth and connectivity centrality in the path to determine the final priority. After sorting, the nodes at the top are defined as key propagation nodes for error correction and contour offset backtracking calculation.

[0028] The process of forming the contour feedback constraint mechanism in S4 is as follows: For key propagation nodes, gradient pullback calculation is performed on sub-pixel offsets to generate corresponding local correction amounts. For identified key propagation nodes, their corresponding sub-pixel-level edge offsets are extracted, and the offsets are calculated by inverse differentiation based on the local gradient field. The offset correction direction is obtained by calculating the gradient change direction within the neighborhood window of the key node and projecting the current offset onto the gradient descent direction. The correction magnitude is then weighted and adjusted based on the stable edge response intensity within the neighborhood to finally obtain the local correction amount corresponding to each key propagation node. The local correction amount is mapped to the corresponding node of the profile offset propagation chain and then passed down step by step along the propagation chain. The local correction amount generated by the key propagation node is mapped back to the corresponding node in the profile offset propagation chain according to the topological correspondence, and is used as the initial correction input value to be passed down step by step in the propagation chain structure according to the node connection order. The offset of each adjacent node is recursively corrected. The correction method includes weighted superposition and attenuation propagation control to limit the excessive amplification or attenuation distortion of the correction amount during the propagation process. Through this step-by-step transmission process, the local correction amount forms a continuous correction effect in the propagation chain. By combining the stable edge response components to apply consistency constraints to the chain correction results, a contour feedback constraint mechanism is formed. After completing the step-by-step correction of the propagation chain, the corrected contour structure is spatially aligned with the stable edge response components. Consistency comparison calculations are performed on the edge responses at the same location or within the neighborhood, including directional consistency, gradient magnitude consistency, and spatial position deviation analysis. When the deviation between the correction result and the stable edge response components exceeds the preset constraint range, the correction amount of the corresponding node is adjusted a second time to satisfy the stable edge response constraint conditions. Through this consistency constraint process, the step-by-step correction results are fused with the stable edge structure to form a contour feedback constraint mechanism with constraint convergence characteristics.

[0029] S5: Based on the contour feedback constraint mechanism, the local edge fitting parameters, contour connection parameters and global contour reconstruction parameters are dynamically adjusted in linkage, and the size measurement results of the target parts are output based on the corrected contour continuity and consistency.

[0030] The process of outputting the dimensional measurement results of the target component in S5 is as follows: Based on the contour feedback constraint mechanism, the local edge fitting parameters, contour connection parameters, and global contour reconstruction parameters are dynamically adjusted in conjunction to generate a stable and consistent contour geometry. The constraint information output by the contour feedback constraint mechanism is used as the control input and applied to the local edge fitting module, contour connection module, and global reconstruction module, respectively. The local edge fitting parameters are corrected using least squares fitting or spline curve fitting methods, and the fitting residuals are iteratively updated according to the feedback constraints. The contour connection parameters are adjusted according to the node connection weights to correct the priority and topological relationship of the connecting edges. The global contour reconstruction parameters are corrected based on the overall offset error distribution. Through the synchronous iterative adjustment of the three types of parameters, the consistency constraint of the local and global structures is achieved, generating a stable and consistent contour geometry. Based on the contour geometry, the contour feature points of the target component are extracted, and the corresponding subpixel-level dimensional parameters are calculated. The generated contour geometry is processed by feature point extraction. The set of key contour feature points is determined by curvature extremum detection, edge abrupt change point detection, and geometric inflection point analysis. At the subpixel accuracy level, the feature point positions are optimized by subpixel interpolation. The gray-scale centroid method or subpixel gradient fitting method is used to improve the positioning accuracy. Based on the optimized feature point coordinates, the length, width, diameter, or spacing of the target component is calculated in a unified scale space and expressed as subpixel-level measurement results. The system verifies the dimensional measurement results by combining contour continuity and consistency, and outputs the dimensional measurement results of the target component. The calculated sub-pixel level dimensional parameters are also verified for contour continuity and consistency. By detecting the continuity, directional consistency, and local geometric smoothness of the contour path corresponding to the dimension, abnormal measurement values ​​are identified and corrected. The dimensional calculation path is backtracked and matched with the contour geometry. If there are breaks, abrupt changes, or discontinuities, the corresponding dimensional results are discarded or recalculated. Finally, all dimensional results that meet the consistency constraints are summarized and processed, and output as the final dimensional measurement results of the target component. This is used for the dimensional inspection result output, quality judgment, or assembly matching analysis of the target component.

[0031] Example 2: Please refer to Figure 2 A composite image measurement system based on AI subpixel edge detection includes: Response decomposition module: performs hierarchical analysis on the continuous gradient change process to generate stable edge response components and offset perturbation response components; Propagation building module: Based on the analysis of the offset perturbation response components, the offset continuity and curvature correlation of the contour segment are analyzed, the contour offset propagation chain is constructed, and the continuous contour correlation structure is formed by combining the stable edge response components; The residual calculation module performs joint calculations on edge connection offsets, curvature imbalances, and continuous deviations between contour segments to generate contour-related residual parameters. Feedback correction module: Based on the residual parameters, the edge offset propagation path is traced in reverse, and the sub-pixel level offset is pulled back to correct, forming a feedback constraint mechanism; Linked reconstruction module: Dynamically and collaboratively adjusts edge fitting, contour connection and global reconstruction parameters, and outputs corrected high-precision dimensional measurement results.

[0032] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "include," "contain," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus.

[0033] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.

Claims

1. A composite image measurement method based on AI sub-pixel edge detection, characterized in that, Includes the following steps: Multi-directional edge scanning is performed on the image of the component under test. By combining the regional reflection change state, surface gray-scale disturbance intensity and local illumination shift distribution, the gradient continuous change process in the edge neighborhood is analyzed in layers to generate stable edge response components and shift disturbance response components. Based on the offset perturbation response components, the offset direction sequence, curvature change gradient and grayscale transition stable interval of different contour segments during the edge extension process are extracted to construct the contour offset propagation chain, and a continuous contour association structure is formed by combining the stable edge response components. Based on the continuous contour association structure, the edge connection offset, local curvature imbalance and contour continuity deviation between adjacent contour segments are jointly calculated, and the cumulative intensity and diffusion trend of the offset in the contour propagation path are combined to generate contour association residual parameters. Based on the contour-related residual parameters, the propagation relationship between the overall contour error and the local edge offset is traced in reverse, and the sub-pixel offset of the corresponding edge segment is pulled back and corrected according to the contour offset propagation chain, forming a contour feedback constraint mechanism. Based on the contour feedback constraint mechanism, the local edge fitting parameters, contour connection parameters, and global contour reconstruction parameters are dynamically adjusted in conjunction with each other, and the dimensional measurement results of the target parts are output based on the corrected contour continuity and consistency. 2.The AI sub-pixel edge detection-based composite image measurement method of claim 1, wherein, The process of generating stable edge response components and offset disturbance response components is as follows: Multi-directional convolutional scanning and gradient extraction are performed on the input component images to obtain edge responses in each direction and spatial aggregation is performed to form candidate edge response regions. Stability is determined based on the local reflection consistency of candidate edge response regions, and regions that meet the continuous response condition are divided into stable response components. The disturbance characteristics of the remaining edge response regions are identified based on the grayscale change amplitude to obtain candidate disturbance response regions; The candidate regions for disturbance response are subjected to illumination uniformity normalization. Consistency analysis is performed on the processed disturbance response based on the stable response components to obtain the stable edge response components, the offset disturbance response components, and the offset disturbance response components. 3.The AI sub-pixel edge detection-based composite image measurement method of claim 2, wherein, The process of constructing the contour offset propagation chain is as follows: The offset perturbation response components are decomposed into a direction field to obtain the offset direction vector of the contour edge in the local neighborhood. Based on the offset direction vector, adjacent contour segments are continuously matched according to the consistency of direction to establish a connection relationship between contour segments with spatial adjacency. Based on the connectivity, the curvature change rate is introduced to enhance the difference in the contour transition area; By combining the stability of grayscale changes at the turning points, discontinuous disturbances and offsets between contour segments are eliminated. Based on the connection relationship of the selected contour segments, the connection path is corrected by combining the constraints of directional consistency, curvature continuity and grayscale stability to form a contour offset propagation chain.

4. The composite image measurement method based on AI sub-pixel edge detection according to claim 3, characterized in that, The process of forming a continuous contour association structure by combining stable edge response components is as follows: Structural confidence assessment is performed on stable edge response components to screen for highly reliable edge response point sets; Based on spatial neighborhood consistency, a topological connection is performed on the set of highly reliable edge response points to construct an initial contour skeleton structure; Map the contour offset propagation chain to the initial contour skeleton structure and align the offset nodes with the corresponding skeleton nodes; By combining the stable edge response intensity to constrain and correct the skeleton connection relationship, a continuous contour association structure supported by a stable skeleton structure and incorporating offset propagation information is formed.

5. The composite image measurement method based on AI sub-pixel edge detection according to claim 4, characterized in that, The process of jointly calculating the edge connection offset, local curvature imbalance, and contour continuity deviation between adjacent contour segments is as follows: Based on the continuous contour association structure, the connection edges of adjacent segments are extracted along the connection relationship of contour segments, and sub-pixel level offset estimation is performed to obtain the corresponding spatial position offset. Perform curvature variation analysis on adjacent contour segments in a continuous contour-related structure and calculate the curvature difference; Detect locations of continuous changes along the contour connection path and identify information on contour break sections; The spatial position offset, curvature difference and fracture section information are uniformly fused and calculated to generate a consistency error index to characterize the local structural distortion of the contour.

6. The composite image measurement method based on AI sub-pixel edge detection according to claim 5, characterized in that, The process of generating contour-related residual parameters is as follows: The consistency error index is used as the initial weight input for each offset node in the offset propagation chain. Based on the initial weight input, the offset propagation chain is carried out node by node to accumulate the offset, forming a path-level offset accumulation. Using the directional distribution of path-level offset accumulation as a constraint, the diffusion trend of directional consistency in the offset propagation chain is modeled to obtain the directional consistency constraint term. Under the combined effect of path-level offset accumulation and directional consistency constraint, the weight distribution of local structural distortion nodes in the propagation path is reconstructed and corrected to generate structural offset error. Using the structural offset error as the function input, the contour-related residual parameters are mapped to obtain the parameters.

7. The composite image measurement method based on AI sub-pixel edge detection according to claim 6, characterized in that, The process of reverse tracing the propagation relationship between overall contour error and local edge offset is as follows: The source interval of error propagation is determined by using nodes in the contour correlation residual parameters that exceed a preset threshold. Construct a backpropagation path in the contour structure based on the source interval; The contribution decomposition of local edge offset is performed along the back propagation path, and the error influence weight of each propagation node is output. The propagation nodes are sorted based on the error impact weight, and the nodes with the highest ranking are identified as key propagation nodes.

8. The composite image measurement method based on AI sub-pixel edge detection according to claim 7, characterized in that, The process of forming the contour feedback constraint mechanism is as follows: For key propagation nodes, gradient pullback calculation is performed on sub-pixel offsets to generate corresponding local correction values; The local correction amount is mapped to the corresponding node of the profile offset propagation chain, and the correction is passed down step by step along the propagation chain. By combining stable edge response components to apply consistency constraints to the chain correction results, a contour feedback constraint mechanism is formed.

9. The composite image measurement method based on AI sub-pixel edge detection according to claim 8, characterized in that, The process of outputting the dimensional measurement results of the target component is as follows: Based on the contour feedback constraint mechanism, the local edge fitting parameters, contour connection parameters and global contour reconstruction parameters are dynamically adjusted to generate a stable and consistent contour geometry. Based on the contour geometry, extract the contour feature points of the target component and calculate the corresponding sub-pixel level size parameters; The dimensional measurement results are verified by combining the continuity and consistency of the contour, and the dimensional measurement results of the target part are output.

10. A composite image measurement system based on AI sub-pixel edge detection, applied to the method described in any one of claims 1-9, characterized in that, include:: Response decomposition module: performs hierarchical analysis on the continuous gradient change process to generate stable edge response components and offset perturbation response components; Propagation building module: Based on the analysis of the offset perturbation response components, the offset continuity and curvature correlation of the contour segment are analyzed, the contour offset propagation chain is constructed, and the continuous contour correlation structure is formed by combining the stable edge response components; The residual calculation module performs joint calculations on edge connection offsets, curvature imbalances, and continuous deviations between contour segments to generate contour-related residual parameters. Feedback correction module: Based on the residual parameters, the edge offset propagation path is traced in reverse, and the sub-pixel level offset is pulled back to correct, forming a feedback constraint mechanism; Linked reconstruction module: Dynamically and collaboratively adjusts edge fitting, contour connection and global reconstruction parameters, and outputs corrected high-precision dimensional measurement results.