A 3D point cloud stitching and reconstruction method based on a rotating stage

By using calibration plates on the rotating table for high-precision calibration, and combining pose transformation and surface implicit functions to achieve three-dimensional point cloud splicing and reconstruction, the problem of low accuracy and efficiency in the existing technology is solved, and high-precision and efficient three-dimensional reconstruction effect is achieved.

CN113205603BActive Publication Date: 2025-05-06WUXI XINJIE ELECTRICAL
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202110498497.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-05-07
Publication Date
2025-05-06
Estimated Expiration
2041-05-07

AI Technical Summary

Technical Problem

The existing three-dimensional splicing methods are generally low in accuracy and efficiency, and will produce incorrect splicing results for targets with fewer features. The traditional rotating table shaft calibration accuracy is low, and the complex Poisson reconstruction method is low in efficiency.

Method used

The three-dimensional point cloud splicing reconstruction method based on the rotary table is used to calibrate the linear position of the rotary table shaft through the calibration plate, and the positioning transformation is used to splice point cloud splicing using calibration parameters and rotation angle of the rotary table, and surface reconstruction is realized through the surface implicit function and the moving cube algorithm.

Benefits of technology

It improves the accuracy and simplicity of rotary table calibration, realizes high-precision point cloud splicing and surface reconstruction, and is more efficient, suitable for high-resolution measurement and automated full-view three-dimensional contour measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113205603B_ABST
    Figure CN113205603B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of industrial machine vision technology, specifically a three-dimensional point cloud splicing and reconstruction method based on a turntable, firstly, the linear position of the rotating shaft is calibrated with the help of a calibration plate, then all the viewpoint point clouds are spliced ​​through posture transformation using the calibration parameters and the turntable rotation angle, and finally the target surface function is constructed using the spliced ​​point cloud and the normal of each point toward the outside of the target, and the isosurface is extracted and the surface reconstruction function is realized through the moving cube algorithm. The present invention can realize the function of high-resolution measurement of the surface contour features of an object, and can perform automated full-view three-dimensional contour measurement of an object. The splicing and reconstruction method is simple and easy to maintain, and is not only suitable for general work scene requirements, but also suitable for fast and high-precision applications.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of industrial machine vision, and in particular to a three-dimensional point cloud splicing and reconstruction method based on a rotating table. Background Art

[0002] With the development of intelligent manufacturing technology in recent years, the demand for three-dimensional measurement and identification in many fields such as the automotive and 3C manufacturing industries, reverse engineering, cultural relics protection, and quality inspection has gradually increased. Traditional two-dimensional vision technology cannot meet the needs of such processes due to the lack of one dimension. Three-dimensional vision technology represented by structured light projection technology has emerged. The equipment manufactured by this technology can generate three-dimensional point cloud data of the target after scanning the target to be measured. The use of visual algorithms to process point cloud data can realize functions such as target size measurement, identification and positioning.

[0003] 3D stitching technology is an important part of 3D vision technology. This technology stitches together the multi-view point clouds of the target in some way to obtain a complete target model. The speed and accuracy of 3D stitching will directly affect the accuracy and stability of subsequent point cloud processing.

[0004] At present, the common stitching method is to calculate the feature points of the multi-view point cloud of the target, use the Ransac method to achieve the rough registration of the point cloud based on these feature point information, and then use the ICP algorithm to achieve the fine registration of the point cloud. This method is generally low in accuracy and efficiency, and will produce wrong stitching results for targets with fewer features. There are still some problems with the calibration of the turntable position in some turntable-based 3D stitching methods, such as the calibration principle is relatively ideal, and the calibration accuracy is low. In addition, the common 3D surface reconstruction method is an improved version based on the Poisson reconstruction method, which is more complicated and less efficient.

[0005] Therefore, a technology is urgently needed to solve this problem. Summary of the invention

[0006] The purpose of the present invention is to overcome the problems of the above-mentioned prior art and provide a three-dimensional point cloud stitching and reconstruction method based on a turntable. First, the linear position of the rotation axis is calibrated with the help of a calibration plate, and then all viewpoint point clouds are spliced ​​through posture transformation using the calibration parameters and the turntable rotation angle. Finally, the target surface function is constructed using the spliced ​​point cloud and the normal of each point facing the outside of the target, and the isosurface is extracted through the marching cube algorithm to realize the surface reconstruction function.

