A Structured Light Calibration Method Using a Freely Placed Single Cylindrical Target
By using a freely placed single cylindrical target and Scheimpflug camera imaging model, the positional relationship between the camera and the laser is calculated, and the problem of low calibration accuracy in measuring curved surface parts in the prior art is solved, and high-precision curved surface measurement is achieved.
Patent Information
- Application Number
- CN202311322978.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-06-20
- Estimated Expiration
- 2043-10-13
AI Technical Summary
When measuring curved surface parts, the existing structured light measurement system uses two-dimensional plane targets for calibration, resulting in low measurement accuracy and high light bar noise, making it difficult to ensure the accuracy of curved surface detection.
The freely placed single cylindrical target is used for calibration, and the positional relationship between the camera and the laser is calculated using the Scheimpflug camera imaging model and light plane equation, and the optical strip model is established through the edge lines of the cylindrical target to improve calibration accuracy and measurement stability.
The structured light measurement system has improved the high-precision measurement capability of curved surface objects, reduced the error introduced by light bar noise, and enhanced the stability and accuracy of calibration results.
Smart Images

Figure CN117387487B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of structured light measurement, and particularly relates to a calculation method for the positional relationship between a camera and a laser of a three-dimensional measurement system of line structured light based on Scheimpflug camera imaging. Background Art
[0002] A structured light measurement system mainly includes a camera, a laser, and a supporting scanning motion device. The working principle is that the laser emits laser light of a specific shape, such as a light plane, which intersects with the surface of the object to be measured. As the shape of the surface of the object to be measured varies, the form of the laser light will also change correspondingly. By capturing images of this laser light with the camera and performing three-dimensional solution on the images based on the camera parameters and the relative position between the camera and the laser, three-dimensional measurement can be achieved.
[0003] In a structured light measurement system, the determination of the relative positional relationship between the camera and the laser is a definite solution condition for the three-dimensional position of the object, and the calibration of the line structured light system is a key link to ensure measurement accuracy. During the measurement process, the accuracy of the positional relationship between the two directly affects the accuracy of the dimensions and shape of the three-dimensional measurement of the object.
[0004] In practical applications, a large number of measurement objects are curved surface parts. However, currently, two-dimensional planar targets are commonly used for calibration, which is restricted by the calibration accuracy of the external parameters of the camera, has problems such as excessive differences in light and dark stripes leading to unstable data, and is not suitable for measuring curved surface parts.
[0005] Existing technologies usually directly use the external parameters in the camera calibration process to construct a homography matrix. For example, the calibration method based on joint external parameter estimation proposed by Duan Fajie, and the calibration method using the homography matrix to solve feature points and adopting principal component analysis proposed by Li Weiming. These methods all use planar targets with specific black and white patterns. Due to the influence of color, the stability of the light strips is insufficient, usually introducing strong noise, and it is difficult to ensure the accuracy of curved surface detection for planar target calibration, resulting in poor calibration results and measurement results. Summary of the Invention
[0006] The purpose of the present invention is to provide a calibration method for a line structured light system using a freely placed single cylindrical target. The target is uniform, the image is stable, the error introduced by light strip noise is reduced, the calibration accuracy is improved, and the calibration process is based on a cylindrical model. Compared with two-dimensional planar targets, it can improve the high-precision measurement ability of the measurement system for curved surface objects and is applicable to general industrial measurement applications.
[0007] The technical solution adopted by the present invention is as follows:
[0008] Equipment: camera, line laser, two-dimensional plane target and multiple types of cylindrical pin gauges. The cylindrical pin gauge cannot be too thick, and the camera needs to be able to capture the edge lines on both sides of the cylinder at the same time. The calibration process includes the following steps:
[0009] Step S1: Establishing the Scheimpflug camera thick lens measurement model: P c =λKp u , where P c =(x c y c z c ) T is the object space coordinate point, λ is a balancing factor, p u =(x u y u 1) T are the homogeneous coordinates of the image points,
[0010]
[0011] is the imaging matrix, f is the focal length of the camera, e is the distance of the camera principal point, θ, is the Scheimpflug camera inclination angle, d u ,d v is the pixel size, u0, v0 is the pixel coordinate of the intersection of the camera optical axis and CCD, and z0 is the z coordinate of the intersection of the camera optical axis and CCD. Establish the line structured light measurement model P C =λKp u ,Ax c +By c +Cz c =1, the two equations can eliminate the balancing factor λ, (x c y c z c ) T =K(x u y u 1) T / (ABC)K(x u y u 1) T , where A, B, C are the coefficients of the light plane equation.
[0012] Step S2: Establish the correlation between the optical center and the cylinder where ρ i =(A i B i C i D i ) T are the coefficients of the two tangent plane equations from the optical center to the cylinder, l i =(a i bi c i ) are the two edge straight line coefficients for cylindrical imaging.
[0013] The light plane intersects with the cylinder, forming a three-dimensional elliptical arc. The minor semi-axis of the elliptical arc is equal to the radius of the cylinder, and each point on the elliptical arc is on the cylinder, conforming to the cylinder equation and also conforming to the light plane equation.
[0014] Step S3: Calculate the relative position between the camera and the cylinder. According to the geometric relationship, assume ρ i If the included angle between the two normal vectors is obtuse, then the included angle between the two tangent planes is The distance from the optical center to the axis of the cylinder The direction vector is Then is a point on the axis of the cylinder, and keep the solution with z c >0. The direction vector of the axis is the cross product of the two normal vectors
[0015] Let keep the solution, then the axis of the cylinder is
[0016] Step S4: Assume that the axis of the cylinder is the z-axis, establish a cylindrical coordinate system, and r is the radius of the cylinder. Then the cylinder can be expressed as
[0017] The cylindrical coordinate system and the camera coordinate system conform to the rigid body transformation where:
[0018]
[0019] is the rotation matrix obtained by applying the Rodrigues algorithm, is the translation vector between the coordinate systems.
[0020] Then the conversion relationship between the cylindrical point and the camera is
[0021]
[0022] Step S5: Extract the central points of the elliptical arc light strips. Combine the camera imaging model and the two equations of the conversion relationship between the cylinder and the camera, Cancel out λ, discard the solutions on the side far from the optical center of the camera, and obtain multiple actual light strip points. Let P i =(x i y i z i ) T be the i-th light strip point obtained by solving, with a total of n light strip points. Arrange all the light strip points to obtain the matrix G=(P1 P2…P n ) T , then the light plane coefficients (A B C)T =(G T G) -1 G T (1…1) T 。 Description of the Drawings
[0023] Figure 1 is a flowchart of the implementation of the method of the present invention
[0024] Figure 2 is a schematic diagram of the line structured light measurement system model
[0025] Figure 3 are the calibration images acquired during the calibration experiment
[0026] Figure 4 is a schematic diagram of the intersection of the light plane and the cylindrical target
[0027] Figure 5 is a three-dimensional fitting diagram of the calibrated light stripe points Detailed Embodiment
[0028] To make the technical problems, technical solutions, and advantages to be solved by the present invention clearer, the following will be described in detail with reference to the drawings and specific embodiments
[0029] The steps are outlined as Figure 1 shown. The equipment to be used includes a camera, a line laser, a two-dimensional planar target, and multiple cylindrical plug gauges
[0030] Step S1: Establish a Scheimpflug camera thick lens measurement model
[0031] Starting from the ideal optical imaging principle and the data characteristics of the CCD image, it can be obtained that the three-dimensional object coordinate point P c =(x c y c z c ) T and the two-dimensional image homogeneous coordinate point p u =(x u y u 1) T satisfy the relational expression
[0032] P c =λKp u
[0033] where λ is a scaling factor that serves to normalize the image points
[0034]
[0035] is the imaging matrix, f is the camera focal length, e is the distance of the camera principal point, θ, is the tilt angle of the Scheimpflug camera, d u , d v is the pixel size, u0, v0 are the pixel coordinates of the intersection of the camera optical axis and the CCD, and z0 is the z coordinate of the intersection of the camera optical axis and the CCD.
[0036] The process of structured light measurement is to calculate the corresponding object coordinate points based on the obtained image coordinate points of the light stripe. Therefore, an additional condition is needed to eliminate the scaling factor λ.
[0037] According to the light plane equation, the structured light measurement model is as Figure 2 :
[0038] P C = λKp u , Ax c + By c + Cz c = 1
[0039] By combining the two equations, we can get (x c y c z c ) T = K(x u y u 1) T / (A B C)K(x u y u 1) T , where A, B, and C are the coefficients of the light plane equation.
[0040] Freely place the two-dimensional planar target, and the camera captures the image of the target. Using the nominal parameters of the camera lens and CCD as the initial values, and taking the minimization of the reprojection error as the objective function based on the coordinate points of the target feature points and their corresponding image points, optimize to calibrate the imaging matrix K and obtain the camera parameters.
[0041] Step S2: Establish the correlation between the optical center and the cylinder.
[0042] Freely place the cylindrical pin gauge so that the laser emitted by the laser illuminates the pin gauge to form a light stripe, and both the light stripe and the edge of the generatrix of the cylindrical pin gauge are captured by the camera in the same picture, as Figure 3 . The generatrix of the pin gauge is a straight line in the image. Using the edge extraction algorithm and the Hough transform, obtain the straight line coefficient vector l i = (a i b i c i ). According to the principle of projective geometry, the plane determined by the optical center and the straight line is called the back-projection plane ρ i = (A i B i Ci D i ) T , tangent to the corresponding generatrix of the cylinder, so:
[0043]
[0044] The light plane intersects the cylinder, forming a three-dimensional ellipse, such as Figure 4
[0045] For example: Let the equation of an inclined cylinder and the equation of the light plane be
[0046]
[0047] Then the ellipse is Obviously, at this time, the minor semi-axis of the ellipse is equal to the radius of the cylinder, and each point of the ellipse is on the cylinder, conforming to the cylinder equation and also conforming to the light plane equation. This conclusion always holds when the axis of the cylinder and the normal direction of the light plane are not perpendicular.
[0048] Step S3: Calculate the relative position between the camera and the cylinder.
[0049] In the actual situation, the distance from the optical center to the axis of the cylinder is much larger than the radius r of the cylinder. Therefore, according to the geometric relationship, the back-projection plane ρ obtained in step S2 i The included angle is always an acute angle, while the included angle between the normal vectors of the two planes may be an acute angle or an obtuse angle.
[0050] Assume that the included angle between the normal vectors of ρ i is an obtuse angle, then the included angle between the two back-projection planes is:
[0051]
[0052] The distance from the optical center to the axis of the cylinder where r is the radius of the pin gauge.
[0053] The direction vector from the optical center to the axis of the cylinder is the sum of the two normal vectors:
[0054]
[0055] Then is a point on the axis of the cylinder. Considering that in the model, the object is always on the side where z c > 0, retain the solution where z c > 0.
[0056] The direction vector of the axis of the cylinder is the cross product of the two normal vectors:
[0057]
[0058] Let have a z coordinate greater than 0, that is, retain Solution, the equation of the cylinder axis is:
[0059]
[0060] Step S4: Establish the conversion relationship between the cylindrical target, the light plane and the corresponding image:
[0061] Assuming that the cylinder axis is the z-axis and a cylindrical coordinate system is established, the cylinder can be expressed as:
[0062]
[0063] The transformation relationship between the cylindrical coordinate system and the camera coordinate system conforms to the rigid body transformation:
[0064]
[0065] in:
[0066]
[0067] The Rodrigues algorithm is used to obtain the rotation matrix based on the cylinder axis obtained in step S3. is the translation vector between the coordinate systems.
[0068] The specific process of Rodrigues algorithm is:
[0069] Enter a rotation vector
[0070]
[0071] where θ rot is the rotation angle, is the unit column vector in the direction of the rotation axis, e rot,i , i=1,2,3 is The three components
[0072] Then the transformation relationship between the cylindrical point and the camera is
[0073]
[0074] Step S5: Solving the optimal line structured light system parameters:
[0075] Extract the center point of the elliptical arc light strip in the calibration image obtained in step S2, the combined camera imaging model, and the two equations of the cylinder and camera conversion relationship.
[0076]
[0077] Since the system of equations is a quadratic equation and has double solutions, considering that the camera can only capture objects facing the camera and cannot capture the back of the objects, the solutions on the side far from the camera optical center are discarded, obtaining an elliptical arc composed of multiple actual light stripe points. All the light stripe points in all images are extracted and the corresponding three-dimensional coordinates are solved, as Figure 5 。
[0078] Let P i =(x i y i z i ) T be the i-th light stripe point obtained by solution, with a total of n light stripe points. All the light stripe points are arranged to obtain the matrix G=(P1 P2…P n ) T . The light plane equation is solved using the least squares method:
[0079]
Claims
1. A structured light calibration method using a freely placed single cylindrical target, characterized in that: Step S1: Based on the system structure of the Scheimpflug camera's thick lens imaging model, a new line structured light measurement system was established; Step S2: Based on the principle of projective geometry, a cylindrical target was established, and an imaging model between the light plane and camera imaging was established; Step S3: Combining the structure of the line structured light measurement system and the cylindrical target imaging model, the relative position between the cylindrical target and the camera was established according to geometric relationships; Step S4: According to the relative relationship between the cylindrical target and the corresponding image, combined with image edge extraction, the conversion relationship between the cylindrical target and the image was calculated; Step S5: According to the light strip points in the image, the relative positions of each actual light strip and the camera were calculated, and the least squares method was applied to solve the optimal line structured light system parameters.
2. The calibration method according to claim 1, characterized in that, In the said Step S1, the method for establishing the line structured light measurement system includes the following steps: In Step S1, the specific method for establishing the line structured light measurement system is as follows: Establish the thick lens measurement model of the Scheimpflug camera: P c = λKp u , where P c =(x c y c z c ) T is the object space coordinate point, λ is a balancing factor, p u =(x u y u 1) T is the homogeneous coordinate of the image point, is the imaging matrix, f is the focal length of the camera, e is the distance of the camera principal point, θ, is the Scheimpflug camera inclination angle, d u ,d v is the pixel size, u0, v0 is the pixel coordinate of the intersection of the camera optical axis and CCD, z0 is the z coordinate of the intersection of the camera optical axis and CCD; establish the line structured light measurement model P C =λKp u ,Ax c +By c +Cz c =1, the two equations can eliminate the balancing factor λ, (x c y c z c ) T =K(x u y u 1) T / (ABC)K(x u y u 1) T , where A, B, C are the coefficients of the light plane equation; In Step S2, the specific method for establishing the imaging model is as follows: Establish the correlation between the optical center and the cylinder where ρ i =(A i B i C i D i ) T are the coefficients of the two tangent plane equations from the optical center to the cylinder, and l i =(a i b i c i ) are the coefficients of the two edge lines of the cylinder imaging; The light plane intersects the cylinder to form a three-dimensional elliptical arc. The minor semi-axis of the elliptical arc is equal to the radius of the cylinder, and each point of the elliptical arc is on the cylinder, conforming to the cylinder equation and also conforming to the light plane equation; In Step S3, the specific method for calculating the relative position between the camera and the cylinder is as follows: According to the geometric relationship, assume ρ i If the included angle between the two normal vectors is obtuse, then the included angle between the two tangent planes is The distance from the optical center to the axis of the cylinder The direction vector is Then is a point on the axis of the cylinder, keep the solution of z c >0. The direction vector of the axis is the cross product of the two normal vectors Set aside Then the axis of the cylinder is In Step S4, the specific method for establishing the conversion relationship between the cylindrical target, the light plane, and the corresponding image is as follows: Assume that the cylindrical axis is the z-axis and a cylindrical coordinate system is established. Let r be the radius of the cylinder, then the cylinder can be expressed as Rigid body transformation compliance between cylindrical coordinate system and camera coordinate system Where: is the rotation matrix obtained by applying the Rodrigues algorithm, is the translation vector between coordinate systems; Then the conversion relationship between this cylinder point and the camera is In Step S5, the specific method for solving the optimal line structured light system parameters is as follows: Extract the center point of the elliptical arc light strip, combine the camera imaging model, and the two equations of the cylinder and camera conversion relationship. P c =λKp u , reduce λ, discard the solution far from the camera optical center, and get multiple actual light strip points. i =(x i y i z i ) T For the i-th light strip point obtained, there are n light strip points in total. Arrange all the light strip points to get the matrix G = (P1 P2 … P n ) T , then the optical plane coefficient (ABC) T =(G T G) -1 G T (1 … 1) T .
Citation Information
Patent Citations
Calibration method for line structured light vision sensor based on single-cylinder 3D target
CN113129442A