A high-precision camera calibration method and device based on a special annular calibration plate

CN115409898BActive Publication Date: 2026-10-09HUAZHONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210934214.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2026-10-09
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

该方法有效地解决了相机成像过程中圆心偏差导致的精度降低问题,极大地降低了计算复杂度,大大提高了标定精度

Benefits of technology

[0073] 1. This invention uses a complete circular target in the calibration plate to determine the initial calibration value and adopts an ellipse fitting optimization algorithm, which has strong robustness and high accuracy, providing more accurate camera parameters for subsequent distortion compensation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115409898B_ABST
    Figure CN115409898B_ABST
Patent Text Reader

Abstract

The application belongs to the technical field of camera vision calibration, and discloses a high-precision camera calibration method and equipment based on a special annular calibration board. The method comprises the following steps: constructing a special annular calibration board, which comprises complete annular rings and incomplete annular rings arranged in horizontal rows and vertical rows; calculating the internal and external parameters of the camera and the lens distortion parameters from the complete annular rings in the calibration board and the camera imaging model as initial calibration values; using the corner point features of the incomplete annular rings and the geometric characteristics of the projective transformation to obtain the positions of the real center projection points of the incomplete annular rings, and combining the initial calibration values to compensate the distortion of the camera and obtain accurate camera parameters. The application effectively solves the problem of reduced precision caused by the center deviation in the camera imaging process, greatly reduces the calculation complexity, and greatly improves the calibration precision.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of camera vision calibration technology, and more specifically, relates to a high-precision camera calibration method and device based on a special ring calibration plate. Background Technology

[0002] Camera calibration is a fundamental problem in computer vision, with important applications in virtual reality, 3D reconstruction, and visual measurement. Camera calibration methods primarily aim to solve for the camera's intrinsic and extrinsic parameters, and can generally be categorized into three types: traditional camera calibration methods, camera self-calibration methods, and active vision-based calibration methods. Currently, in fields such as 3D measurement where high camera calibration accuracy is required, traditional calibration methods based on two-dimensional planar calibration boards are widely used. These methods utilize known calibration board images to establish the correspondence between the world coordinate system and the pixel coordinate system, thereby solving for the camera parameters.

[0003] Patent document CN111968182A discloses a calibration method for nonlinear model parameters of a binocular camera. Using a checkerboard calibration board, it estimates lens distortion parameters based on the cross-ratio invariance of collinear interior corner points and corrects the image. Then, it estimates the camera's intrinsic and extrinsic parameters based on the imaging model, using these as initial values ​​for global nonlinear optimization to achieve binocular camera calibration. This method boasts high computation speed. However, due to the extraction of checkerboard corner coordinates, the positioning accuracy is significantly affected by noise, resulting in low calibration accuracy.

[0004] Furthermore, patent document CN112767497A discloses a highly robust calibration device and positioning method based on a circular calibration plate. This method achieves camera calibration through steps such as establishing an undirected graph, cluster analysis, and edge detection, eliminating the need to pre-set the size or arrangement of the dots or rings. It offers fast calibration speed and greater robustness against dirt or occlusion on the calibration plate. However, this method does not consider the deviation between the elliptical center of the circular calibration object's image and the actual projected center point due to perspective projection transformation and lens distortion. This deviation can lead to reduced camera calibration accuracy. Summary of the Invention

[0005] To address the aforementioned deficiencies or improvement needs of existing technologies, this invention provides a high-precision camera calibration method based on a special ring-shaped calibration plate. First, the camera's intrinsic and extrinsic parameters, as well as lens distortion parameters, are calculated using the complete ring within the calibration plate and the camera's imaging model. These initial values ​​are then used for distortion compensation. Next, the position of the true center projection point is determined using the corner features of the incomplete ring and the geometric properties of projective transformation. Camera calibration is then performed again to obtain accurate camera parameters. This method effectively solves the accuracy reduction problem caused by center deviation during camera imaging, significantly reduces computational complexity, and greatly improves calibration accuracy.

[0006] To achieve the above objectives, this invention proposes a high-precision camera calibration method based on a special ring-shaped calibration plate, comprising the following steps:

[0007] S1 constructs a special ring calibration plate, which includes complete and incomplete rings arranged in alternating horizontal and vertical rows;

[0008] S2 calculates the camera's intrinsic and extrinsic parameters and lens distortion parameters using the complete circular ring in the calibration plate and the camera imaging model as initial calibration values;

[0009] S3 uses the corner features of the incomplete ring and the geometric properties of projective transformation to determine the position of the true center projection point of the incomplete ring, performs distortion compensation on the initial values ​​of camera calibration, and obtains accurate camera parameters.

[0010] As a further preferred option, step S2 specifically includes:

[0011] S21 acquires images of multiple calibration plates;

[0012] S22 preprocesses the image of the calibration board;