[0007] The above objectives are achieved through the following technical solutions:

[0008] A three-dimensional point cloud splicing and reconstruction method based on a rotating stage comprises the following steps:

[0009] Step (1) building a three-dimensional stitching and reconstruction system: the three-dimensional stitching and reconstruction system comprises a 3D camera, a PC, a driver, a servo motor and a rotating table, the 3D camera and the driver are respectively connected to the PC, the servo motor is connected to the driver, the servo motor is connected to the rotating table, the rotating table is used to place the object to be measured, and the 3D camera is used to take a picture of the object to be measured and transmit it to the PC to obtain image and point cloud data;

[0010] Step (2) calibration of the rotating table: a calibration plate with at least one circular mark point is vertically placed on the surface of the rotating table, and the calibration plate can perform synchronous rotation under the drive of the rotating table; the calibration plate is photographed by a 3D camera to obtain image data and corresponding point cloud data; the sub-pixel coordinates of the rotation center of the circular mark point on the calibration plate are extracted by a circle recognition algorithm, and the corresponding three-dimensional coordinates of the center are obtained by an interpolation method; the motion trajectory of the same circular mark point is fitted with plane and spherical equations, and the three-dimensional coordinates of the rotation center of each circular mark point can be solved by combining them, and the linear parameters of multiple rotation centers are fitted by the least squares method, and the linear parameters are the calibration parameters of the rotating table;

[0011] Step (3) point cloud stitching: calculating the pose conversion relationship between the point clouds of each viewpoint through the calibration parameters of the turntable and the corresponding rotation interval of the turntable, realizing point cloud stitching and completing point cloud fusion;

[0012] Step (4) point cloud surface reconstruction: The fused point cloud normals are calculated, and the surface implicit function is constructed. The coefficients of the function are solved using the least squares method, and the isosurface is extracted using the marching cubes algorithm, thereby realizing the surface reconstruction function.

[0013] Furthermore, the rotating platform is circular, and the center of the circle is vertically connected to the rotating shaft of the servo motor.

[0014] Furthermore, the calibration plate is square or rectangular, and at least one circular marking point is arranged on the surface.

[0015] Furthermore, in step (2), the calibration plate is photographed by a 3D camera to obtain image data and corresponding point cloud data, specifically: the rotation stage is rotated multiple times within the field of view of the camera, and the rotation interval remains consistent. Each time the rotation is performed, the 3D camera takes a photo of the calibration plate and obtains the corresponding calibration plate grayscale image and oriented point cloud data.

[0016] Furthermore, in step (2), the sub-pixel coordinates of the rotation center of the circular mark point on the calibration plate are extracted by the circle recognition algorithm, and the corresponding three-dimensional coordinates of the center of the circle are obtained by the interpolation method. Specifically, the sub-pixel coordinates of the center of the circular mark point on each calibration plate image are extracted by the circle recognition algorithm, and the integer pixel coordinates of the four adjacent points are obtained from the sub-pixel coordinates. At the same time, the three-dimensional coordinates of the corresponding points in the directed point cloud data are obtained by the four pixel indexes. These four three-dimensional points can be used for interpolation to obtain high-precision three-dimensional coordinates of the center of the circle.

[0017] Furthermore, let the sub-pixel coordinate of the center of the circular marker be P c =(u c , v c ), the coordinates of the four adjacent integer pixels around this coordinate are P c0 =(u0,v0),P c1 =(u0+1,v0),P c2 =(u0v0+1),P c3 =(u0+1, v0+1), where (u0, v0) is P c Round the coordinates down.

[0018] Calculate the areas of the four rectangular regions enclosed by the four integer pixel coordinates, S0, S1, S2, and S3. The corresponding reciprocals are W0, W1, W2, and W3. Use the four integer pixel coordinates to find the corresponding three-dimensional coordinates P0, P1, P2, and P3 in the directed point cloud. Then use the interpolation method to obtain P c The coordinates are ∑W i P i / ∑W i .

