Workpiece three-dimensional model construction and processing method based on binocular vision detection data

By combining a density-sensing dynamic registration framework using a binocular camera and a line laser, along with an improved coherent point drift fine registration algorithm, the problems of low efficiency and insufficient accuracy in existing detection technologies are solved. This enables the rapid construction of 3D models of workpieces and the extraction of key features, thus meeting the detection requirements of high-speed production lines.

CN121962439APending Publication Date: 2026-05-01SHENSI TANGIBLE (CHENGDU) TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610022171.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-01-08
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing detection technologies in high-end manufacturing suffer from low detection efficiency, insufficient accuracy, inability to meet real-time requirements, and lack of specialized analysis of key workpiece features, making it difficult to achieve closed-loop management from detection to optimization.

Method used

By combining a binocular camera with a line laser, and employing a density-aware dynamic registration framework and an improved coherent point drift fine registration algorithm, functional feature parameters of the workpiece are extracted through the acquisition, registration, fusion, and feature-preserving modeling of multi-view point cloud data.

Benefits of technology

It achieves high-precision and high-speed construction of workpiece 3D models, enabling rapid acquisition of key feature information of workpieces during online inspection, meeting the real-time and precision requirements of high-end manufacturing, and providing accurate inspection data support.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121962439A_ABST
    Figure CN121962439A_ABST
Patent Text Reader

Abstract

The invention discloses a workpiece three-dimensional model construction and processing method based on binocular vision detection data, and the method comprises the steps: firstly carrying out the multi-angle synchronous scanning of a workpiece through employing a combination of a binocular camera and a line laser, and obtaining the multi-view three-dimensional point cloud data of the surface of the workpiece; and constructing a density sensing type dynamic registration framework, and performing distance weighted fusion and outlier elimination on the registered multi-view point clouds in an overlapping region to generate a complete workpiece point cloud. A feature retention type point cloud direct modeling strategy is adopted, normal vector optimization is performed on a down-sampling point cloud, key feature marks are manufactured, a lightweight three-dimensional model is generated through color coding rendering, and a large amount of calculation of traditional surface reconstruction is avoided. And finally, based on model coordinate system calibration and point cloud fitting optimization, extracting functional characteristic parameters of edge straightness, datum plane flatness and hole system position degree, and completing workpiece quality evaluation. According to the method, the point cloud processing speed and the key feature analysis precision are improved, and the real-time requirement of industrial online detection is met.
Need to check novelty before this filing date? Find Prior Art

Description

Method for constructing and processing 3D models of workpieces based on binocular vision inspection data Technical Field

[0001] This invention belongs to the field of visual inspection technology, specifically relating to a method for constructing and processing a 3D model of a workpiece based on binocular visual inspection data. Background Technology

[0002] In the process of modern industry transforming towards intelligent manufacturing, the quality of workpiece components directly determines the performance, reliability, and safety of the final product. This is especially true in high-end fields such as aerospace and precision automotive manufacturing, where the requirements for dimensional accuracy and structural integrity of workpieces are even more stringent. Therefore, comprehensive and effective inspection of workpiece components is a crucial link in industrial production. Inspection not only promptly identifies defective products, preventing defective workpieces from entering subsequent assembly or use stages and reducing safety hazards and economic losses caused by product failures, but also, by collecting and analyzing inspection data, provides feedback to the production process, helping technicians identify deviations and deficiencies in the production process, optimize process parameters, improve the stability and consistency of the production process, and provide data support for flexible production models, adapting to the production and inspection needs of different specifications and types of workpieces, thus promoting the development of manufacturing towards high efficiency, precision, and intelligence.

[0003] Currently, industrial inspection methods are mainly divided into two categories: contact and non-contact. Contact measurement, represented by coordinate measuring machines (CMMs), is used in precision inspection due to its high measurement accuracy. However, it requires direct contact with the workpiece surface during the inspection process, resulting in low inspection efficiency and difficulty in meeting the continuous online inspection requirements of mass production scenarios. In non-contact inspection solutions, monocular cameras rely on complex algorithms to infer depth information, which is easily affected by ambient light, leading to inaccurate data. Although lidar can directly acquire three-dimensional point clouds, the point cloud density is low, and its ability to capture subtle features such as micro-holes and thin-walled edges of workpieces is insufficient. While multi-sensor solutions combining binocular cameras and lasers have been optimized at the data acquisition level, subsequent data processing still faces many challenges.