[0013] S23 performs ellipse center fitting on the image corresponding to the complete ring in the preprocessed image;

[0014] S24 calculates the camera's intrinsic and extrinsic parameters, as well as lens distortion parameters, based on the fitted ellipse center and camera imaging model, as initial values ​​for calibration.

[0015] As a further preferred option, step S23 specifically includes:

[0016] S231 first performs gradient magnitude and gradient direction detection on the image. The point with the largest gradient magnitude in the gradient direction is the edge point. This determines the single-pixel edge of the complete circular ring imaging ellipse. Then, it calculates the sub-pixel coordinates (u,v) of all edge points.

[0017] S232 uses the set of sub-pixel coordinates (u,v) as the contour points of the ellipse, and fits the center coordinates of the imaging ellipse corresponding to the complete ring using the least squares method, and uses these as the initial values ​​of the ellipse center coordinates.

[0018] As a further preferred step, in step S232, in the pixel coordinate system, dashed lines represent the actual collected elliptical contour points, and solid ellipses are ellipses fitted using the least squares method. The center of the fitted ellipse is point p'. Connecting point p' and any point k on the dashed line, line segment kp' intersects the fitted ellipse at point k'. The algebraic distance between the two points on line segment kk' is the error value, which is used as the input value d(i) = |kk'| for the ellipse fitting optimization algorithm. The sample point set d(i) follows a normal distribution. At the same time, coarse error points in the contour points are removed, and the specific method is as follows:

[0019] First, calculate the arithmetic mean of the sample point set.

[0020]

[0021] Secondly, calculate the standard deviation σ:

[0022]

[0023] The residual of this set of sample data is:

[0024]

[0025] When |ε i If the value is greater than a specified threshold, the contour point represented by point i is considered a gross error point and is removed. All contour points are analyzed, and after removing all gross error points, a new ellipse is fitted using the least squares method. The above steps are repeated iteratively until the residual of all sample points is |ε. i All values ​​are within the specified threshold, and the center of the fitted ellipse at this point is output as the optimal result.

[0026] As a further preferred option, step S24 specifically includes:

[0027] S241, under ideal conditions where camera lens distortion is not considered, adopts a pinhole model and establishes the camera coordinate system as O. c -X c Y c Z c ;

[0028] S242 Let Π1 be the plane containing the spatial circle, Π2 be the camera imaging plane, and construct a point P(x) on plane Π1. w ,y w ,z w The projection relationship between point ) and its projection point p(u,v) on plane Π2:

[0029] λ(u,v,1) T =K[RT](x w ,y w ,zw ,1) T

[0030] In the formula: λ is a constant, R and T are the rotation and translation matrices from the camera coordinate system to the world coordinate system, respectively, is the extrinsic parameter matrix of the camera, and K is the intrinsic parameter matrix of the camera;

[0031] S243 constructs a camera lens distortion model and performs optimization calculations to obtain camera parameters and lens distortion parameters as initial values ​​for calibration. Specifically:

[0032] Based on the radial distortion dr and tangential distortion dt of the lens distortion, construct the image point of any contour point Q on the image offset from q(u,v) to q′(u). d ,v d Offset coordinate model:

[0033]

[0034] Construct the cost function:

[0035]

[0036] In the formula: [k1 k2 p1 p2] represents the lens distortion parameters, n is the number of images; m is the number of feature points in each image; p ij Let p' be the image coordinates of the j-th feature point on the i-th image; p' is the reprojection equation; R i and T i Let P be the rotation and translation matrix from the camera coordinate system to the world coordinate system for the i-th image; j Let j be the world coordinates of the j-th feature point;

[0037] Using the parameters of the pinhole model as initial values, the Levenberg-Marquardt optimization algorithm is used to iteratively solve for the camera parameters and lens distortion parameters that minimize the reprojection error E, which are then used as initial values ​​for calibration.

[0038] As a further preferred embodiment, step S3, which utilizes the corner features of the incomplete annulus and the geometric properties of projective transformation to determine the position of the true center projection point of the incomplete annulus, specifically includes:

[0039] S31 uses Shi-Tomasi corner detection to obtain the sub-pixel coordinates of incomplete circular corner points in the image;

[0040] S32 Based on the initial calibration values ​​obtained in step S2, and based on the fitted ellipse center and camera imaging model, distortion compensation is performed on the coordinates of the circle center obtained by fitting the incomplete ring and the detected corner points of the incomplete ring.

[0041] S33 uses cross-ratio invariance to calculate the target center of an incomplete circular ring;

[0042] S34 calculates the projection point of the center of the incomplete ring based on the ellipse center of the four complete ring imaging patterns around the incomplete ring in the image, using the positional relationship between the points and the lines they lie on.

