Sheet error detection method and system based on point cloud segmentation and shape difference

CN122550835APending Publication Date: 2026-08-11WEIFANG METROLOGY TECH RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-15
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

此类策略在实施前即确定了分析区域的划分方式与精细程度(即分析粒度),未能与工件表面的实际制造误差分布相关联

Benefits of technology

[0014]上述技术方案,通过构建空间连续误差场并依据其梯度变化,自适应地确定各区域的分段尺度与敏感度等级,进而执行多尺度分段与误差计算。能够根据误差的实际分布分配检测资源,在误差平缓区域快速处理,在误差剧烈区域精细分析,从而在确保全局一致性的前提下,提升板片类工件三维尺寸误差检测的整体效率与定位精度。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122550835A_ABST
    Figure CN122550835A_ABST
Patent Text Reader

Abstract

This invention provides a method and system for detecting plate-like errors based on point cloud segmentation and shape differences, belonging to the field of workpiece inspection technology. The method includes establishing a unified inspection benchmark; calculating the directed distance between each measurement point in the 3D point cloud and the geometric surface defined by the theoretical model; initially segmenting the 3D point cloud to obtain multiple initial segmentation units, and determining the segmentation scale of each initial segmentation unit; defining the segmentation scale hierarchically; and calculating the geometric error of each segmented region relative to the theoretical model for each segmented region after multi-scale segmentation, thus obtaining the plate-like error detection results. This invention constructs a spatially continuous error field and adaptively determines the segmentation scale and sensitivity level of each region based on its gradient change, thereby performing multi-scale segmentation and error calculation. While ensuring global consistency, it improves the overall efficiency and positioning accuracy of 3D dimensional error detection for plate-like workpieces.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of workpiece inspection technology, specifically to a method and system for detecting plate errors based on point cloud segmentation and shape differences. Background Technology

[0002] In the manufacturing process of sheet-like workpieces (such as automotive body panels, aerospace skins, and precision sheet metal), their dimensions, shape, and positional accuracy directly determine the assembly quality and performance of the final product. Traditional inspection methods mostly rely on coordinate measuring machines (CMMs) or specialized fixtures, which are inefficient and struggle to acquire complete three-dimensional topographic information of the workpiece surface. With the widespread adoption of three-dimensional optical measurement technologies (such as structured light and laser scanning), rapidly acquiring high-density three-dimensional point cloud data of the workpiece surface and performing full-size digital inspection has become an industry trend. Three-dimensional digital inspection of sheet-like workpieces typically relies on fixed, uniform, or preset geometric feature-based point cloud segmentation strategies. These strategies determine the division method and level of detail (i.e., analysis granularity) of the analysis area before implementation, failing to correlate with the actual manufacturing error distribution on the workpiece surface. Summary of the Invention

[0003] The purpose of this invention is to provide a plate error detection method and system based on point cloud segmentation and shape differences, which is used to adjust the analysis precision of different areas according to the distribution of measured errors on the workpiece surface, thereby improving the overall detection efficiency while ensuring the detection accuracy of key areas.

[0004] To achieve the above objectives, this invention provides a plate error detection method based on point cloud segmentation and shape differences, comprising: globally aligning the three-dimensional point cloud of the measured workpiece with a theoretical model to establish a unified detection benchmark; calculating the directed distance between each measurement point in the three-dimensional point cloud and the geometric surface defined by the theoretical model based on the detection benchmark; constructing a spatial continuous error field based on the directed distance, and initially segmenting the three-dimensional point cloud to obtain multiple initial segmentation units; determining the segmentation scale of the corresponding initial segmentation unit based on the gradient change of the spatial continuous error field within each initial segmentation unit; defining the segmentation scale hierarchically to obtain the difference sensitivity level of each initial segmentation unit, and performing multi-scale segmentation on the initial segmentation unit according to the difference sensitivity level; and calculating the geometric error of each segmented region relative to the theoretical model based on the detection benchmark for each segmented region after multi-scale segmentation to obtain the plate partition error detection result.

[0005] Optionally, constructing a spatially continuous error field based on the directed distance includes: performing spatial interpolation and smooth reconstruction on the discrete directed distance to form a continuous error distribution function; wherein, at least one of weighted neighborhood averaging, local least squares fitting, and voxel grid-based interpolation reconstruction is used for smooth reconstruction to suppress measurement noise and obtain spatially continuous error field data.

[0006] Optionally, the initial segmentation of the 3D point cloud includes: calculating the normal vector and curvature values ​​corresponding to each measurement point of the 3D point cloud; setting the normal vector angle threshold and curvature difference threshold corresponding to the region growth rule; selecting seed points in the 3D point cloud, and determining the geometric continuity of neighboring measurement points according to the set normal vector angle threshold and curvature difference threshold; merging and expanding points in the neighborhood where both normal vector and curvature satisfy the continuity condition to grow into a single initial segmentation unit; iteratively selecting new seed points and performing growth operations until all 3D point cloud measurement points are divided and classified, resulting in multiple initial segmentation units.