[0004] The numerous shortcomings of existing inspection technologies severely restrict the large-scale application of online inspection in high-end manufacturing. In the point cloud registration stage, the traditional ICP algorithm is extremely sensitive to initial pose. When the overlap rate of point clouds from adjacent viewpoints is low or the initial deviation is large, it is prone to getting trapped in local optima, leading to registration failure. While the standard CPD algorithm has some robustness, it does not consider differences in point cloud density, resulting in slow convergence when processing point clouds of complex surface workpieces, failing to meet the time requirements of real-time inspection. In the 3D model generation stage, although Poisson reconstruction technology can generate topologically complete models, it requires extensive mesh subdivision calculations, placing high demands on hardware computing power and resulting in excessively long modeling times. While the Alpha shape method has lower computational requirements, it easily loses key features such as sharp edges and small protrusions of the workpiece, making it difficult to balance model accuracy and generation speed. In the feature analysis stage, most existing systems only focus on measuring the overall dimensions of the workpiece and lack specialized analysis modules for key functional features such as the flatness of the reference surface, the straightness of the edges, and the position of the hole system. As a result, the detection results cannot directly provide accurate data support for process optimization, making it difficult to achieve closed-loop management from detection to optimization. At the same time, the low efficiency of contact detection and the limitations of data from single non-contact sensors also make it impossible to meet the dual requirements of high-speed production lines for detection accuracy and efficiency. Summary of the Invention

[0005] To address the problems existing in the prior art, this invention provides a method for constructing and processing a 3D model of a workpiece based on binocular vision inspection data. By combining the advantages of a binocular camera and a line laser, it effectively compensates for the shortcomings of a single sensor in terms of depth information acquisition or point cloud density.

[0006] The technical solution adopted in this invention is as follows:

[0007] In a first aspect, the present invention discloses a method for constructing and processing a three-dimensional model of a workpiece based on binocular vision inspection data, comprising the following steps:

[0008] A combination of a binocular camera and a line laser is used to perform multi-angle synchronous scanning of the workpiece to obtain multi-view three-dimensional point cloud data of the workpiece surface.

[0009] Then, a density-aware dynamic registration framework is constructed. The framework is based on the coarse registration of fast point feature histogram and the improved coherent point drift fine registration, and introduces the local density adaptive weight factor of point cloud and momentum acceleration convergence mechanism in the fine registration iteration process to achieve high-precision alignment between point clouds from adjacent viewpoints.

[0010] Then, distance-weighted fusion and outlier removal are performed on the registered multi-view point clouds in the overlapping areas to generate a complete workpiece point cloud. A feature-preserving point cloud direct modeling strategy is adopted to optimize the normal vectors and mark the key manufacturing features of the downsampled point cloud. A lightweight 3D model is generated by color-coded rendering.

[0011] Finally, based on model coordinate system calibration and point cloud fitting optimization, functional feature parameters such as edge straightness, datum surface flatness, and hole system position are extracted to complete the workpiece quality assessment.

[0012] In conjunction with the first aspect, the present invention provides a first embodiment of the first aspect, wherein in the combination of the binocular camera and the line laser, the binocular camera is an industrial camera with a resolution of not less than 2 million pixels and a frame rate of not less than 30fps.

[0013] The line laser has an output wavelength of 650nm, a laser line width of no more than 1mm, and a dynamically adjustable scanning frequency range of 50-200Hz. The multi-angle synchronous scanning is achieved by rotating or translating the workpiece, and the overlap rate of adjacent viewing angles is controlled in the range of 20%-40%.

[0014] In conjunction with the first aspect, the present invention provides a second embodiment of the first aspect, wherein the multi-view three-dimensional point cloud data is obtained by calculation through the principle of binocular stereo vision triangulation, the point cloud data of each view is stored in an independent coordinate system, and the corresponding laser scanning angle and camera pose parameters are recorded.

