Laser patterning apparatus image recognition and precision control system
Patent Information
- Application Number
- CN202511571611.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-10-30
- Publication Date
- 2026-08-21
- Estimated Expiration
- 2045-10-30
AI Technical Summary
此时,虽然这些曲线段在几何空间中具有相近的末端走向及相似的曲率变化趋势,能够在逻辑上组成一个整体轮廓,但现有的激光图形化设备图像识别与精度控制技术不能根据图像中存在非闭合曲线组合因像素断裂导致边缘断裂的情况下的边缘末端走向一致性和曲率相似性去自动融合断裂曲线以恢复完整的加工轮廓
1、本发明针对图像采集过程中因表面反射不均、焦距偏移或分辨率不足所引起的像素级边缘断裂问题,通过构建拓扑片段图对边缘结构进行图形化建模,并引入端点几何特征分析方法,实现对非闭合曲线组合的识别与断裂定位。系统利用方向向量、三阶曲率变化率及形心偏移角等多维特征构成联合向量,配合一致性阈值判定机制,能够精准识别具有几何延续性的边缘末端,并在匹配后通过引入曲率惩罚项的贝塞尔插值算法完成断裂路径的高质量拟合,最终拼接成满足结构闭合性与导数连续性的完整加工轮廓。
Smart Images