[0043] S35 calculates the offset of the center projection point of the incomplete ring. If the offset distance is less than the threshold, the coordinates of the true projection point of the center of the incomplete ring are obtained; otherwise, the point is discarded.

[0044] As a further preferred embodiment, in step S33, a planar projective transformation model is constructed:

[0045]

[0046] In the formula: x and x′ are the homogeneous three-dimensional vector and its projective mapping, respectively, and H is the homography matrix;

[0047] An incomplete annulus is composed of three sector-shaped annulus segments formed by three dividing lines. If any dividing line of the incomplete annulus forms four collinear points with the incomplete annulus, the invariance of the cross ratio at these four collinear points can be expressed as:

[0048] Cross(a,b:c,d)=Cross(A,B:C,D)

[0049] Where points A, B, C, and D are the intersection points formed by any dividing line and the annulus, and points a, b, c, and d are the image points a(u) of points A, B, C, and D after perspective projection transformation. a ,v a ), b(u b ,v b ), c(u) c ,v c ), d(u d ,v d );

[0050] Preferably, in step S34, the projection point of the center of the real incomplete annulus is p(u p ,v p Based on the collinearity and cross-ratio invariance of projective transformation, the relationship between the straight line formed by points a, b, c, d, and p on the image and the diameter of the incomplete annulus on the spatial calibration plate can be established, which can be expressed as:

[0051] Cross(a,b:c,p)=Cross(A,B:C,P)

[0052] Cross(b,p:c,d)=Cross(B,P:C,D)

[0053] The above relationship can be further expressed using coordinates as follows:

[0054]

[0055]

[0056]

[0057]

[0058] In the formula: R is the radius of the great circle of the incomplete ring, and r is the radius of the small circle of the incomplete ring. R and r are known when the calibration plate is designed, so the center coordinates of the incomplete ring can be obtained.

[0059] Preferably, in step S35, the relative position of the incomplete ring to the surrounding complete rings is fixed, that is, the center of the incomplete ring lies on the straight line connecting the centers of the two complete rings arranged at an angle around it. o1, o2, o3, and o4 are the center points of the image formed by the complete rings surrounding the incomplete ring. Using the positional relationship between the points and the straight lines they lie on, the 12 corner points of each incomplete ring are divided into 3 groups, namely point a i b i c i d i Where i = 1, 2, 3, the projection point p of the center of the incomplete annulus is calculated using each set of corner points. i ;

[0060] Project the center point p i A local magnification of the region is shown, with l1 representing the line containing points o1 and o4, and l2 representing the line containing points o2 and o3. The equations of these lines are fitted, and p is set as an example. i The distances to lines l1 and l2 are d_1 and d_2 respectively, and the projection point of the circle center is p. i The offset distance D can be expressed as:

[0061] D = d_1 + d_2

[0062] When the projection point of the center of the circle is p i If the offset distance is greater than the threshold, the positioning of the point is considered to have a large error, so it is discarded. Finally, the average coordinates of the center projection points of the retained incomplete rings are taken to obtain the coordinates of the uniquely determined true center projection point of this incomplete ring.

[0063] According to another aspect of the present invention, a high-precision camera calibration system based on a special ring calibration plate is also provided, comprising:

[0064] A special ring-shaped calibration plate, comprising complete and incomplete rings arranged alternately in horizontal and vertical rows;

[0065] The first module is used to calculate the camera's intrinsic and extrinsic parameters and lens distortion parameters based on the complete circular ring in the calibration plate and the camera imaging model, as initial calibration values.

[0066] The second module uses the corner features of the incomplete ring and the geometric properties of projective transformation to determine the position of the true center projection point of the incomplete ring, performs distortion compensation on the initial values ​​of camera calibration, and obtains accurate camera parameters.

[0067] According to another aspect of the invention, an electronic device is also provided, comprising:

[0068] At least one processor, at least one memory, and a communication interface; wherein,

[0069] The processor, memory, and communication interface communicate with each other;

[0070] The memory stores program instructions that can be executed by the processor, which calls the program instructions to execute the method described above.

[0071] According to another aspect of the invention, a non-transitory computer-readable storage medium is also provided, the non-transitory computer-readable storage medium storing computer instructions that cause the computer to perform the above-described method.

[0072] In summary, compared with the prior art, the above-described technical solutions conceived by this invention mainly possess the following technical advantages:

[0073] 1. This invention uses a complete circular target in the calibration plate to determine the initial calibration value and adopts an ellipse fitting optimization algorithm, which has strong robustness and high accuracy, providing more accurate camera parameters for subsequent distortion compensation.

[0074] 2. This invention utilizes the incomplete circular target in the calibration plate to calculate the true projection point of the circle center, and through iteration, greatly reduces the influence of the circle center deviation caused by perspective projection transformation and lens distortion during camera imaging, thereby improving calibration accuracy.

[0075] 3. This invention combines the corner features of an incomplete annulus with the geometric properties of projective transformation to calculate the true projection point of the center, avoiding the use of the basic properties of the annulus points, reducing the solution complexity and computational load, thereby further improving the calibration accuracy. Attached Figure Description

[0076] Figure 1 This is a flowchart of a high-precision camera calibration method based on a special ring calibration plate, which is an embodiment of the present invention.

[0077] Figure 2 This is a schematic diagram of the structure of the special annular calibration plate involved in the embodiments of the present invention;

[0078] Figure 3 This is a flowchart of the imaging ellipse center fitting process according to an embodiment of the present invention;

[0079] Figure 4 This is a schematic diagram of the ellipse fitting optimization data sample point set involved in an embodiment of the present invention;

[0080] Figure 5 This is a schematic diagram of circular perspective projection related to an embodiment of the present invention;

[0081] Figure 6 This is a schematic diagram of lens distortion according to an embodiment of the present invention;

[0082] Figure 7 This is a flowchart of the camera recalibration process according to an embodiment of the present invention;

[0083] Figure 8 This is a schematic diagram of the geometric characteristics of the projective transformation involved in the embodiments of the present invention;

[0084] Figure 9 (a) in the image is an incomplete circular target on a special annular calibration plate. Figure 9 (b) is an image of an incomplete ring on a special ring calibration plate acquired by the camera;

[0085] Figure 10 In the diagram, (a) represents the relative position of the center point of the incomplete annulus to the center points of the surrounding complete annulus. Figure 9 (b) is a magnified view of the center point of the incomplete annulus. Detailed Implementation

[0086] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention. Furthermore, the technical features involved in the various embodiments of this invention described below can be combined with each other as long as they do not conflict with each other.

[0087] like Figure 1 and Figure 2 As shown in the figure, this invention provides a high-precision camera calibration method based on a special ring calibration plate, used for calibrating cameras such as... Figure 2 The calibration is performed using a special annular calibration plate, which comprises complete and incomplete annular rings arranged in an array. Generally, in this invention, in the transverse direction of the calibration plate, a row of complete annular rings and a row of incomplete annular rings are arranged alternately, and in the vertical direction, the complete and incomplete annular rings are staggered. More specifically, as shown... Figure 2 , Figure 9 as well as Figure 10As shown, the center point of the incomplete ring involved in this invention is located on the line connecting the center points of two completed rings arranged at an angle around it. The incomplete ring is divided into three sectors by the line connecting the center points of the two completed rings arranged at an angle around it, and by any two dividing lines not collinear with the aforementioned two lines (these two dividing lines pass through the center point of the incomplete ring). Each line intersects the incomplete ring at four points. In the calibration method of this invention, the camera's intrinsic and extrinsic parameters and lens distortion parameters are first calculated using the complete ring in the calibration plate and the camera imaging model. These parameters are then used as initial calibration values ​​for distortion compensation. Next, the position of the true center projection point is obtained using the corner features of the incomplete ring and the geometric properties of the projective transformation. Camera calibration is then performed again to obtain accurate camera parameters. This method effectively solves the problem of reduced accuracy caused by center deviation during camera imaging, greatly reduces computational complexity, and significantly improves calibration accuracy.

[0088] More specifically, the method of the present invention includes the following steps:

[0089] Step 1: Image acquisition of the calibration board.

[0090] Multiple images are captured by photographing a special ring-shaped calibration plate using a camera, constantly changing the plate's pose. The camera's position and focal length must remain constant during image capture, all ring-shaped features of the calibration plate must be clearly visible in the field of view, and the calibration plate should ideally cover at least three-quarters of the image. Of course, the camera position needs to be calibrated in this application.

[0091] Step two: Preprocess the acquired images.

[0092] The acquired images are preprocessed by first converting them to grayscale, then filtering them, and finally using an opening operation to remove isolated noise.

[0093] Step 3: Fit the center of the ellipse based on the preprocessed image.

[0094] like Figure 3 As shown, center fitting is performed on the imaging ellipse corresponding to the completed ring in the preprocessed image. Gradient magnitude and gradient direction are detected in the preprocessed image. The point with the largest magnitude in the gradient direction is defined as the edge point. In this way, the single-pixel edge of the imaging ellipse in the image is obtained, and then the sub-pixel coordinates (u,v) of the edge point are calculated. The calculation model of sub-pixel coordinates (u,v) is as follows:

[0095]

[0096] In the formula, i is the pixel-level x-coordinate of the current edge point, j is the pixel-level y-coordinate of the current edge point, and G...l G represents the gradient value to the left of the edge point. r G0 is the gradient value to the left of the edge point, w is the distance from the adjacent pixel to the edge point, and θ is the gradient direction of the edge point.

[0097] Based on the calculated set of sub-pixel coordinates of the elliptical contour of the complete ring, the center coordinates of the imaging ellipse corresponding to the complete ring are fitted using the least squares method, and these coordinates are used as the initial values ​​of the center coordinates. Since all contour points are used as accurate values, the fitting error is large when image noise is significant, so the fitting result is further optimized.

[0098] Therefore, in this step, as Figure 4 As shown, in the pixel coordinate system, the dashed lines represent the actual collected partial elliptical contour points, while the solid ellipse is the ellipse fitted using the least squares method, with its center at point p'. Point k is any point on the actual elliptical contour. Connecting kp' intersects the fitted ellipse at point k'. The algebraic distance between points k and k' is the error value, which is used as the input value d(i) = |kk'| for the ellipse fitting optimization algorithm. It has been verified that the sample point set d(i) follows a normal distribution. Therefore, large error points in the contour points can be removed through data analysis. The specific method is as follows:

[0099] First, calculate the arithmetic mean of the sample point set.

[0100]

[0101] Secondly, calculate the standard deviation σ:

[0102]

[0103] The residual of this set of sample data is:

[0104]

[0105] When |ε i If |ε| is greater than 3σ, then the contour point represented by point i is considered a gross error point and is removed. Analyze all contour points; after removing all gross error points, fit a new ellipse using the least squares method. Repeat the above steps iterating until the residuals of all sample points are |ε|. i All values ​​are within 3σ, and the center of the fitted ellipse at this time is output as the optimal result.

[0106] Step four: Perform initial camera calibration.

[0107] Based on the camera imaging model, the camera's intrinsic and extrinsic parameters, as well as lens distortion parameters, are calculated using the center of the imaging ellipse of the fitted complete ring as initial calibration values.

[0108] In this step, under the ideal condition of not considering camera lens distortion, a pinhole model is used to establish the camera coordinate system as O. c -X c Y c Z c .like Figure 5 As shown, when the plane Π1 containing the spatial circle is not parallel to the camera imaging plane Π2, the spatial circle is imaged as an ellipse after perspective projection transformation. p is the true projection point of the center P of the spatial circle onto the image plane, and p′ is the center of the imaged ellipse. According to the principle of projective geometry, these two points do not coincide, thus causing an eccentricity error. This error is mainly related to the angle between the image plane and the plane containing the spatial circle. Wherein, point P(x... w ,y w ,z w The projection relationship between p(u,v) and p(u,v) can be expressed as follows:

[0109] λ(u,v,1) T =K[RT](x w ,y w ,z w ,1) T (5)

[0110] In the formula: λ is a constant; R and T are the rotation and translation matrices from the camera coordinate system to the world coordinate system, respectively, and are the extrinsic parameters of the camera; K is the intrinsic parameter matrix of the camera.

[0111]

[0112] In the formula: (u0, v0) are the coordinates of the principal point, f u and f v Let be the equivalent focal lengths in the u and v directions, respectively, and s be the camera tilt factor. From this, the camera's intrinsic and extrinsic parameters can be calculated.

[0113] Due to manufacturing and installation errors in camera lenses, nonlinear optical distortion can occur in the spatial circle during imaging. For example... Figure 6 As shown, lens distortion mainly consists of radial distortion dr and tangential distortion dt, which causes the image point of any contour point Q on the circle to shift from q(u,v) to q′(u). d ,v d The offset coordinates can be expressed as:

[0114]

[0115] In the formula: [k1 k2 p1 p2] represent lens distortion parameters. We define a cost function:

[0116]

[0117] In the formula: n is the number of images; m is the number of feature points in each image; p ij Let p' be the image coordinates of the j-th feature point on the i-th image; p' is the reprojection equation; R i and T i Let P be the rotation and translation matrix from the camera coordinate system to the world coordinate system for the i-th image; j Let be the world coordinates of the j-th feature point. Using the parameters of the pinhole model as initial values, the Levenberg-Marquardt optimization algorithm is used iteratively to solve for the camera parameters and lens distortion parameters that minimize the reprojection error E, which are then used as the initial values ​​for camera calibration.

[0118] Step 5: Perform distortion compensation on the camera.

[0119] In step four, the ellipse fitting center is used as a feature point for initial camera calibration, introducing eccentricity error and thus increasing the error of the initially calibrated camera parameters. This invention directly calculates the coordinates of the projection point of the center of the incomplete annulus in the calibration plate for camera recalibration, and reduces the impact of eccentricity error on calibration accuracy through iterative optimization. The specific process is as follows: Figure 7 As shown.

[0120] First, Shi-Tomasi corner detection is used to obtain the sub-pixel coordinates of the incomplete circular corner points in the image.

[0121] Secondly, using the initial values ​​of camera calibration, and combining the initial values ​​of camera calibration formula (7), distortion compensation is performed on the center coordinates of the fitted ellipse and the detected incomplete circular ring corners.

[0122] Next, we introduce the geometric properties of projective transformation. A planar projective transformation is an invertible linear transformation of a homogeneous 3D vector, which can be expressed as:

[0123]

[0124] In the formula: x and x′ are the homogeneous 3D vectors and their projective mappings, respectively, and H is the homography matrix. The projective transformation does not change H by multiplying it by any non-zero scaling factor; therefore, a projective transformation has 8 degrees of freedom. Objects will exhibit shape distortion under projective transformations; properties such as parallelism, angles, and length ratios will no longer remain unchanged. However, collinear points remain collinear after the transformation, and the cross ratio of the four collinear points remains unchanged. That is, projective transformations possess collinearity and cross ratio invariance. Figure 8 As shown. The invariance of the cross ratio of four collinear points can be expressed as:

[0125] Cross(a,b:c,d)=Cross(A,B:C,D) (10)

[0126] Next, based on the geometric properties of the projective transformation described above, the center coordinates of the incomplete circular target are calculated. The incomplete circular target consists of three sector-shaped rings divided by three straight lines. Figure 9 In (a), points A, B, C, and D are the intersection points of a straight line and the annulus. The image of this template is as follows: Figure 9 As shown in (b), assume that the image points of points A, B, C, and D after perspective projection transformation are a(u a ,v a ), b(u b ,v b ), c(u) c ,v c ), d(u d ,v d The true center projection point is p(u). p ,v p Based on the collinearity and cross-ratio invariance of projective transformation, the relationship between the straight line formed by points abcdp on the image and the diameter of the annulus on the spatial calibration plate can be established, which can be expressed as:

[0127]

[0128] Its calculation formula can be further expressed using coordinates as follows:

[0129]

[0130] In the formula: R is the radius of the larger circle of the incomplete annulus, and r is the radius of the smaller circle. R and r are known during the design of the calibration plate. By solving the four equations in formula (12), the center coordinates of the incomplete annulus target can be obtained.

[0131] Next, determine the true projection point of the center of the displacement circle, and the relative positions of the incomplete annulus and the surrounding complete annulus are as follows: Figure 10 As shown in (a), o1, o2, o3, and o4 are the centers of the image formed by the four complete annexes. Using the positional relationship between points and their corresponding lines, the 12 corner points of each incomplete annulus are divided into 3 groups, namely point a... i b i c i d i (where i = 1, 2, 3), the projection point p of the center of the circle can be calculated for each set of corner points using equation (12). i .

[0132] Project the center point p i A magnified view of the area, such as Figure 10 As shown in (b), l1 is the line containing points o1 and o4, and l2 is the line containing points o2 and o3. The equations of these lines are fitted. Let p... iThe distances to lines l1 and l2 are d_1 and d_2, respectively. The offset distance D of the projection point of the circle's center describes the magnitude of the offset between the point and the expected position, and can be expressed as:

[0133] D = d_1 + d_2 (13)

[0134] When p i If the offset distance is greater than a threshold, the location of that point is considered to have a large error due to corner detection or other issues, and is therefore discarded. Finally, the average of the coordinates of the retained center projection points is taken to obtain the coordinates of the uniquely determined true center projection point of this incomplete ring.

[0135] Finally, using the calculated set of true projection point coordinates of the circle center and their corresponding world coordinates, the camera parameters and reprojection error are calculated again based on the above camera imaging model and lens distortion model.

[0136] Repeat the above steps until the reprojection error is less than the threshold or the number of iterations reaches the maximum value, thus obtaining the final calibration result.

[0137] According to another aspect of the present invention, a high-precision camera calibration system based on a special ring-shaped calibration plate is also provided, comprising a special ring-shaped calibration plate including complete and incomplete rings arranged alternately in horizontal and vertical directions; in the present invention, in the horizontal direction of the calibration plate, a row of complete rings and a row of incomplete rings are arranged alternately, and in the vertical direction, the complete and incomplete rings are staggered. More specifically, as... Figure 2 , Figure 9 as well as Figure 10 As shown, the center point of the incomplete ring involved in this invention is located on the line connecting the center points of two completed rings arranged at an angle around it. The incomplete ring is divided into three sectors by the line connecting the center points of the two completed rings arranged at an angle around it and any two dividing lines that are not collinear with the above two lines (the two dividing lines pass through the center point of the incomplete ring). Each line intersects the incomplete ring at four points.

[0138] The camera module is used to capture photos of a specified image.

[0139] The first module is used to calculate the camera's intrinsic and extrinsic parameters and lens distortion parameters based on the complete circular ring in the calibration plate and the camera imaging model, as initial calibration values.

[0140] The second module is used to determine the position of the true center projection point of the incomplete ring by utilizing the corner features and geometric properties of the projective transformation. Combined with the initial calibration values, the module performs distortion compensation on the camera to obtain accurate camera parameters.

[0141] According to one aspect of the present invention, the method of the embodiments of the present invention is implemented using an electronic device, therefore it is necessary to describe the relevant electronic device. For this purpose, embodiments of the present invention provide an electronic device comprising: at least one processor, a communication interface, at least one memory, and a communication bus, wherein the at least one processor, the communication interface, and the at least one memory communicate with each other through the communication bus. The at least one processor can invoke logical instructions in the at least one memory to execute all or part of the steps of the methods provided in the foregoing method embodiments. More specifically, an electronic device of this embodiment includes: at least one processor, at least one memory, and a communication interface; wherein the processor, the memory, and the communication interface communicate with each other; the memory stores program instructions executable by the processor, and the processor invokes the program instructions to execute the above-described high-precision camera calibration method based on a special ring calibration plate.

[0142] Furthermore, when the logical instructions in at least one of the aforementioned memories can be implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various method embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0143] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.

[0144] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.

[0145] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of the present invention. Based on this understanding, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, or sometimes in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0146] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