[0007] Optionally, determining the segmentation scale of the corresponding initial segmentation unit based on the gradient change of the spatial continuous error field within each initial segmentation unit includes: selecting a set of sampling points within each initial segmentation unit; calculating the gradient vector of the spatial continuous error field at each sampling point in the set of sampling points; calculating a gradient intensity index characterizing the severity of error change within the initial segmentation unit based on the gradient vector; and determining the corresponding segmentation scale based on the value of the gradient intensity index, wherein the selection of the segmentation scale is inversely proportional to the value of the gradient intensity index.

[0008] Optionally, the layering defines the segmentation scale to obtain the difference sensitivity level of each initial segmentation unit, including: mapping the segmentation scale determined based on the gradient strength index to the corresponding difference sensitivity level according to a preset first sensitivity threshold and a second sensitivity threshold; if the value of the gradient strength index is less than the first sensitivity threshold, it is mapped to a low sensitivity level; if the value of the gradient strength index is greater than or equal to the first sensitivity threshold and less than or equal to the second sensitivity threshold, it is mapped to a medium sensitivity level; if the value of the gradient strength index is greater than the second sensitivity threshold, it is mapped to a high sensitivity level.

[0009] Optionally, performing multi-scale segmentation on the initial segmentation units based on the difference sensitivity level includes: for initial segmentation units with high sensitivity levels, recursively segmenting using a first set of segmentation parameters; for initial segmentation units with medium sensitivity levels, recursively segmenting using a second set of segmentation parameters, wherein the geometric consistency threshold of the second set of segmentation parameters is greater than that of the first set of segmentation parameters; and for initial segmentation units with low sensitivity levels, maintaining the current segmentation result or recursively segmenting using a third set of segmentation parameters, wherein the geometric consistency threshold of the third set of segmentation parameters is greater than that of the second set of segmentation parameters.

[0010] Optionally, the stopping condition for the recursive segmentation includes at least one of the following: the error improvement of the current segmented region is less than a preset improvement threshold; the number of point clouds in the current segmented region is less than a preset minimum number of points threshold; or the preset maximum segmentation level has been reached.

[0011] Optionally, the calculation of the geometric errors of each segmented region relative to the theoretical model includes at least one of the following: for a segmented region determined to be a plane, calculating its flatness error and / or offset relative to the theoretical plane; for a segmented region determined to be a hole or arc, calculating at least one of its hole diameter error, roundness error, and center position deviation; for a segmented region determined to be an edge, calculating its straightness error and / or boundary offset.

[0012] Optionally, based on the segmentation results and error data accumulated in historical detections, the judgment threshold used to determine the difference sensitivity level and / or the segmentation parameters used to perform the multi-scale segmentation can be optimized.

[0013] On the other hand, the present invention provides a plate error detection system based on point cloud segmentation and shape difference, for implementing a plate error detection method based on point cloud segmentation and shape difference. The system includes a control module, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the plate error detection method based on point cloud segmentation and shape difference.

[0014] The above technical solution constructs a spatially continuous error field and adaptively determines the segmentation scale and sensitivity level of each region based on its gradient changes, thereby performing multi-scale segmentation and error calculation. It can allocate detection resources according to the actual error distribution, enabling rapid processing in areas with mild errors and detailed analysis in areas with severe errors, thus improving the overall efficiency and positioning accuracy of three-dimensional dimensional error detection for plate-like workpieces while ensuring global consistency.

[0015] Other features and advantages of the present invention will be described in detail in the following detailed description section. Attached Figure Description

[0016] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the following detailed description to explain the invention, but do not constitute a limitation thereof. In the drawings: Figure 1 This is a flowchart of a plate error detection method based on point cloud segmentation and shape differences.

[0017] Figure 2 This is a flowchart of sensitivity level determination and adaptive segmentation parameter matching based on error field gradient intensity. Detailed Implementation

[0018] The following is in conjunction with the appendix Figure 1 -Appendix Figure 2 The specific implementation methods of the embodiments of the present invention will be described in detail below. It should be understood that the specific implementation methods described herein are only for illustrating and explaining the embodiments of the present invention, and are not intended to limit the embodiments of the present invention.

[0019] It should be noted that the acquisition, transmission, storage, use, and processing of data in the technical solution of this application all comply with the relevant provisions of national laws and regulations. In the embodiments of this application, certain existing industry solutions such as software, components, and models may be mentioned. These should be considered exemplary, intended only to illustrate the feasibility of implementing the technical solution of this application, and do not imply that the applicant has already used or necessarily used such solutions.

