An Axis Calibration Method for a Line Structured Light System
Through the axis optimization algorithm of cylindrical calibration body and contour point cloud features, the problem of large error and complexity of linear structure optical systems in the calibration of cylinder parts is solved, efficient and accurate axis calibration is achieved, and the operation process is simplified.
Patent Information
- Application Number
- CN202510316473.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-18
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-03-18
AI Technical Summary
When calibrating cylinder parts, existing linear structured light systems have problems such as large axis calibration error, difficult to obtain calibration bodies, and complex operational processes. Especially in ICP point cloud registration and methods based on small hole imaging models, there are problems such as limitations and insufficient accuracy.
The cylindrical calibration body and the axis optimization algorithm based on the contour point cloud characteristics are used to coordinate the cylindrical calibration body by clamping the cylindrical calibration body through a three-claw chuck. Combined with the structured light plane normal vector and ellipse fitting, iterative optimization is used using the Rodriguez formula to construct the objective function to obtain the accurate axis equation.
It reduces the difficulty of obtaining the calibration body, provides reliable initial axis value, improves iterative convergence speed, realizes high-precision axis calibration, simplifies the operation process, and performs axis calibration when the camera internal reference is unknown.
Smart Images

Figure CN119845194B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer vision, and particularly relates to a method for calibrating the axis of a line structured light system. Background Art
[0002] With the increasing application of computer-aided design (CAD) in the field of mechanical manufacturing, the three-dimensional digital model of parts has become an indispensable part in the manufacturing and quality inspection processes. Non-contact measurement has gradually replaced the contact measurement method mainly based on coordinate measuring machines (CMMs) with its low cost and high topography measurement efficiency. As a non-contact active vision measurement method, line structured light is widely used in dimension measurement and quality inspection with high efficiency and high precision. Currently, line structured light usually works with a motion mechanism and relies on the pre-calibrated moving direction to achieve the stitching of contour point clouds, that is, integrating the point cloud data scanned at different positions to form a complete contour point cloud. However, there is a problem with this scanning method. Since the back side of the object is blocked, the contour information of this part cannot be scanned and thus is lost. Based on this, for line structured light, it is very crucial to develop an efficient and accurate axis calibration method. Only by achieving accurate axis calibration can complete point cloud data be obtained when scanning cylindrical parts, and the shape and other information of the cylindrical parts can be presented comprehensively.
[0003] There are two main methods for obtaining the complete circumferential contour point cloud of the measured cylindrical part. One is the point cloud registration method based on ICP and its variants, and the other is the rotary stitching method with a known axis equation. ICP has limitations in point cloud registration. It has high requirements for the spatial pose of the point cloud to be registered. When the initial spatial position and attitude are poor, it is easy to fall into a local optimal solution during the solution process, that is, the global best result cannot be obtained. To solve this problem, corresponding variants of ICP have emerged, and the role of these variants is to make the algorithm converge to the correct result more easily during iterative calculation. For parts with repetitive features on the surface contour such as shafts, stepped shafts, ball screws, and screws, incorrect matching often occurs during point pair operations, and this incorrect matching will further lead to registration errors or even complete registration failures during the registration of parts, making related assembly or positioning work unable to proceed normally. For the rotary stitching method with a known axis equation, there are currently two main ways for axis calibration. The first way is to estimate the external camera parameter matrix based on the pinhole imaging model for axis calibration. This method has limitations. In the camera field of view, the angle between the normal vector of the calibration board and the camera optical axis cannot be too large. If the angle is too large, the detection of the corner points of the calibration board will become difficult, thereby having an adverse effect on the calibration accuracy, which limits the calibration application scenario of this method.
[0004] The second method is to calibrate the axis based on a standard calibration object. Its advantage is that it avoids multiple estimations of the external camera parameters and reduces the introduction of errors. However, this method also has disadvantages. The standard calibration object is usually not easy to obtain, and the accuracy requirements for the calibration object itself are extremely high.
[0005] Currently, there is an urgent need for an axis calibration method for a line structured light system that is easy to operate and whose calibration object is easy to obtain. Summary of the Invention
[0006] The present invention provides an axis calibration method for a line structured light system. Starting from a cylindrical calibration object and an axis optimization algorithm based on contour point cloud features, it fundamentally reduces the problems of large axis calibration errors, difficult acquisition of the calibration object, and complex operation process in the line structured light system.
[0007] An axis calibration method for a line structured light system. Preferably, the axis calibration system of the applied line structured light system includes:
[0008] Line structured light system: including a camera and a line laser;
[0009] Mechanism to be calibrated: three-jaw chuck, rotating belt, turntable to be calibrated, motor runner, chuck runner, rotating motor;
[0010] Cylindrical calibration object and the mechanism of the top pin to be calibrated;
[0011] The axis calibration method of the line structured light system includes:
[0012] S1: The three-jaw chuck at the front end of the turntable to be calibrated clamps a cylindrical calibration object with an ideal Lambert surface, and the axis of the cylindrical calibration object is coaxial with the axis of the three-jaw chuck;
[0013] S2: Complete the installation of the line structured light system, and calibrate the camera and the structured light plane of the line structured light system;
[0014] S3: The cylindrical calibration object rotates uniformly around the axis, and the line structured light system scans and records each frame of the contour point cloud and the rotation angle of the cylindrical calibration object; verify the coaxial relationship between the cylindrical calibration object and the axis of the turntable to be calibrated. If the coaxial condition is met, continue to execute S4, otherwise return to S1 for recalibration;
[0015] S4: Based on the ellipse fitted by the normal vector of the structured light plane and the contour point cloud, project the ellipse into a perfect circle through the ellipse, and obtain the initial axis value based on the projection of the perfect circle in the axis direction;
[0016] S5: Based on the initial value of the axis, the Rodriguez formula is used to splice the contour point clouds of each frame to obtain the overall contour point cloud. The objective function is constructed by combining the cylindrical geometric constraints and the variance of the distance distribution from the overall contour point cloud of the cylindrical calibration body to the axis, and the axis equation is iteratively optimized.
[0017] Preferably, the cylindrical calibration body is made of alumina ceramics and has a cross-sectional diameter of 18 mm.
[0018] Preferably, the camera parameter calibration adopts Zhang's two-step calibration method to determine the camera's internal and external parameters and the lens's distortion coefficient; the structured light plane calibration uses a coplanar target method to obtain the spatial equation of the structured light plane, and the specific steps of S2 are as follows;
[0019] The working surface of the calibration plate is coplanar with the Lambertian plate to establish a coplanar target. The structured light plane is irradiated on the Lambertian plate, and the spatial pose of the coplanar target is changed multiple times. The camera extrinsic parameters are estimated using the extracted corner points of the calibration plate to obtain the plane equations of each calibration plate in the camera coordinate system. The plane equations of the calibration plate under each pose are obtained by multiple joint calculations. The center point of the light strip extracted at the current pose , using the extracted light strip center point The corresponding dedistorted normalized coordinates Construction Rays , the coordinates in the camera coordinate system are obtained by combining the following equation (1): , by least squares fitting coordinates The final light plane equation is obtained;
[0020] (1);
[0021] in , , , are the parameters of the equation, Normalized coordinates for dedistortion.
[0022] Preferably, the specific steps of S3 are as follows:
[0023] S3.1: Setting the rotation speed of the turntable to be calibrated, where the rotation speed matches the frame rate captured by the camera;
[0024] S3.2: The three-jaw chuck rotates at a constant speed to drive the cylindrical calibration body to rotate, and the line structured light system scans the cylindrical calibration body and records the contour point cloud and rotation angle of each frame;
[0025] S3.3: Compare the offsets of the corresponding points of the contour point clouds of each frame in the camera coordinate system, and use the method based on pixel size mapping to verify the coaxial relationship between the cylindrical calibration body and the turntable to be calibrated. The camera pixel size 、Object distance and the camera focal length are both known. When the rotation axis of the three-jaw chuck coincides with the rotary axis of the cylindrical calibration body, the corresponding distance in the three-dimensional space of the point pairs in the contour point cloud is less than the tolerance , and satisfies the following formula (2):
[0026] (2);
[0027] Where 、 are the corresponding points of image i and image j in the contour point cloud, is the adjustment factor;
[0028] If the corresponding distance , that is, the offset is less than the tolerance , then the coaxial relationship is satisfied; the corresponding distance is greater than the tolerance , return to the above S1, calibrate the three-jaw chuck with the assistance of a micrometer, and re-clamp the cylindrical calibration body until the coaxial relationship is satisfied.
[0029] Preferably, the specific steps of S4 are as follows:
[0030] S4.1: Construct an orthogonal two-dimensional coordinate system based on the normal vector of the structured light plane and the initial point in the single-frame contour point cloud ;
[0031] S4.2: Project the contour point cloud generated by the intersection of the structured light plane and the cylindrical calibration body onto the orthogonal two-dimensional coordinate system and complete the ellipse fitting. After fitting, obtain the center point of the ellipse, the major axis of the ellipse, the minor axis of the ellipse, and the inclination angle of the ellipse;
[0032] S4.3: Based on the normal vector of the structured light plane, find the direction vector that makes the projection of the contour point cloud a perfect circle. The direction vector is the initial value of the axis direction vector . The three-dimensional coordinates obtained by mapping the center point of the ellipse through the axis to be calibrated is the initial value of the space point passing through the axis ;
[0033] The derivation process of obtaining the initial value of the axis is as follows:
[0034] The orthogonal two-dimensional coordinate system Orthogonal unit vectors The formulas are shown in (3), (4), and (5) as follows:
[0035] (3);
[0036] (4);
[0037] (5);
[0038] is an intermediate variable for derivation, used to construct orthogonal vectors and determine the vector direction of:
[0039] Three-dimensional coordinate system For each three-dimensional point in the contour point cloud in the two-dimensional coordinate system the coordinates are shown in formula (6) as follows:
[0040] (6);
[0041] The center coordinates of the ellipse can be obtained by fitting the contour point cloud in the two-dimensional coordinate system , and after mapping it to the three-dimensional coordinate system, it is the initial value of the spatial point passing through the axis as shown in (7):
[0042] (7);
[0043] The major axis direction of the ellipse is shown in (8) as follows:
[0044] (8);
[0045] One of the projection directions is the initial value of the axis direction vector as shown in (9):
[0046] (9);
[0047] Wherein , .
[0048] Preferably, the specific steps in S5 are as follows:
[0049] S5.1: Based on the initial value of the axis direction vector and the initial value of the spatial point passing through the axis Using the Rodriguez formula, the contour point clouds of each frame are rotationally stitched around the iterative intermediate quantity or the initial iterative value to obtain the overall contour point cloud. The stitching process of the contour point cloud around the rotation axis is shown in Equation (10):
[0050] (10);
[0051] where is the rotation matrix, is the identity matrix, is the rotation angle, is expressed as the product of the sine value of the rotation angle and the skew-symmetric matrix ; is expressed as the product of the difference between 1 and the cosine value of the rotation angle and the square of the skew-symmetric matrix :
[0052] where is the skew-symmetric matrix composed of the axis direction vectors, and the matrix is shown in Equation (11):
[0053] (11);
[0054] Before rotation, the contour point cloud is placed at the origin, and the formula is as shown in (12):
[0055] (12);
[0056] The contour point cloud rotates around the rotation axis. When the new point cloud is added during the stitching process, the original point cloud is rotated, is the contour point cloud obtained after rotation, is the spatial coordinates of each contour point cloud subtracted from the coordinates of the spatial point passing through the axis and then transposed, is the above result left-multiplied by the rotation matrix and then transposed;
[0057] S5.2: Establish an objective function based on the geometric characteristics of the cylindrical calibration body, and make the obtained rotation axis equation approximate the theoretical value after multiple iterations. The expression of the objective function is as shown in (13):
[0058] (13);
[0059] The objective function consists of two parts. The first part depends on the geometric dimensions of the cylindrical calibration body, and the second part is the variance of the distance distribution of the overall contour point cloud to the axis at the current iteration for constraint, is the variance of the distance distribution from the point cloud to the axis, where is the weight factor, is the total number of contour point clouds of the overall profile. The initial value selection of the iteration depends on the above S4, is the sum of the square roots of the differences between the distance values of each point to the axis and the size values of the cylindrical calibration body, is the product of the weight and the reciprocal of the total number of contour point clouds of the overall profile, means to obtain the minimum value of the function in the parentheses;
[0060] After calibrating the rotation axis, the rotation angle of the i-th contour point cloud, the camera sampling frequency and the rotational angular velocity are related as shown in (14):
[0061] (14);
[0062] During the iteration process, in each iteration, the contour point clouds are spliced around the iterative intermediate quantity of the space axis. The overall contour point cloud obtained after splicing is constrained by the objective function until the objective function of the obtained rotation axis equation is minimized, and then the acquisition of the space axis, that is, the calibration process, is completed.
[0063] Preferably, the line structured light system is inclined at an angle of 20 - 45 degrees and is arranged parallel to the axis direction on the side of the axis calibration platform. The mechanism to be calibrated is arranged at one end of the axis calibration platform, and the to-be-calibrated thimble mechanism is located at the other end of the axis calibration platform. The three-jaw chuck includes three jaws. The three-jaw chuck is used to clamp and firmly fix the cylindrical calibration body. The motor runner and the chuck runner are connected by a rotating belt and are arranged at the end far from the three-jaw chuck. The motor runner is connected to the rotating motor. The rotating motor drives the motor runner to rotate, and then drives the rotating belt outside the motor runner to rotate. The rotating belt drives the chuck runner to rotate, and the chuck runner drives the three-jaw chuck to rotate. When the center of gravity of the clamped cylindrical calibration body is unstable, the to-be-calibrated thimble mechanism is used to support the cylindrical calibration body.
[0064] The beneficial effects of the present invention are as follows:
[0065] 1. By designing the cylindrical calibration body, the present invention reduces the difficulty of obtaining the calibration body compared with the existing axis calibration methods.
[0066] 2. Based on the geometric features formed by the intersection of the cylindrical calibration body and the structured light plane, the present invention proposes a method for obtaining the initial value of the axis using the contour point cloud of the calibration body, provides a reliable initial value for the subsequent optimization algorithm, and accelerates the convergence of the iteration.
[0067] 3. The present invention constructs an objective function for optimizing the parameters of the axis equation by using the dimensions and geometric features of the cylindrical calibration body, and the accurate axis equation can be obtained by iteratively solving the objective function through an optimization algorithm.
[0068] 4. Compared with the method of calibrating the axis using a calibration plate, the present invention can calibrate the axis of the line structured light system when the internal parameters of the camera are unknown, greatly reducing the conditions for applying this method. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The drawings described herein are used to provide a further understanding of the present invention, form a part of this application, and the schematic examples and descriptions of the present invention are used to explain the present invention and do not constitute an improper limitation to the present invention.
[0070] Figure 1 It is a schematic flowchart of the axis calibration method for the line structured light system of the present invention;
[0071] Figure 2 It is a schematic diagram of the placement of the cylindrical calibration body and the line structured light system during axis calibration of the present invention;
[0072] Figure 3 It is the left view of the schematic diagram of the placement of the cylindrical calibration body and the line structured light system during axis calibration of the present invention;
[0073] Figure 4 It is the top view of the schematic diagram of the placement of the cylindrical calibration body and the line structured light system during axis calibration of the present invention;
[0074] Figure 5 They are two frames of contour point clouds of the cylindrical calibration body obtained by the line structured light system of the present invention, and the deviation of corresponding points when the cylindrical calibration body and the axis to be calibrated are not coaxial;
[0075] Figure 6 It is a schematic diagram of the method for obtaining the initial axis value proposed in the present invention;
[0076] Figure 7 It is the effect diagram of the rotational splicing of part of the contour point cloud of the cylindrical calibration body around a known axis in the present invention;
[0077] Figure 8 It is the overall contour point cloud of the stepped shaft reconstructed by using the axis calibration method of the line structured light system of the present invention;
[0078] Figure 9 It is the overall contour point cloud of the rectangular spline shaft reconstructed by using the axis calibration method of the line structured light system of the present invention.
[0079] Reference numerals: 1 line structured light system; 2 mechanism to be calibrated; 2-1 three-jaw chuck; 2-2 rotating belt; 2-3 turntable to be calibrated; 2-4 motor runner; 2-5 chuck runner; 2-6 rotating motor; 3 cylindrical calibration body; 4 thimble mechanism to be calibrated; 5 axis calibration platform. Detailed implementation manners
[0080] To solve the above problems, the present invention proposes an axis calibration method for a line structured light system, which can simplify the axis calibration process of the system and improve the reconstruction efficiency.
[0081] Refer to Figures 1 to 6 As shown, the axis calibration device of the axis calibration method for a line structured light system proposed by the present invention includes: a line structured light system 1, a mechanism to be calibrated 2, a cylindrical calibration body 3, a thimble mechanism to be calibrated 4, and an axis calibration platform 5.
[0082] The structured light system 1 includes a camera and a line laser. The line laser of the line structured light system 1 is used to emit line structured light onto the surface of the cylindrical calibration body 3. The line structured light system 1 is inclined at a certain angle, and the angle range is 20 - 45 degrees, and it is arranged parallel to the axis direction on the side of the axis calibration platform 5. The line structured light system 1 is inclined to ensure that the structured light plane intersects with the cylindrical calibration body 3 to generate an elliptical contour point cloud. The inclination angle only needs to ensure that an elliptical contour point cloud can be generated by the intersection. It is found in the experimental process that if the angle is too large, the ellipse fitting effect is not good, and if the angle is too small, the ellipse trend is not obvious. Therefore, the line structured light system 1 has the best ellipse fitting effect when inclined at an angle of 20 - 45 degrees.
[0083] Due to the height changes and shape differences on the object surface, the intersection line of the structured light plane and the object to be measured will be deformed. The camera is used to collect images of the deformed intersection line. The line structured light system 1 calculates the three-dimensional coordinates of each point on the object surface by analyzing the deformation of the intersection line in the images collected by the camera, combined with the triangulation principle and related algorithms, so as to obtain the three-dimensional information of the object. During this process, it is necessary to ensure that the parameters of the camera, such as the focal length, exposure time, etc., are set reasonably to obtain clear and accurate images. The line structured light system 1 is a prior art, so it will not be elaborated too much.
[0084] The mechanism to be calibrated 2 includes a three-jaw chuck 2-1, a rotating belt 2-2, a turntable to be calibrated 2-3, a motor runner 2-4, a chuck runner 2-5, and a rotating motor 2-6. The mechanism to be calibrated 2 is located at one end of the axis calibration platform 5, and the thimble mechanism to be calibrated 4 is located at the other end of the axis calibration platform 5;
[0085] The three-jaw chuck 2-1 includes three jaws. The three-jaw chuck 2-1 is used to clamp and firmly fix the cylindrical calibration body 3 to keep the cylindrical calibration body 3 stable during subsequent operations;
[0086] The motor runner 2-4 and the chuck runner 2-5 are rotationally connected by a rotating belt 2-2 and are arranged at one end away from the three-jaw chuck 2-1. The motor runner 2-4 is connected to the rotating motor 2-6. Driven by the rotating motor 2-6, the motor runner 2-4 rotates, thereby driving the rotating belt 2-2 outside the motor runner 2-4 to rotate. The rotating belt 2-2 drives the chuck runner 2-5 to rotate, and the chuck runner 2-5 drives the three-jaw chuck 2-1 to rotate.
[0087] The cylindrical calibration body 3 is a standard object in the shape of a cylinder. The cylindrical calibration body 3 is used to calibrate and standardize instrument equipment, and serves as a standard reference to ensure the accuracy and reliability of measurement or detection. The diameter of the cylindrical calibration body 3 is 18mm. The diameter is not limited, and the range is between 10mm and 100mm. In this embodiment, 18mm is preferably used. When the length is too long and there is a situation of unstable center of gravity, the to-be-calibrated thimble mechanism 4 is used to support the cylindrical calibration body 3 to ensure that the center of gravity does not shift downward.
[0088] The cylindrical calibration body 3 is made of a material such as alumina ceramic with the optical characteristics of a Lambert surface. The energy distribution of the alumina ceramic on the light strip normal vector obtained in the structured light system is closer to the Gaussian distribution, avoiding the error introduced by the extraction error of the light strip center point algorithm and avoiding the occurrence of high specular reflection phenomena, facilitating the camera to obtain high-quality light strip images.
[0089] The flowchart of an axis calibration method for a line structured light system is shown in Figure 1 , and the specific process includes the following steps:
[0090] S1: Clamp the cylindrical calibration body;
[0091] The three-jaw chuck 2-1 clamps and firmly fixes the cylindrical calibration body 3. During installation, it should be ensured that the axis of rotation of the cylindrical calibration body 3 coincides with the axis of rotation of the to-be-calibrated turntable 2, and the coaxiality error is less than or equal to 0.01mm. The diameter of the cylindrical calibration body 3 is 18mm, and the length is 200mm.
[0092] S2: Complete the installation of the line structured light system, and calibrate the camera and the structured light plane of the line structured light system;
[0093] Among them, the calibration of the camera parameters uses Zhang's two-step calibration method to determine the internal and external parameters of the camera and the distortion coefficient of the lens. The structured light plane calibration uses the method of a coplanar target to obtain the spatial equation of the structured light plane.
[0094] The specific process is as follows:
[0095] The designed fixture ensures that the working surface of the calibration plate is coplanar with the Lambertian material plate to establish a coplanar target. The spatial position of the coplanar target is changed multiple times while ensuring the clarity of the calibration plate corners and the structured light plane irradiating the Lambertian plate. The camera extrinsic parameters are estimated using the extracted calibration plate corners to obtain the plane equations of each calibration plate in the camera coordinate system.
[0096] The plane equation of the plate is calibrated by multiple joint calculations at different poses The center point of the light strip extracted at the current pose , the corresponding dedistorted normalized coordinates Construction Rays , the coordinates in the camera coordinate system are obtained by combining the following formulas , by least squares fitting these coordinates The final light plane equation is obtained;
[0097] (1);
[0098] in , , , are the parameters of the equation, Normalized coordinates for dedistortion.
[0099] The schematic diagram of the arrangement space of the cylindrical calibration body 3 clamping and axis calibration device is as follows Figure 2 shown.
[0100] S3: Complete the contour scanning of the cylindrical calibration body 3 through the line structured light system. During the scanning process, the calibration body rotates at a constant speed and the rotation angle is recorded;
[0101] S3.1: Set the rotation speed of the turntable 2 to be calibrated. The rotation speed should match the camera acquisition frame rate.
[0102] In this embodiment, the camera shooting frame rate is 30, and the turntable is fixed to rotate 30° per second, that is, the angular interval between the contour point clouds is 1°;
[0103] S3.2: During the rotation of the turntable 2 to be calibrated, the linear structured light system records the rotation angle of the contour point cloud in each frame;
[0104] In this embodiment, after completing the camera calibration and the light plane calibration, the pixel coordinates of the center point of the light strip in the image can correspond to the world coordinates one by one. The contour point cloud can be obtained by rotating and scanning the cylindrical calibration body 3 by the three-claw chuck 2-1. In order to avoid the calibration error of the rotation axis caused by the different axes of the three-claw chuck, the present invention uses a method based on pixel size mapping. The camera pixel size used in the line structured light system for size measurement , Object distance and camera focal length All are known. When the chuck rotating shaft coincides with the rotary axis of the cylindrical calibration body, its intuitive manifestation is the distance between the corresponding point pairs in the contour point cloud in three-dimensional space. It should be less than the tolerance. , as shown in the schematic diagram Figure 3 , which satisfies the following formula (2):
[0105] (2);
[0106] Where and are the corresponding points of image i and image j, is the adjustment factor;
[0107] When formula (2) is satisfied, the clamping of the cylindrical calibration body meets the calibration requirements;
[0108] If formula (2) is not satisfied, then re-clamp the cylindrical calibration body with the assistance of tools. The specific steps are as follows:
[0109] Calibrate the three-jaw chuck 2-1: Use tools such as a micrometer to assist in calibrating the three-jaw chuck 2-1. Install the micrometer at a suitable position so that its measuring head contacts the surface of the cylindrical calibration body 3.
[0110] Slowly rotate the three-jaw chuck 2-1 and observe the change of the micrometer pointer. According to the deviation of the pointer, finely adjust the three-jaw chuck 2-1 so that the reading change of the micrometer during the rotation of the cylindrical calibration body 3 is controlled within a very small range, so as to ensure that the axis of the cylindrical calibration body 3 is as coaxial as possible with the axis to be calibrated. The axis to be calibrated is the axis of the turntable to be calibrated. During the calibration process, it is necessary to measure the offset of the contour point cloud multiple times and repeatedly adjust the clamping of the three-jaw chuck 2-1 until the coaxial relationship requirements are met.
[0111] S4: Obtain the initial value of the axis based on the obtained contour point cloud of the cylindrical calibration body:
[0112] S4.1: Construct an orthogonal two-dimensional coordinate system according to the structure light plane normal vector and the initial point in the single-frame contour point cloud;
[0113] S4.2: Project the contour point cloud generated by the intersection of the structure light plane and the cylindrical calibration body onto the orthogonal two-dimensional coordinate system and complete the ellipse fitting. After fitting, obtain the center point of the ellipse, the major axis of the ellipse, the minor axis of the ellipse and the inclination angle of the ellipse;
[0114] S4.3: Based on the normal vector of the structured light plane, find the direction vector that projects the contour point cloud into a perfect circle. This vector is the initial value of the axis direction vector. , the center point of the ellipse The three-dimensional coordinates obtained by mapping The axis to be calibrated passes through the initial value of the space point on the axis ;
[0115] The derivation process of obtaining the initial value of the axis is as follows:
[0116] The orthogonal two-dimensional coordinate system The orthogonal unit vectors in it The formulas are shown in (3), (4), and (5):
[0117] (3);
[0118] (4);
[0119] (5);
[0120] is an intermediate variable for derivation, used to construct an orthogonal vector and determine the vector direction of:
[0121] The three-dimensional coordinate system Each three-dimensional point of the contour point cloud in the two-dimensional coordinate system The coordinates are shown in formula (6):
[0122] (6);
[0123] Fitting the contour point cloud in the two-dimensional coordinate system gives the ellipse center coordinates , which are mapped to the three-dimensional coordinate system as the initial value of the space point on the axis as shown in (7):
[0124] (7);
[0125] The major axis direction of the ellipse is shown in (8):
[0126] (8);
[0127] One of the projection directions is the initial value of the axis direction vector as shown in (9):
[0128] (9);
[0129] Among them , ,thus completing the acquisition of the optimized initial value.
[0130] S5: Based on the obtained initial axis value, rely on Rodriguez's formula to complete the optimized solution of the axis equation. The specific steps are as follows:
[0131] S5.1: Use Rodriguez's formula to perform preliminary rotational stitching of the cylindrical calibration body 3 based on the initial axis value obtained in S4.3;
[0132] In this embodiment, based on Rodriguez's formula, during the subsequent iterative solution of the objective function, rotational stitching can be performed around the iterative intermediate quantity or the iterative initial value to obtain the overall contour point cloud.
[0133] The process of stitching the contour point cloud around the rotation axis is shown in formula (10):
[0134] (10);
[0135] Among them is the rotation matrix, is the identity matrix, is the rotation angle, is expressed as the product of the sine value of the rotation angle and the skew-symmetric matrix ; is expressed as the product of the difference between 1 and the cosine value of the rotation angle and the square of the skew-symmetric matrix ;
[0136] Among them is the skew-symmetric matrix composed of the direction vector, and the matrix is shown in formula (11):
[0137] (11);
[0138] Before rotation, place the contour point cloud at the origin, and the formula is as shown in (12):
[0139] (12);
[0140] Thus, the process of rotating the contour point cloud around the rotation axis is completed. When adding new point clouds during the stitching process, the original point cloud needs to be rotated. is the contour point cloud obtained after rotation, is the spatial coordinates of each contour point cloud subtracted from the spatial point passing through the axis and then transposed, is the above result left-multiplied by the rotation matrix and then transposed;
[0141] S5.2; Establish an optimization objective function based on the geometric characteristics of the cylindrical calibration body, which should approximately approach the theoretical value of the obtained axis equation after multiple iterations;
[0142] In this embodiment, the objective function consists of two parts. On the one hand, it depends on the geometric dimensions of the standard cylindrical calibration body 3 , and on the other hand, it is constrained by the variance of the distance distribution from the overall contour point cloud to the axis of rotation at the current iteration . is the variance of the distance distribution from the point cloud to the axis, is the number of overall contour point clouds. The expression of the objective function is as shown in (13):
[0143] (13);
[0144] Where is the weight factor, and the initial value of the iteration is selected depending on the above S4, is the sum of the square roots of the differences between the distance values of each point to the axis and the size values of the cylindrical calibration body, is the product of the weight and the reciprocal of the total number of overall contour point clouds, is to take the mean of the above-obtained sum of square roots and assign a weight, means to obtain the minimum value of the function within the brackets.
[0145] After calibrating the axis of rotation, the relationship between the rotation angle of the i-th contour point cloud and the camera sampling frequency and the angular velocity of rotation is as shown in (14):
[0146] (14);
[0147] During the iteration process, in each iteration, the contour point clouds are spliced around the intermediate iteration quantity of the spatial axis. The overall contour point cloud obtained after splicing is constrained by the objective function until the objective function of the obtained axis of rotation equation is minimized, and then the acquisition of the spatial axis, that is, the calibration process, is completed.
[0148] Figure 7 This is the effect diagram of the rotation splicing of the contour point clouds of part of the cylindrical calibration body around the known axis in the present invention.
[0149] Figures 8 - 9The overall contour point clouds of the stepped shaft and the splined shaft reconstructed by using the axis calibration method of the line structured light system of the present invention are shown. From the spliced overall contour point clouds, it can be seen that relying on the calibrated rotation axis of the present invention, based on the principle of laser triangulation, combined with technologies such as camera calibration, structured light plane calibration, axis calibration, and contour point cloud processing, the reconstruction of the stepped shaft and the splined shaft is completed. The line structured light system can complete the reconstruction of cylindrical parts with high precision based on the obtained axis equation, intuitively demonstrating the practicability of the present invention in the field of rotational reconstruction.
[0150] The above are only the preferred examples of the present invention and are not used to limit the present invention. For those skilled in the art, various changes and modifications can be made to the present invention. Any modification, equivalent replacement, improvement, etc. made to the present invention shall be included within the protection scope of the present invention.
Claims
1. An axis calibration method for a line structured light system, characterized in that: The axis calibration system of the applied line structured light system includes: Line structured light system: including a camera and a line laser; Mechanism to be calibrated: three-jaw chuck, rotating belt, turntable to be calibrated, motor runner, chuck runner, rotating motor; Cylindrical calibration body and thimble mechanism for the body to be calibrated; The axis calibration method of the line structured light system includes: S1: The three-jaw chuck at the front end of the turntable to be calibrated clamps a cylindrical calibration body with an ideal Lambert surface, and the axis of the cylindrical calibration body is coaxial with the axis of the three-jaw chuck; S2: Complete the installation of the line structured light system, and calibrate the camera and the structured light plane of the line structured light system; S3: The cylindrical calibration body rotates uniformly around its axis, and the line structured light system scans and records the contour point clouds and rotation angles of each frame of the cylindrical calibration body; Check the coaxial relationship between the cylindrical calibration body and the axis of the turntable to be calibrated. If the coaxial condition is met, continue with S4, otherwise return to S1 for recalibration; S4: Based on the ellipse fitted by the normal vector of the structured light plane and the contour point cloud, project the ellipse into a perfect circle through the ellipse, and obtain the initial axis value based on the projection of the perfect circle in the axis direction; S5: Based on the initial axis value, use the Rodriguez formula to splice the contour point clouds of each frame to obtain the overall contour point cloud, and construct an objective function by combining the cylindrical geometric constraints and the variance of the distance distribution of the overall contour point cloud of the cylindrical calibration body to the axis, and iteratively optimize the axis equation; The specific steps of S3 are as follows; S3.1: Set the rotation speed of the turntable to be calibrated, and the rotation speed matches the frame rate collected by the camera; S3.2: Start the rotating motor, the three-jaw chuck rotates uniformly to drive the cylindrical calibration body to rotate, and the line structured light system scans the cylindrical calibration body and records the contour point clouds and rotation angles of each frame; S3.3: Compare the offset of the corresponding points of each frame of contour point cloud in the camera coordinate system, and use the method based on pixel size mapping to verify the coaxial relationship between the cylindrical calibration body and the turntable to be calibrated. The pixel size of the camera , object distance and camera focal length are all known. When the rotation axis of the three-jaw chuck coincides with the rotation axis of the cylindrical calibration body, the corresponding distance of the point pairs in the contour point cloud in three-dimensional space is less than the tolerance and satisfies the following formula (2): (2); wherein and are corresponding points of image i and image j in the contour point cloud, is an adjustment factor; Corresponding distance That is, the offset is less than the tolerance , then the coaxial relationship is satisfied; the corresponding distance is greater than the tolerance , return to S1, calibrate the three-jaw chuck with the assistance of a dial indicator, and re-clamp the cylindrical calibration body until the coaxial relationship is satisfied; The specific steps of S4 are as follows: S4.1: According to the normal vector of the structured light plane and the initial points in the single-frame contour point cloud construct an orthogonal two-dimensional coordinate system ; S4.2: Project the contour point cloud generated by the intersection of the structured light plane and the cylindrical calibration body onto the orthogonal two-dimensional coordinate system and complete the ellipse fitting. After fitting, obtain the center point of the ellipse, the major axis of the ellipse, the minor axis of the ellipse, and the inclination angle of the ellipse; S4.3: Based on the normal vector of the structured light plane, find the direction vector that projects the contour point cloud into a perfect circle, and this direction vector is the initial value of the axis direction vector , the center point of the ellipse The three-dimensional coordinates obtained by mapping The axis to be calibrated is the initial value of the space point passing through the axis ; The derivation process of obtaining the initial axis value is as follows: The orthogonal two-dimensional coordinate system The orthogonal unit vectors The formulas are as shown in (3), (4), and (5): (3); (4); (5); To derive intermediate variables for constructing orthogonal vectors and determine the vector direction of Three-dimensional coordinate system Each three-dimensional point of the middle contour point cloud In a two-dimensional coordinate system The coordinates under As shown in formula (6): (6); The center coordinates of the ellipse can be obtained by fitting the contour point cloud in the two-dimensional coordinate system After being mapped to the three-dimensional coordinate system, it is the initial value of the spatial point passing through the axis As shown in (7): (7); The direction of the major axis of the ellipse As shown in (8): (8); One of the projection directions is the initial value of the axis direction vector As shown in (9): (9); Among them , ; The specific steps in S5 are as follows: S5.1: Based on the initial value of the axis direction vector and the initial value of the spatial point on the axis Using the Rodriguez formula, the overall contour point cloud is obtained by rotating and splicing each frame of contour point cloud around the iterative intermediate quantity or the iterative initial value. The process of splicing the contour point cloud around the rotation axis is shown in Equation (10): (10); Among them is the rotation matrix, is the identity matrix, is the rotation angle, is expressed as the product of the sine value of the rotation angle and the skew-symmetric matrix ; is expressed as the product of the difference between 1 and the cosine value of the rotation angle and the square of the skew-symmetric matrix : is an anti-symmetric matrix formed by the axis direction vectors, and the matrix is shown in formula (11) as follows: (11); Before rotation, place the contour point cloud at the origin, and the formula is as shown in (12): (12); The contour point cloud Rotates around the rotation axis. When a new point cloud is added during the splicing process, the original point cloud is rotated, and the contour point cloud obtained after rotation is For each contour point cloud The vector subtraction is performed between the spatial coordinates and the spatial point passing through the axis and then transposed, is the result of the above left-multiplied by the rotation matrix and then transposed; S5.2: Establish an objective function based on the geometric characteristics of the cylindrical calibration body, and after multiple iterations, make the obtained axis of rotation equation approximate the theoretical value. The expression of the objective function is as shown in (13): (13); The objective function consists of two parts. The first part depends on the geometric dimensions of the cylindrical calibration body , and the second part is the variance of the distance distribution from the overall contour point cloud to the axis at the current iteration . Constraints are imposed . Here, is the variance of the distance distribution from the point cloud to the axis, where is the weight factor , is the sum of the square roots of the differences between the numerical values of the distances from each point to the axis and the numerical values of the dimensions of the cylindrical calibration body , which is the product of the weight and the reciprocal of the total number of the overall contour point cloud , is to calculate the mean value of the above sum of square roots and assign weights means to obtain the minimum value of the function within the brackets; After calibrating the rotation axis, the relationship between the rotation angle of the i-th contour point cloud, the camera sampling frequency and the rotational angular velocity is shown in (14): (14); In each iteration of the contour point cloud, splice around the iterative intermediate quantity of the space axis, and constrain the overall contour point cloud obtained after splicing through the objective function until the objective function obtained from the axis of rotation equation is minimized, then the acquisition of the space axis, that is, the calibration process, is completed; The material of the cylindrical calibration body is alumina ceramic.
2. The axis calibration method of a line structured light system according to claim 1, characterized in that: The cross-sectional diameter of the cylindrical calibration body is 18 mm.
3. A method for calibrating the axis of a line structured light system according to claim 1, characterized in that: The camera parameter calibration uses Zhang's two-step calibration method to determine the internal and external parameters of the camera and the distortion coefficient of the lens; The structured light plane calibration uses the method of a coplanar target to obtain the space equation of the structured light plane. The specific steps of S2 are as follows; The working surface of the calibration plate is coplanar with the Lambertian plate to establish a coplanar target. The structured light plane is irradiated on the Lambertian plate, and the spatial pose of the coplanar target is changed multiple times. The camera extrinsic parameters are estimated using the extracted corner points of the calibration plate to obtain the plane equations of each calibration plate in the camera coordinate system. The plane equations of the calibration plate under each pose are obtained by multiple joint calculations. The center point of the light strip extracted at the current pose , using the extracted light strip center point The corresponding dedistorted normalized coordinates Construction Rays , the coordinates in the camera coordinate system are obtained by combining the following equation (1): , by least squares fitting coordinates The final light plane equation is obtained; (1); Among them 、 、 、 are equation parameters, is the undistorted normalized coordinate.
4. A method for calibrating the axis of a line structured light system according to claim 1, characterized in that: The line structured light system is inclined at an angle of 20 - 45 degrees and is arranged parallel to the axis direction on the side of the axis calibration platform; The mechanism to be calibrated is set at one end of the axis calibration platform, and the thimble mechanism for the body to be calibrated is located at the other end of the axis calibration platform; The three-jaw chuck includes three jaws and is used to clamp and firmly fix the cylindrical calibration body; The motor runner and the chuck runner are connected by a rotating belt and are arranged at one end far from the three-jaw chuck. The motor runner is connected to the rotating motor. The rotating motor drives the motor runner to rotate, thereby driving the rotating belt outside the motor runner to rotate. The rotating belt drives the chuck runner to rotate, and the chuck runner drives the three-jaw chuck to rotate; when the center of gravity of the clamped cylindrical calibration body is unstable, the calibration thimble mechanism to be calibrated is used to support the cylindrical calibration body.