[0019] Furthermore, in step (2), the plane and spherical equations are fitted to the motion trajectory of the same circular mark point, and the three-dimensional coordinates of the rotation center of each circular mark point can be solved by combining them. The linear parameters are fitted to multiple rotation centers using the least squares method, and the linear parameters are the calibration parameters of the rotation stage, which are specifically:

[0020] Assume that the coordinates of the circular mark points on the same arc are (x i ,y i , z i ), the coordinates of the center of the sphere are (x0, y0, z0), and the radius is r. First, fit a plane to these points, and the plane equation is:

[0021] Ax+By+Cz+1=0,

[0022] The equation of the sphere is:

[0023] (x-x0) 2 +(y-y0) 2+(z-z0) 2 =r 2 ,

[0024] Then, the following equation is established by combining the spherical equation and the plane equation based on the constraint that the center of the sphere is on the plane:

[0025]

[0026] If there are at least 3 marking points on the same arc, the above equation can be solved and the coordinates of the center of the sphere can be obtained;

[0027] The linear equation obtained by using PCA to fit the straight line of multiple spherical center coordinates is P = tN + S, where the unit direction vector of the straight line is N (N x , N y , N z ), a point on the straight line is S(S x , S y , S z );

[0028] Calculate the mean coordinates of the point cloud on the straight line: That is S;

[0029] The calculation matrix is:

[0030] Perform SVD decomposition on the matrix C, and take the eigenvector corresponding to the maximum eigenvalue as the direction vector N of the line.

[0031] Furthermore, the point cloud stitching is specifically as follows:

[0032] Set N as the unit direction vector of the rotating platform axis, S as a point on the axis line, and N and S as the calibration parameters of the rotating platform solved in step (2);

[0033] Assume that there is a point C on the target surface to be spliced ​​at the initial position 0 , the corresponding point after the turntable rotates counterclockwise θ is C, the 3D camera always faces the position of point C, and obtains the point cloud data of this position. Point cloud stitching is to obtain the coordinates of point C before rotation from the position of point C after each rotation 0 In the process of obtaining the coordinates of the point position, the splicing function can be achieved by rotating point C clockwise around the axis by an axis angle of θ, as follows:

[0034] By S(X S , Y S , Z S ), C(X C , Y C , Z C ) to get the formula:

[0035]

[0036] Among them, R(N, θ) is a 3×3 matrix related to the unit normal vector of the rotating platform and the rotation angle θ. After sorting, we can get:

[0037]

[0038] Where R(N,θ) is:

[0039]

[0040]

[0041] Calculation can be obtained from the coordinates of point C 0 Point coordinates;

[0042] If the rotation angle interval of the rotating platform is θ°, and the total rotation is m=360 / θ-1 times, the i-th point cloud obtained by the 3D camera after rotation is PC bi , each point cloud after stitching is PC ai ,but:

[0043] PC ai =R(N,θ)(PC bi -S)+S i=0,1,2…m

[0044] The result of combining all the point clouds before rotation is the point cloud stitching result.

[0045] Furthermore, in step (4), the surface implicit function is constructed and the coefficients of the function are solved using the least squares method, specifically:

[0046] The implicit function F(p) for constructing the surface specifies a value for each position in the space (p is any point in the space). When the point is inside the surface, F(p) < 0; when it is on the surface, F(p) = 0; when it is outside the surface, F(p) > 0. The coordinates of each point before rotation and the corresponding normal vector are used to construct an analytical expression. The points that satisfy F(p) = 0 constitute the surface of the object.

[0047] For each point p i By constructing the function F(p), we can get:

[0048] F(p i +εn i )=ε,

[0049] F(p i -εn i )=-ε,

[0050] F(p i )=0,

[0051] Among them, ε is a positive value that is very small relative to the scale of the point cloud, n i For point p i The normal vector of the target facing outward;

[0052] F(p) is represented by a linear combination of distance-related functions:

[0053]

[0054] in, is the kernel function, ||ab|| represents the spatial distance between points a and b;

[0055] Using the constraints of the above formula to form a linear equation system, the function coefficient a can be solved using the least squares method. i 、b i and c i .

[0056] Beneficial Effects