[0020] In the process of realizing this invention, the inventors of this application discovered that the prior art, due to its fixed segmentation detection strategy, cannot match the actual error variation distribution, resulting in a difficulty in achieving both detection efficiency and accuracy.

[0021] Example 1 Reference Figures 1-2 This is the first embodiment of the present invention, which provides a plate error detection method based on point cloud segmentation and shape differences, including: S100: Globally align the 3D point cloud of the measured workpiece with the theoretical model to establish a unified inspection benchmark.

[0022] In the embodiments of this application, three-dimensional point cloud data of sheet-like workpieces are acquired using non-contact three-dimensional measurement devices such as structured light scanners, laser profilometers, or three-dimensional vision measurement equipment. To ensure the accuracy of the measurement data, the measurement equipment needs to be calibrated before data acquisition to eliminate systematic errors introduced by lens distortion, scale deviation, and coordinate drift.

[0023] After obtaining the measured 3D point cloud, it is globally aligned with the theoretical model of the workpiece to establish a unique and unified inspection benchmark. The theoretical model is a CAD model or a standard 3D model generated from design files. Global alignment includes: selecting stable and easily identifiable benchmark features on the workpiece as registration constraints; benchmark features are selected from benchmark planes, benchmark edges, hole centers, corner points, or symmetry center lines. Coarse registration is performed between the 3D point cloud and the theoretical model based on the selected benchmark features; fine registration is then performed by solving a rigid body transformation consisting of rotation matrices and displacement vectors, which does not introduce local non-rigid deformations. This process ensures that the measured 3D point cloud and the theoretical model are in the same coordinate system, thereby establishing a unified inspection benchmark.

[0024] The above scheme, by selecting stable reference features for coarse and fine registration, accurately aligns the measured point cloud with the theoretical model to the same coordinate system. This reduces systematic coordinate offsets caused by the pose of the measuring equipment and workpiece clamping deviations, and establishes a unique and accurate spatial reference frame for all subsequent error calculations.

[0025] S200: Based on the detection benchmark, calculate the directed distance between each measurement point in the 3D point cloud and the geometric surface defined by the theoretical model.

[0026] In the embodiments of this application, based on a unified detection benchmark, each measurement point in the 3D point cloud is traversed to determine its nearest projection point on the geometric surface of the theoretical model. Then, combined with the normal vector of the theoretical model at the projection point, the directed distance from the measurement point to the surface of the theoretical model is calculated, as follows:

[0027] in, This represents the directed distance to the i-th measurement point. The sign function takes +1 when the input value is positive, -1 when it is negative, and 0 when it is 0, and is used to assign positive or negative attributes to the distance. Indicates the theoretical model at the projection point The unit normal vector at the projection point is obtained by calculating and normalizing the normal vector of the geometric surface where the projection point is located. The calculation method of the normal vector is determined according to the representation of the theoretical model. When the theoretical model is a parametric surface, the normal vector is calculated by the cross product of the partial derivatives of the surface parametric equations; when the theoretical model is a discrete mesh model, the normal vector is determined by the normal vector of the mesh patch where the projection point is located. This represents the i-th measurement point in the 3D point cloud, which is a spatial coordinate point acquired by a 3D scanning device, in the form of... , Point The nearest projection point on the surface of the theoretical model, obtained through nearest neighbor search or surface projection algorithm, is used to represent the position on the theoretical model that is closest to the measurement point.

[0028] It should be noted that, >0 indicates that the corresponding measurement point is located outside the surface of the theoretical model. <0 indicates that the corresponding measurement point is located inside the surface of the theoretical model. =0 indicates that the corresponding measurement point coincides with the theoretical surface.

[0029] The above scheme transforms the complex shape differences in three-dimensional space into a series of scalar error values ​​with directional attributes by calculating the directed distance from each measurement point to the surface of the theoretical model. This not only quantifies the magnitude of the deviation but also clearly distinguishes the process states of "thick" (excess material) and "thin" (insufficient material) through symbols.

[0030] S300: Construct a spatially continuous error field based on the directed distance, and perform initial segmentation on the 3D point cloud to obtain multiple initial segmentation units. Determine the segmentation scale of the corresponding initial segmentation unit based on the gradient change of the spatially continuous error field within each initial segmentation unit.

[0031] In the embodiments of this application, spatial interpolation and smooth reconstruction are performed on discrete directed distances to form a continuous error distribution function; wherein, at least one of weighted neighborhood averaging, local least squares fitting, and voxel grid-based interpolation reconstruction is used for smooth reconstruction to suppress measurement noise and obtain spatially continuous error field data.