Claims

1. A high-precision camera calibration method based on a special ring-shaped calibration plate, characterized in that, Includes the following steps: S1 constructs a special ring calibration plate, which includes complete and incomplete rings arranged in alternating horizontal and vertical rows; S2 calculates the camera's intrinsic and extrinsic parameters and lens distortion parameters using the complete circular ring in the calibration plate and the camera imaging model as initial calibration values; S3 uses the corner features of the incomplete ring and the geometric properties of projective transformation to determine the position of the true center projection point of the incomplete ring, performs distortion compensation on the initial values ​​of camera calibration, and obtains accurate camera parameters. In step S3, determining the position of the true center projection point of the incomplete annulus using the corner features and geometric properties of projective transformation specifically includes: S31 uses Shi-Tomasi corner detection to obtain the sub-pixel coordinates of incomplete circular corner points in the image; S32 Based on the initial calibration values ​​obtained in step S2, and based on the fitted ellipse center and camera imaging model, distortion compensation is performed on the ellipse center coordinates obtained by fitting the incomplete ring and the detected incomplete ring corner points. S33 calculates the projection point of the center of the incomplete ring based on the elliptical centers of the four complete ring imaging patterns in the circumference of the incomplete ring in the image, using the cross ratio invariance and the positional relationship between the points and the lines they lie on. S34 calculates the offset of the center projection point of the incomplete ring. If the offset distance is less than the threshold, the coordinates of the true projection point of the center of the incomplete ring are obtained; otherwise, the point is discarded.

