Laser-guided double-view-angle workpiece three-dimensional reconstruction and measurement method and system
Through the laser -guided dual -perspective three -dimensional reconstruction method, combined with the single -eye structure light and the three -dimensional reconstruction method of the two -dimensional eye, the integration and processing of point cloud data solve the problem of poor robustness after the integration of point cloud data in the existing technology. A more accurate three -dimensional reconstruction effect is achieved.
Patent Information
- Application Number
- CN202411584658.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-01-28
AI Technical Summary
In the existing three-dimensional reconstruction technology, binocular three-dimensional reconstruction is difficult to match feature points in smooth areas, and monocular structured light methods have blind spots, resulting in poor robustness after point cloud data fusion and cannot meet the requirements of three-dimensional reconstruction.
The three -dimensional reconstruction method of double -perspective workers guided by laser guidance is used to obtain point cloud data with a single line structure light and three -dimensional reconstruction methods through the combination of laser generator and camera. Combined with the RANSAC algorithm and the OpenCV function for data processing, calculate the final contour length.
It improves the steelation of point cloud data, allows it to meet the requirements of 3D reconstruction, and overcomes the problem of poor data robustness after the combination of the two -dimensional and monocular three -dimensional reconstruction methods.
Smart Images

Figure CN119379919A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of three-dimensional reconstruction, and in particular relates to a laser-guided dual-viewing angle workpiece three-dimensional reconstruction and measurement method and system. Background Art
[0002] 3D reconstruction technology is a process that uses computer technology to generate a 3D model from a 2D image or other data source. There are two main traditional 3D reconstruction technologies: binocular 3D reconstruction method and monocular line structured light 3D reconstruction method.
[0003] The disadvantage of binocular 3D reconstruction is that it is difficult to find effective feature points for matching in areas without significant textures, such as smooth metal surfaces, resulting in inaccurate disparity calculation.
[0004] The disadvantage of the monocular line structured light 3D reconstruction method is that the laser line scanning usually only covers a small area, which is prone to blind spots. Figure 4 and Figure 5 shown.
[0005] At present, the technical personnel in this field have not been able to fuse the point cloud data obtained by the above two methods to reconstruct the workpiece in three dimensions because the main difficulty lies in: the accuracy of the point cloud data of the above two methods is different. The point cloud with noise, outliers and complex geometric structures in the fused point cloud data will have a strong interference on the subsequent three-dimensional reconstruction results and poor robustness. Therefore, in order to fuse the point cloud data of the two methods, the fused point cloud data must be optimized to improve robustness. Summary of the invention
[0006] The laser-guided dual-viewing angle workpiece three-dimensional reconstruction and measurement method and system of the present invention can improve robustness.
[0007] A laser-guided dual-view workpiece three-dimensional reconstruction structure of the present invention comprises:
[0008] Laser generator, assuming that the laser plane emitted by the laser generator is a vertical plane; the moving direction of the workpiece is perpendicular to the laser plane;
[0009] The left camera and the right camera, located on both sides of the laser plane, are capable of capturing images of the workpiece.
[0010] A laser-guided dual-view workpiece three-dimensional reconstruction and measurement method comprises the following steps:
[0011] S1: Turn on the left camera and the laser generator, and turn off the right camera; use the monocular line structured light 3D reconstruction method to perform 3D reconstruction on the workpiece to obtain the point cloud data of the workpiece, and record the point cloud data as point cloud data A;
[0012] S2: Turn on the right camera and the laser generator, and turn off the left camera; use the monocular line structured light 3D reconstruction method to perform 3D reconstruction on the workpiece to obtain point cloud data of the workpiece, and record the point cloud data as point cloud data B;
[0013] S3: Turn on the left camera and the right camera, and turn off the laser generator; use the binocular 3D reconstruction method to perform 3D reconstruction on the workpiece, obtain point cloud data of the workpiece, and record the point cloud data as point cloud data C;
[0014] S4: transform point cloud data A, point cloud data B and point cloud data C to the same camera perspective through coordinate rotation and translation;
[0015] S5: perform point cloud registration and fusion on the point cloud data A, point cloud data B and point cloud data C under the same camera perspective; the fused point cloud data is recorded as point cloud data X;
[0016] S6: Process the point cloud data X based on the RANSAC algorithm;
[0017] S7: Use the findContours() function and drawContours() function in the opencv function to calculate the contour length of the final result.
[0018] Furthermore, step S6 further includes the following steps:
[0019] S6.1: Randomly select three non-collinear points in the point cloud data X, denoted as P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3); fit the three points into a plane, and set the plane equation to be ax+by+cz+d=0;
[0020] S6.2: Calculate any point P in the point cloud data X i (x i ,y i ,z i ) to the plane i ; The calculation formula is:
[0021]
[0022]
[0023] Among them, Π represents the indicator function; ε is the set threshold; K is the number of sampling points;
[0024] S6.3: Cycle S6.1-S6.2 for N times, and the three non-collinear points randomly selected in S6.1 are different each time; a total of N models are generated, and the number of internal points of the N models is recorded;
[0025] S6.4: Select the model with the largest number of inliers.
[0026] Furthermore, step S6 also includes:
[0027] S6.5: Model verification; S6.5 specifically includes the following steps:
[0028] S6.5.1: Calculate the intersection points of the model in S6.4; suppose there are v intersection points in total, denoted by {a1, a2, ..., a v};
[0029] S6.5.2: Calculate the geometric center a0 of the intersection point in the model using the formula:
[0030]
[0031] S6.5.3: Calculate the distance from the geometric center a0 to each intersection point, denoted as {d 10 , d 20 ,……,d v0};
[0032] S6.5.4: Calculate the model error using the formula:
[0033] v is an even number;
[0034] v is an odd number.
[0035] like Then the model in S6.4 is selected, and σ is set to 0.2; otherwise, it indicates that the fitting effect of the model in S6.4 is not good, and S6.1-S6.5 are cycled again until the model is selected;
[0036] Furthermore, in step S5, the solvePnp() function of OpenCV is used to convert the point cloud data A, the point cloud data B and the point cloud data C to the perspective of the left camera.
[0037] Furthermore, in step S6.2, ε is 0.1 cm.
[0038] Further, step S7 includes the following steps:
[0039] S7.1: Canny edge detection for 3D segmentation;
[0040] The specific steps include:
[0041] S7.1.1: Project the three-dimensional point cloud in S6 onto a two-dimensional plane, and the projected point cloud data is recorded as P;
[0042] S7.1.2: Map the point cloud data P into a two-dimensional depth image to obtain a grayscale image, where each pixel in the grayscale image represents the depth of the location;
[0043] S7.1.3: Apply Canny edge detection to the generated 2D depth image, using the findContours() and drawContours() functions in OpenCV to perform contour detection;
[0044] S7.2: Minimum rectangular bounding box calculation;
[0045] The specific steps include:
[0046] S7.2.1: Edge point extraction: extract edge points from the edge image obtained by Canny detection and convert them into a series of two-dimensional coordinate points;
[0047] S7.2.2: Compute the minimum rectangular bounding box
[0048] Use the coordinates of the edge points to calculate the minimum rectangular bounding box of the target object;
[0049] The specific steps include:
[0050] S7.2.2.1: Compute the convex hull; compute the convex hull of the edge points to obtain the smallest convex polygon that contains all the edge points;
[0051] S7.2.2.2: Rotate the caliper. By rotating the caliper, find the smallest rectangle that is tangent to the vertices of the convex hull.
[0052] S7.2.2.3: Calculate bounding box dimensions; calculate the length, width, and height of the object based on the vertices of the smallest rectangle.
[0053] Beneficial Effects
[0054] 1. This solution fuses the fused binocular 3D reconstruction point cloud data and the monocular laser 3D point cloud data, and processes the fused point cloud data based on the RANSAC algorithm so that it can meet the 3D reconstruction requirements.
[0055] 2. It overcomes the problem in the prior art that the data robustness after the fusion of binocular 3D reconstruction point cloud data and monocular laser 3D point cloud data is poor and cannot meet the requirements of 3D reconstruction. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] Figure 1 Schematic diagram of the three-dimensional reconstruction method.
[0057] Figure 2 This is the point cloud data diagram after three-dimensional reconstruction of the second embodiment.
[0058] Figure 3 It is the point cloud data map after binocular 3D reconstruction;
[0059] Figure 4 It is a schematic diagram of the structure of single-line structured light 3D reconstruction;
[0060] Figure 5 It is a schematic diagram of the structure when the single-line structured light 3D reconstruction is blocked. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the accompanying drawings. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0062] Example 1: See Figure 1 A laser-guided dual-view workpiece 3D reconstruction and measurement system includes a laser generator that can emit a laser plane. In this embodiment, the laser plane is a vertical plane that can illuminate the workpiece on the stepping platform. The moving direction of the workpiece on the stepping platform is perpendicular to the laser plane. The 3D reconstruction structure also includes two cameras, which are located on both sides of the laser plane and can respectively capture images of the laser on the workpiece. The two cameras are respectively denoted as a left camera and a right camera.
[0063] Embodiment 2: A laser-guided dual-view workpiece 3D reconstruction and measurement method, comprising the following steps:
[0064] S1: Turn on the left camera and the laser generator, and turn off the right camera; use the monocular line structured light 3D reconstruction method to perform 3D reconstruction on the workpiece to obtain the point cloud data of the workpiece, and record the point cloud data as point cloud data A;
[0065] The monocular line structured light three-dimensional reconstruction method belongs to the existing technology, including: camera calibration, reference external parameter calculation, light plane calibration, mobile device calibration, laser image centerline extraction, depth calculation and point cloud drawing.
[0066] S2: Turn on the right camera and the laser generator, and turn off the left camera; use the monocular line structured light 3D reconstruction method to perform 3D reconstruction on the workpiece to obtain point cloud data of the workpiece, and record the point cloud data as point cloud data B;
[0067] S3: Turn on the left camera and the right camera, and turn off the laser generator; use the binocular 3D reconstruction method to perform 3D reconstruction on the workpiece, obtain point cloud data of the workpiece, and record the point cloud data as point cloud data C;
[0068] S4: transform point cloud data A, point cloud data B and point cloud data C to the same camera perspective through coordinate rotation and translation;
[0069] The three-dimensional coordinates in point cloud data A, point cloud data B, and point cloud data C are all world coordinates in the world coordinate system, but the perspectives of point cloud data A, point cloud data B, and point cloud data C are different. For example, point cloud data A is the world coordinate from the perspective of the left camera; point cloud data B is the world coordinate from the perspective of the right camera; point cloud data C may be the world coordinate from the perspective of the left camera or the perspective of the right camera.
[0070] Therefore, the three point cloud data need to be converted into world coordinates under the same perspective before the point cloud data can be fused. In this embodiment, the left camera perspective and displacement are used as the initial angle and initial displacement; the point cloud data under the right camera perspective is converted into the point cloud data under the left camera perspective.
[0071] In this embodiment, the point cloud data A, the point cloud data B, and the point cloud data C are converted into world coordinates under the perspective of the left camera through the solvePnp() function of OpenCV.
[0072] S5: perform point cloud registration and fusion on point cloud data A, point cloud data B and point cloud data C under the same camera perspective; the fused point cloud data is recorded as point cloud data X.
[0073] The following steps are involved:
[0074] S5.1: pre-processing the point cloud data A, point cloud data B and point cloud data C under the same camera perspective respectively, wherein the pre-processing includes point cloud filtering and point cloud sampling;
[0075] S5.2: Use the ICP algorithm to fuse point cloud data A, point cloud data B, and point cloud data C from the same camera perspective.
[0076] S6: Perform data processing on the point cloud data X based on the RANSAC algorithm.
[0077] The following steps are involved:
[0078] S6.1: Randomly select three non-collinear points in the point cloud data X, denoted as P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3); fit the three points into a plane, and set the plane equation to be ax+by+cz+d=0;
[0079] S6.2: Calculate the distance r from any point Pi(xi,yi,zi) in the point cloud data X to the plane i ; The calculation formula is:
[0080]
[0081] Among them, Π represents the indicator function; ε is the set threshold; the function of the indicator function is: when the input is True, the output is 1, 1 represents an inlier, when the input is False, the output is 0, 0 represents not an inlier. A total of K points are randomly sampled as a model. If the points in the model satisfy equations (1) and (2), they are considered inliers, and the number of inliers in the model is recorded.
[0082]
[0083] Among them, P is the expected confidence level, which is set to 0.99; t is the probability of each point being an inlier in the data; n is the number of sampled points, which is set to 3.
[0084] S6.3: Cycle S6.1-S6.2 for N times in total. Each time, the three non-collinear points randomly selected in S6.1 are different, and the model generated by formula (1) is also different. A total of N models are generated, and the number of internal points of the N models is recorded.
[0085] S6.4: Select the model with the largest number of inliers.
[0086] S6.5: Model validation;
[0087] S6.5.1: Calculate the intersection points of the model in S6.4; suppose there are v intersection points in total, denoted by {a1, a2, ..., a v};
[0088] Assume that for a cubic workpiece, the model in step S6.4 has six planes; other embodiments have other numbers of planes. Linear algebra knowledge can be used to calculate the equations of the lines where two adjacent planes intersect, a total of twelve line equations, and eight intersection points are obtained by the line equations. They are respectively denoted as {a1, a2, a3, a4, a5, a6, a7, a8};
[0089] S6.5.2: Find the geometric center of the intersection a0(x0,y0,z0), using the formula:
[0090]
[0091] The geometric center of the cubic workpiece is:
[0092] a0=(a1+a2+a3+a4+a5+a6+a7+a8) / 8;
[0093] S6.5.3: Calculate the distances from the eight intersection points to the geometric center a0, denoted as {d 10 , d 20 ,……,dv0}; the distance from each point of the cube to the geometric center
[0094] {d10 , d 20 ,d 30 , d 40 , d 50 , d 60 , d 70 , d 80};
[0095] S6.5.4: Calculate the model error using the formula:
[0096] There are two situations:
[0097] v is an even number;
[0098] v is an odd number;
[0099] In this embodiment:
[0100]
[0101] like Then the model in S6.4 is selected and σ is set to 0.2; otherwise, it indicates that the fitting effect of the model in S6.4 is not good, and S6.1-S6.5 are cycled again until the model is selected.
[0102] The design focus of this solution S6.5.3 is to calculate the distance from the geometric center to each intersection through the geometric center of the workpiece, and finally determine the model error.
[0103] In the traditional method, after calculating the eight intersection points, the eight points are used to determine the side length of the workpiece and finally determine the error. The method of determining the side length of the workpiece is relatively complicated. It is necessary to first calculate the distance between the two intersection points. This distance not only includes the side length of the workpiece, but also includes the face diagonal and body diagonal of the workpiece; these face diagonals and body diagonals are not the side length of the workpiece, so threshold judgment is also required to eliminate the face diagonals and body diagonals, which will generate a lot of calculations.
[0104] In this solution, the geometric center point is designed to avoid the operation of determining the side length of the workpiece composed of 8 points, simplifying a large number of calculations and improving the simplicity of the method.
[0105] S7: Use the findContours() function and drawContours() function in the opencv function to calculate the contour length of the final result; the final result is the model in S6.4.
[0106] The findContours() and drawContours() functions will binarize the image and then obtain the attribute information of the image contour. The attribute information includes the contour area, contour length, contour perimeter, geometric moment and center distance, minimum circumscribed rectangle, minimum circumscribed circle or fitted circle, fitted ellipse, fitted line, polygon approximation - approximation to the true shape, etc. For the fitted image, the calculation function can be written through the data corresponding to its edge to realize the measurement of the three-dimensional space target.
[0107] Specifically include:
[0108] S7.1. Canny edge detection for 3D segmentation
[0109] Canny edge detection is usually used in 2D images, but it can be implemented in 3D point clouds by following the following steps.
[0110] S7.1.1: Projection onto a 2D plane
[0111] Since the Canny algorithm is mainly used in two-dimensional images, the three-dimensional point cloud is projected onto a two-dimensional plane. The principal component analysis algorithm (PCA), a linear dimensionality reduction method, is used to map high-dimensional data into a low-dimensional space through linear projection, hoping that the amount of data information in the projected dimension is the largest (the variance is the largest), thereby using fewer data dimensions while retaining more of the characteristics of the original data points. The point cloud data is projected onto a two-dimensional plane with the largest change direction (for example, for a cubic workpiece, its corners change the most) using principal component analysis (PCA) projection, and the projected point cloud data is recorded as P.
[0112] S7.1.2: Generate 2D Depth Image
[0113] The projected point cloud data P is mapped into a two-dimensional depth image, and the depth value can be represented by the height Z of the point. This will produce a grayscale image where each pixel represents the depth of that location.
[0114] S7.1.3: Canny edge detection
[0115] Canny edge detection is applied to the generated two-dimensional depth image, and the findContours() function and drawContours() function in opencv are used to find the contour. Further contour (binary image) analysis can be performed to obtain various useful attribute information of the contour.
[0116] Includes S7.1.3.1: Gaussian filtering: Perform Gaussian filtering on the depth image to smooth the image and reduce noise.
[0117] S7.1.3.2: Calculate gradient: Use the Sobel operator to calculate the gradient (edge) of the image;
[0118]
[0119] Among them, Gx represents the gradient in the horizontal direction; Gy represents the gradient in the vertical direction; Represents the ratio of pixel value to pixel horizontal coordinate; Represents the ratio of pixel value to pixel ordinate.
[0120] Gradient amplitude G:
[0121]
[0122] Non-maximum suppression: Suppress non-maxima in the gradient direction and retain local maxima as edges.
[0123] Threshold processing: Use high and low thresholds to distinguish strong and weak edges and obtain the final edge image.
[0124] S7.2: Minimum rectangular bounding box calculation;
[0125] Taking cube projection as an example, after obtaining the edge of the target object, the coordinate points of the edge can be used to calculate the minimum rectangular bounding box (MBR). This rectangle can approximately describe the size of the target object.
[0126] S7.2.1: Edge point extraction
[0127] Extract edge points from the edge image obtained by Canny detection and convert them into a series of two-dimensional coordinate points.
[0128] S7.2.2: Compute the minimum rectangular bounding box
[0129] Use the coordinates of the edge points to calculate the minimum rectangular bounding box of the target object.
[0130] Specifically include:
[0131] S7.2.2.1: Rotating Calipers:
[0132] S7.2.2.1.1: Compute the convex hull:
[0133] Calculate the convex hull of the edge points to obtain the minimum convex polygon that contains all edge points.
[0134] S7.2.2.1.2: Rotating calipers:
[0135] By rotating the caliper, find the smallest rectangle that is tangent to the convex hull vertices.
[0136] S7.2.2.1.3: Bounding box size calculation
[0137] Based on the vertices of the smallest rectangle, calculate the length, width, and height of the object (if multiple projections are used in 3D space):
[0138] Length (L): The length of the side of the smallest rectangle in the longest direction.
[0139] Width (W): The length of the side of the smallest rectangle perpendicular to the length.
[0140] Height (H): The height can be obtained from the z-coordinate range of the point cloud data:
[0141] H=Z max -Zmin
[0142] Among them, Z max It is the maximum value of the z coordinate of the point cloud data; Zmin is the minimum value of the z coordinate of the point cloud data.
[0143] If you need other things, you can also calculate the contour area S, contour perimeter C, geometric moments and center distance moments(), minimum enclosing rectangle minAreaRect(), minimum enclosing circle / fitting circle minEnclosingCircle(), fitting ellipse fitEllipse(), fitting straight line fitLine(), polygon approximation - approximating the true shape approxPolyDP()...
[0144] Finally, the three-dimensional spatial target measurement of the workpiece is achieved.
[0145] Advantages of Canny edge detection + minimum rectangular bounding box:
[0146] High edge detection accuracy: Canny edge detection is a classic edge detection algorithm that can effectively extract the edges of target objects and is particularly suitable for processing objects with obvious boundaries in depth images.
[0147] Simple calculation: After combining with the minimum rectangular bounding box, the size calculation is relatively simple and easy to implement, which is suitable for the size measurement of regular objects (such as rectangles, cuboids, etc.).
[0148] Wide application: This method can be applied to the measurement of a variety of target objects, especially when the object contour is relatively regular, the effect is better.
[0149] Example 3: In order to verify that the method in Example 2 can accurately obtain the outline of an object, a cube with a side length of 2 cm is used for 3D reconstruction. The 3D reconstruction method in Example 2 and the binocular 3D reconstruction method are compared. The results are as follows: Figure 2 and Figure 3 shown.
[0150] Figure 2 This is the point cloud data diagram after three-dimensional reconstruction of this embodiment 2. Figure 3 is the point cloud data after binocular 3D reconstruction; Figure 2 and Figure 3 The contours are calculated using opencv functions respectively, and the final contour sizes are shown in Table 1.
[0151] Table 1 Measurement results of the contour of a 2cm cube using two methods
[0152]
[0153] It can be seen from Table 1 that the three-dimensional reconstruction method of Example 2 can more accurately construct the contour of the object, which is more consistent with the actual result.
[0154] Based on the above ideal embodiments of the present invention, the relevant staff can make various changes and modifications without departing from the technical concept of the present invention through the above description. The technical scope of the present invention is not limited to the contents of the specification, and its technical scope must be determined according to the scope of the claims.
Claims
1. A laser-guided dual-view workpiece 3D reconstruction and measurement system, characterized in that: include: Laser generator, assuming that the laser plane emitted by the laser generator is a vertical plane; the moving direction of the workpiece is perpendicular to the laser plane; The left camera and the right camera, located on both sides of the laser plane, are capable of capturing images of the workpiece.
2. A laser-guided dual-view workpiece 3D reconstruction and measurement method, based on the laser-guided dual-view workpiece 3D reconstruction structure of claim 1, characterized in that: The following steps are involved: S1: Turn on the left camera and the laser generator, and turn off the right camera; use the monocular line structured light 3D reconstruction method to perform 3D reconstruction on the workpiece to obtain the point cloud data of the workpiece, and record the point cloud data as point cloud data A; S2: Turn on the right camera and the laser generator, and turn off the left camera; use the monocular line structured light 3D reconstruction method to perform 3D reconstruction on the workpiece to obtain point cloud data of the workpiece, and record the point cloud data as point cloud data B; S3: Turn on the left camera and the right camera, and turn off the laser generator; use the binocular 3D reconstruction method to perform 3D reconstruction on the workpiece, obtain point cloud data of the workpiece, and record the point cloud data as point cloud data C; S4: transforming point cloud data A, point cloud data B and point cloud data C to the same camera perspective through coordinate rotation and translation; S5: perform point cloud registration and fusion on the point cloud data A, point cloud data B and point cloud data C under the same camera perspective; the fused point cloud data is recorded as point cloud data X; S6: Process the point cloud data X based on the RANSAC algorithm; S7: Use the findContours() function and drawContours() function in the opencv function to calculate the contour length of the final result.
3. The laser-guided dual-view workpiece 3D reconstruction and measurement method according to claim 2, characterized in that: Step S6 includes the following steps: S6.1: Randomly select three non-collinear points in the point cloud data X, denoted as P1(x1, y1, z1), P2(x2, y2, z2), and P3(x3, y3, z3); fit the three points into a plane; let the plane equation be ax+by+cz+d=0; S6.2: Calculate any point P in the point cloud data X i (x i ,y i ,z i ) to the plane i ; The calculation formula is: Among them, Π represents the indicator function; ε is the set threshold; K is the number of sampling points; S6.3: Cycle S6.1-S6.2 for N times, and the three non-collinear points randomly selected in S6.1 are different each time; a total of N models are generated, and the number of internal points of the N models is recorded; S6.4: Select the model with the largest number of inliers.
4. The laser-guided dual-view workpiece 3D reconstruction and measurement method according to claim 3, characterized in that: Step S6 also includes S6.5: model verification; S6.5 specifically includes the following steps: S6.5.1: Calculate the intersection points of the model in S6.4; suppose there are v intersection points in total, denoted by {a1, a2, ..., a v }; S6.5.2: Calculate the geometric center a0 of the intersection point in the model using the formula: S6.5.3: Calculate the distance from the geometric center a0 to each intersection point, denoted as {d 10 , d 20 ,……,d v0 }; S6.5.4: Calculate the model error using the formula: There are two situations: v is an even number; v is an odd number; like Then the model in S6.4 is selected and σ is set to 0.2; otherwise, it indicates that the fitting effect of the model in S6.4 is not good, and S6.1-S6.5 are cycled again until the model is selected.
5. According to the laser-guided dual-view workpiece three-dimensional reconstruction and measurement method of claim 4, in step S5, the solvePnp() function of OpenCV is used to convert point cloud data A, point cloud data B and point cloud data C to the left camera perspective.
6. The laser-guided dual-view workpiece 3D reconstruction and measurement method according to claim 2, characterized in that: In step S6.2, ε is 0.1 cm.
7. The laser-guided dual-view workpiece 3D reconstruction and measurement method according to claim 2, characterized in that: Step S7 includes the following steps: S7.1: Canny edge detection for 3D segmentation; The specific steps include: S7.1.1: Project the three-dimensional point cloud in S6 onto a two-dimensional plane, and the projected point cloud data is recorded as P; S7.1.2: Map the point cloud data P into a two-dimensional depth image to obtain a grayscale image, where each pixel in the grayscale image represents the depth of the location; S7.1.3: Apply Canny edge detection to the generated 2D depth image, using the findContours() and drawContours() functions in OpenCV to perform contour detection; S7.2: Minimum rectangular bounding box calculation; The specific steps include: S7.2.1: Edge point extraction: extract edge points from the edge image obtained by Canny detection and convert them into a series of two-dimensional coordinate points; S7.2.2: Compute the minimum rectangular bounding box Use the coordinates of the edge points to calculate the minimum rectangular bounding box of the target object; The specific steps include: S7.2.2.1: Compute the convex hull; compute the convex hull of the edge points to obtain the smallest convex polygon that contains all the edge points; S7.2.2.2: Rotate the caliper. By rotating the caliper, find the smallest rectangle that is tangent to the vertices of the convex hull. S7.2.2.3: Calculate bounding box dimensions; calculate the length, width, and height of the object based on the vertices of the smallest rectangle.