[0032] In a preferred embodiment of this application, based on the calculated discrete directed distance dataset, the 3D point cloud space is first divided into several local neighborhoods. To suppress measurement noise, at least one of the following methods is used to locally smooth the discrete directed distances within each neighborhood: weighted neighborhood averaging, local least squares fitting, or voxel grid-based interpolation reconstruction. By interpolating and fitting the smoothed data across the entire spatial domain, a continuous function is formed with spatial coordinates (x, y, z) as the independent variable and the error value as the dependent variable, i.e., a continuous spatial error field E(x, y, z), which characterizes the continuous distribution and variation trend of the plate surface error.

[0033] In the embodiments of this application, the initial segmentation of a 3D point cloud includes: calculating the normal vector and curvature values ​​corresponding to each measurement point in the 3D point cloud; setting the normal vector angle threshold and curvature difference threshold corresponding to the region growth rule; selecting seed points in the 3D point cloud, and determining the geometric continuity of neighboring measurement points according to the set normal vector angle threshold and curvature difference threshold; merging and expanding points in the neighborhood where both the normal vector and curvature satisfy the continuity condition to grow into a single initial segmentation unit; iteratively selecting new seed points and performing growth operations until all 3D point cloud measurement points are divided and classified, resulting in multiple initial segmentation units.

[0034] In a preferred embodiment of this application, the local geometric properties corresponding to each measurement point in the 3D point cloud are calculated, including its unit normal vector and curvature values. The normal vector and curvature are obtained by performing principal component analysis or local surface fitting on the spatial neighborhood point set of each measurement point.

[0035] The geometric continuity criteria and their quantization thresholds for region growing are defined, including the normal vector angle threshold and the curvature difference threshold. The normal vector angle threshold defines the maximum allowable angular deviation between the normal vector of a point under investigation and the average normal vector of the current grown region during region growing. For example, under general accuracy requirements, this threshold can be set to 10 degrees; in precision inspection scenarios with extremely high surface continuity requirements, this threshold can be set to a more stringent 5 degrees. The curvature difference threshold defines the maximum allowable absolute difference between the point under investigation and the average curvature value of the current region. This threshold can be set according to the curvature distribution range of the point cloud, for example, it can be set to 0.01 to 0.03 times the curvature value range. By setting the above thresholds, the merging conditions of region growing can be effectively controlled, ensuring that the initial segmentation units meet the requirements of local geometric feature continuity.

[0036] Furthermore, in the 3D point cloud, a sub-point is selected, and the geometric continuity of its spatial neighborhood is determined based on the normal vector angle threshold and the curvature difference threshold. For any neighborhood point, if the angle between its normal vector and the average normal vector of the current growing region is less than the normal vector angle threshold, and the absolute difference between its curvature value and the average curvature value of the current region is less than the curvature difference threshold, then the point is determined to meet the continuity condition and is merged into the current region. By continuously merging neighborhood points that meet the conditions, the region is expanded until there are no more points in its neighborhood that meet the conditions. At this point, growth stops, forming an initial segmentation unit.

[0037] The above process is repeated, selecting new seed points from those not belonging to any region, and repeating the growth operation until all 3D point cloud measurement points are divided and classified, resulting in multiple initial segmentation units with relatively continuous geometric features and relatively stable point cloud distribution within a local area.

[0038] In the embodiments of this application, determining the segmentation scale of the corresponding initial segmentation unit based on the gradient change of the spatial continuous error field within each initial segmentation unit includes: selecting a set of sampling points within each initial segmentation unit; calculating the gradient vector of the spatial continuous error field at each sampling point in the sampling point set; calculating the gradient intensity index characterizing the severity of error change within the initial segmentation unit based on the gradient vector; and determining the corresponding segmentation scale based on the value of the gradient intensity index, wherein the selection of the segmentation scale is inversely proportional to the value of the gradient intensity index.

[0039] In a preferred embodiment of this application, for each initial segmentation unit obtained in the initial segmentation step, a representative set of sampling points is selected within the physical space defined by the initial segmentation unit according to a preset rule. The set of sampling points can be obtained by uniform spatial sampling, random sampling, or weighted sampling based on point cloud density within the unit. The purpose is to obtain a sufficient number of points to reliably characterize the error field variation features within the entire unit.

[0040] The gradient vector ∇E of the spatially continuous error field E(x, y, z) at each of the above sampling points is calculated as follows:

[0041] Where ∇E represents the gradient vector of the spatially continuous error field E. This represents the partial derivative of the spatially continuous error field E with respect to the x-coordinate direction. This represents the partial derivative of the spatially continuous error field E in the y-coordinate direction. It represents the partial derivative of the spatially continuous error field E in the z-coordinate direction.