[0015] In conjunction with the first aspect, the present invention provides a third embodiment of the first aspect, wherein the coarse registration based on FPFH specifically comprises:

[0016] FPFH feature descriptors are extracted from point clouds from adjacent viewpoints. The RANSAC algorithm is used for global feature matching and the initial rigid body transformation matrix is ​​calculated iteratively. This reduces the initial pose deviation of adjacent point clouds from millimeters to less than 1mm, providing a stable initial alignment state for fine registration.

[0017] In conjunction with the first aspect, the present invention provides a fourth embodiment of the first aspect, wherein the improved coherence point drift fine registration is specifically as follows:

[0018] Based on the Gaussian mixture model of the standard CPD algorithm, a density adaptive weighting factor is introduced. This factor dynamically adjusts the matching weight of each corresponding point according to the ratio of local point density between the target point cloud and the source point cloud in the current iteration. The region with higher point density has a larger weighting coefficient.

[0019] Simultaneously, a momentum acceleration term is introduced, which weights and accumulates the displacement vectors of the first three iterations to the current iteration step size, with the weight decay coefficient set to 0.5-0.8.

[0020] In conjunction with the fourth implementation of the first aspect, the present invention provides a fifth implementation of the first aspect, wherein the local density of the point cloud is calculated by K-nearest neighbor search, the K value is 10-20, the density adaptive weight factor is updated in real time in each CPD iteration, and the total number of iterations of the dynamic registration framework is controlled to be 50-100 times.

[0021] In conjunction with the first aspect, the present invention provides a sixth embodiment of the first aspect, wherein the distance-weighted fusion specifically comprises:

[0022] Point clouds closer to the camera's optical center within the overlapping area are assigned a weight coefficient of 1.0, while point clouds farther away are assigned weight coefficients of 0.3-0.5. The fused points are then generated by weighted averaging.

[0023] The outlier removal uses a statistical filtering algorithm, setting a 3σ threshold to remove outliers that deviate from the mean by more than three standard deviations.

[0024] In conjunction with the first aspect, the present invention provides a seventh embodiment of the first aspect, wherein the feature-preserving point cloud direct modeling strategy is specifically as follows:

[0025] Principal component analysis is used to optimize the normal vector calculation of the downsampled point cloud. Key feature points are generated based on the normal vector mutation and curvature value marking. The reference plane is marked as a blue point cloud cluster, the edge contour is marked as a green point cloud cluster, and the hole system feature is marked as a red point cloud cluster. A visual 3D model without triangulation is directly generated through the OpenGL or Vulkan rendering pipeline.

[0026] In conjunction with the first aspect, the present invention provides an eighth embodiment of the first aspect, wherein the extraction of the functional feature parameters specifically comprises:

[0027] The RANSAC algorithm is used to fit three-dimensional straight lines to the point cloud of the marked edges, the deviation between the actual length and the design length of the straight line segment is calculated, and the minimum region method is used to calculate the straightness error of the edge.

[0028] The least squares method is used to fit the point cloud of the marked plane, the distance deviation from the point to the fitted plane is calculated, and the maximum deviation, average deviation and root mean square deviation are statistically analyzed to evaluate the flatness of the plane.

[0029] The center coordinates of the hole system are extracted using Hough transform or template matching method, and the hole diameter deviation and position error are calculated.

[0030] The beneficial effects of this invention are as follows:

[0031] (1) By combining the advantages of binocular cameras and line lasers, this invention effectively makes up for the shortcomings of single sensors in depth information acquisition or point cloud density. The acquired point cloud data can accurately reflect the three-dimensional information of the workpiece surface and has strong anti-environment interference capability, laying a good foundation for subsequent point cloud processing and modeling work.

[0032] (2) The present invention uses a two-level registration strategy of coarse registration and improved fine registration algorithm to ensure the stability of the initial alignment and improve the convergence speed of the registration process by optimizing and adjusting the fine registration algorithm. While ensuring the registration accuracy, it significantly shortens the registration time and meets the real-time requirements of online detection.

[0033] (3) The present invention adopts a strategy of direct point cloud modeling combined with feature enhancement, which abandons the complex calculation process of traditional surface reconstruction technology. While shortening the model generation time, it effectively retains the key feature information of the workpiece, avoids the problem of feature loss, and adapts to the detection rhythm of high-speed pipelines. Attached Figure Description