[0057] The present invention provides a three-dimensional point cloud splicing and reconstruction method based on a rotating table. Compared with the traditional rotating table axis calibration method, this calibration method uses a calibration plate for calibration, which is simpler to operate and has higher calibration accuracy. The algorithm in this paper has a calibration accuracy of 0.05mm; compared with the traditional ICP alignment method, this method does not require initial alignment of point clouds, and only uses high-precision calibration parameters and rotation parameters to obtain high-precision splicing effects, which is more efficient; compared with the traditional complex Poisson reconstruction method, this reconstruction method is simpler and has good reconstruction effects. The present invention can realize the function of high-resolution measurement of the surface contour features of an object, and can perform automated full-view three-dimensional contour measurement of an object. The splicing and reconstruction method is simple and easy to maintain. It is not only suitable for general work scene requirements, but also suitable for fast and high-precision applications. BRIEF DESCRIPTION OF THE DRAWINGS

[0058] Figure 1 A schematic diagram of the calibration of a rotating platform of a three-dimensional point cloud splicing and reconstruction method based on a rotating platform according to the present invention;

[0059] Figure 2 A schematic diagram of point cloud stitching of a three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to the present invention;

[0060] Figure 3 This is a flow chart of a three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to the present invention;

[0061] Figure 4 The point cloud images of each viewing angle of the first two targets are stitched together in the three-dimensional point cloud stitching and reconstruction method based on a rotating stage of the present invention;

[0062] Figure 5 It is a point cloud image of two objects after being stitched together in the three-dimensional point cloud stitching and reconstruction method based on a rotating stage described in the present invention;

[0063] Figure 6 This is a grid image after two target surfaces are reconstructed in the three-dimensional point cloud stitching and reconstruction method based on a rotating stage described in the present invention. DETAILED DESCRIPTION

[0064] The present invention is further described in detail below based on the accompanying drawings and embodiments.

[0065] like Figure 3 As shown, a three-dimensional point cloud stitching and reconstruction method based on a rotating stage includes the following steps:

[0066] Step (1) building a three-dimensional stitching and reconstruction system: the three-dimensional stitching and reconstruction system comprises a 3D camera, a PC, a driver, a servo motor and a rotating table, the 3D camera and the driver are respectively connected to the PC, the servo motor is connected to the driver, the servo motor is connected to the rotating table, the rotating table is used to place the object to be measured, and the 3D camera is used to take a picture of the object to be measured and transmit it to the PC to obtain image and point cloud data;

[0067] Step (2) calibration of the rotating table: a calibration plate with at least one circular mark point is vertically placed on the surface of the rotating table, and the calibration plate can perform synchronous rotation under the drive of the rotating table; the calibration plate is photographed by a 3D camera to obtain image data and corresponding point cloud data; the sub-pixel coordinates of the rotation center of the circular mark point on the calibration plate are extracted by a circle recognition algorithm, and the corresponding three-dimensional coordinates of the center are obtained by an interpolation method; the motion trajectory of the same circular mark point is fitted with plane and spherical equations, and the three-dimensional coordinates of the rotation center of each circular mark point can be solved by combining them, and the linear parameters of multiple rotation centers are fitted by the least squares method, and the linear parameters are the calibration parameters of the rotating table;

[0068] Step (3) point cloud stitching: calculating the pose conversion relationship between the point clouds of each viewpoint through the calibration parameters of the turntable and the corresponding rotation interval of the turntable, realizing point cloud stitching and completing point cloud fusion;

[0069] Step (4) point cloud surface reconstruction: The fused point cloud normals are calculated, and the surface implicit function is constructed. The coefficients of the function are solved using the least squares method, and the isosurface is extracted using the marching cubes algorithm, thereby realizing the surface reconstruction function.

[0070] Specifically, Figure 1As shown, the three-dimensional stitching and reconstruction system consists of a 3D camera, a PC, a driver, a servo motor and a rotating table. The 3D camera structure is a combination of a monocular and a DLP. The camera has completed structural calibration before use, and the camera can simultaneously obtain image data of the target to be measured and the corresponding point cloud data; the 3D camera is directly connected to the PC, and the PC controls the 3D camera to take pictures of the target (measured object) and obtain point cloud data. The PC controls the motor rotation by controlling the driver; the rotating table is circular, and the center of the circle is vertically connected to the rotating shaft of the servo motor, and the object to be measured is placed on the rotating table; the calibration plate is square or rectangular, and at least one circular marking point is arranged on the surface.