[0042] It should be noted that ∇E represents the rate of change of the spatial continuous error field along each coordinate axis at that point, and its direction points in the direction of the fastest increase in error. The gradient vector can be calculated by differentiating the continuous error distribution function E(x, y, z) using numerical difference methods (such as the central difference method), or it can be directly obtained by using the analytical derivative of the interpolation fitting model used to construct the spatial continuous error field.

[0043] Furthermore, based on the calculated gradient vectors of each sampling point, a scalar index, namely the gradient strength index, is calculated to characterize the overall drastic degree of error change within the initial segmentation unit. , The calculation formula is as follows:

[0044] in, This represents the gradient intensity index within the initial segmentation unit, where m represents the number of sampling points selected within the initial segmentation unit. This represents the k-th sampling point within the j-th unit. This represents the magnitude of the gradient vector at that point (i.e., the gradient magnitude). The weights assigned to the corresponding sampling points can be used to reflect the importance of different locations (for example, assigning higher weights to points located at edges or in feature regions, and lower weights to noisy points).

[0045] Furthermore, based on the calculated gradient strength index The value determines the segmentation scale corresponding to the initial segmentation unit. The segmentation scale defines the level of granularity to be used when performing multi-scale segmentation on the unit. It is defined hierarchically and specifically embodied in three difference sensitivity levels: "low", "medium", and "high", and is directly related to the specific segmentation algorithm parameters.

[0046] It should be noted that the core mapping principle is an inverse relationship: gradient strength index The larger the value, the smaller the segmentation scale, which means that for regions with drastic error changes, a more refined and finer-grained segmentation strategy will be used for in-depth analysis; conversely, The smaller the value, the larger the segmentation scale, indicating that a coarser analytical granularity can be used for regions with smooth error.

[0047] The above scheme first constructs a spatially continuous error field based on directed distance, transforming discrete error information into a continuous distribution. Then, it uses the spatial trend of the error field to quantify the degree of error variation within each initial segmentation unit, determining the corresponding segmentation scale accordingly. This allows the segmentation granularity to adaptively adjust with error changes. Compared to methods that rely solely on local geometric features such as normal vectors and curvature for segmentation, this scheme uses the error distribution itself as the driving force, enabling the segmentation process to reflect the true characteristics of error changes. It automatically improves analysis accuracy in areas of rapid error change and reduces unnecessary refinement in areas of moderate error change. This not only improves the identification accuracy and positioning capability of complex plate errors but also effectively reduces computational redundancy while maintaining detection accuracy, exhibiting stronger targeting and adaptability.

[0048] S400: Define the segmentation scale in layers, obtain the difference sensitivity level of each initial segmentation unit, and perform multi-scale segmentation on the initial segmentation unit according to the difference sensitivity level.

[0049] In the embodiments of this application, the segmentation scale is defined hierarchically to obtain the difference sensitivity level of each initial segmentation unit, including: mapping the segmentation scale determined based on the gradient strength index to the corresponding difference sensitivity level according to the preset first sensitivity threshold and second sensitivity threshold; if the value of the gradient strength index is less than the first sensitivity threshold, it is mapped to a low sensitivity level; if the value of the gradient strength index is greater than or equal to the first sensitivity threshold and less than or equal to the second sensitivity threshold, it is mapped to a medium sensitivity level; if the value of the gradient strength index is greater than the second sensitivity threshold, it is mapped to a high sensitivity level.

[0050] In one specific embodiment, the first sensitivity threshold and the second sensitivity threshold on which the mapping is based can be preset according to the type of the plate being tested, historical quality data statistics, or the accuracy tolerance of a specific process. For example, the first sensitivity threshold T1 is set to 0.1 mm / mm, and the second sensitivity threshold T2 is set to 0.3 mm / mm. Here, the dimension of the gradient intensity index, mm / mm, characterizes the amount of change in error value within a unit spatial length.

[0051] Based on the aforementioned thresholds, specific mapping operations are performed. For example, an initial segmentation unit with a gradient strength index of 0.05 mm / mm is mapped to a low sensitivity level because its value is less than the first sensitivity threshold T1. A unit with a gradient strength index of 0.20 mm / mm is mapped to a medium sensitivity level because its value is between T1 and T2. A unit with a gradient strength index as high as 0.50 mm / mm is mapped to a high sensitivity level because its value is greater than the second sensitivity threshold T2.

[0052] In the embodiments of this application, multi-scale segmentation is performed on the initial segmentation unit according to the difference sensitivity level, including: for the initial segmentation unit with a high sensitivity level, recursive segmentation is performed using a first set of segmentation parameters; for the initial segmentation unit with a medium sensitivity level, recursive segmentation is performed using a second set of segmentation parameters, wherein the geometric consistency determination threshold of the second set of segmentation parameters is greater than that of the first set of segmentation parameters; for the initial segmentation unit with a low sensitivity level, the current segmentation result is maintained or recursive segmentation is performed using a third set of segmentation parameters, wherein the geometric consistency determination threshold of the third set of segmentation parameters is greater than that of the second set of segmentation parameters.