[0034] Figure 1 is a schematic diagram of the generated model after point cloud stitching in an embodiment of the present invention;

[0035] Figure 2 is a schematic diagram of edge point extraction based on normal vector information in an embodiment of the present invention;

[0036] Figure 3 is a flowchart of the method in an embodiment of the present invention. Detailed Implementation

[0037] The present invention will be further explained below with reference to the accompanying drawings and specific embodiments.

[0038] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. The components of the embodiments of this application described and shown in the accompanying drawings can generally be arranged and designed in various different configurations.

[0039] Therefore, the following detailed description of the embodiments of this application provided in the accompanying drawings is not intended to limit the scope of the claimed application, but merely to illustrate selected embodiments of the application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0040] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.

[0041] In the description of this application, it should be noted that the use of terms such as "center," "upper," "lower," "left," "right," "vertical," "horizontal," "inner," and "outer" to indicate orientation or positional relationships is based on the orientation or positional relationships shown in the accompanying drawings, or the orientation or positional relationships commonly used when the product is in use. These terms are used solely for the convenience of describing this application and for simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this application. Furthermore, the use of terms such as "first" and "second" in the description of this application is only used to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0042] Furthermore, the use of terms such as "horizontal" and "vertical" in the description of this application does not imply that the component is required to be absolutely horizontal or suspended, but rather that it may be slightly tilted. For example, "horizontal" simply means that its direction is more horizontal relative to "vertical," and does not mean that the structure must be completely horizontal, but rather that it may be slightly tilted.

[0043] In the description of this application, it should also be noted that, unless otherwise expressly specified and limited, the terms "set up," "install," "connect," and "link" should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral connection; they can refer to a mechanical connection or an electrical connection; they can refer to a direct connection or an indirect connection through an intermediate medium; and they can refer to the internal connection between two components. Those skilled in the art can understand the specific meaning of the above terms in this application based on the specific circumstances.

[0044] Example 1:

[0045] This embodiment provides a method for constructing and processing a 3D model of a workpiece based on binocular vision inspection data, which is mainly applicable to typical application scenarios of online quality inspection in automotive engine cylinder head production lines.

[0046] It should be noted that the engine cylinder head, as a complex casting containing intake manifold, exhaust manifold, combustion chamber, cooling water jacket and dense bolt hole system, has key functional characteristics whose precision directly affects engine performance and sealing reliability, such as combustion chamber surface profile, cylinder head mating surface flatness, and valve guide hole position accuracy.

[0047] Traditional coordinate measuring machines (CMMs) take more than 15 minutes per inspection, which cannot meet the annual production cycle requirements. The method used in this embodiment achieves full-process automation from multi-view point cloud acquisition to functional feature analysis by constructing a density-aware dynamic registration framework. It can complete three-dimensional morphology inspection and key dimension determination immediately after the engine cylinder head leaves the casting process.

[0048] Specifically:

[0049] First, a binocular laser scanning system is used to perform a four-view circular scan on the cylinder head fixed to the rotating fixture to obtain an initial point cloud data cluster covering the entire surface. Then, under the density-aware dynamic registration framework, FPFH feature coarse registration is performed on the point clouds of adjacent viewpoints to quickly establish the initial spatial alignment relationship and compress the rotation and translation error between viewpoints from the millimeter level to the sub-millimeter level.

[0050] Based on this, an improved CPD fine registration engine was launched. This engine embeds an adaptive weight factor for local point cloud density into the Gaussian mixture model of the standard coherent point drift algorithm. By calculating the K-nearest neighbor density ratio of the target point cloud and the source point cloud in the registration overlap area in real time, the contribution weight of each matching point pair is dynamically adjusted, so that the dense point cloud area of ​​the cylinder head combustion chamber is strengthened by 1.5 times, while the weight of the sparse area of ​​the water jacket is reduced to 0.6 times, effectively suppressing the registration oscillation caused by uneven density.