2. The high-precision camera calibration method based on a special ring calibration plate according to claim 1, characterized in that, Step S2 specifically includes: S21 acquires images of multiple calibration plates; S22 preprocesses the image of the calibration board; S23 performs ellipse center fitting on the image corresponding to the complete ring in the preprocessed image; S24 calculates the camera's intrinsic and extrinsic parameters, as well as lens distortion parameters, based on the fitted ellipse center and camera imaging model, as initial values ​​for calibration.

3. The high-precision camera calibration method based on a special ring calibration plate according to claim 2, characterized in that, Step S23 specifically includes: S231 first performs gradient magnitude and gradient direction detection on the image. The point with the largest gradient magnitude in the gradient direction is the edge point. This determines the single-pixel edge of the complete circular ring imaging ellipse. Then, it calculates the sub-pixel coordinates (u,v) of all edge points. S232 uses the set of sub-pixel coordinates (u,v) as the contour points of the ellipse, and fits the center coordinates of the imaging ellipse corresponding to the complete ring using the least squares method, and uses these as the initial values ​​of the ellipse center coordinates.

4. The high-precision camera calibration method based on a special ring calibration plate according to claim 3, characterized in that, In step S232, in the pixel coordinate system, dashed lines represent the actual collected elliptical contour points, and solid ellipses are ellipses fitted using the least squares method. The center of the fitted ellipse is point p'. Connecting point p' and any point k on the dashed line, line segment kp' intersects the fitted ellipse at point k'. The algebraic distance between the two points on line segment kk' is the error value, which is used as the input value d(i) = |kk'| for the ellipse fitting optimization algorithm. The sample point set d(i) follows a normal distribution. At the same time, coarse error points in the contour points are removed, and the specific method is as follows: First, calculate the arithmetic mean of the sample point set. : ; Secondly, calculate the standard deviation. : ; The residual of this sample point set data is: ; when If the error exceeds a specified threshold, the contour point represented by point i is considered a gross error point and is removed. All contour points are analyzed, and after removing all gross error points, a new ellipse is fitted using the least squares method. The above steps are repeated iteratively until the residuals of all sample points are found. All values ​​are within the specified threshold, and the center of the fitted ellipse at this point is output as the optimal result.