Figure CN121482452B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of laser patterning equipment technology, and more specifically to an image recognition and precision control system for laser patterning equipment. Background Technology
[0002] Image recognition and precision control in laser patterning equipment refers to the intelligent perception of the position, contour, or features of the object being processed during laser processing through image acquisition and recognition technology. Based on this perception, the laser processing path, parameters, or posture are adjusted to improve the accuracy and consistency of the pattern processing. In existing technologies, image recognition and precision control typically include the following key steps: First, images of the material to be processed are acquired using industrial cameras or vision sensors to obtain its actual placement, edge information, or reference points. Second, traditional image processing algorithms (such as edge detection and contour extraction) or AI deep learning models (such as object detection and semantic segmentation) are used to analyze the images and extract data that can be used for positioning and correction. Next, the system converts the identified image coordinates into the motion control coordinate system of the laser processing equipment and matches them with preset graphic data, calculating deviations through coordinate mapping, rotation, scaling, and other methods. Subsequently, the control system dynamically adjusts the position or path of the laser head based on the deviation information to achieve precise alignment and processing. Finally, a closed-loop feedback mechanism can be used during processing to monitor the processing trajectory or results in real time and further fine-tune and compensate for processing accuracy. The entire process relies on an efficient data communication mechanism to ensure that the data between the image recognition module, the control system and the laser actuator can interact and respond synchronously in real time, thereby achieving high-precision and high-reliability laser patterning processing control.
[0003] The existing technology has the following shortcomings: In laser patterning, when the pattern to be processed consists of multiple open broken lines with unclosed ends, pixel-level edge breaks may occur during image acquisition due to uneven reflection of the processed surface, slight focal length shift, or insufficient imaging resolution. In this case, the recognition system will generate several discontinuous curve segments during image edge extraction. Although these curve segments have similar end directions and curvature trends in geometric space, logically forming a complete outline, existing laser patterning equipment image recognition and accuracy control technologies cannot automatically fuse the broken curves to restore the complete processing outline based on the consistency of edge end directions and curvature similarity when pixel breaks occur in the image due to non-closed curve combinations. Because the recognition process lacks analysis and judgment of the geometric continuity of broken edges, the system may misidentify edges belonging to the same pattern as multiple independent processing paths. This leads to laser trajectory segmentation, repetitive motion, or missed cutting in subsequent path generation and execution stages, resulting in discontinuous edges, distorted shapes, and decreased overall accuracy in the processed pattern.
[0004] The information disclosed in the background section is only intended to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0005] The purpose of this invention is to provide an image recognition and accuracy control system for laser patterning devices to solve the problems mentioned in the background art.
[0006] To achieve the above objectives, the present invention provides the following technical solution: an image recognition and precision control system for laser patterning equipment, including an edge breakage recognition module, a geometric consistency calculation module, a path fusion reconstruction module, a contour consistency verification module, and a parameter self-adjustment module; The edge breakage recognition module constructs a topological fragment graph to structurally represent the edge information in the image, collects the endpoint information of unclosed edges and calculates the connection residual and distribution density between the beginning and end of the edge to determine whether there are non-closed curve combinations in the image that cause edge breakage due to pixel breakage. The geometric consistency calculation module, when the judgment result is that there are non-closed curve combinations in the image that cause edge breakage due to pixel breakage, performs joint calculation of direction vector, third-order curvature change rate and centroid offset angle on the end of the unclosed edge to determine the consistency of edge end direction and curvature similarity; The path fusion and reconstruction module constructs connection segments based on the consistency of edge end orientation and curvature similarity results, and uses a Bezier interpolation algorithm with curvature penalty term to fit the fracture path, generating a complete processing contour that meets the continuity requirements. The contour consistency verification module performs structural closure, shape symmetry, and curvature continuity verification on the generated machining contour, and calculates the contour confidence factor to verify the consistency of the contour structure. The parameter self-adjustment module collects trajectory execution error and edge deformation data during processing, and jointly adjusts the contour confidence factor and edge breakage judgment parameters according to the error trend to achieve adaptive updates of image recognition and precision control.
[0007] Preferably, the edge breakage recognition module is implemented as follows: By constructing a topological fragment graph, edge information in the image is represented in a structured way. The extracted edge pixels are divided into fragments according to pixel connectivity, and each connected fragment is used as a node. Topological connections are established based on the gradient direction of adjacent pixels to generate graph structure data containing node attributes and edge connection attributes, which is used to express the spatial distribution and geometric extension relationship of edge fragments in the image. The endpoint information of edge segments that do not form closed paths in the topological segment map is collected. The coordinates, direction vector and gray-level gradient change value of each endpoint are recorded. For each pair of spatially adjacent endpoints, the connection residual and distribution density between the beginning and end of the edge are calculated. The geometric deviation between endpoints is determined by the angle between the Euclidean distance and the direction vector. The endpoint density is calculated by local point set statistics to form a data matrix for fracture analysis. The connection residual and the values in the distribution density matrix are compared with the preset fracture judgment threshold. When the connection residual is less than the fracture distance threshold, the angle between the direction vectors is less than the fracture angle threshold, and the distribution density is higher than the fracture density threshold, it is determined that there are pixel-level discontinuities between the edge segments. It is determined that there are non-closed curve combinations in the image that cause edge fracture due to pixel fracture, and the fracture recognition result is output for subsequent processing by the geometric consistency calculation module.
[0008] Preferably, the implementation of the geometric consistency calculation module is as follows: If the judgment result is that there are non-closed curve combinations in the image and the edge breaks are caused by pixel breaks, the end pixel of each unclosed edge and its adjacent continuous pixels are extracted. The local pixel direction is calculated by multi-point linear regression and a direction vector is constructed. At the same time, a cubic spline curve is fitted in the neighborhood with the end as the starting point. The curvature derivative change is obtained based on the fitting result to obtain the third curvature change rate. In the local region at the end of each unclosed edge, the centroid of pixel distribution is calculated based on the gray-scale weighted coordinate method. The angle between the vector direction formed by the line connecting the end pixel to the centroid and the direction vector is used as the centroid offset angle. A joint feature vector composed of the direction vector, the third-order curvature change rate and the centroid offset angle is established. For all unclosed edge ends, perform pairwise matching, calculate the angle difference between direction vectors, the numerical difference between third-order curvature change rates, and the angle difference between centroid offset angles, and compare them with the direction consistency threshold, curvature similarity threshold, and centroid tolerance threshold, respectively. When all differences do not exceed their respective thresholds, it is determined that the corresponding unclosed edge ends have edge end direction consistency and curvature similarity.
[0009] Preferably, the implementation of the path fusion and reconstruction module is as follows: Based on the results of edge end direction consistency and curvature similarity, edge end pairs that meet the geometric constraints are selected in the image space. The coordinates, direction vectors and third-order curvature change rates of each pair of edge ends are extracted to construct the connection segment starting structure as the input basis for interpolation fitting. A Bessel interpolation algorithm with curvature penalty term is introduced to fit the connection segment. The geometric properties of the edge end are used as boundary conditions. At the same time, the curvature change rate is embedded into the penalty function to participate in the control point optimization. Multiple rounds of iterative processing to minimize path fluctuation are performed to obtain the fitted fracture path. The fitted fracture path is spliced with the original edge segment, and the first and second derivatives at the path connection are corrected by the derivative continuity constraint to complete the generation of a complete processing contour that satisfies curvature continuity and structural closure.
[0010] Preferably, a Bezier interpolation algorithm with a curvature penalty term is introduced to fit the connection segment, using the geometric properties of the edge ends as boundary conditions. Simultaneously, the rate of change of curvature is embedded into the penalty function to participate in control point optimization. Multiple rounds of iterative processing to minimize path fluctuations are performed to obtain the fitted fracture path, specifically: The coordinate points at the two edge ends are used as the beginning and end nodes of the Bézier curve. The direction vectors at the two edge ends are set as the control vector directions. The third-order curvature change rate at the two edge ends is used as the initial curvature constraint value to initialize the control point structure. Construct an objective function that includes a path fitting error term and a curvature penalty term. The path fitting error term is constructed based on the distance residual between the edge point and the Bézier curve. The curvature penalty term reflects the rate of change of the third curvature through the changes of the first and second derivatives of the control points. The penalty coefficient and the curvature change amplitude are jointly embedded into the objective function. A gradient-direction-based control point iterative update method is adopted. In each iteration, the control point position and curvature penalty response factor are adjusted synchronously to minimize the path fluctuation and curvature abrupt change. After the convergence condition is met, a Bessel-fitted broken path that meets the continuity requirement is output.
[0011] Preferably, the implementation of the contour consistency verification module is as follows: The generated machining contour is subjected to structural closure verification. The coordinates of the starting point and ending point of the machining contour are extracted, and their Euclidean distance is calculated as the closure residual. The angle between the tangent directions of the two points is compared. When the closure residual is lower than the closure distance threshold and the angle is less than the closure direction threshold, the machining contour is judged to satisfy the structural closure. Under the premise of satisfying structural closure, shape symmetry verification and curvature continuity verification are performed. Shape symmetry is calculated by symmetrical matching of pixel points on both sides of the contour after region mirror projection. Curvature continuity is calculated by traversing the continuous line segments formed by three adjacent points in the contour path, calculating the standard deviation of the corresponding rate of curvature change, and comparing it with the continuity tolerance threshold. When the standard deviation is less than the continuity tolerance threshold, the curvature continuity is determined to be valid. The numerical scores corresponding to the verification results of structural closure, shape symmetry and curvature continuity are weighted and fused to calculate the contour credibility factor. When the contour credibility factor is higher than the consistency assessment threshold, it is determined that the processed contour structure meets the consistency requirements.
[0012] Preferably, the implementation of the parameter self-adjustment module is as follows: During the processing, the real-time displacement coordinates of the laser processing trajectory and the processing path reference coordinates generated in the image recognition stage are recorded simultaneously. The trajectory execution error is calculated by the Euclidean distance between the two in the same frame sequence. By comparing the image acquired before processing with the feedback image after processing, edge deformation data is extracted based on the pixel difference and gradient mapping of the contour edge. An error trend sequence of trajectory execution error and edge deformation data is constructed. The trend slope is extracted by weighted regression fitting by setting a time window and compared with the trend growth critical value. When the trend growth slope is continuously higher than the preset threshold, the evaluation weight of the contour credibility factor is dynamically adjusted, and the response sensitivity of the edge breakage judgment parameter is improved. Based on the updated contour confidence factor and edge breakage judgment parameters, the edge fusion logic and breakage judgment conditions involved in image recognition and precision control are updated synchronously. The parameter iteration is driven by the error trend to achieve adaptive updating of the image recognition and precision control process.
[0013] The technical effects and advantages provided by the present invention in the above technical solution are as follows: 1. This invention addresses the pixel-level edge breakage problem caused by uneven surface reflection, focal length shift, or insufficient resolution during image acquisition. It constructs a topological fragment graph to graphically model the edge structure and introduces endpoint geometric feature analysis methods to identify and locate breaks in non-closed curve combinations. The system utilizes multi-dimensional features such as direction vectors, third-order curvature change rate, and centroid offset angle to form a joint vector. Combined with a consistency threshold judgment mechanism, it can accurately identify edge ends with geometric continuity. After matching, a Bezier interpolation algorithm with a curvature penalty term is used to achieve high-quality fitting of the break path, ultimately splicing together a complete processing contour that satisfies structural closure and derivative continuity.
[0014] 2. This invention further ensures the processing reliability of the generated path through a contour consistency verification mechanism encompassing three dimensions: structural closure, shape symmetry, and curvature continuity. The quantitative evaluation of the reliability factor provides a basis for subsequent control strategies. Simultaneously, the system integrates a parameter self-adjustment module, which can collect trajectory execution error and edge deformation data in real time during processing, dynamically analyze error trend changes, and then jointly adjust the fracture judgment parameters and contour reliability factor to achieve adaptive refresh of image recognition and precision control parameters. The above technical approach significantly improves the fault tolerance and robustness of image processing, solves the problems of fracture path misjudgment and processing trajectory segmentation, and ensures the continuity of pattern edges, consistency of morphology, and stability of overall processing accuracy. Attached Figure Description
[0015] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this invention. For those skilled in the art, other drawings can be obtained based on these drawings.
[0016] Figure 1 This is a schematic diagram of the module of the image recognition and precision control system of the laser patterning device of the present invention. Detailed Implementation
[0017] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that the description of this disclosure will be more complete and fully convey the concept of the exemplary embodiments to those skilled in the art.
[0018] This invention provides, for example Figure 1 The laser graphic device image recognition and precision control system shown includes an edge breakage recognition module, a geometric consistency calculation module, a path fusion reconstruction module, a contour consistency verification module, and a parameter self-adjustment module. The edge breakage recognition module constructs a topological fragment graph to structurally represent the edge information in the image, collects the endpoint information of unclosed edges and calculates the connection residual and distribution density between the beginning and end of the edge to determine whether there are non-closed curve combinations in the image that cause edge breakage due to pixel breakage. In this embodiment, the edge breakage recognition module is implemented as follows: By constructing a topological fragment graph, edge information in the image is represented in a structured way. The extracted edge pixels are divided into fragments according to pixel connectivity, and each connected fragment is used as a node. Topological connections are established based on the gradient direction of adjacent pixels to generate graph structure data containing node attributes and edge connection attributes, which is used to express the spatial distribution and geometric extension relationship of edge fragments in the image. To achieve a structured representation of edge information in images, a topological segment graph approach can be used. First, edge extraction is performed on the acquired image, using the Canny edge detection algorithm to obtain a set of edge pixels. Then, all edge pixels are segmented based on their spatial connectivity within the image; edge segments with continuous pixel relationships are defined as independent segments, and each connected segment is treated as a node. Next, the average pixel gradient direction is calculated within each segment, and this direction information is recorded in the graph structure. Then, based on the geometric proximity and similarity of pixel gradient directions between adjacent segments, edge connections are established in the graph, i.e., edges are added between two segments, forming graph data with a clear structure. Each node in this topological graph represents an edge segment, and node attributes include start and end coordinates, length, and average gradient direction. Edge connection attributes include spatial distance and directional differences between adjacent nodes. This graph structure effectively organizes edge data, providing fundamental data support for subsequent endpoint analysis, residual calculation, and fusion judgment.
[0019] "Dividing edge pixels into segments based on pixel connectivity" aims to discretize and modularize complex edge information, giving each edge segment a clear start and end range and traceability. "Using each connected segment as a node" transforms pixel paths in the image into a graph structure, enabling topological analysis of edge relationships. "Establishing topological connections based on the gradient directions of adjacent pixels" captures the geometric continuity between different edge segments, thus establishing structured relationships through spatial and directional dimensions. "Generating graph structure data containing node attributes and edge connectivity attributes" quantifies and explicitly represents the relationship between each edge segment and its potential extension directions, providing a necessary foundation for subsequent determination of whether they belong to the same logical contour. The overall process enhances the expressiveness of edge distribution structures through graph modeling, avoiding the limitations and ambiguity of traditional linear scanning methods when dealing with broken edges.
[0020] The endpoint information of edge segments that do not form closed paths in the topological segment map is collected. The coordinates, direction vector and gray-level gradient change value of each endpoint are recorded. For each pair of spatially adjacent endpoints, the connection residual and distribution density between the beginning and end of the edge are calculated. The geometric deviation between endpoints is determined by the angle between the Euclidean distance and the direction vector. The endpoint density is calculated by local point set statistics to form a data matrix for fracture analysis. To collect endpoint information of edge segments that do not form closed paths in the topological fragment image, we can first traverse all edge segments in the constructed topological fragment image, extracting the starting and ending pixels of each edge segment as its two endpoints. During endpoint extraction, we record the two-dimensional coordinates, local direction vector, and grayscale gradient change value at each endpoint. The direction vector can be obtained by calculating the vector direction formed by the endpoint and its two adjacent pixels, while the grayscale gradient change value can be estimated using the Sobel operator near the point. Next, for any pair of spatially adjacent endpoints among all unclosed endpoints, we calculate their geometric connection residual, including the Euclidean distance and the angle between the direction vectors, to determine the spatial offset and orientation deviation between the two endpoints. Simultaneously, we count the number of other endpoints within a certain radius around each endpoint in the entire image, calculating the endpoint density within that region. For example, if several broken edge segments exist in an image region, and the distance between two endpoints is 4 pixels, the direction angle is less than 10 degrees, and the density of the regions containing both endpoints is higher than the average, then these endpoints can be considered to have a strong connection probability. The results of this series of calculations will be uniformly recorded in a structured data matrix for subsequent analysis of the fracture edges.
[0021] "Collecting endpoint information of edge fragments that do not form closed paths" focuses on potential break locations and eliminates interference from complete closed shapes. "Recording coordinates, direction vectors, and grayscale gradient changes" establishes geometric and image feature attributes for each endpoint, providing a foundation for subsequent geometric association. "Calculating connection residuals and distribution density" assesses whether the two endpoints might have originally belonged to the same contour by using the distance and direction difference between them, and determines whether the region is a high-frequency break area by density. "Determining geometric deviation by Euclidean distance and the angle between direction vectors" is a comprehensive judgment method combining spatial location and directional trend. "Statistically calculating endpoint density through local point sets" reflects the break concentration trend and assists in judgment. "Forming a data matrix for break analysis" unifies all geometric and statistical information, making it quantifiable, comparable, and trainable, thus providing structured input for subsequent recognition logic. The entire process achieves a precise mapping from raw pixel endpoint information to the break recognition feature space, serving as a crucial bridge connecting edge extraction and intelligent judgment.
[0022] The connection residual and the values in the distribution density matrix are compared with the preset fracture judgment threshold. When the connection residual is less than the fracture distance threshold, the angle between the direction vectors is less than the fracture angle threshold, and the distribution density is higher than the fracture density threshold, it is determined that there are pixel-level discontinuities between the edge segments. It is determined that there are non-closed curve combinations in the image that cause edge fracture due to pixel fracture, and the fracture recognition result is output for subsequent processing by the geometric consistency calculation module.
[0023] To determine the breakage, the geometric deviation and density values corresponding to each pair of endpoints in the previously constructed connection residual matrix and distribution density matrix are compared one by one with a pre-set breakage threshold. The connection residual includes Euclidean distance and the angle between the direction vectors. A breakage distance threshold and a breakage angle threshold can be set as judgment criteria, such as a distance less than 5 pixels and an angle less than 12 degrees. The distribution density can be obtained by counting the number of endpoints in the local region of the endpoints, and a breakage density threshold can be set, such as the presence of no less than 3 endpoints in the region. The system will traverse all endpoint combinations and perform a joint judgment on each set of results: when the distance between a pair of endpoints is lower than the breakage distance threshold, the angle between the directions is less than the breakage angle threshold, and the endpoint density is higher than the breakage density threshold, then the pair of endpoints is considered to belong to an edge breakage position caused by pixel breakage. For example, if the distance between two edge ends in the image is 3.6 pixels, the angle between the directions is 8 degrees, and there are 5 endpoints in the local region, then all three conditions are met, and it can be confirmed that there is an edge breakage feature of a non-closed curve combination at this position. Endpoint pairs that meet the conditions will be recorded as potential fracture regions and their numbers and associated features will be output as the input basis for subsequent contour reconstruction and orientation analysis.
[0024] The distance threshold in the connection residual defines the maximum tolerable spatial offset between fractures; too large a threshold may lead to false connections, while too small a threshold may result in missed fractures. The direction vector angle threshold limits the deviation of the curve ends, thus ensuring the rationality of the connection. The distribution density threshold reflects the local clustering trend of fracture endpoints; higher density indicates a greater likelihood of fracture in that area. The preset fracture judgment threshold is a set of rules combining the above three parameters, used to comprehensively control the sensitivity and accuracy of fracture identification. Its setting can be optimized through regression of historical sample data or training on offline labeled data. This process, through the joint control of three-dimensional parameter conditions, avoids the coarse connection logic based on traditional single distance judgment, while also improving the adaptability to complex fracture structures and providing reliable data for subsequent edge fusion.
[0025] The geometric consistency calculation module, when the judgment result is that there are non-closed curve combinations in the image that cause edge breakage due to pixel breakage, performs joint calculation of direction vector, third-order curvature change rate and centroid offset angle on the end of the unclosed edge to determine the consistency of edge end direction and curvature similarity; In this embodiment, the implementation of the geometric consistency calculation module is as follows: If the judgment result is that there are non-closed curve combinations in the image and the edge breaks are caused by pixel breaks, the end pixel of each unclosed edge and its adjacent continuous pixels are extracted. The local pixel direction is calculated by multi-point linear regression and a direction vector is constructed. At the same time, a cubic spline curve is fitted in the neighborhood with the end as the starting point. The curvature derivative change is obtained based on the fitting result to obtain the third curvature change rate. To construct direction vectors and extract the third-order rate of change of curvature for the ends of unclosed edges, the positions of all unclosed edge ends in the image must first be located. A neighborhood window with a fixed number of pixels is set around each end, for example, extracting the end and six consecutive pixels distributed along the edge direction. By using the coordinate set of these pixels for multi-point linear regression modeling, an optimal straight line is fitted to represent the local direction of the edge end. The slope of this line serves as the direction reference for the direction vector. Subsequently, starting from the end and extending along the edge pixels, a cubic spline curve is constructed to represent the geometric direction of the local edge segment. Derivative analysis is performed on the spline function to obtain the first, second, and third derivatives of the edge curvature, and the third-order rate of change of curvature is calculated at the end. This value reflects the local trend of edge morphology changes. For example, if the edge end is a smooth curve bend, its third-order rate of change of curvature tends to be stable; while if the end is an abrupt turn, its third-order rate of change will fluctuate drastically.
[0026] Multi-point linear regression is a direction fitting method based on the least squares method. It uses the coordinates of several pixels at the edge endpoints as input to calculate a straight line that minimizes the sum of squared residuals, thus stably reflecting the extension direction of the edge endpoints. The significance of constructing the direction vector lies in establishing a quantifiable standard for matching the directions between different edge endpoints. Cubic spline curve fitting is a curve modeling method with smoothness and continuity, suitable for describing the geometric direction characteristics of continuous edge segments in an image. The rate of change of third-order curvature, as a geometric parameter in the higher-order derivative of the curve, can accurately reflect the rate of morphological change of the edge at its endpoint, helping to determine whether edges belong to the same structural unit. This joint calculation not only improves the accuracy of edge recognition but also provides structural support for subsequent judgments on the rationality of edge connections.
[0027] In the local region at the end of each unclosed edge, the centroid of pixel distribution is calculated based on the gray-scale weighted coordinate method. The angle between the vector direction formed by the line connecting the end pixel to the centroid and the direction vector is used as the centroid offset angle. A joint feature vector composed of the direction vector, the third-order curvature change rate and the centroid offset angle is established. Within the terminal region of an unclosed edge, the centroid of pixel distribution can be obtained using a gray-scale weighted coordinate method, thus aiding in the assessment of the geometric offset trend at the edge's end. In the specific implementation, a fixed-size window region, such as 11×11 pixels, is defined around the terminal pixel of the unclosed edge, and all pixels belonging to or adjacent to the edge within this region are extracted. The gray-scale value of each pixel is used as a weight, and together with its two-dimensional spatial coordinates, it is used to calculate the weighted average coordinates, i.e., the centroid position of the edge pixels in that region of the image. Subsequently, a vector is constructed from the terminal pixel to the calculated centroid coordinates, and the angle between this vector and the edge's end direction vector is calculated, defined as the centroid offset angle. A smaller centroid offset angle indicates a stable extension trend of the edge in that direction; a larger offset angle indicates an inconsistency between the edge direction and the pixel distribution, potentially indicating incorrect connections or heterogeneous edges. For example, in edge regions with smooth curvature changes, the centroid offset angle is typically less than 15 degrees; while at edge bends or breaks, this angle may exceed 45 degrees.
[0028] The gray-scale weighted coordinate method is a centroid calculation method that considers the intensity distribution of an image. It not only reflects the spatial concentration trend of pixels but also integrates gray-scale information to improve the reliability of geometric judgment. The line connecting the terminal pixel to the centroid can capture the potential geometric extension direction in the image structure, and then the offset angle is quantified by calculating the angle between the centroid and the direction vector. The direction vector represents the local direction of the terminal, the rate of change of the third-order curvature describes the rate of change of the curve's shape, and the centroid offset angle reflects the symmetry and consistency of the local pixel distribution. These three types of information are combined into a joint feature vector, aiming to perform multi-dimensional geometric similarity matching in high-dimensional space, thereby improving the accuracy and robustness of unclosed edge pairing judgment. This feature structure provides a stronger basis for subsequent fracture fusion algorithms.
[0029] For all unclosed edge ends, perform pairwise matching, calculate the angle difference between direction vectors, the numerical difference between third-order curvature change rates, and the angle difference between centroid offset angles, and compare them with the direction consistency threshold, curvature similarity threshold, and centroid tolerance threshold, respectively. When all differences do not exceed their respective thresholds, it is determined that the corresponding unclosed edge ends have edge end direction consistency and curvature similarity.
[0030] After extracting the end features of unclosed edges, pairing operations are performed on all ends to calculate their geometric similarity. Specifically, this involves first traversing all unclosed edge ends to construct a candidate pairing set. For each pair, its direction vector, third-order curvature change rate, and centroid offset angle are extracted, and the differences between these three features are calculated. The angle difference between direction vectors can be obtained through vector dot product, reflecting whether the two edges have the same direction; the difference in the third-order curvature change rate is directly compared numerically, reflecting the similarity of edge morphological changes; and the difference in the centroid offset angle indicates the consistency of the local structural extension trend. Subsequently, the three differences are independently compared with preset thresholds for direction consistency, curvature similarity, and centroid tolerance. When all three differences are below their respective thresholds, it indicates that the pair of edge ends have high consistency in direction, curvature change, and structural offset, and can be judged to originate from the same continuous edge structure. For example, the matching conditions can be met when the difference in the included angle between the two ends is less than 10 degrees, the difference in the rate of change of curvature is less than 0.2, and the centroid offset angle is less than 15 degrees.
[0031] This pairing judgment process relies on three key judgment thresholds: a directional consistency threshold to control the consistency requirements of the directions at the ends of the two edges, typically set between 10 and 15 degrees; a curvature similarity threshold to define the allowable difference in the rate of change of the local shape between the two curves, generally empirically considered to be within 0.2; and a centroid tolerance threshold to specify the allowable range of pixel density center offset trend in the end region, typically 15 to 20 degrees. These three thresholds quantify the geometric extensibility, curvature continuity, and structural symmetry of the edges, respectively, jointly constructing an evaluation benchmark for whether the ends can be merged. Compared with traditional methods based on edge distance and connectivity, this joint judgment strategy is more multidimensionally geometrically sensitive, effectively avoiding misconnections or misjudgments of discontinuous graphics, and is particularly suitable for edge fusion requirements with pixel-level breaks but high structural similarity. End pairing achieved in this way has higher robustness and judgment accuracy, providing a stable foundation for subsequent break reconstruction.
[0032] The path fusion and reconstruction module constructs connection segments based on the consistency of edge end orientation and curvature similarity results, and uses a Bezier interpolation algorithm with curvature penalty term to fit the fracture path, generating a complete processing contour that meets the continuity requirements. In this embodiment, the path fusion and reconstruction module is implemented as follows: Based on the results of edge end direction consistency and curvature similarity, edge end pairs that meet the geometric constraints are selected in the image space. The coordinates, direction vectors and third-order curvature change rates of each pair of edge ends are extracted to construct the connection segment starting structure as the input basis for interpolation fitting. To generate a complete processing contour, a set of edge end pairs that satisfy the conditions of consistent edge direction and curvature similarity needs to be selected in the image space. This can be done by scanning all combinations of unclosed edge ends, comparing their direction vectors, third-order rate of curvature change, and centroid offset angle, and selecting end pairs whose three geometric indices are all within the tolerance threshold as candidate connection objects. For each candidate end pair, its pixel coordinates are extracted to set the start and end points of the interpolation path, the direction vector is extracted to define the direction of the starting control vector, and the third-order rate of curvature change is extracted for setting the subsequent curvature penalty factor. The entire process is completed through matrix matching and conditional filtering, and then stored in a structured form as interpolation input data. For example, if the angle between the direction vectors of two end points is less than five degrees, the difference in the rate of curvature change is less than ten percent, and the distance between them does not exceed ten pixels, they can be judged as a pair of connectable edges.
[0033] Geometric constraints include directional consistency, curvature similarity, and spatial proximity, ensuring the reliability of shape continuity at the edges of the connection. Edge end coordinates refer to the two-dimensional coordinates of the end pixels in image space, used to initialize the spatial position of the interpolation path. The direction vector reflects the extension trend of the edge at the end and is used to control the tangent direction of the fitted curve. The third-order rate of curvature change is the derivative of the curve's bending rate, used to measure the stability of the curve's trend and control the smoothness of the fit. The initial structure of the connection segment is a dataset composed of these three parameters, forming the basic geometric framework for constructing the interpolation curve and providing a stable starting point for subsequent Bézier fitting and path continuity.
[0034] A Bessel interpolation algorithm with curvature penalty term is introduced to fit the connection segment. The geometric properties of the edge end are used as boundary conditions. At the same time, the curvature change rate is embedded into the penalty function to participate in the control point optimization. Multiple rounds of iterative processing to minimize path fluctuation are performed to obtain the fitted fracture path. The fitted fracture path is spliced with the original edge segment, and the first and second derivatives at the path connection are corrected by the derivative continuity constraint to complete the generation of a complete processing contour that satisfies curvature continuity and structural closure.
[0035] After obtaining the Bezier fitting result of the fracture path, this path needs to be seamlessly spliced with the original edge segments to ensure the overall processing contour is geometrically and physically continuous and feasible. During the splicing process, the starting point of the fitted path is first connected to the ending point of one original edge segment, and the ending point of the fitted path is simultaneously connected to the starting point of another original edge segment. To avoid abrupt changes or sharp corners at the connection points, a derivative continuity constraint mechanism is introduced. The first and second derivatives at the connection points are aligned and corrected, i.e., interpolation adjustments are performed on the tangent vector and curvature change trends at the splicing boundary, ensuring that the two curve segments have dual continuity in direction and curvature at the transition point. This correction process is achieved by minimizing the derivative residual in the neighborhood of the connection point, ultimately resulting in a complete processing path with smooth curvature changes and a closed topological structure, improving the continuity and stability of laser trajectory execution.
[0036] The start and end points of the fracture path fitting curve are set based on the geometric properties and directional constraints of the edge ends during the initial design, thus possessing inherent structural compatibility during the splicing stage. Derivative continuity correction not only ensures the consistency of the processing path's morphology but also avoids processing errors or material thermal stress concentration caused by abrupt trajectory changes in the laser equipment. The first derivative reflects the continuity of the path tangent direction, while the second derivative reflects the smoothness of the path curvature; both are indispensable and must be evaluated jointly. Achieving structural closure involves not only geometric connections but also the reconstruction of a closed contour in a topological sense, a prerequisite for the execution of the processing contour. Through this multi-layered constraint superposition splicing process, the integrity and high precision of the fracture-reconstructed processing path can be ensured during execution, making it suitable for fine laser processing tasks involving highly complex patterns.
[0037] In this embodiment, a Bezier interpolation algorithm with a curvature penalty term is introduced to fit the connection segment. The geometric properties of the edge ends are used as boundary conditions, and the rate of change of curvature is embedded in the penalty function to participate in control point optimization. Multiple rounds of iterative processing to minimize path fluctuation are performed to obtain the fitted fracture path, specifically: The coordinate points at the two edge ends are used as the beginning and end nodes of the Bézier curve. The direction vectors at the two edge ends are set as the control vector directions. The third-order curvature change rate at the two edge ends is used as the initial curvature constraint value to initialize the control point structure. To achieve smooth curve reconstruction at edge breaks, the coordinates of the two edge endpoints to be connected can be set as the start and end points of the Bézier curve, respectively. Their corresponding direction vectors are used as the basis for setting the direction of the curve's start and end control vectors, ensuring the fitted curve's trajectory when entering and leaving the endpoints remains consistent with the original edge. Specifically, the direction vector can be obtained by linear regression of several consecutive pixels before the edge endpoints. This direction vector is then normalized and used as the direction of the control vector. Simultaneously, a distance of a set magnitude is used as the distance between control points, constructing the initial control structure. To further improve the geometric consistency of the fitted curve, the third-order rate of curvature change of each endpoint can be introduced as a curvature constraint factor to constrain the nonlinear offset between control points and prevent excessive curve oscillation. After setting the initial structure, the system obtains a set of control points containing geometric start and end points, directional trends, and local curvature changes, providing a complete and stable geometric input basis for subsequent interpolation optimization. Taking connecting a broken open contour as an example, if the two end directions are nearly horizontal, their direction vectors both point to the right, and the curvature change is small, the Bézier control points will also exhibit a smooth and symmetrical arrangement, facilitating the generation of smooth and natural connection segments. This design ensures the continuity of the path at the connection points and the consistency of the shape transition, effectively eliminating the risk of trajectory jumps caused by edge breaks.
[0038] Construct an objective function that includes a path fitting error term and a curvature penalty term. The path fitting error term is constructed based on the distance residual between the edge point and the Bézier curve. The curvature penalty term reflects the rate of change of the third curvature through the changes of the first and second derivatives of the control points. The penalty coefficient and the curvature change amplitude are jointly embedded into the objective function. When reconstructing a broken path, to ensure that the fitting result simultaneously satisfies the requirements of edge continuity and curvature smoothness, a composite objective function needs to be constructed, incorporating both the path fitting error term and the curvature penalty term into the optimization constraints. The path fitting error term is quantified by measuring the Euclidean distance residual between the fitted Bézier curve and the original edge pixels, ensuring that the fitted path closely approximates the spatial distribution of the edges before and after the break. The curvature penalty term indirectly derives the third-order curvature change rate based on the rate of change of the first and second derivatives of the control points, used to measure the smoothness of the path. This term monitors the acceleration and curvature changes of the control points within a local range to identify potential curve fluctuations during the fitting process. To balance the optimization priorities between the two objectives, an adjustable penalty coefficient is introduced, and this coefficient is weighted and fused with the maximum curvature change in the current region before being embedded into the objective function as a constraint factor for control point updates. In practical applications, if the curvature changes drastically at the ends of the two edges, the weight of the penalty term automatically increases, forcing the algorithm to suppress fluctuations in the fitted path in that region, thereby avoiding sharp bends in the path at the connecting segments. By designing the objective function and using the constraint coupling mechanism, not only can the geometric continuity of the path be achieved, but its smooth controllability at both the visual and physical execution levels can also be ensured.
[0039] A gradient-direction-based control point iterative update method is adopted. In each iteration, the control point position and curvature penalty response factor are adjusted synchronously to minimize the path fluctuation and curvature abrupt change. After the convergence condition is met, a Bessel-fitted broken path that meets the continuity requirement is output.
[0040] To achieve smooth curvature control while maintaining the continuity of image edge structure, a gradient-direction-based iterative update method for control points is introduced. This method uses the initial coordinates of the control points in image space as a basis, adjusting their positions in each iteration according to the gradient direction of the objective function, minimizing both path fitting error and curvature change. Specifically, in each calculation, the partial derivative of the control point with respect to the path fitting error term is used as the update direction. Simultaneously, considering the trend of derivative changes between the current control point and its neighboring control points, the updated value of the curvature penalty response factor is calculated and embedded into the increment of the control point position adjustment through weight adjustment. This joint adjustment strategy automatically strengthens the penalty when the control point approaches a curvature abrupt change region, suppressing sharp changes and promoting a smoother path. As the number of iterations increases, the path fluctuation and curvature abrupt change gradually decrease. When both changes are below a preset threshold, the convergence condition is met, and the final Bézier-fitted path is output. This strategy can effectively handle highly complex edge connection scenarios, improving fitting accuracy while avoiding local overfitting or discontinuity, ensuring that the final output processing contour has stability and high-precision executability in both morphology and physical trajectory.
[0041] The contour consistency verification module performs structural closure, shape symmetry, and curvature continuity verification on the generated machining contour, and calculates the contour confidence factor to verify the consistency of the contour structure. In this embodiment, the contour consistency verification module is implemented as follows: The generated machining contour is subjected to structural closure verification. The coordinates of the starting point and ending point of the machining contour are extracted, and their Euclidean distance is calculated as the closure residual. The angle between the tangent directions of the two points is compared. When the closure residual is lower than the closure distance threshold and the angle is less than the closure direction threshold, the machining contour is judged to satisfy the structural closure. When performing structural closure verification, the two-dimensional coordinates of the first and last edge pixels in the processed contour are first extracted, and their Euclidean distance is calculated based on these two coordinates as the closure residual to evaluate the degree of closure of the contour space. Subsequently, a continuous set of edge pixels is selected within the local regions of these two points, and the tangent direction vector is fitted using linear regression. The angle between the two direction vectors is calculated to evaluate the consistency of the direction at the end. When the calculated closure residual is less than a preset closure distance threshold, and the angle between the directions is less than a closure direction threshold, the current contour is determined to be geometrically a continuous path with a closed beginning and end. This method effectively avoids the problem of structural incompleteness recognition caused by pixel-level breaks or errors in the start and end points of the contour. For example, when dealing with cases where there are extremely small gaps or blurred edges in the pattern contour, the accuracy of contour closure determination can still be guaranteed through dual judgment of distance and direction.
[0042] The closure distance threshold is a distance tolerance parameter used to measure the spatial proximity between the starting and ending points of a processed contour. Its value must be set less than the minimum recognizable distance corresponding to the image resolution to prevent misjudging actual breaks as closures. The closure direction threshold is used to determine whether the tangent directions of the starting and ending points are consistent, typically set to less than 15 degrees to ensure directional continuity at path connections. In image processing applications, edge directional consistency is often more sensitive than position; therefore, the closure direction threshold provides a supplementary constraint on geometric continuity. These two parameters work together to tolerate minor offsets while strictly controlling structural continuity, thereby improving the accuracy of determining the closure state of complex contour structures. This closure verification mechanism is particularly suitable for scenarios with extremely fine contours, partial occlusion, or false edge noise interference in the image, improving recognition robustness while ensuring the reliability of subsequent contour stitching and accuracy control.
[0043] Under the premise of satisfying structural closure, shape symmetry verification and curvature continuity verification are performed. Shape symmetry is calculated by symmetrical matching of pixel points on both sides of the contour after region mirror projection. Curvature continuity is calculated by traversing the continuous line segments formed by three adjacent points in the contour path, calculating the standard deviation of the corresponding rate of curvature change, and comparing it with the continuity tolerance threshold. When the standard deviation is less than the continuity tolerance threshold, the curvature continuity is determined to be valid. When performing structural closure verification on the processed contour, the two-dimensional coordinates of the first and last points are first extracted from the generated edge contour, and the Euclidean distance between the two points is calculated as the closure residual representing the positional relationship between the first and last points. Then, a fixed number of neighboring pixels are selected around the first and last points to construct a local linear regression model, thereby obtaining the tangent direction vectors of the two points. Next, the angle between these two direction vectors is calculated to evaluate the consistency of the first and last edge directions. If the calculation results show that the closure residual is less than a preset closure distance threshold and the angle is less than a preset closure direction threshold, it indicates that the contour constitutes a continuous closed structure in terms of geometric shape. Taking laser processing for vector pattern edge tracking as an example, when a graphic contour has slight pixel misalignment or incomplete orientation due to image blurring, point matching alone may indicate a break. However, by adding orientation judgment, it can be identified that the contour as a whole still has closed characteristics, thereby avoiding unnecessary path repair operations and improving recognition efficiency and processing accuracy.
[0044] The closure distance threshold limits the maximum acceptable positional deviation between the start and end coordinates. This value is typically set based on the pixel resolution of the image acquisition device. For example, at a resolution of 0.1 mm, a closure distance threshold of 0.2 mm can tolerate an error of 1 to 2 pixels. The closure direction threshold defines the maximum acceptable angle between two tangent direction vectors, reflecting the directional continuity of the start and end edges. It is usually set in the range of 10 to 20 degrees to ensure similar edge trends without being overly strict. These two parameters together constitute the criteria for judging the closure of the contour structure. The continuity tolerance threshold is an indicator used to uniformly constrain the combined error tolerance of the closure distance threshold and the closure direction threshold, measuring the overall tolerance of structural integrity. When the start and end points of the contour are close in spatial location and continuous in directional trend, and the overall error is lower than the continuity tolerance threshold, it can be determined that the path meets the structural closure requirements for processing, which helps to ensure the stability and accuracy of subsequent trajectory execution.
[0045] The numerical scores corresponding to the verification results of structural closure, shape symmetry and curvature continuity are weighted and fused to calculate the contour credibility factor. When the contour credibility factor is higher than the consistency assessment threshold, it is determined that the processed contour structure meets the consistency requirements.
[0046] After verifying the structural closure, shape symmetry, and curvature continuity of the machining contour, a unified judgment needs to be made on these three geometric consistency results to output a comprehensive assessment of whether machining is feasible. First, each verification result is mapped to a percentage score using a standardized function. Structural closure is scored based on a scoring function of the closure residual and the angle between the directions. Shape symmetry is calculated by calculating the mean error of the point set on both sides of the axis of symmetry and then inversely normalizing it. Curvature continuity is assessed by constructing a scoring curve using the first and second derivative residuals at the breakpoint. Different weights are assigned to the three scores, typically with structural closure having the highest weight, followed by curvature continuity, and then shape symmetry, with specific values set according to actual machining error tolerance requirements. Finally, a weighted average is used to merge the scores and output the contour confidence factor. For example, for a set of edge contours, if the closure score is 90, the symmetry score is 80, and the curvature continuity score is 85, with a weight ratio of 4:3:3, the final confidence factor is 86.5. When the score exceeds the preset consistency assessment threshold, such as 85 points, the contour can be considered to meet the integrity and stability requirements, and no further structural repair is needed. It is suitable for direct use in path generation.
[0047] Structural closure score reflects whether the contour is closed. The scoring function should integrate both position and direction factors. For example, the score tends to be full when the errors in the closure distance and the directional angle are both close to zero. Shape symmetry score reflects whether the contour exhibits left-right, up-down, or rotational symmetry. It is usually based on constructing a mirror axis based on the image centroid and calculating the deviation of the symmetry point to obtain the score. Curvature continuity score focuses on the smoothness of the contour's derivatives. The better the continuity of the first and second derivatives in the fracture repair area, the higher the score. Weighted fusion refers to the process of synthesizing the multi-dimensional scoring results after assigning different importance weights, reflecting the priority judgment of different verification items. The consistency evaluation threshold is the critical value for judging whether the overall structure meets the standard. It is determined based on empirical values, simulation data, or backfitting of processing errors. If the contour confidence factor exceeds this threshold, it indicates that the processing path is within a reasonable range in terms of closure, symmetry, and curvature smoothness, which can ensure the continuous operation of the laser path without causing structural distortion, shape distortion, or path interruption.
[0048] The parameter self-adjustment module collects trajectory execution error and edge deformation data during processing, and jointly adjusts the contour confidence factor and edge breakage judgment parameters according to the error trend to achieve adaptive updates of image recognition and precision control.
[0049] In this embodiment, the parameter self-adjustment module is implemented as follows: During the processing, the real-time displacement coordinates of the laser processing trajectory and the processing path reference coordinates generated in the image recognition stage are recorded simultaneously. The trajectory execution error is calculated by the Euclidean distance between the two in the same frame sequence. By comparing the image acquired before processing with the feedback image after processing, edge deformation data is extracted based on the pixel difference and gradient mapping of the contour edge. During laser processing, the real-time displacement coordinates of the processing head at each moment are recorded by an integrated encoder or optical tracking device. Simultaneously, reference coordinate points corresponding to the timestamps in the processing path generated during the image recognition stage are invoked. Under the premise of time series alignment, the Euclidean distance between each pair of real-time coordinates and reference coordinates is calculated to obtain the trajectory execution error, and a sequence of error changes over time is constructed. Edge deformation data is acquired by comparing the original image acquired before processing with the feedback image after processing. Image registration methods are used to geometrically align the two images. Then, pixel difference detection is used to detect the offset of edge regions, and gradient direction maps are combined to quantify the shape changes of local edges, thereby achieving high-precision evaluation of edge geometric deformation. For example, if an edge block in the processed image shifts outward by 3 pixels relative to the original image, and the gradient direction shift exceeds 15 degrees, it can be recorded as an edge deformation event.
[0050] Real-time displacement coordinates are used to record the actual trajectory of the machining head in space. Each point is acquired through high-frequency sampling, resulting in high temporal resolution. The machining path reference coordinates are derived from an ideal trajectory obtained through image recognition, serving as a benchmark for execution comparison. Both sets of coordinates must be strictly aligned on the time axis to ensure the accuracy of error measurement. Trajectory execution error measures machining accuracy deviation based on the Euclidean distance between coordinate points, reflecting the degree of spatial deviation between the actual execution and the desired path. Image registration aligns image frames before and after machining, forming the basis for edge change analysis. Pixel difference is used to detect edge displacement, and gradient mapping reflects changes in edge directionality; together, they constitute edge deformation data. This multi-source error data not only supports subsequent assessment of machining stability but also provides a basis for dynamically adjusting control parameters.
[0051] An error trend sequence of trajectory execution error and edge deformation data is constructed. The trend slope is extracted by weighted regression fitting by setting a time window and compared with the trend growth critical value. When the trend growth slope is continuously higher than the preset threshold, the evaluation weight of the contour credibility factor is dynamically adjusted, and the response sensitivity of the edge breakage judgment parameter is improved. During processing, continuously recorded trajectory execution errors and edge deformation data are arranged in chronological order to form an error trend sequence. A fixed-width time window is then used to perform weighted regression fitting on each data segment, obtaining the slope of the error over time within each window. More recent data is given higher weight in the weighted regression process to enhance the perception of current error fluctuations. If the slope value consistently exceeds a preset trend growth threshold across multiple time windows, it indicates a significant increase in error, at which point a dynamic adjustment mechanism is activated. By increasing the weights of the structural closure verification term and curvature continuity verification term in the contour confidence factor, the evaluation constraints on the processing path quality are strengthened. Simultaneously, the breakage distance threshold and curvature similarity threshold in the edge breakage judgment parameters are adjusted, making the system more sensitive to minor anomalies in edge structure. For example, when the fitted slope consistently exceeds an error growth rate of 0.8 pixels per second, the system increases the weight of the closure term in the confidence factor from 0.3 to 0.5 and lowers the breakage distance threshold by two pixels.
[0052] Trajectory execution error and edge deformation data reflect processing stability and forming accuracy, and their trend changes are the core basis for judging system state drift. The error trend sequence is a set of continuous error data in the time domain, and the time window defines the size of the analysis interval. Weighted regression enhances the sensitivity to changes in the current state by applying a time decay coefficient. The trend growth slope represents the rate of error change per unit time and is the trigger condition for dynamic control. The trend growth threshold is set as the maximum allowable error slope of the processing equipment in a stable state; once exceeded, it indicates that the working condition may deteriorate. The evaluation weight of the contour reliability factor refers to the coefficient assigned to different contour consistency indicators; adjusting its proportion can change the bias of contour quality assessment. The response sensitivity of the edge breakage judgment parameter is achieved by changing the threshold to control the sensitivity of the recognition algorithm to breakage features, realizing an adaptive update mechanism for image recognition and accuracy control.
[0053] Based on the updated contour confidence factor and edge breakage judgment parameters, the edge fusion logic and breakage judgment conditions involved in image recognition and precision control are updated synchronously. The parameter iteration is driven by the error trend to achieve adaptive updating of the image recognition and precision control process.
[0054] After the parameters are dynamically adjusted, the updated contour confidence factor and edge breakage judgment parameters are input into the image recognition and accuracy control process to synchronously refresh the edge fusion logic and breakage judgment conditions. Specifically, the system first reads the new contour confidence factor value and performs additional edge consistency correction on contours below the preset reference range, making subsequent recognition processes focus more on closure and curvature continuity features. Simultaneously, the breakage recognition conditions are redefined based on the new edge breakage judgment parameters, replacing the old values with updated values for the breakage distance threshold, curvature similarity threshold, and direction consistency threshold, and applying them to the judgment model in the edge analysis stage. During execution, after each round of recognition calculation, the system compares the new round of recognition results with the processing path error trend. If the error continues to decrease, the current parameter configuration is maintained; if the error still fluctuates, the parameters are fine-tuned according to the error trend curve, achieving automatic iterative updates of parameters in the time domain. For example, when the new error curve shows that the processing path offset has decreased from 3 pixels to less than 1 pixel, the system determines that the current parameter combination is effective and freezes the parameters to stabilize processing accuracy.
[0055] The contour confidence factor is used to measure the comprehensive quality index of the processed contour in terms of closure, symmetry, and curvature continuity. The updated confidence factor directly affects the edge feature selection strategy of the image recognition algorithm. Edge breakage judgment parameters include three key parameters: breakage distance threshold, curvature similarity threshold, and orientation consistency threshold. These three parameters jointly determine whether an edge is judged as broken, and their updates reflect the algorithm's sensitivity to minor edge discontinuities. Edge fusion logic refers to the geometric criteria for integrating multiple broken edge segments. By dynamically adjusting the fusion logic, the recognition algorithm can adapt to different edge breakage patterns. The error trend-driven parameter iteration mechanism collects processing errors in real time and feeds them back to the parameter update stage, forming a closed-loop control process. This enables image recognition and accuracy control to maintain adaptive accuracy optimization capabilities under different working conditions. This method can achieve a dynamic balance between recognition sensitivity and control accuracy in complex processing scenarios, effectively improving the stability and forming consistency of the processing path.
[0056] The above embodiments can be implemented, in whole or in part, by software, hardware, firmware, or any other combination thereof. When implemented using software, the above embodiments can be implemented, in whole or in part, as a computer program product. The computer program product includes one or more computer instructions or computer programs. When the computer instructions or computer programs are loaded or executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that includes one or more sets of available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium. The semiconductor medium can be a solid-state drive.
[0057] It should be understood that in the various embodiments of this application, the sequence number of each process does not imply the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0058] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0059] In the several embodiments provided in this application, it should be understood that the disclosed systems and methods can be implemented in other ways. For example, the embodiments described above are merely illustrative; for instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, and may be electrical, mechanical, or other forms.
[0060] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0061] In addition, the functional units in the various embodiments of this application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0062] The above description is merely a specific embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A laser graphic device image recognition and precision control system, characterized in that, It includes an edge breakage recognition module, a geometric consistency calculation module, a path fusion reconstruction module, a contour consistency verification module, and a parameter self-adjustment module; The edge breakage recognition module constructs a topological fragment graph to structurally represent the edge information in the image, collects the endpoint information of unclosed edges and calculates the connection residual and distribution density between the beginning and end of the edge to determine whether there are non-closed curve combinations in the image that cause edge breakage due to pixel breakage. The geometric consistency calculation module, when the judgment result is that there are non-closed curve combinations in the image that cause edge breakage due to pixel breakage, performs joint calculation of direction vector, third-order curvature change rate and centroid offset angle on the end of the unclosed edge to determine the consistency of edge end direction and curvature similarity; The path fusion and reconstruction module constructs connection segments based on the consistency of edge end orientation and curvature similarity results, and uses a Bezier interpolation algorithm with curvature penalty term to fit the fracture path, generating a complete processing contour that meets the continuity requirements. The contour consistency verification module performs structural closure, shape symmetry, and curvature continuity verification on the generated machining contour, and calculates the contour confidence factor to verify the consistency of the contour structure. The parameter self-adjustment module collects trajectory execution error and edge deformation data during processing, and jointly adjusts the contour confidence factor and edge breakage judgment parameters according to the error trend to achieve adaptive updates of image recognition and precision control.
2. The laser patterning device image recognition and accuracy control system according to claim 1, characterized in that, The edge breakage detection module is implemented as follows: By constructing a topological fragment graph, edge information in the image is represented in a structured way. The extracted edge pixels are divided into fragments according to pixel connectivity, and each connected fragment is used as a node. Topological connections are established based on the gradient direction of adjacent pixels to generate graph structure data containing node attributes and edge connection attributes, which is used to express the spatial distribution and geometric extension relationship of edge fragments in the image. The endpoint information of edge segments that do not form closed paths in the topological segment map is collected. The coordinates, direction vector and gray-level gradient change value of each endpoint are recorded. For each pair of spatially adjacent endpoints, the connection residual and distribution density between the beginning and end of the edge are calculated. The geometric deviation between endpoints is determined by the angle between the Euclidean distance and the direction vector. The endpoint density is calculated by local point set statistics to form a data matrix for fracture analysis. The connection residual and the values in the distribution density matrix are compared with the preset fracture judgment threshold. When the connection residual is less than the fracture distance threshold, the angle between the direction vectors is less than the fracture angle threshold, and the distribution density is higher than the fracture density threshold, it is determined that there are pixel-level discontinuities between the edge segments. It is determined that there are non-closed curve combinations in the image that cause edge fracture due to pixel fracture, and the fracture recognition result is output for subsequent processing by the geometric consistency calculation module.
3. The laser patterning device image recognition and accuracy control system according to claim 1, characterized in that, The implementation of the geometric consistency calculation module is as follows: If the judgment result is that there are non-closed curve combinations in the image and the edge breaks are caused by pixel breaks, the end pixel of each unclosed edge and its adjacent continuous pixels are extracted. The local pixel direction is calculated by multi-point linear regression and a direction vector is constructed. At the same time, a cubic spline curve is fitted in the neighborhood with the end as the starting point. The curvature derivative change is obtained based on the fitting result to obtain the third curvature change rate. In the local region at the end of each unclosed edge, the centroid of pixel distribution is calculated based on the gray-scale weighted coordinate method. The angle between the vector direction formed by the line connecting the end pixel to the centroid and the direction vector is used as the centroid offset angle. A joint feature vector composed of the direction vector, the third-order curvature change rate and the centroid offset angle is established. For all unclosed edge ends, perform pairwise matching, calculate the angle difference between direction vectors, the numerical difference between third-order curvature change rates, and the angle difference between centroid offset angles, and compare them with the direction consistency threshold, curvature similarity threshold, and centroid tolerance threshold, respectively. When all differences do not exceed their respective thresholds, it is determined that the corresponding unclosed edge ends have edge end direction consistency and curvature similarity.
4. The laser patterning device image recognition and accuracy control system according to claim 1, characterized in that, The implementation of the path fusion and reconstruction module is as follows: Based on the results of edge end direction consistency and curvature similarity, edge end pairs that meet the geometric constraints are selected in the image space. The coordinates, direction vectors and third-order curvature change rates of each pair of edge ends are extracted to construct the connection segment starting structure as the input basis for interpolation fitting. A Bessel interpolation algorithm with curvature penalty term is introduced to fit the connection segment. The geometric properties of the edge end are used as boundary conditions. At the same time, the curvature change rate is embedded into the penalty function to participate in the control point optimization. Multiple rounds of iterative processing to minimize path fluctuation are performed to obtain the fitted fracture path. The fitted fracture path is spliced with the original edge segment, and the first and second derivatives at the path connection are corrected by the derivative continuity constraint to complete the generation of a complete processing contour that satisfies curvature continuity and structural closure.
5. The laser patterning device image recognition and accuracy control system according to claim 4, characterized in that, A Bessel interpolation algorithm with a curvature penalty term is introduced to fit the connection segment. The geometric properties of the edge ends are used as boundary conditions, and the rate of change of curvature is embedded in the penalty function to participate in control point optimization. Multiple rounds of iterative processing to minimize path fluctuation are performed to obtain the fitted fracture path, specifically: The coordinate points at the two edge ends are used as the beginning and end nodes of the Bézier curve. The direction vectors at the two edge ends are set as the control vector directions. The third-order curvature change rate at the two edge ends is used as the initial curvature constraint value to initialize the control point structure. Construct an objective function that includes a path fitting error term and a curvature penalty term. The path fitting error term is constructed based on the distance residual between the edge point and the Bézier curve. The curvature penalty term reflects the rate of change of the third curvature through the changes of the first and second derivatives of the control points. The penalty coefficient and the curvature change amplitude are jointly embedded into the objective function. A gradient-direction-based control point iterative update method is adopted. In each iteration, the control point position and curvature penalty response factor are adjusted synchronously to minimize the path fluctuation and curvature abrupt change. After the convergence condition is met, a Bessel-fitted broken path that meets the continuity requirement is output.
6. The laser patterning device image recognition and accuracy control system according to claim 1, characterized in that, The implementation of the contour consistency verification module is as follows: The generated machining contour is subjected to structural closure verification. The coordinates of the starting point and ending point of the machining contour are extracted, and their Euclidean distance is calculated as the closure residual. The angle between the tangent directions of the two points is compared. When the closure residual is lower than the closure distance threshold and the angle is less than the closure direction threshold, the machining contour is judged to satisfy the structural closure. Under the premise of satisfying structural closure, shape symmetry verification and curvature continuity verification are performed. Shape symmetry is calculated by symmetrical matching of pixel points on both sides of the contour after region mirror projection. Curvature continuity is calculated by traversing the continuous line segments formed by three adjacent points in the contour path, calculating the standard deviation of the corresponding rate of curvature change, and comparing it with the continuity tolerance threshold. When the standard deviation is less than the continuity tolerance threshold, the curvature continuity is determined to be valid. The numerical scores corresponding to the verification results of structural closure, shape symmetry and curvature continuity are weighted and fused to calculate the contour credibility factor. When the contour credibility factor is higher than the consistency assessment threshold, it is determined that the processed contour structure meets the consistency requirements.
7. The laser patterning device image recognition and accuracy control system according to claim 1, characterized in that, The implementation of the parameter self-adjustment module is as follows: During the processing, the real-time displacement coordinates of the laser processing trajectory and the processing path reference coordinates generated in the image recognition stage are recorded simultaneously. The trajectory execution error is calculated by the Euclidean distance between the two in the same frame sequence. By comparing the image acquired before processing with the feedback image after processing, edge deformation data is extracted based on the pixel difference and gradient mapping of the contour edge. An error trend sequence of trajectory execution error and edge deformation data is constructed. The trend slope is extracted by weighted regression fitting by setting a time window and compared with the trend growth critical value. When the trend growth slope is continuously higher than the preset threshold, the evaluation weight of the contour credibility factor is dynamically adjusted, and the response sensitivity of the edge breakage judgment parameter is improved. Based on the updated contour confidence factor and edge breakage judgment parameters, the edge fusion logic and breakage judgment conditions involved in image recognition and precision control are updated synchronously. The parameter iteration is driven by the error trend to achieve adaptive updating of the image recognition and precision control process.
Citation Information
Patent Citations
Track fitting method based on dynamic weight Bezier curve
CN118691709A
Dislocation stratum deformation analysis and calculation method for active fault zone
CN120542103A