[0053] In one specific embodiment, it is assumed that there are three initial segmentation units that have completed the sensitivity level determination, namely unit X (high sensitivity level), unit Y (medium sensitivity level) and unit Z (low sensitivity level).

[0054] For a cell X identified as having a high sensitivity level, the system invokes the first set of segmentation parameters to perform recursive segmentation. This set of parameters is used to achieve the most refined analysis, and it includes the most stringent geometric consistency threshold. For example, the normal vector angle threshold can be set to 5 degrees, and the curvature difference threshold can be set to 0.003, 0.004, etc. This threshold means that during the recursive segmentation process, only points with very similar curvature values ​​are allowed to be merged. This threshold can effectively distinguish minute fluctuations in curvature within regions of high error variation, thereby enabling fine-grained exploration, while avoiding oversensitivity to point cloud noise and ineffective over-segmentation that may result from thresholds that are too small (such as 0.00 or smaller).

[0055] For unit Y, which is determined to be of medium sensitivity, the second set of segmentation parameters is invoked. Its curvature difference threshold should be greater than that of the first set of parameters, for example, set to 0.008 or 0.010. This threshold relaxes the merging conditions, allowing for moderate curvature changes, and is suitable for performing balance analysis on regions with some error fluctuations but non-core defects.

[0056] For unit Z, which is classified as having low sensitivity, if the third set of segmentation parameters is selected for recursive segmentation, its curvature difference threshold can be set to a larger value, such as 0.015 or 0.018. This lenient threshold allows for merging of point clouds within a large range of curvature variations, enabling rapid processing of large areas with gentle curvature and improving overall processing efficiency.

[0057] It should be noted that the stopping conditions for recursive segmentation include at least one of the following: the improvement in error of the current segmented region is less than a preset improvement threshold. For example, when the standard deviation of the error decreases by less than 0.005 mm or the root mean square of the error decreases by less than 0.01 mm, it is determined that there is no significant improvement; the number of point clouds in the current segmented region is less than a preset minimum number of points threshold. For example, when the number of point clouds in the region is less than 50 points or the number of effective sampling points in the region is less than 30 points, it is determined that it cannot be further segmented; the preset maximum segmentation level has been reached. For example, when the segmentation level reaches the 5th level or the recursion depth reaches the preset 3rd level, the segmentation is terminated.

[0058] The above scheme defines the difference sensitivity levels according to the gradient intensity. For high, medium, and low sensitivity regions, it performs recursive segmentation using segmentation parameters of corresponding stringency to match the error variation characteristics of different regions. In high-sensitivity regions with drastic error changes, a strict threshold is used for in-depth subdivision to capture minute defects; in regions with gentler error changes, a more lenient threshold is used to avoid over-segmentation. This simultaneously meets the dual requirements of precise detection and efficient processing, improving the adaptability and discriminative power of the segmentation results to differences in plate shape and error distribution.

[0059] S500: For each segmented region after multi-scale segmentation, based on the detection benchmark, calculate the geometric error of each segmented region relative to the theoretical model to obtain the partition error detection result of the plate.

[0060] In the embodiments of this application, before calculating the geometric error of each segmented region relative to the theoretical model, the geometric type of each segmented region is determined by the point cloud geometric feature recognition method in the prior art. That is, based on the normal vector, curvature and spatial distribution characteristics of the point cloud of the segmented region, the region is determined to be a plane, a circular hole / arc or an edge, etc.

[0061] In the embodiments of this application, the geometric errors of each segmented region relative to the theoretical model are calculated, including at least one of the following: for a segmented region determined to be a plane, its flatness error and / or offset relative to the theoretical plane are calculated; for a segmented region determined to be a hole or arc, at least one of its hole diameter error, roundness error, and center position deviation is calculated; for a segmented region determined to be an edge, its straightness error and / or boundary offset are calculated.

[0062] For a segmented region determined to be planar, the best-fit plane can be found for all points within that region using the least squares method. The solution involves calculating the flatness error and the offset relative to the theoretical plane based on this fitted plane. The flatness error can be characterized as the algebraic difference between the maximum and minimum distances from all measured points within the region to the fitted plane; its value reflects the flatness of the surface of that region. The offset to the theoretical plane can be characterized as the normal distance between the equation parameters of the fitted plane (such as the normal vector constant of the plane equation) and the target plane defined in the theoretical model; it reflects the overall positional deviation of the region.