5. The high-precision camera calibration method based on a special ring calibration plate according to claim 4, characterized in that, Step S24 specifically includes: S241, under ideal conditions where camera lens distortion is not considered, adopts a pinhole model and establishes the camera coordinate system as follows: ; S242 denotes the plane containing the spatial circle. Camera imaging plane Construct a plane A little bit With the point in the plane Projection point on Projection relationship between them: ; In the formula: It is a constant. and are the rotation and translation matrices from the camera coordinate system to the world coordinate system, respectively, and is the camera's extrinsic parameter matrix. This is the intrinsic parameter matrix of the camera; S243 constructs a camera lens distortion model and performs optimization calculations to obtain camera parameters and lens distortion parameters as initial values ​​for calibration. Specifically: Based on radial distortion of lens distortion and tangential distortion Construct arbitrary contour points on the image Image points from Offset to Offset coordinate model: ; Construct the cost function: ; In the formula: , For lens distortion parameters, Number of images; The number of feature points on each image; For the first The first image Image coordinates of feature points; The equation is the reprojection equation; and For the first The rotation and translation matrices from the camera coordinate system to the world coordinate system for each image; For the first The world coordinates of each feature point; Using the parameters of the pinhole model as initial values, the Levenberg-Marquardt optimization algorithm is used iteratively to solve for the reprojection error. The minimum camera parameters and lens distortion parameters are used as initial calibration values.