[0051] Meanwhile, a momentum acceleration convergence mechanism is introduced, which accumulates the optimal displacement vectors from the first three iterations to the current step size with attenuation coefficients of 0.7, 0.5, and 0.3, thereby increasing the algorithm's convergence speed by 35%, stabilizing the registration time to within 1.5 seconds, and achieving a registration accuracy of 0.015mm.

[0052] After registration, distance-weighted fusion is performed on the four-view point clouds in the overlapping area: weights are assigned according to the Euclidean distance from the point to the camera optical center, where the weight is 1.0 for distances <300mm, 0.6 for distances between 300-500mm, and 0.3 for distances >500mm; after weighted averaging, a fused point cloud without redundancy is generated, and 3σ statistical filtering is used to remove outlier noise points.

[0053] Subsequently, feature-preserving direct modeling was performed on the fused point cloud. The normal vector calculation was optimized by PCA, and the normal vector angle mutation (>30°) and curvature threshold (>0.1) were automatically labeled. The combustion chamber outline was green, the cylinder head mating surface was blue, and the bolt hole edge was red. The lightweight 3D model was directly generated using the OpenGL rendering pipeline, without the need for Poisson surface reconstruction which takes more than 30 seconds.

[0054] Finally, the model is transformed to the cylinder head design coordinate system through calibration. The least squares method is used to fit the mating surface plane and calculate the flatness error. RANSAC is used to fit the valve guide hole axis and calculate the positional deviation. Finally, a digital inspection report containing flatness, straightness, and positional accuracy is output. The entire process takes about 50 seconds, meeting the real-time inspection requirements of the production line.

[0055] This embodiment has good engineering applicability in scenarios with complex structures, high-density features, and strong real-time constraints. Its core lies in the coupling of density perception and momentum feedback mechanisms, which solves the problem that traditional registration algorithms cannot achieve both accuracy and speed in industrial point cloud density uneven scenarios, and provides a framework foundation for subsequent feature expansion.

[0056] Example 2:

[0057] This embodiment addresses a perforated bracket-type workpiece, which includes an L-shaped body measuring 250mm × 150mm, three reinforcing ribs, twelve 8mm diameter mounting holes, and four 12mm diameter positioning holes. A further preferred implementation process is proposed, referring to Figures 1-3, as follows:

[0058] Step S101: Multi-view point cloud data acquisition

[0059] The workpiece to be tested is fixed on an automated rotating platform and scanned using a combination of a binocular camera and a line laser.

[0060] The binocular camera has a resolution of 2048×1536 pixels, a frame rate of 30fps, and a baseline distance of 120mm; the line laser has a wavelength of 650nm, a line width of 0.8mm, a power of 100mW, and a scanning frequency of 100Hz. The rotating platform is controlled to rotate 6 times at 60° intervals to obtain 6 viewing angles. At each viewing angle, the laser projects a line laser beam, and the binocular camera synchronously acquires the laser stripe image.

[0061] The three-dimensional coordinates of each pixel are calculated using the principle of binocular stereo vision triangulation, generating 6 sets of independent point cloud data, and recording the rotation angle, camera exposure time and laser intensity parameters corresponding to each set of point cloud.

[0062] Step S201: Coarse registration of FPFH features

[0063] First, the two point clouds are downsampled to 50,000 points respectively. For each downsampled point, the nearest neighbor points within a radius of 5mm are searched, and the FPFH feature descriptor of its 33-dimensional vector is calculated.

[0064] Then, the RANSAC global matching algorithm was used, with 5000 iterations, 3 pairs of sampling points, and a distance threshold of 0.5mm, to find the rigid body transformation matrix that aligns the most FPFH feature points.

[0065] In this embodiment, RANSAC finds the optimal solution after 3247 iterations, obtaining the initial transformation matrix T_coarse. After transforming the point cloud at viewpoint 2, the average distance between it and the point cloud at viewpoint 1 decreases from the initial 5.2mm to 0.8mm, satisfying the fine registration start condition.

[0066] Step S301: Improve the CPD algorithm for precise registration

[0067] Based on the coarse registration, an improved coherent point drift fine registration is initiated, setting the point cloud of view 1 as the target point cloud X and the point cloud of view 2 as the source point cloud Y, and performing the following iterative optimization:

[0068] Density-adaptive weighting factor calculation:

[0069] For each point yi in X and Y, search for its 15 nearest neighbors and calculate the local density:

[0070] ρ(yi) = 15 / (average distance of 15 neighboring points)

[0071] Define weighting factors:

[0072] w(yi)=ρ(yi) / ρ_max

[0073] Where ρ_max is the maximum density value among all points.

[0074] In this embodiment, the edge area of ​​the bracket mounting hole has ρ_max = 800 points / mm³, and the weight w = 1.0; the L-shaped main body plane area has ρ = 400 points / mm³, and the weight w = 0.5; the dark area away from laser irradiation has ρ = 150 points / mm³, and the weight w = 0.19.

[0075] This weighting factor is updated in real time during each iteration and is embedded in the objective function of the CPD algorithm:

[0076] E=∑w(yi)·P(yi|xj)·||xj-(R·yi+t)||²

[0077] This increases the contribution of the high-density pore system region to the registration objective function by 3-5 times.

[0078] Momentum acceleration convergence mechanism:

[0079] Record the optimal displacement vectors Δt_{k-1}, Δt_{k-2}, and Δt_{k-3} for the (k-1)th, (k-2)th, and (k-3)th iterations, respectively. The current iteration step size is corrected as follows:

[0080] Δt_k'=Δt_k+0.7·Δt_{k-1}+0.5·Δt_{k-2}+0.3·Δt_{k-3}

[0081] The rotation matrix R works similarly. This mechanism enables the CPD algorithm in this embodiment to converge after 58 iterations, with the registration error stabilizing at 0.012mm and a total time of 1.8 seconds. Compared to the standard CPD algorithm, which requires 92 iterations and takes 2.7 seconds, the efficiency is improved by 33%.

[0082] After iterative convergence, the fine registration transformation matrix T_fine is obtained, which aligns the point clouds of the two views to the same coordinate system. The average spacing of the point clouds in the overlapping area after registration is 0.05mm.

[0083] Step S401: Weighted fusion and outlier removal

[0084] Global stitching is performed on the six finely registered point clouds. In the overlapping region of any two adjacent point clouds, distance-weighted fusion is performed on point pairs with a distance difference less than 0.1 mm: if the distance from a point to its corresponding camera optical center is d (in mm), then its fusion weight w_fus = 1 / (1 + 0.001·d), with greater weight for closer points. The fused points generate a complete workpiece point cloud.

[0085] Then, statistical filtering was used to remove outliers: for each point, 20 nearest neighbors were searched, the average distance μ and standard deviation σ were calculated, and points with a distance greater than μ+3σ were removed.

[0086] In this embodiment, more than 1,200 outliers were removed, and 448,000 valid point clouds were retained. Figure 1 shows the complete 3D point cloud model of the support workpiece generated after splicing.

[0087] Step S501: Direct Modeling of Feature-Preserving Point Clouds

[0088] The stitched point cloud was downsampled using a voxel grid with a voxel size of 0.2 mm, resulting in a simplified point cloud of approximately 120,000 points. Principal component analysis was used to optimize the normal vector calculation for each point, searching for nearest neighbors within a 15 mm radius. The eigenvector corresponding to the smallest eigenvalue of the covariance matrix was then used as the normal vector.

[0089] Key manufacturing feature labeling based on the angle between normal vectors and curvature:

[0090] Reference plane (L-shaped main body bottom surface): normal vector angle <10° and curvature <0.05, marked as blue point cloud clusters.

[0091] Edge contour (intersection of reinforcing rib and main body): normal vector angle > 30° and curvature > 0.1, marked as green point cloud cluster.

[0092] Hole characteristics (edges of 12 mounting holes): Normal vectors are radially distributed with abrupt curvature changes > 0.15, marked as red point cloud clusters.

[0093] After marking is completed, the OpenGL rendering pipeline is used to skip the triangulation process and directly generate a visual 3D model based on the point cloud and normal vectors. Different colors intuitively distinguish each functional area, and the model generation takes only 0.3 seconds.

[0094] Step S601: Model coordinate system calibration and accuracy optimization