[0063] For segmented regions identified as circular holes or arc structures, cross-sectional point clouds can be extracted on multiple sections perpendicular to their theoretical axis, and circles can be fitted on each section using the least squares method. Based on the fitting results of multiple sections, at least one of the following errors is calculated: hole diameter error, expressed as the difference between the average diameter of the fitted circles on all sections and the theoretical diameter; roundness error, expressed as the difference between the maximum and minimum radii of the circles on all sections, reflecting the roundness of the hole; and center position deviation, expressed as the Euclidean distance between the average spatial position of the fitted circles on all sections and the theoretical center position, reflecting the overall positional offset of the hole.

[0064] For a segmented region identified as an edge, boundary points are first extracted from the point cloud of that region, and a spatial straight line is fitted using the least squares method. Based on this fitted line, its straightness error and boundary offset are calculated. The straightness error can be characterized as the algebraic difference between the maximum and minimum distances from all boundary points to the fitted line. The boundary offset can be characterized as the average directed distance from all boundary points to the corresponding boundary line (or curve) defined in the theoretical model, reflecting the overall positional deviation of the edge contour.

[0065] In a preferred embodiment of this application, the decision threshold for determining the difference sensitivity level and / or the segmentation parameters used for performing multi-scale segmentation are optimized based on the segmentation results and error data accumulated in historical detection.

[0066] It should be noted that after completing one or more detection cycles, this method also includes a self-optimization process based on historical data to improve the accuracy and efficiency of subsequent detections. This process uses the segmentation results and corresponding error data accumulated in historical detections to iteratively update the core decision parameters.

[0067] Specifically, the system can optimize the judgment thresholds (e.g., the first sensitivity threshold and the second sensitivity threshold) used to determine the difference sensitivity level. The method includes: statistically analyzing the distribution and severity of actual errors in regions judged as having different sensitivity levels in historical detections; if a mismatch is found between the judgment results and the error severity (e.g., some error regions that should trigger high sensitivity analysis are misjudged as medium or low level), the judgment threshold value is dynamically adjusted to make the sensitivity level judgment more consistent with the actual error impact.

[0068] Simultaneously, the system can optimize the segmentation parameters used for multi-scale segmentation (e.g., the geometric consistency thresholds in the first, second, and third sets of parameters). The method includes analyzing the error separation effect and computational efficiency of the final region after recursive segmentation under different parameters. For example, if the current parameters used for high-sensitivity regions are found to be too strict, leading to a significant increase in computation time with limited error improvement, the threshold can be appropriately relaxed; conversely, if insufficient separation of certain error patterns is found, the threshold can be tightened. Through this type of feedback learning, the segmentation parameters adapt to the typical error patterns of a specific production line or workpiece type.

[0069] The above scheme categorizes the multi-scale segmented regions according to their geometric features (planes, holes, arcs, edges, etc.) and calculates corresponding specific geometric errors such as flatness, hole diameter, roundness, and straightness. This results in a structured and engineered zoning inspection report that can be directly used for quality assessment and process guidance. A self-optimization mechanism is also introduced, which iteratively optimizes the sensitivity threshold and segmentation parameters based on historical data. This enables the system to self-improve and adapt to different workpiece types and process requirements, enhancing the method's versatility, accuracy, and long-term applicability.

[0070] The present invention also provides a plate error detection system based on point cloud segmentation and shape difference, for implementing a plate error detection method based on point cloud segmentation and shape difference. The system includes a control module, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the plate error detection method based on point cloud segmentation and shape difference.

[0071] This invention provides a storage medium storing a program that, when executed by a processor, implements a plate error detection method based on point cloud segmentation and shape differences.

[0072] This invention provides a processor for running a program, wherein the program executes a plate error detection method based on point cloud segmentation and shape differences.

[0073] This invention provides a device including a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, it implements a plate error detection method based on point cloud segmentation and shape differences. The device described herein can be a server, PC, PAD, mobile phone, etc.

[0074] This application also provides a computer program product that, when executed on a data processing device, is suitable for performing a plate error detection method based on point cloud segmentation and shape differences.

[0075] Those skilled in the art will understand that embodiments of this application can provide methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0076] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0077] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0078] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0079] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0080] Memory may include non-persistent memory in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, like read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.

[0081] Computer-readable media include both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0082] It should also be noted that the terms "comprising," "including," 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 process, method, article, or apparatus. Unless otherwise specified, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes that element.

[0083] The above are merely embodiments of this application and are not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

Claims

