A dual-telecentric lens imaging model and calibration method considering camera mounting errors
By establishing a dual telecentric lens imaging model that considers lens installation errors, and utilizing a high-precision displacement platform and a nonlinear Simpson solution method, combined with the orthogonality of the rotation matrix and the LM optimization algorithm, the problem of limited lens calibration accuracy was solved, achieving efficient and accurate lens calibration and distortion correction, and improving the accuracy of visual measurements.
Patent Information
- Application Number
- CN202211109643.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-13
- Publication Date
- 2026-02-10
- Estimated Expiration
- 2042-09-13
AI Technical Summary
Existing dual telecentric lens calibration methods fail to effectively account for lens installation errors, resulting in limited calibration accuracy, especially in projection measurements where accuracy is difficult to guarantee.
A dual telecentric lens imaging model considering camera installation errors was established. Images were acquired using a high-precision displacement platform with a calibration plate. The homography matrix was calculated using the nonlinear Simpson method, the intrinsic parameters were solved by combining the orthogonality of the rotation matrix, and the distortion coefficients were solved by the LM optimization algorithm.
It improves calibration accuracy, reduces the number of images required for calibration, comprehensively corrects distortion, and significantly enhances the measurement accuracy and precision of visual measurements.
Smart Images

Figure CN115375778B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application belongs to the field of machine vision measurement, and relates to a telecentric lens imaging model and a calibration method considering camera installation errors. BACKGROUND
[0002] Visual measurement technology is a mainstream measurement technology in non-contact measurement, and lens calibration, as a core link in the visual measurement process, plays a decisive role in measurement accuracy. The special optical structure of the double telecentric lens makes it have the advantages of high resolution, super wide depth of field, ultra-low distortion and unique parallel light design, and it is often used to improve the measurement accuracy. Based on the ordinary lens calibration model, the existing double telecentric lens calibration algorithm mainly simplifies the imaging model, further uses the Zhang calibration method, solves the homography matrix from the pixel coordinate system to the world coordinate system through the linear algorithm DLT, then uses the orthogonal property of the rotation matrix in the external parameter matrix to solve the intrinsic parameter, and finally uses the nonlinear optimization algorithm to solve the distortion coefficient. However, in general visual measurement instruments, the lens is in a vertical installation position, so the imaging plane is idealized as a parallel state, without considering the lens installation error, and the calibration accuracy will be limited.
[0003] For the calibration method of the double telecentric lens in visual measurement, Linna Li et al. of Tianjin University of Science and Technology published an article entitled "Telecentric lens calibration method based on ordered image sequence and controllable external parameters" in the Journal of Tianjin University of Science and Technology, Vol. 30, No. 4, 2015. By controlling the high-precision displacement platform to carry the calibration board to collect sequence calibration images, the external parameters are changed from unknown to known and simplified, the linear DLT algorithm is used to solve the magnification and telecentricity of the telecentric lens, and finally the L-M nonlinear optimization algorithm is used to solve the distortion coefficient. However, this method does not consider the error that the calibration board is not completely perpendicular to the axis of the telecentric lens, and the accuracy of the projection measurement method is difficult to guarantee, so it is extremely important to provide a double telecentric lens imaging model and a calibration method considering camera installation errors. SUMMARY
[0004] The application aims at making up for the shortage of the existing telecentric lens calibration algorithm, and invents a double-telecentric lens imaging model and calibration method considering camera installation error, which aims at the calibration link of the double-telecentric lens in the two-dimensional vision measurement of the vertical position, calculates the required lens magnification, installation error angle and distortion coefficient, and provides precision guarantee for the geometric parameter measurement based on two-dimensional vision measurement. First, the imaging model of the double-telecentric lens is established based on the installation error of the telecentric lens; second, the high-precision displacement platform is used to carry the calibration plate to obtain the initial calibration plate image and the two calibration images moved by a certain step distance to the x and y directions, so as to simplify the relative external parameter matrix; then the non-linear Simpson method is used to calculate the homography matrix, the orthogonality of the rotation matrix in the initial external parameter matrix is used to establish an equation group, and the internal parameters, i.e. the installation error angle, the magnification, the CMOS tilt angle and the image center point coordinates, are solved, and the initial external parameter matrix is solved; finally, the L-M optimization algorithm is used to solve the lens distortion coefficient. The method has the advantages of high efficiency and accuracy, and has good application value for the calibration method of vision measurement.
[0005] The technical scheme adopted by the application is:
[0006] A double-telecentric lens imaging model and calibration method considering camera installation error, which first establishes a double-telecentric lens imaging model, w -X w Y w Z w is a world coordinate system, o c -x c y c z c ,o' c -x' c y' c z' c are ideal camera coordinate systems and camera coordinate systems with installation error, o d -x d y d z d is an image coordinate system, and uv is a pixel coordinate system. The specific calculation steps are as follows:
[0007] First step, establish a double-telecentric lens imaging model considering camera installation error;
[0008] The double-telecentric lens imaging model considering camera installation error is:
[0009]
[0010] In formula (1), u and v are pixel coordinate values of each calibration circle center of the calibration plate in the pixel coordinate system, m is the lens magnification, d u ,d vis the scale factor from pixel coordinate system to image coordinate system, θ is the angle of image plane, u'0, v'0 are the actual projection center coordinates, u0, v0 are the ideal projection center coordinates, λ, are the rotation angles of ideal camera coordinate system around x-axis and y-axis due to camera installation error, ε is the rotation angle of rotation matrix, t x ,t y is the translation of external parameters, X w Y w are the coordinate values of each calibration circle center of the calibration board in the world coordinate system, the above imaging model of the double telecentric lens is rewritten into a block matrix as follows:
[0011]
[0012] wherein E 2×2 is the unit matrix, H is the mapping homography matrix corresponding to the world coordinate to the pixel coordinate, h 11 ~h 33 are the corresponding elements in the homography matrix, respectively.
[0013] Secondly, the high-precision displacement table is used to carry the calibration board to translate to solve the homography matrix, and to solve the internal parameters and external parameters.
[0014] The high-precision displacement table is used to carry the calibration board to move Δt x ,Δt y in x, y direction with known step distance, after moving, the moving vector becomes Three images including the initial position calibration board image are collected, and the nonlinear Simpson solving method is used to solve the homography matrix H 1 ,H 2 ,H 3 corresponding to the first, second and third calibration board images, and the following equation is obtained:
[0015]
[0016] In the formula, φ T is the camera installation error angle vector to be solved, and
[0017] The above equation is changed, and the result is:
[0018]
[0019] By solving equation (4):
[0020]
[0021] wherein, are homography matrix H 1 ,H 2 ,H 3 corresponding h 33 in the different values;
[0022] Internal parameter camera installation error angle is solved, and further rotation matrix R is solved:
[0023]
[0024] By the orthogonality of the rotation matrix, other calibration internal parameters are solved:
[0025]
[0026]
[0027]
[0028]
[0029]
[0030] wherein is the corresponding homography matrix H 1 corresponding to the corresponding matrix element in the first calibration image, are the difference values between the homography matrix H 1 and the second calibration image H 2 corresponding to h 31 , h 33 elements;
[0031] Third step, solve the lens distortion coefficient;
[0032] With the internal parameters already solved as initial values, consider the distortion coefficient generated by the lens, since the distortion coefficient of the double telecentric lens is small, therefore mainly consider the first order radial distortion coefficient k1, tangential distortion coefficient s1, s2, thin lens distortion p1, p2, distortion correction before the image coordinates u, v, that is, the pixel coordinate value of the center of the calibration board in the above pixel coordinate system and the distortion correction after the coordinate u', v' represents:
[0033]
[0034] Using L-M optimization algorithm, the distortion coefficient is solved by optimizing the objective function:
[0035]
[0036] K = [k1, g1, g2, g3, g4] (13) Wherein K represents the set vector of distortion coefficient, F is the target value minimum optimization function, N is the number of all calibration circles in all calibration plate images.
[0037] The present application has the following advantages: the present application fully considers the existence of tilt of the double telecentric lens image plane and the installation error angle of the lens, uses a high-precision displacement table to carry a calibration plate to control the external parameters, solves the homography matrix, solves the external parameter matrix through equations, solves the internal parameters of the calibration according to the orthogonality of the rotation matrix, and finally solves the distortion coefficients through the L-M optimization algorithm. After distortion correction, the measurement accuracy is obviously higher than before distortion correction, which verifies the effectiveness and accuracy of the method. The double telecentric lens imaging model considering camera installation error and the method thereof can accurately and quickly realize the double telecentric lens calibration work, and have good application value for actual visual measurement. The method is a calculation method with practical visual measurement application value, and compared with the existing industrial vision calibration software Halcon, the significant advantages are that the required images for calibration are reduced, the internal parameters for calibration are increased, and the distortion coefficients are more comprehensive. The calculation method is simple and efficient, has high calculation accuracy, and is good in universality. BRIEF DESCRIPTION OF DRAWINGS
[0038] Figure 1 is the flow chart of the double telecentric lens calibration method proposed by the present application;
[0039] Figure 2 is the actual double telecentric lens calibration imaging model considering camera installation error;
[0040] Figure 3 (a) is the calibration image collected at the initial position of the high-precision displacement table carrying the calibration plate;
[0041] Figure 3 (b) is the calibration image collected after the high-precision displacement table carrying the calibration plate moves Δt y along the y-axis direction;
[0042] Figure 3 (c) is the calibration image collected after the high-precision displacement table carrying the calibration plate moves Δt Figure 3 along the x-axis direction at the position in (b); x
[0043] Figure 3 (d) is the calibration image after solving the distortion coefficients and performing distortion correction;
[0044] Figure 4 (a) is the feature image of the measurement standard block;
[0045] Figure 4 (b) is a measurement of the actual size of the standard gauge block. DETAILED DESCRIPTION
[0046] The application is further described below in conjunction with the accompanying drawings and examples.
[0047] The embodiment selects a type TC4M009-F far-infrared lens produced by opto with a theoretical magnification of 2 times, a depth of field of 0.3 mm, and an image resolution of 5120x5120, a pixel scale factor d u v 4.5x10 -3 mm large target camera for calibration calculation, and measures the size of the standard gauge block for precision verification. The standard size of the standard gauge block is 2 mm, and the specific steps of the calculation method are as follows.
[0048] First step, establish the imaging model of the double telecentric lens considering the camera installation error;
[0049]
[0050]
[0051] Rewrite the block matrix:
[0052]
[0053] Second step, solve the homography matrix by using a high-precision displacement table, solve the internal and external parameters of the calibration;
[0054] First, use a linear motor displacement table with a repeated positioning accuracy of ±0.1 μm, a grating resolution of 0.1 μm, and a stroke of 60 mm to carry a circular calibration plate with a type of ASD-4-D0.2-T1.6. The circular calibration plate is moved 1.000 mm in the X w direction, 1.000 mm in the Y w direction, that is, Δt x =1mm, Δt y =1mm, and the simpson nonlinear solution method is used to solve the homography matrix corresponding to the calibration image:
[0055]
[0056]
[0057]
[0058] The known relative external parameter matrix is:
[0059]
[0060] Solve the camera error angle of internal parameter as:
[0061]
[0062] Further, the rotation matrix R is obtained as:
[0063]
[0064] Then, the remaining internal parameters are calculated by using the orthogonality of the rotation matrix as:
[0065] α=438.15,β=438.89,γ=-0.99,u'0=2518.4,v'0=2521.1
[0066] m=1.9736,θ=86.83°
[0067] Third step, solving the lens distortion coefficient
[0068] Through equation (12), the distortion coefficient is solved by using L-M optimization algorithm as:
[0069] g1=-1.5×10 -4 ,g2=-1.8×10 -4 ,g3=1.48×10 -5 ,g4=3.83×10 -4 ,k1=-4.93×10 -9
[0070] The double telecentric lens imaging model and method considering camera installation error provided by the application are calibrated by using a high-precision displacement table to carry a calibration plate, the camera installation error angle is solved by using the known external parameter matrix after the homography matrix is obtained, the remaining internal parameters are solved by using the orthogonality of the rotation matrix, and finally the distortion coefficient is solved by using L-M optimization algorithm, and the collected calibration image and distortion correction image are as shown in Figure 3 After the double telecentric lens imaging model and method considering camera installation error provided by the application calibrate the double telecentric lens, the standard block size is further measured, the measurement result is 2.011 mm, as shown in Figure 4 , and the measurement error is 0.55%, which proves that the method provided by the application is correct and effective.
[0071] The application provides a telecentric lens imaging model and a calibration method considering camera installation errors, fully considers that a double-telecentric lens image plane exists tilt and a lens exists an installation error angle, uses a high-precision displacement table to carry a calibration board to move and control external parameters, solves a homography matrix, solves an external parameter matrix through an equation, solves calibration internal parameters according to the orthogonality of a rotation matrix, finally solves distortion coefficients through an L-M optimization algorithm, and after distortion correction, is used to measure actual sizes, and the measurement accuracy after distortion correction is obviously higher than that before distortion correction, and has good application value for improving the accuracy in actual visual measurement.
Claims
1. A method for calibrating dual telecentric lenses for imaging, taking into account camera mounting errors, characterized in that, This method first establishes a dual telecentric lens imaging model, O w -X w Y w Z w For the world coordinate system, o c -x c y c z c ,o' c -x' c y' c z' c These represent the ideal camera coordinate system and the camera coordinate system with installation errors, respectively. d -x d y d z d Let 'u' be the image coordinate system and 'uv' be the pixel coordinate system. The specific calculation steps are as follows: The first step is to establish a dual telecentric lens imaging model that takes into account camera installation errors; The dual telecentric lens imaging model, taking into account camera installation errors, is as follows: In equation (1), u and v are the pixel coordinates of the centers of the calibration circles on the calibration plate in the pixel coordinate system, m is the lens magnification, and d is the pixel coordinates of the calibration circle. u ,d v λ is the scale factor from the pixel coordinate system to the image coordinate system, θ is the angle between the image planes, u'0, v'0 are the actual projection center coordinates, u0 v0 are the ideal projection center coordinates, and λ... Let ε and t represent the rotation angles of the ideal camera coordinate system around the x-axis and y-axis due to camera installation errors, respectively. Let ε be the rotation angle of the rotation matrix, and t be the rotation angle of the rotation matrix. x ,t y X is the translation of the extrinsic parameter. w Y w Given the coordinates of the centers of each calibration circle on the calibration plate in the world coordinate system, the above dual-telecentric lens imaging model can be rewritten as a block matrix: in E 2×2 It is the identity matrix. H is the homography matrix that maps world coordinates to pixel coordinates. 11 ~h 33 These are the corresponding elements in the homography matrix; The second step is to use a high-precision displacement stage to carry a calibration plate and translate it to solve the homography matrix, and calculate the intrinsic and extrinsic parameters of the model. Using a high-precision displacement stage with a calibration plate, move the plate Δt in the x and y directions with known step distances. x ,Δt y After moving, the movement vector Become Three images were acquired, including one for the initial position calibration plate. The homography matrix H corresponding to the first, second, and third calibration plate images was solved using the nonlinear Simpson method. 1 H 2 H 3 The following equation is obtained: In the formula, φ T Let be the camera mounting error angle vector to be solved. By changing the above equation, the result is: By solving equation (4): In the formula, The homography matrix H obtained from the first, second, and third calibration images respectively 1 H 2 H 3 The corresponding h in 33 Different values; The intrinsic parameter camera mounting error angle is obtained, and then the rotation matrix R is calculated: Solve for other calibration intrinsic parameters by utilizing the orthogonality of the rotation matrix: in The homography matrix H corresponding to the first calibration image 1 The corresponding matrix elements in The homography matrix H of the first calibration image is shown below. 1 The second calibration image H 2 Corresponding to h 31 ,h 33 The difference between elements; The third step is to solve for the lens distortion coefficient; Using the already calculated intrinsic parameters as initial values, and considering the distortion coefficients generated by the lens, since the distortion coefficients of the double telecentric lens are relatively small, we mainly consider the first-order radial distortion coefficient k1, tangential distortion coefficients s1, s2, thin lens distortion p1, p2, and the image coordinates u, v before distortion correction. That is, the pixel coordinates of the center of each calibration circle on the calibration plate and the coordinates u', v' after distortion correction in the above pixel coordinate system are expressed as follows: The distortion coefficients are solved by optimizing the objective function using the LM optimization algorithm. K=[k1,g1,g2,g3,g4] (13) Where K represents the set vector of distortion coefficients, F is the optimization function for minimizing the objective value, and N is the number of all calibration circles in all calibration plate images.
Citation Information
Patent Citations
Double-telecentric lens calibration method based on binary quartic polynomial distortion error compensation
CN104881874A
Automatic calibration system based on visual guidance
WO2022120567A1