[0095] The rendered model is transformed to the workpiece design coordinate system. The theoretical centers of three 12mm diameter positioning holes on the workpiece surface are selected as references. The transformation matrix T_calib is calculated using the three-point alignment method to ensure that the deviation between the model coordinate system and the design coordinate system is less than 0.005mm.

[0096] The least squares method was used to fit the marked blue reference plane point cloud to the plane, and the plane equation ax+by+cz+d=0 was obtained. The distance deviation from each point to the plane was calculated. After fitting optimization, the flatness error was corrected from the initial 0.08mm to 0.03mm.

[0097] Step S701: Analysis of edge straightness and plane flatness

[0098] Edge straightness analysis:

[0099] Green edge contour point cloud was extracted, and 3D straight line segments were fitted using the RANSAC algorithm. The interior point threshold was set to 0.02 mm, and the random sampling was performed 1000 times.

[0100] In this embodiment, RANSAC successfully fitted four main edges, calculated the deviation between the actual length and the design length of each edge, and used the minimum region method to calculate the straightness error: two parallel straight lines were drawn to encompass the point cloud of the edge, and the minimum encompassing width was the straightness error. The measured straightness error of the main edges was 0.032 mm / m, which meets the design requirement of ≤0.05 mm / m.

[0101] Plane flatness analysis:

[0102] For the point cloud on the blue reference plane, the distance deviation from all points to the fitted plane was statistically analyzed. The maximum deviation was 0.08 mm, the average deviation was 0.025 mm, and the root mean square deviation was 0.032 mm. The plane flatness was evaluated as 0.03 mm / 100 mm², which is better than the design standard of ≤0.1 mm / 100 mm². This part refers to the point cloud extraction for the model shown in Figure 2.

[0103] Step S801: Analysis of Hole System Position and Diameter Deviation

[0104] For the feature point cloud of the red hole system, the Hough circle transform is used to detect the two-dimensional projection center of each mounting hole, and then the three-dimensional hole center coordinates are reconstructed through depth information.

[0105] The deviation between the actual center coordinates and the design coordinates of the 12 mounting holes was calculated. The maximum positional error was 0.06 mm, which meets the IT8 tolerance requirement. At the same time, the hole diameter was fitted, and the average diameter of the 12 holes was 8.02 mm, which deviates from the design value by +0.02 mm, all within the tolerance zone.

[0106] Step S901: Test report generation and non-conforming product alarm

[0107] All the above analysis results are integrated into a digital inspection report, including parameters such as: workpiece ID, inspection time, registration accuracy, model integrity, flatness, edge straightness, hole position accuracy, and diameter deviation. If any parameter exceeds the tolerance, the system automatically triggers an audible and visual alarm and sends an NG signal to the production line PLC, controlling the robotic arm to move the defective product to the rework station. In this embodiment, the total process time is 48 seconds, meeting the production line's 60-second cycle time requirement, and the inspection accuracy meets the online quality control needs of automotive bracket parts.

[0108] This invention is not limited to the optional embodiments described above, and anyone can derive other various forms of products based on the inspiration of this invention. The specific embodiments described above should not be construed as limiting the scope of protection of this invention; the scope of protection of this invention should be determined by the claims, and the specification can be used to interpret the claims.

Claims

1. A method for constructing and processing a 3D model of a workpiece based on binocular vision inspection data, characterized in that, Includes the following steps: A combination of a binocular camera and a line laser is used to perform multi-angle synchronous scanning of the workpiece to obtain multi-view three-dimensional point cloud data of the workpiece surface. Then, a density-aware dynamic registration framework is constructed. This framework is based on coarse registration using fast point feature histograms and fine registration using improved coherent point drift, and introduces an adaptive weighting factor for local point cloud density and a momentum-accelerated convergence mechanism during the fine registration iteration process to achieve high-precision alignment between point clouds from adjacent viewpoints. Next, distance-weighted fusion and outlier removal are performed on the registered multi-viewpoints in overlapping areas to generate a complete workpiece point cloud. A feature-preserving point cloud direct modeling strategy is adopted, and the downsampled point cloud undergoes normal vector optimization and manufacturing key feature marking. A lightweight 3D model is generated through color-coded rendering. Finally, based on model coordinate system calibration and point cloud fitting optimization, functional feature parameters such as edge straightness, datum surface flatness, and hole system position are extracted to complete the workpiece quality assessment.