[0071] As an optimization of this embodiment, step (2) is specifically as follows:

[0072] First, the turntable is calibrated to solve the parameters of the turntable axis line in the camera coordinate system. A calibration plate is placed on the turntable and rotated multiple times to obtain the calibration plate image and point cloud data. The calibration parameters can be obtained by extracting the center coordinates and the corresponding point cloud coordinates according to a certain algorithm.

[0073] Fix the circular mark point calibration plate vertically on the rotating platform, fix the 3D camera on the external bracket, and face the rotating platform. Rotate the platform multiple times within the camera's field of view, and keep the rotation interval consistent. Each time the platform rotates, the camera takes a photo of the calibration plate to obtain the corresponding calibration plate grayscale image and oriented point cloud data. The camera is required to obtain clear calibration plate images and point cloud data every time it takes a photo. Figure 1 As shown, the unit direction vector of the axis of rotation is N(N x , N y , N z ), a point on the axis is S(S x , S y , S z );

[0074] The sub-pixel coordinates of the rotation center of the circular mark point on the calibration plate are extracted by the circle recognition algorithm, and the corresponding three-dimensional coordinates of the center of the circle are obtained by the interpolation method. Specifically, the sub-pixel coordinates of the center of the circular mark point on each calibration plate image are extracted by the circle recognition algorithm, and the integer pixel coordinates of the four adjacent points are obtained from the sub-pixel coordinates. At the same time, the three-dimensional coordinates of the corresponding points in the directed point cloud data are obtained by the four pixel indexes. These four three-dimensional points can be used for interpolation to obtain high-precision three-dimensional coordinates of the center of the circle.

[0075] Let the sub-pixel coordinate of the center of the circular marker be P c =(u c , v c ), the coordinates of the four adjacent integer pixels around this coordinate are P c0=(u0,v0),P c1 =(u0+1,v0),P c2 =(u0,v0+1),P c3 =(u0+1, v0+1), where (u0, v0) are the coordinates rounded down.

[0076] Calculate the areas of the four rectangular regions enclosed by the four integer pixel coordinates, S0, S1, S2, and S3. The corresponding reciprocals are W0, W1, W2, and W3. Use the four integer pixel coordinates to find the corresponding three-dimensional coordinates P0, P1, P2, and P3 in the directed point cloud. Then use the interpolation method to obtain P c The coordinates are ∑W i P i / ∑W i .

[0077] In step (2), the plane and spherical equations are fitted to the motion trajectory of the same circular mark point, and the three-dimensional coordinates of the rotation center of each circular mark point can be solved by combining them. The linear parameters are fitted to multiple rotation centers using the least squares method. The linear parameters are the calibration parameters of the rotation stage, which are specifically:

[0078] Assume that the coordinates of the circular mark points on the same arc are (x i ,y i , z i ), the coordinates of the center of the sphere are (x0, y0, z0), and the radius is r. First, fit a plane to these points, and the plane equation is:

[0079] Ax+By+Cz+1=0,

[0080] The equation of the sphere is:

[0081] (x-x0) 2 +(y-y0) 2 +(z-z0) 2 =r 2 ,

[0082] Then, the following equation is established by combining the spherical equation and the plane equation based on the constraint that the center of the sphere is on the plane:

[0083]

[0084] If there are at least 3 marking points on the same arc, the above equation can be solved and the coordinates of the center of the sphere can be obtained;

[0085] The linear equation obtained by using PCA to fit the straight line of multiple spherical center coordinates is P = tN + S, where the unit direction vector of the straight line is N (N x , N y , N z ), a point on the straight line is S(S x, S y , S z );

[0086] Calculate the mean coordinates of the point cloud on the straight line: That is S;

[0087] The calculation matrix is:

[0088] Perform SVD decomposition on the matrix C, and take the eigenvector corresponding to the maximum eigenvalue as the direction vector N of the line.