6. The high-precision camera calibration method based on a special ring calibration plate according to claim 1, characterized in that, In step S33, the planar projective transformation model is constructed: ; In the formula: and These are homogeneous three-dimensional vectors and their projective mappings, respectively. It is a homography matrix; An incomplete annulus is composed of three sector-shaped annulus segments formed by three dividing lines. If any dividing line of the incomplete annulus forms four collinear points with the incomplete annulus, the invariance of the cross ratio at these four collinear points is expressed as: ; Where points A, B, C, and D are the intersection points formed by any dividing line and the annulus, and points a, b, c, and d are respectively points... , , , Image points after perspective projection transformation , , , .

7. The high-precision camera calibration method based on a special ring calibration plate according to claim 6, characterized in that, In step S33, the projection point of the center of the real incomplete annulus is: Based on the collinearity and cross-ratio invariance of projective transformation, a method is established using points on the image. The relationship between the straight line formed and the diameter of the incomplete annulus on the plane of the spatial calibration plate is expressed as: ; ; The above relationship can be further expressed in coordinates as follows: ; ; ; ; In the formula: The radius of the great circle of the incomplete annulus. The radius of the smaller circle of the incomplete annulus. and Since the coordinates of the center of the incomplete annulus are known during the design of the calibration plate, they can be obtained.