2. The method for constructing and processing a 3D model of a workpiece based on binocular vision inspection data according to claim 1, characterized in that, In the combination of binocular camera and line laser, the binocular camera is an industrial camera with a resolution of not less than 2 million pixels and a frame rate of not less than 30fps; the line laser has an output wavelength of 650nm, a laser line width of not more than 1mm, and a dynamically adjustable scanning frequency range of 50-200Hz. The multi-angle synchronous scanning is achieved by rotating or translating the workpiece, and the overlap rate of adjacent viewing angles is controlled in the range of 20%-40%.

3. The method for constructing and processing a workpiece 3D model based on binocular vision inspection data according to claim 1, characterized in that, The multi-view 3D point cloud data is calculated using the principle of binocular stereo vision triangulation. The point cloud data for each view is stored in an independent coordinate system, and the corresponding laser scanning angle and camera pose parameters are recorded.

4. The method for constructing and processing a workpiece 3D model based on binocular vision inspection data according to claim 1, characterized in that, The coarse registration based on FPFH specifically involves: extracting FPFH feature descriptors from adjacent viewpoint point clouds, performing global feature matching using the RANSAC algorithm, iteratively calculating the initial rigid body transformation matrix, reducing the initial pose deviation of adjacent point clouds from millimeters to less than 1mm, and providing a stable initial alignment state for fine registration.

5. The method for constructing and processing a workpiece 3D model based on binocular vision inspection data according to claim 1, characterized in that, The improved coherent point drift fine registration is as follows: Based on the Gaussian mixture model of the standard CPD algorithm, a density adaptive weight factor is introduced. This factor dynamically adjusts the matching weight of each corresponding point according to the ratio of local point density between the target point cloud and the source point cloud in the current iteration. The region with higher point density has a larger weight coefficient. At the same time, a momentum acceleration term is introduced, which accumulates the displacement vectors of the previous three iterations to the current iteration step size with weights, and the weight decay coefficient is set to 0.5-0.

8.

6. The method for constructing and processing a workpiece 3D model based on binocular vision inspection data according to claim 5, characterized in that, The local density of the point cloud is calculated by K-nearest neighbor search, with K value ranging from 10 to 20. The density adaptive weight factor is updated in real time in each CPD iteration, and the total number of iterations of the dynamic registration framework is controlled to be 50-100.

7. The method for constructing and processing a 3D model of a workpiece based on binocular vision inspection data according to claim 1, characterized in that, The distance-weighted fusion specifically involves assigning a weight coefficient of 1.0 to point clouds closer to the camera's optical center within the overlapping area, and assigning a weight coefficient of 0.3-0.5 to point clouds farther away. The fusion points are then generated by weighted averaging. The outlier removal employs a statistical filtering algorithm with a 3σ threshold to remove outliers that deviate from the mean by more than three standard deviations.

8. The method for constructing and processing a workpiece 3D model based on binocular vision inspection data according to claim 1, characterized in that, The feature-preserving point cloud direct modeling strategy is as follows: principal component analysis is used to optimize the normal vector calculation of the downsampled point cloud, and key feature points are generated based on the normal vector mutation and curvature value marking. The reference plane is marked as a blue point cloud cluster, the edge contour is marked as a green point cloud cluster, and the pore system feature is marked as a red point cloud cluster. A visual 3D model without triangulation is directly generated through the OpenGL or Vulkan rendering pipeline.

9. The method for constructing and processing a 3D model of a workpiece based on binocular vision inspection data according to claim 1, characterized in that, The extraction of functional feature parameters specifically involves: using the RANSAC algorithm to perform three-dimensional straight line fitting on the point cloud of the marked edge, calculating the deviation between the actual length and the designed length of the straight line segment, and using the minimum region method to calculate the straightness error of the edge; using the least squares method to perform plane fitting on the point cloud of the marked plane, calculating the distance deviation from the point to the fitted plane, and statistically analyzing the maximum deviation, average deviation, and root mean square deviation to evaluate the plane flatness; and using the Hough transform or template matching method to extract the center coordinates of the hole system, and calculating the hole diameter deviation and positional error.