[0089] It also includes checking the calibration accuracy: the three-dimensional coordinates of the center of each viewing angle marker point are converted to the first viewing angle by the calibration parameters and the rotation angle, the Euclidean distance between each marker point and the corresponding point after the conversion is calculated, the average of the marker point distances of an image is used as the calibration error of the image, and the average of the calibration errors of all images is used as the overall calibration error.

[0090] The step (3) of point cloud stitching is specifically as follows:

[0091] The multi-view point cloud is stitched by the calibration parameters and rotation angle of the turntable. The target is placed on the turntable, and the turntable is rotated at a certain angle interval. The 3D camera obtains multi-view point cloud data within 360°. The rotation matrix and translation vector are calculated using the calibration parameters and rotation angle intervals, and the multi-view point cloud is finally stitched. The point cloud after stitching has a high density in the overlapping area, and voxel filtering can be used to obtain a uniform and consistent point cloud.

[0092] like Figure 2 As shown, N is set as the unit direction vector of the rotating platform axis, S is set as a point on the axis line, and N and S are the calibration parameters of the rotating platform solved in step (2);

[0093] Assume that there is a point C on the target surface to be spliced ​​at the initial position 0 , the corresponding point after the turntable rotates counterclockwise θ is C, the 3D camera always faces the position of point C, and obtains the point cloud data of this position. Point cloud stitching is to obtain the coordinates of point C before rotation from the position of point C after each rotation 0 In the process of obtaining the coordinates of the point position, the splicing function can be achieved by rotating point C clockwise around the axis by an axis angle of θ, as follows:

[0094] By S(X S , Y S , Z S ), c(X C , Y C , Z C ) to get the formula:

[0095]

[0096] Among them, R(N, θ) is a 3×3 matrix related to the unit normal vector of the rotating platform and the rotation angle θ. After sorting, we can get:

[0097]

[0098] Where R(N,θ) is:

[0099]

[0100]

[0101] Calculation can be obtained from the coordinates of point C 0 Point coordinates;

[0102] If the rotation angle interval of the rotating platform is θ°, and the total rotation is m=360 / θ-1 times, the i-th point cloud obtained by the 3D camera after rotation is PC bi , each point cloud after stitching is PC ai ,but:

[0103] PC ai =R(N,θ)(PC bi -S)+S i=0,1,2…m

[0104] The result of combining all the point clouds before rotation is the point cloud stitching result (such as Figure 5 As shown in the figure, the point cloud images of each view before stitching are as follows Figure 4 shown).

[0105] The step (4) is specifically:

[0106] The spliced ​​point cloud is reconstructed into a target surface with a grid structure. The normal of the point cloud is calculated for each view, and the normal direction is adjusted to face the outside of the target according to the view information. The normal of each view is uniformly converted from the above R(N, θ) to the first view. Then, the implicit function of the surface is constructed from each point and the corresponding normal information. The coefficient of the implicit function is solved using the least squares method. Finally, the isosurface is extracted by linear interpolation using the marching cube algorithm (Marching Cube) to finally construct the model surface.

[0107] To solve the normal vector of each point, a KNN query is performed on each point, and the normal vector of the point is calculated by the PCA method using the K points closest to the point. The camera's viewing direction is v p , calculate the angle between the normal direction of each point and the viewing angle, and negate the normal direction when the angle is greater than 90°. Solve and correct the direction of all point normals in all viewing angles, and finally convert them to the first-person perspective.

[0108] The step (4) of constructing a surface implicit function and solving the function coefficients using the least squares method is specifically as follows:

[0109] The implicit function F(p) for constructing the surface specifies a value for each position in the space (p is any point in the space). When the point is inside the surface, F(p) < 0; when it is on the surface, F(p) = 0; when it is outside the surface, F(p) > 0. The coordinates of each point before rotation and the corresponding normal vector are used to construct an analytical expression. The points that satisfy F(p) = 0 constitute the surface of the object.

[0110] For each point p i By constructing the function F(p), we can get:

[0111] F(p i +εn i )=ε,

[0112] F(p i -εn i )=-ε,

[0113] F(p i )=0,

[0114] Among them, ε is a positive value that is very small relative to the scale of the point cloud, n i For point p i The normal vector of the target facing outward;

[0115] F(p) is represented by a linear combination of distance-related functions:

[0116]

[0117] in, is the kernel function, ||ab|| represents the spatial distance between points a and b;