8. The high-precision camera calibration method based on a special ring calibration plate according to claim 7, characterized in that, In step S35, the relative position of the incomplete ring to the surrounding complete rings is fixed; that is, the center of the incomplete ring lies on the straight line connecting the centers of the two complete rings arranged at an angle around it. , , , These are the center points of the image formed by the complete rings surrounding the incomplete ring. Using the positional relationship between these points and the lines they lie on, the 12 corner points of each incomplete ring are divided into 3 groups, namely... , , , ,in 1, 2, 3, calculate the projection point of the center of the incomplete annulus using each set of corner points. ; Project the center point The area is magnified locally. For point , The line in question, For point , The line in question is fitted to its equation. Let... to the straight line , The distances are respectively , The projection point of the center of the circle offset distance Represented as: ; When the center projection point If the offset distance is greater than the threshold, the positioning of the point is considered to have a large error, so it is discarded. Finally, the average coordinates of the center projection points of the retained incomplete rings are taken to obtain the coordinates of the uniquely determined true center projection point of this incomplete ring.

9. A high-precision camera calibration system based on a special ring calibration plate, used to implement the high-precision camera calibration method based on a special ring calibration plate as described in any one of claims 1-8, characterized in that, include: A special ring-shaped calibration plate, comprising complete and incomplete rings arranged alternately in horizontal and vertical rows; The first module is used to calculate the camera's intrinsic and extrinsic parameters and lens distortion parameters based on the complete circular ring in the calibration plate and the camera imaging model, as initial calibration values. The second module uses the corner features of the incomplete ring and the geometric properties of projective transformation to determine the position of the true center projection point of the incomplete ring, performs distortion compensation on the initial values ​​of camera calibration, and obtains accurate camera parameters.

10. An electronic device, characterized in that, include: At least one processor, at least one memory, and a communication interface; wherein, The processor, memory, and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, which invokes the program instructions to perform the method described in any one of claims 1 to 8.

11. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions that cause the computer to perform the method described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Calibration method for nonlinear model parameters of binocular camera

    CN111968182A

  • High-robustness calibration device based on circular calibration plate and positioning method

    CN112767497A