1. A sheet error detection method based on point cloud segmentation and shape difference, characterized in that, include: The three-dimensional point cloud of the measured workpiece is globally aligned with the theoretical model to establish a unified detection benchmark. Based on the detection benchmark, the directed distance between each measurement point in the three-dimensional point cloud and the geometric surface defined by the theoretical model is calculated; A spatial continuous error field is constructed based on the directed distance, and the three-dimensional point cloud is initially segmented to obtain multiple initial segmentation units. The segmentation scale of the corresponding initial segmentation unit is determined based on the gradient change of the spatial continuous error field in each initial segmentation unit. The segmentation scale is defined hierarchically to obtain the difference sensitivity level of each initial segmentation unit, and multi-scale segmentation is performed on the initial segmentation unit according to the difference sensitivity level; For each segmented region after multi-scale segmentation, based on the detection benchmark, the geometric error of each segmented region relative to the theoretical model is calculated to obtain the partition error detection result of the plate.

2. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, The construction of a spatially continuous error field based on the directed distance includes: Spatial interpolation and smooth reconstruction are performed on discrete directed distances to form a continuous error distribution function. Among them, at least one of weighted neighborhood averaging, local least squares fitting, and voxel grid-based interpolation reconstruction is used for smooth reconstruction to suppress measurement noise and obtain spatially continuous error field data.

3. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, The initial segmentation of the 3D point cloud includes: Calculate the normal vector and curvature values ​​corresponding to each measurement point of the three-dimensional point cloud; Set thresholds for the angle between normal vectors and the curvature difference corresponding to the region growth rule; In a 3D point cloud, a seed point is selected, and the geometric continuity of the neighboring measurement points is determined based on the set normal vector angle threshold and the curvature difference threshold. Points in the neighborhood whose normal vectors and curvatures both satisfy the continuity condition are merged and expanded to grow into a single initial segmentation unit; New seed points are selected and growth operations are performed repeatedly until all 3D point cloud measurement points are divided and classified, resulting in multiple initial segmentation units.

4. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, The step of determining the segmentation scale of the corresponding initial segmentation unit based on the gradient change of the spatial continuous error field within each initial segmentation unit includes: For each initial segmentation unit, a set of sampling points is selected within it; Calculate the gradient vector of the spatially continuous error field at each sampling point in the sampling point set; Based on the gradient vector, calculate the gradient strength index, which characterizes the degree of drastic change in error within the initial segmentation unit; Based on the value of the gradient strength index, the corresponding segmentation scale is determined, wherein the selection of the segmentation scale is inversely proportional to the value of the gradient strength index.

5. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, The hierarchical definition of the segmentation scale yields the difference sensitivity level of each initial segmentation unit, including: Based on the preset first sensitivity threshold and second sensitivity threshold, the segmented scale determined based on the gradient strength index is mapped to the corresponding difference sensitivity level; If the value of the gradient strength index is less than the first sensitivity threshold, it is mapped to a low sensitivity level. If the value of the gradient strength index is greater than or equal to the first sensitivity threshold and less than or equal to the second sensitivity threshold, it is mapped to a medium sensitivity level. If the value of the gradient strength index is greater than the second sensitivity threshold, it is mapped to a high sensitivity level.

6. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, The step of performing multi-scale segmentation on the initial segmentation unit based on the difference sensitivity level includes: For the initial segmentation units with high sensitivity levels, recursive segmentation is performed using the first set of segmentation parameters; For the initial segmentation unit with medium sensitivity level, recursive segmentation is performed using the second set of segmentation parameters, where the geometric consistency threshold of the second set of segmentation parameters is greater than that of the first set of segmentation parameters. For initial segmentation units with low sensitivity levels, the current segmentation result is maintained or recursive segmentation is performed using a third set of segmentation parameters, wherein the geometric consistency threshold of the third set of segmentation parameters is greater than that of the second set of segmentation parameters.

7. The plate error detection method based on point cloud segmentation and shape difference according to claim 6, characterized in that, The stopping condition for the recursive partitioning includes at least one of the following: The improvement in error of the current segmented region is less than the preset improvement threshold; The number of point clouds in the current segmented region is less than the preset minimum number of points threshold; The preset maximum segmentation level has been reached.

8. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, The calculation of the geometric error of each segmented region relative to the theoretical model includes at least one of the following: For a segmented region that is determined to be a plane, calculate its flatness error and / or offset relative to the theoretical plane; For the segmented region that is determined to be a circular hole or a circular arc, calculate at least one of its hole diameter error, roundness error, and center position deviation; For segmented regions identified as edges, calculate their straightness error and / or boundary offset.

9. The plate error detection method based on point cloud segmentation and shape difference according to claim 1, characterized in that, Also includes: Based on the segmentation results and error data accumulated in historical detection, the judgment threshold used to determine the difference sensitivity level and / or the segmentation parameters used to perform the multi-scale segmentation are optimized.

10. A plate error detection system based on point cloud segmentation and shape differences, characterized in that, The system includes a control module, which includes a memory, a processor, and a computer program stored in the memory and executable on the processor. The processor executes the computer program to implement the plate error detection method based on point cloud segmentation and shape difference according to any one of claims 1-9.