[0118] Using the constraints of the above formula to form a linear equation system, the function coefficient a can be solved using the least squares method. i 、b i and c i .

[0119] After the surface implicit function is obtained, the spatial isosurface can be determined. The point cloud space is divided into voxels using Octree, and the intersection of each voxel and the isosurface is found using the Marching Cube algorithm. These intersections are combined to form the reconstructed surface mesh (such as Figure 6 shown).

[0120] The above description is only for illustrating the implementation mode of the present invention and is not intended to limit the present invention. For those skilled in the art, any modification, equivalent substitution, improvement, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A three-dimensional point cloud splicing and reconstruction method based on a rotating stage, characterized in that: include: (1) Building a three-dimensional stitching and reconstruction system: The three-dimensional stitching and reconstruction system includes a 3D camera, a PC, a driver, a servo motor and a rotating table. The 3D camera and the driver are respectively connected to the PC, the servo motor is connected to the driver, and the servo motor is connected to the rotating table. The rotating table is used to place the object to be measured. The 3D camera is used to take pictures of the object to be measured and transmit them to the PC to obtain images and point cloud data; (2) Turntable calibration: a calibration plate with at least one circular mark point is vertically placed on the surface of the turntable, and the calibration plate can perform synchronous rotation under the drive of the turntable; the calibration plate is photographed by a 3D camera to obtain image data and corresponding point cloud data; the sub-pixel coordinates of the rotation center of the circular mark point on the calibration plate are extracted by a circle recognition algorithm, and the corresponding three-dimensional coordinates of the center are obtained by an interpolation method; the motion trajectory of the same circular mark point is fitted with plane and spherical equations, and the three-dimensional coordinates of the rotation center of each circular mark point can be solved by combining them; the least squares method is used to fit straight line parameters for multiple rotation centers, and the straight line parameters are the calibration parameters of the turntable; (3) Point cloud stitching: The pose conversion relationship between point clouds of each viewpoint is calculated through the calibration parameters of the turntable and the corresponding rotation interval of the turntable, so as to realize point cloud stitching and complete point cloud fusion; (4) Point cloud surface reconstruction: The normals of the fused point cloud are calculated, and the surface implicit function is constructed. The coefficients of the function are solved using the least squares method, and the isosurface is extracted using the marching cubes algorithm to achieve surface reconstruction.

2. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1, characterized in that: The rotating platform is circular, and the center of the circle is vertically connected to the rotating shaft of the servo motor.

3. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1 is characterized in that: The calibration plate is square or rectangular, and at least one circular marking point is arranged on the surface.

4. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1, characterized in that: In step (2), the calibration plate is photographed by a 3D camera to obtain image data and corresponding point cloud data. Specifically, the rotating table is rotated multiple times within the field of view of the camera, and the rotation interval remains consistent. Each time the 3D camera rotates, the calibration plate is photographed once, and the corresponding grayscale image of the calibration plate and oriented point cloud data are obtained.

5. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1, characterized in that: In step (2), the sub-pixel coordinates of the rotation center of the circular mark point on the calibration plate are extracted by the circle recognition algorithm, and the corresponding three-dimensional coordinates of the center of the circle are obtained by the interpolation method. Specifically, the sub-pixel coordinates of the center of the circular mark point on each calibration plate image are extracted by the circle recognition algorithm, and the integer pixel coordinates of the four adjacent points are obtained from the sub-pixel coordinates. At the same time, the three-dimensional coordinates of the corresponding points in the directed point cloud data are obtained by the four pixel indexes. These four three-dimensional points can be used for interpolation to obtain high-precision three-dimensional coordinates of the center of the circle.

6. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 5, characterized in that: Let the sub-pixel coordinate of the center of the circular marker be P c =(u c , v c ), the coordinates of the four adjacent integer pixels around this coordinate are P c0 =(u0,v0),P c1 =(u0+1,v0),P c2 =(u0,v0+1),P c3 =(u0+1, v0+1), where (u0, v0) is P c Round down the coordinates; Calculate the areas of the four rectangular regions enclosed by the four integer pixel coordinates, S0, S1, S2, and S3. The corresponding reciprocals are W0, W1, W2, and W3. Use the four integer pixel coordinates to find the corresponding three-dimensional coordinates P0, P1, P2, and P3 in the directed point cloud. Then use the interpolation method to obtain P c The coordinates are ∑W i P i / ∑w i .

7. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1, characterized in that: In step (2), the plane and spherical equations are fitted to the motion trajectory of the same circular mark point, and the three-dimensional coordinates of the rotation center of each circular mark point can be solved by combining them. The linear parameters are fitted to multiple rotation centers using the least squares method. The linear parameters are the calibration parameters of the rotation stage, which are specifically: Assume that the coordinates of the circular mark points on the same arc are (x i ,y i , z i ), the coordinates of the center of the sphere are (x0, y0, z0), and the radius is r. First, fit a plane to these points, and the plane equation is: Ax+By+Cz+1=0, The equation of the sphere is: (x-x0) 2 +(y-y0) 2 +(z-z0) 2 =r 2 , Then, the following equation is established by combining the spherical equation and the plane equation based on the constraint that the center of the sphere is on the plane: If there are at least 3 marking points on the same arc, the above equation can be solved and the coordinates of the center of the sphere can be obtained; The linear equation obtained by using PCA to fit the straight line of multiple spherical center coordinates is P = tN + S, where the unit direction vector of the straight line is N (N x , N y , N z ), a point on the straight line is S(S x , S y , S z ); Calculate the mean coordinates of the point cloud on the straight line: That is S; The calculation matrix is: Perform SVD decomposition on the matrix C, and take the eigenvector corresponding to the maximum eigenvalue as the direction vector N of the line.

8. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1, characterized in that: The point cloud stitching is specifically as follows: Set N as the unit direction vector of the rotating platform axis, S as a point on the axis line, and N and S as the calibration parameters of the rotating platform solved in step (2); Assume that there is a point C on the target surface to be spliced ​​at the initial position 0 , the corresponding point after the turntable rotates counterclockwise θ is C, the 3D camera always faces the position of point C, and obtains the point cloud data of this position. Point cloud stitching is to obtain the coordinates of point C before rotation from the position of point C after each rotation 0 In the process of obtaining the coordinates of the point position, the splicing function can be achieved by rotating point C clockwise around the axis by an axis angle of θ, as follows: By S(X S , Y S , Z S ), C(X C , Y C , Z C ) to get the formula: Among them, R(N, θ) is a 3×3 matrix related to the unit normal vector of the rotating platform and the rotation angle θ. After sorting, we can get: Where R(N,θ) is: Calculation can be obtained from the coordinates of point C 0 Point coordinates; If the rotation angle interval of the rotating platform is θ°, and the total rotation is m=360 / θ-1 times, the i-th point cloud obtained by the 3D camera after rotation is PC bi , each point cloud after stitching is PC ai ,but: PC ai =R(N,θ)(PC bi -S)+S i=0,1,2…m The result of combining all the point clouds before rotation is the point cloud stitching result.

9. The three-dimensional point cloud stitching and reconstruction method based on a rotating stage according to claim 1, characterized in that: In step (4), the surface implicit function is constructed and the coefficients of the function are solved using the least squares method, specifically: The implicit function F(p) for constructing the surface specifies a value for each position in the space (p is any point in the space), when the point is inside the surface, F(p) < 0, when it is on the surface, F(p) = 0, when it is outside the surface, F(p) > 0; the coordinates of each point before rotation and the corresponding normal vector are used to construct an analytical expression, and the points satisfying F(p) = 0 constitute the surface of the object; For each point p i By constructing the function F(p), we can get: F(p i +εn i )=ε, F(p i -εn i )=-ε, F(p i )=0, Among them, ε is a positive value that is very small relative to the scale of the point cloud, n i For point p i The normal vector of the target facing outward; F(p) is represented by a linear combination of distance-related functions: in, is the kernel function, ||ab|| represents the spatial distance between points a and b; Using the constraints of the above formula to form a linear equation system, the function coefficient a can be solved using the least squares method. i , b i and c i .

Citation Information

Patent Citations

  • Three-dimensional measuring device and method based on binocular camera imaging and structured light technology

    CN111750805A

  • Rotating shaft calibration method based on binocular vision

    CN111981984A