Combined calibration method, device and system for internal and external parameters of vehicle-mounted camera

Through the combination of deep learning and unbiased estimation of image moments, the joint calibration of internal and external parameters of the vehicle camera is achieved, which solves the problems of cumbersome calibration process and low accuracy in the existing technology, improves the calibration accuracy and production line efficiency, and is suitable for the production of multiple models of vehicles. need.

CN118864609APending Publication Date: 2024-10-29成都航盛智行科技有限公司 +1
View PDF 0 Cites 3 Cited by

Patent Information

Application Number
CN202410867925.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing vehicle camera calibration technology suffers from cumbersome internal and external parameter calibration processes and low accuracy. Especially in multi-model vehicle production lines, it is difficult to achieve fast and accurate camera parameter calibration, and the distortion correction effect is poor. Traditional methods cannot fully reflect the distortion correction effect. .

Method used

The multi-type calibration plate adaptive detection-segmentation method based on deep learning and the center-of-circle calibration plate centroid detection algorithm for unbiased estimation of image moments are used, combined with the distortion evaluation algorithm of linearity checking, to achieve joint calibration of internal and external parameters of the vehicle camera, through a single Complete internal and external parameter calibration by shooting, and use a variety of combination methods to optimize the calibration process.

Benefits of technology

It achieves fast and accurate internal and external parameter calibration of vehicle cameras, improves calibration accuracy and reliability, adapts to different camera types, enhances distortion correction effects, and improves production line efficiency and car rollout speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118864609A_ABST
    Figure CN118864609A_ABST
Patent Text Reader

Abstract

The invention relates to the field of camera calibration, and discloses a combined calibration method, device and system for internal and external parameters of a vehicle-mounted camera, and the method comprises the steps: enabling a vehicle to enter a calibration station, enabling the vehicle-mounted camera to collect a calibration plate image, transmitting the internal parameter calibration plate image to an internal parameter calibration module, and transmitting an external parameter calibration plate image to an external parameter calibration module; segmenting the internal reference calibration board image, and extracting a small calibration board image of each part in the internal reference calibration board image; the centroids of a plurality of circles on a small calibration plate are solved through a center calibration plate centroid detection algorithm based on an unbiased estimation image moment, an internal reference matrix M and a distortion coefficient D of the vehicle-mounted camera are solved through a Zhang's calibration method, distortion evaluation is carried out through a distortion evaluation algorithm based on linear checking calculation, internal reference is output, and the distortion of the vehicle-mounted camera is evaluated according to the obtained internal reference and the distortion coefficient. And calculating the external parameters through SolvePnP, and completing the joint calibration of the internal and external parameters of the vehicle-mounted camera. According to the invention, the calibration of the internal reference and the external reference of the vehicle-mounted camera can be completed through single shooting.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of camera calibration, and in particular to a method, device and system for jointly calibrating internal and external parameters of a vehicle-mounted camera. Background Art

[0002] The internal parameters of the current vehicle-mounted camera (hereinafter referred to as internal parameters) are divided into two parts: internal parameter matrix and distortion coefficient.

[0003] Intrinsic parameter calibration requires taking images of the calibration plate from multiple angles for calculation. This process requires moving the camera position multiple times, but the production workshop does not have the conditions for multiple driving and multiple shooting. This leads to the need for engineers to manually pre-calibrate the intrinsic parameters of the camera model when developing camera-based vehicle-mounted software. In this way, engineers need to recalibrate the camera model when changing the camera or the production batch. When the factory loads the cameras on the vehicle, it is possible that one vehicle is equipped with cameras from different batches, which will affect the subsequent external parameter calibration or the imaging effect.

[0004] When calibrating the internal parameters, most technical solutions use a checkerboard calibration plate or calibration plate. The corners of the checkerboard produce very large distortion after imaging with some wide-angle and fisheye cameras, making the detection of corners extremely difficult and reducing the detection accuracy. This will introduce errors when solving equations, reduce the accuracy of calibration, and even cause calibration failure.

[0005] Distortion calibration: Distortion is part of the camera's internal parameters, which reflects the degree to which a straight line is distorted when the camera forms an image. Current methods require specific point calibration plates to describe distortion, and the accuracy of the description is determined by the density of the point calibration plates, which reduces the effect of distortion correction. At the same time, existing methods do not set high-precision distortion evaluation standards at the sub-pixel level, and using reprojection error as a standard for evaluating distortion is too simplistic and cannot fully and accurately reflect the effect of distortion correction.

[0006] When calibrating external parameters, three parts of data and camera mathematical models are needed to establish a set of equations. These three parts of data are: camera intrinsic parameters, three-dimensional coordinates of corner points of the real-world calibration plate, and two-dimensional coordinates of corner points of the image. The external parameter calibration of the automobile production line needs to rely on the calibration plate on the ground, and the origin of the vehicle coordinate system specified during calibration is specified according to different models of vehicles. In actual production, the models on the production line are not fixed. A production line may produce multiple models of vehicles. This will lead to the need to measure the coordinate position relationship between the vehicle coordinate system of different models and the calibration plate, and introduce it into the actual engineering code.

[0007] When calibrating external parameters, the position of the vehicle relative to the calibration plate may not be exactly the same every time and may vary. Traditional algorithms have large changes caused by lighting, and it is often difficult to find the exact position of the calibration plate in the image, which introduces errors. Summary of the invention

[0008] The purpose of the present invention is to overcome the shortcomings of the prior art and provide a method for calibrating the internal and external parameters of a vehicle-mounted camera, comprising the following steps:

[0009] Step 1: The vehicle enters the calibration station, and the on-board camera collects the calibration plate image, divides the collected calibration plate image into the internal reference calibration plate image and the external reference calibration plate image, sends the internal reference calibration plate image to the internal reference calibration module, and sends the external reference calibration plate image to the external reference calibration module, and then enters step 2;

[0010] Step 2: Segment the internal reference calibration plate image. The internal reference calibration plate includes a plurality of small calibration plates in different postures. The small calibration plate includes a plurality of black circles and a plurality of black straight lines. The small calibration plate images of various parts in the internal reference calibration plate image are extracted by a multi-type calibration plate adaptive detection-segmentation method based on deep learning;

[0011] Step 3: The center of mass of multiple circles on the small calibration plate is obtained by using the center of mass detection algorithm of the circle calibration plate based on unbiased estimation of image moments. According to the type of vehicle-mounted camera, a camera mathematical model is established. The intrinsic parameter matrix M and distortion coefficient D of the vehicle-mounted camera are solved by Zhang's calibration method to obtain the reprojection error. If the reprojection error is less than the set threshold, proceed to step 4, otherwise, return to step 2.

[0012] Step 4: Distortion evaluation is performed using a distortion evaluation algorithm based on linearity verification to obtain a straight line deviation rate. If the straight line deviation rate is less than the set threshold, the internal parameter calibration is qualified and the internal parameter is output. The output internal parameter includes the camera internal parameter matrix and the distortion coefficient. Otherwise, return to step 2.

[0013] Step 5, detecting the position of the external reference calibration plate by a multi-type calibration plate adaptive detection-segmentation method based on deep learning, and obtaining the image coordinates of the corner points on the external reference calibration plate after detecting the position of the calibration plate; the external reference calibration plate includes AprilTag and a checkerboard image;

[0014] Step 6: Input the image coordinates of the corner points on the extrinsic calibration plate and the world coordinates of the calibration plate into the camera mathematical model. According to the obtained intrinsic parameters and distortion coefficients, the extrinsic parameters are solved by SolvePnP, and the reprojection error is obtained. If the reprojection error is less than the set threshold, the extrinsic calibration of the vehicle-mounted camera is successful, and the process goes to step 7; otherwise, it returns to step 5.

[0015] Step 7: Write the obtained external and internal parameters into a file and encrypt it to complete the joint calibration of the internal and external parameters of the vehicle-mounted camera.

[0016] Furthermore, the multi-type calibration plate adaptive detection-segmentation method based on deep learning is used to extract small calibration plate images of various parts in the internal reference calibration plate image, including:

[0017] The deep learning-based adaptive detection-segmentation method for multiple types of calibration plates is as follows: multiple vehicle-mounted cameras are used to collect different types of calibration plate images, and data augmentation is performed, followed by data annotation. The augmented data is divided into three parts: training, verification, and testing. The training set and the verification set are used to train the neural network to obtain a stable neural network model for detecting and segmenting various types of calibration plates in the image; the small calibration plate images of each part of the internal reference calibration plate image are extracted by the trained neural network model.

[0018] Furthermore, the method of obtaining the centroids of multiple circles on the small calibration plate by using a centroid detection algorithm for the circle center calibration plate based on unbiased estimation of image moments includes:

[0019] Modeling the camera:

[0020]

[0021] Where K represents the intrinsic parameter matrix of the camera, T cw represents the camera rotation and translation, p i is a pixel in the image with coordinates (u,v,1);

[0022] The origin of the world coordinate system is on the calibration plate and Z w Equal to 0, so the projection relationship is established Then, the camera distortion process is:

[0023]

[0024] where d i is the distortion parameter, D is the distortion function, n d The value is the maximum order of the distortion parameter;

[0025] Use the first-order moment to estimate the center of mass of the circle:

[0026] The shape Axy is a set of points enclosed by a closed curve in the xy plane. |Axy| is the interior area of ​​the closed curve, and the moments of the image are:

[0027]

[0028] For any m, n∈Z∫ (the set of non-negative integers), is the (m+n)th moment of Axy

[0029] The first-order moment factors (M1, 0 and M0, 1) are the center points of the shapes, and the second-order moment factors (M2, 0, M1, 1 and M0, 2) are related to the covariance of the shapes. The first-order and second-order moment factors are used to describe the ellipse.

[0030] Given a reversible polynomial function D:(x,y)-→(x′,y′) in the domain X, let By transforming D into Ax′y′, for any m, n∈Z*, there exist cij(D)∈R and p,q∈Z* such that:

[0031]

[0032] Assume A n is the shape in the normalized plane consisting of the points (xn,yn), A d is a deformed shape consisting of points (xd, yd), then the center of the deformed ellipse in the normalized plane is:

[0033]

[0034] Where M represents moment representation, n d is the order of the defined distortion parameter; then the centroid of the distortion ellipse on the imaging plane is for:

[0035]

[0036] x d =kx n

[0037] y d =ky n ,

[0038]

[0039] |A i |=f x f y |A d |,

[0040]

[0041] By building a statistical model, we can make an unbiased estimate of the center of mass and find the optimal point, which is the true center of mass of the ellipse.

[0042] Furthermore, the distortion evaluation is performed by using a distortion evaluation algorithm based on linearity verification to obtain a straight line deviation rate, including:

[0043] Suppose the set of all points on a straight line on the calibration board is S_board[p1,p2,p3...], where p represents a point. Perform equal-interval sampling on the point set S_board to obtain discrete points on the straight line. The point set of discrete points on the straight line is S_board_sub[p1,p2,p3...], where the ordinate Z in the point coordinates is 0; let the length of S_board_sub be N;

[0044] After calibration, the points on the calibration board are projected onto the image through the calibration internal parameter matrix and distortion coefficient. The projection mathematical transformation is F(P), where P represents the point and F represents the projection process. Then the point set after F projection of S_board_sub is S_image_sub. The capacity of S_image_sub is consistent with S_board_sub, and the point coordinates are in the two-dimensional structure [xi,yi].

[0045] At the same time, the calibration parameters are used to dedistort the full frame, and the straight line on the calibration plate will also be dedistorted. The straight line is detected using the straight line detection algorithm, and the expression of the straight line is obtained:

[0046] αx+βy-γ=0

[0047] α=sinθ

[0048] β=cosθ

[0049] γ=Ax sinθ+Ay cosθ

[0050] Si=αxi+βyi-γ

[0051] Where xi, yi is a point in S_image_sub, and there are L such straight lines, then:

[0052]

[0053] Then, the root mean square error d of the straight line is:

[0054]

[0055] Where N T Represents the number of sampling points on all lines reprojected onto the image, then:

[0056]

[0057] dmax is the maximum root mean square error.

[0058] A vehicle-mounted camera internal and external parameter joint calibration device, using the vehicle-mounted camera internal and external parameter joint calibration method, comprising: an internal parameter calibration board, an external parameter calibration board and a vehicle-mounted camera;

[0059] The internal parameter calibration plate and the external parameter calibration plate are combined and arranged at a calibration station; the vehicle-mounted camera is used to collect a combined image of the internal parameter calibration plate and the external parameter calibration plate.

[0060] A vehicle-mounted camera internal and external parameter joint calibration system, using the vehicle-mounted camera internal and external parameter joint calibration device, including a host computer, a domain controller port, a vehicle-mounted camera recognition module, a calibration module and a communication module;

[0061] The domain controller port, the vehicle-mounted camera identification module, and the communication module are respectively connected to the calibration module; the host computer is communicatively connected to the communication module; and the vehicle-mounted camera internal and external parameter joint calibration device is connected to the calibration module.

[0062] The beneficial effect of the present invention is that the present invention can complete the calibration of the internal and external parameters of the vehicle-mounted camera by using a single shot.

[0063] 2 The calibration accuracy of the present invention is higher and more reliable than the previous offline calibration of internal parameters (for example, a batch of cameras uses the same internal parameters).

[0064] 3 The present invention can be easily deployed in any production line or after-sales workshop.

[0065] 4 The present invention does not require the type of camera, it can adapt to the type of camera.

[0066] 5 The present invention uses a variety of combined means to optimize the parameter calibration process. Compared with the mainstream method, it ensures that the calibrated parameters are more reliable.

[0067] 6 The present invention adds a new distortion coefficient evaluation method, which can better correct distortion.

[0068] 7 The speed (actual measured speed) of the present invention is very fast, and all calibrations can be completed within 10 seconds. Due to its faster speed, it improves the efficiency of the production line in disguise, and also increases the speed at which cars come off the production line, which can reduce costs and increase efficiency for enterprises.

[0069] 8 The present invention has good robustness, good resistance to lighting changes, shadows, etc., and a higher calibration success rate.

[0070] The structure of the present invention is very simple, and only two calibration plates are needed to complete the camera calibration.

[0071] 10 The calibration plate of the present invention carries additional information, which brings convenience to calibration. The traditional calibration plate only has corner points and no additional information. BRIEF DESCRIPTION OF THE DRAWINGS

[0072] Figure 1It is a flowchart of a method for joint calibration of internal and external parameters of a vehicle-mounted camera;

[0073] Figure 2 A schematic diagram of detecting and locating the calibration plate area from the image, and locating the coordinates of the specific corner points on the calibration plate;

[0074] Figure 3 Schematic diagram of a stable neural network model for segmenting various types of calibration plates in an image;

[0075] Figure 4 This is a schematic diagram of the distortion caused by aberration;

[0076] Figure 5 This is a schematic diagram of the center distortion of the circle of the calibration plate;

[0077] Figure 6 It is a schematic diagram of straight line deviation rate;

[0078] Figure 7 This is a schematic diagram of internal reference calibration;

[0079] Figure 8 This is a schematic diagram of the external parameter calibration board;

[0080] Fig. 9 This is a schematic diagram of external parameter calibration;

[0081] Fig.10 Schematic diagram of the internal reference calibration plate. DETAILED DESCRIPTION

[0082] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings, but the protection scope of the present invention is not limited to the following.

[0083] The features and performance of the present invention are further described in detail below in conjunction with the embodiments.

[0084] like Figure 1 As shown, a method for joint calibration of internal and external parameters of a vehicle-mounted camera includes the following steps:

[0085] Step 1: The vehicle enters the calibration station, and the on-board camera collects the calibration plate image, divides the collected calibration plate image into the internal reference calibration plate image and the external reference calibration plate image, sends the internal reference calibration plate image to the internal reference calibration module, and sends the external reference calibration plate image to the external reference calibration module, and then enters step 2;

[0086] Step 2: Segment the internal reference calibration plate image. The internal reference calibration plate includes a plurality of small calibration plates in different postures. The small calibration plate includes a plurality of black circles and a plurality of black straight lines. The small calibration plate images of various parts in the internal reference calibration plate image are extracted by a multi-type calibration plate adaptive detection-segmentation method based on deep learning;

[0087] Step 3: The center of mass of multiple circles on the small calibration plate is obtained by using the center of mass detection algorithm of the circle calibration plate based on unbiased estimation of image moments. According to the type of vehicle-mounted camera, a camera mathematical model is established. The intrinsic parameter matrix M and distortion coefficient D of the vehicle-mounted camera are solved by Zhang's calibration method to obtain the reprojection error. If the reprojection error is less than the set threshold, proceed to step 4, otherwise, return to step 2.

[0088] Step 4: Distortion evaluation is performed using a distortion evaluation algorithm based on linearity verification to obtain a straight line deviation rate. If the straight line deviation rate is less than the set threshold, the internal parameter calibration is qualified and the internal parameter is output. The output internal parameter includes the camera internal parameter matrix and the distortion coefficient. Otherwise, return to step 2.

[0089] Step 5, detecting the position of the external reference calibration plate by a multi-type calibration plate adaptive detection-segmentation method based on deep learning, and obtaining the image coordinates of the corner points on the external reference calibration plate after detecting the position of the calibration plate; the external reference calibration plate includes AprilTag and a checkerboard image;

[0090] Step 6: Input the image coordinates of the corner points on the extrinsic calibration plate and the world coordinates of the calibration plate into the camera mathematical model. According to the obtained intrinsic parameters and distortion coefficients, the extrinsic parameters are solved by SolvePnP, and the reprojection error is obtained. If the reprojection error is less than the set threshold, the extrinsic calibration of the vehicle-mounted camera is successful, and the process goes to step 7; otherwise, it returns to step 5.

[0091] Step 7: Write the obtained external and internal parameters into a file and encrypt it to complete the joint calibration of the internal and external parameters of the vehicle-mounted camera.

[0092] The multi-type calibration plate adaptive detection-segmentation method based on deep learning is used to extract small calibration plate images of various parts in the internal reference calibration plate image, including:

[0093] The deep learning-based adaptive detection-segmentation method for multiple types of calibration plates is as follows: multiple vehicle-mounted cameras are used to collect different types of calibration plate images, and data augmentation is performed, followed by data annotation. The augmented data is divided into three parts: training, verification, and testing. The training set and the verification set are used to train the neural network to obtain a stable neural network model for detecting and segmenting various types of calibration plates in the image; the small calibration plate images of each part of the internal reference calibration plate image are extracted by the trained neural network model.

[0094] The method of obtaining the centroids of multiple circles on the small calibration plate by using the centroid detection algorithm of the circle center calibration plate based on unbiased estimation of image moments includes:

[0095] Modeling the camera:

[0096]

[0097] Where K represents the intrinsic parameter matrix of the camera, T cw represents the camera rotation and translation, p i is a pixel in the image with coordinates (u,v,1);

[0098] The origin of the world coordinate system is on the calibration plate and Z w Equal to 0, so the projection relationship is established Then, the camera distortion process is:

[0099]

[0100] where d i is the distortion parameter, D is the distortion function, n d The value is the maximum order of the distortion parameter;

[0101] Use the first-order moment to estimate the center of mass of the circle:

[0102] The shape Axy is a set of points enclosed by a closed curve in the xy plane. |Axy| is the interior area of ​​the closed curve, and the moments of the image are:

[0103]

[0104] For any m, n∈Z∫ (the set of non-negative integers), is the (m+n)th moment of Axy

[0105] The first-order moment factors (M1, 0 and M0, 1) are the center points of the shapes, and the second-order moment factors (M2, 0, M1, 1 and M0, 2) are related to the covariance of the shapes. The first-order and second-order moment factors are used to describe the ellipse.

[0106] Given a reversible polynomial function D:(x,y)-→(x′,y′) in the domain X, let By transforming D into Ax′y′, for any m, n∈Z*, there exist cij(D)∈R and p,q∈Z* such that:

[0107]

[0108] Assume A n is the shape in the normalized plane consisting of the points (xn,yn), A d is a deformed shape consisting of points (xd, yd), then the center of the deformed ellipse in the normalized plane is:

[0109]

[0110] Where M represents the moment representation, n d is the order of the defined distortion parameter; then the centroid of the distortion ellipse on the imaging plane is for:

[0111]

[0112] x d =kx n

[0113] y d =ky n ,

[0114]

[0115]

[0116] |A i |=f x f y |A d |,

[0117]

[0118] By building a statistical model, we can make an unbiased estimate of the center of mass and find the optimal point, which is the true center of mass of the ellipse.

[0119] The distortion evaluation algorithm based on linearity verification is used to perform distortion evaluation to obtain the straight line deviation rate, including:

[0120] Suppose the set of all points on a straight line on the calibration board is S_board[p1,p2,p3...], where p represents a point. Perform equal-interval sampling on the point set S_board to obtain discrete points on the straight line. The point set of discrete points on the straight line is S_board_sub[p1,p2,p3...], where the ordinate Z in the point coordinates is 0; let the length of S_board_sub be N;

[0121] After calibration, the points on the calibration board are projected onto the image through the calibration internal parameter matrix and distortion coefficient. The projection mathematical transformation is F(P), where P represents the point and F represents the projection process. Then the point set after F projection of S_board_sub is S_image_sub. The capacity of S_image_sub is consistent with S_board_sub, and the point coordinates are in the two-dimensional structure [xi,yi].

[0122] At the same time, the calibration parameters are used to dedistort the full frame, and the straight line on the calibration plate will also be dedistorted. The straight line is detected using the straight line detection algorithm, and the expression of the straight line is obtained:

[0123] αx+βy-γ=0

[0124] α=sinθ

[0125] β=cosθ

[0126] γ=Ax sinθ+Ay cosθ

[0127] Si=αxi+βyi-γ

[0128] Where xi, yi is a point in S_image_sub, and there are L such straight lines, then:

[0129]

[0130] Then, the root mean square error d of the straight line is:

[0131]

[0132] Where N T Represents the number of sampling points on all lines reprojected onto the image, then:

[0133]

[0134] dmax is the maximum root mean square error.

[0135] A vehicle-mounted camera internal and external parameter joint calibration device, using the vehicle-mounted camera internal and external parameter joint calibration method, comprising: an internal parameter calibration board, an external parameter calibration board and a vehicle-mounted camera;

[0136] The internal parameter calibration plate and the external parameter calibration plate are combined and arranged at a calibration station; the vehicle-mounted camera is used to collect a combined image of the internal parameter calibration plate and the external parameter calibration plate.

[0137] A vehicle-mounted camera internal and external parameter joint calibration system, using the vehicle-mounted camera internal and external parameter joint calibration device, including a host computer, a domain controller port, a vehicle-mounted camera recognition module, a calibration module and a communication module;

[0138] The domain controller port, the vehicle-mounted camera identification module, and the communication module are respectively connected to the calibration module; and the host computer is communicatively connected to the communication module.

[0139] Specifically, the vehicle enters the calibration station of the production line and begins calibration. First, the computer (host computer) of the factory production line is connected to the domain controller port on the vehicle side, and a calibration command is sent to trigger the camera calibration program in the domain controller. After the calibration program is started, the hardware type of the vehicle camera is read through the driver or related software means, such as an ordinary pinhole camera, a wide-angle camera with a large imaging range, a fisheye camera with an ultra-large imaging range, etc. After reading the camera type, the camera will be started to shoot the production line calibration plate laid near the calibration station, thereby generating an image containing the calibration plate. Taking the vehicle-mounted fisheye camera as an example, there are a total of four, and they are distributed in the front, back, left, and right directions of the vehicle body. The four directions are laid with corresponding flat external parameter calibration plates and vertical internal parameter calibration plates. These two calibration plates will be described in detail later.

[0140] After the image is captured, a total of four fisheye cameras containing two calibration plates are generated. At this time, the algorithm will separate the internal reference calibration plate area and the external reference calibration plate area. The clever thing is that the vertical internal reference calibration plate and the external reference calibration plate laid flat on the ground have a considerable degree of distinction. They present a large Euclidean distance in the imaging area of ​​the image. Even if the car models of different heights and sizes are replaced, a relatively ideal dividing line can still be well divided to distinguish the two parts. Therefore, based on engineering experience, the algorithm separates a captured image into two large areas from top to bottom, and then these two areas will be filled with pixels with a value of 0 to the original image size, and then input into the internal reference calibration module and the external reference calibration module respectively. The internal reference and external reference calibration modules are two interrelated processes, and they are in a joint relationship.

[0141] To facilitate understanding of the entire process and the purpose of the algorithm, before introducing the processes of these two modules, we first introduce the algorithm and special features of this patent design in the process, and explain the algorithm in this camera calibration process with background knowledge. There are three supporting algorithms for the entire calibration process, which are prerequisites for the calibration patent:

[0142] Algorithm ① Adaptive detection and segmentation of multi-type calibration plates based on deep learning.

[0143] Algorithm ② The center of mass detection algorithm of the circle calibration plate based on unbiased estimation of image moment: improves the accuracy of detecting the center corner point of the circular calibration plate.

[0144] Algorithm ③ is a distortion evaluation algorithm based on linearity verification and is applicable to all types of cameras.

[0145] Algorithm ① Adaptive detection and segmentation of multi-type calibration plates based on deep learning

[0146] In camera calibration, detecting and locating the calibration plate area from the image is the first step, and the second step is to locate the coordinates of the specific corner points on the calibration plate. Figure 2 shown.

[0147] In the past, traditional image processing methods used template matching or growth-based methods to locate corner points. These methods cannot obtain ideal results when facing conditions such as illumination changes, camera shake, and camera overexposure. At the same time, if these detection methods are used on the entire image, a large number of candidate points will be obtained. These candidate points contain many points that are not required for calibration and need to be filtered out through post-processing. The design of the filtering algorithm also introduces errors. If non-calibration plate corner points are allowed to participate in the calibration, it may lead to calibration failure. Through a large amount of training, the method based on deep learning is superior to traditional algorithms in robustness and accuracy in the task of finding the calibration plate area. However, the method based on deep learning also has defects. That is, when locating corner points, the black box nature of the neural network may bring abnormal detection results. That is, the neural network may be able to detect most of the ideal corner points, but it will also add unnecessary points. At the same time, due to the uncontrollable output of the neural network, it is still necessary to design a post-processing algorithm to process it. Due to the probabilistic irregular output of corner points, it is also difficult to find a regular post-processing algorithm.

[0148] In summary, in order to achieve both stability and controllability, this method uses a lightweight neural network in the first step of "finding the calibration plate area" to detect the location of the checkerboard in the image. This algorithm can be understood as: first find where the checkerboard is. At the same time, this algorithm is designed to adapt to various types of calibration plates, such as: circular, checkerboard, dot, triangle, etc.

[0149] By collecting a large number of different types of calibration plate images and inputting them into a special convolutional neural network for training, the purpose of identifying the calibration plate can be achieved. At the same time, this neural network supports multiple output methods, including segmentation and detection, which greatly improves the practicality of the algorithm. By adjusting the neural network and training data, the algorithm achieves a good balance between accuracy and recall, and can identify various types of calibration plates under various conditions such as distortion, reality, and light changes.

[0150] The process of making this neural network is as follows Figure 3 , multiple vehicle-mounted cameras are used to collect different types of calibration plate images, and data augmentation and then data annotation are performed. The augmented data is divided into three major parts: training, verification, and testing. The training set and verification set are used to train the neural network, and then fine-tuning is performed according to the training results. Finally, a stable neural network model is obtained that can detect and segment various types of calibration plates in images.

[0151] At the same time, the deep learning-based adaptive detection and segmentation algorithm for multiple types of calibration plates can be adapted to both intrinsic parameter calibration and extrinsic parameter calibration. As the basic calibration algorithm, it lays the foundation for subsequent corner point detection and camera calibration.

[0152] Algorithm ② Circular calibration plate centroid detection algorithm based on unbiased estimation of image moments

[0153] It is mainly used in the process of internal calibration, especially when detecting circular calibration plates. In the camera calibration algorithm, the internal calibration plate usually uses a checkerboard or circular calibration plate, but the significant problem is that the distorted image will cause the calibration plate pattern to be distorted. If a fisheye or wide-angle camera is used, the distortion is very serious and the algorithm usually cannot find the accurate image corner point. (It should be noted here that the checkerboard corner point refers to the point where the black and white grids of the checkerboard intersect, and the circular calibration plate corner point refers to the center or centroid of the circular pattern).

[0154] The calibration plate produces very large distortion in the captured image, which will introduce corner detection errors. The accuracy of the corner coordinates will directly affect the calibration effect. After studying and comparing the two calibration plates and the corner detection methods used with them, the circular calibration plate was selected, and an image moment-based circle center corner detection algorithm was used. Even in the case of large distortion, the first-order moment can be estimated unbiasedly, and the center of mass of the circular pattern can be accurately detected at the sub-pixel level, thereby significantly improving the calibration performance.

[0155] First, the camera is mathematically modeled. This projection model is the basis of all camera models.

[0156]

[0157] The above K represents the camera's intrinsic matrix, Tcw represents the camera rotation and translation, pi is a point in the image with coordinates (u, v), which is secondary processed in the formula for convenience of calculation, that is, it becomes (u, v, 1), and the origin of the world coordinate system is taken on the calibration plate so that Zw is equal to 0, so the projection relationship KEpw = pi is established. At the same time, it can also be regarded as a homography transformation H on two image planes. As shown in the formula on the left side of the figure above. The above equation completely determines the relationship between the target point and the projection point (p~n) in the normalized plane. This projection point (p~n) will further undergo nonlinear transformation (lens distortion) when projected onto the image plane. Therefore, the formula on the right describes the entire nonlinear transformation process, that is, the camera distortion process, di is the distortion parameter, and D is the distortion function. The nd value is the maximum order of the distortion parameter.

[0158] If you don't understand this part, please refer to: Kanala-Brandt distortion model. In short: light passes through the lens and is projected onto the camera imaging sensor. However, due to the type of lens or the error in its own process, the light cannot be projected according to the ideal mathematical model. Its optical path presents a nonlinear bend. This bend (or distortion) exists in the entire image. The above equation only models one of the pixels and describes this nonlinear bend in both the X and Y directions as a polynomial, and introduces this polynomial as a function into the camera's normal projection process.

[0159] The introduction of distortion. In the actual imaging process, due to projection and lens deformation, there is a certain mismatch between the projection center of the circle on the target plane (dot), the projection center of the ellipse on the normalized plane (triangle symbol), and the actual center of mass of the shape on the image plane (cross symbol). The transformed shape caused by the nonlinear deformation in the normalized plane cannot be analytically described as the original quadratic curve (that is, the circle). In other words, it is difficult to find the center of the circular calibration plate because of the distortion caused by the distortion. It can be obtained from Figure 4 and Figure 5 This phenomenon was observed in .

[0160] To this end, a method based on image moments can be used to overcome distortion and find the true center position of the circle in the image.

[0161] After the camera distortion, the shape of the circle is similar to an ellipse, but it is clear that all pixels in the elliptical pixel area on the imaging plane are projections of a perfect circle. To find the center of this elliptical area or irregular area, the moment of the image can be used. After imaging, the boundary blur effect (that is, the edge of the image is not clear) can easily contaminate the higher-order moments. For example, if there is some expansion or erosion in the ellipse, the length of the major and minor axes will become shorter or longer, while the center of mass of the shape remains unchanged. For calibration, both unbiased estimation and accurate measurement are essential; therefore, using only the first-order moment is more conducive to accurately estimating the center of mass.

[0162] The following is an introduction to the process and foundation of mathematics

[0163] Definition: Shape; A shape Axy is a set of points enclosed by a closed curve in the xy plane. |Axy| is the interior area of ​​the closed curve. Ak represents Axkyk.

[0164] Moments of images

[0165]

[0166] For any m, n∈Z∫ (the set of non-negative integers), is the (m+n)th moment of Axy

[0167] The first-order moment factors (M1,0 and M0,1) are the center points of the shape, and the second-order moment factors (M2,0, M1,1 and M0,2) are related to the covariance of the shape. Therefore, the ellipse can be described using only the first-order and second-order moment factors. Assuming that the entire point set of the ellipse is Q, the matrix form of the ellipse is The rectangular form is [M1, 0, M0, 1, M2, 0, M1, 1, M0, 1]. Each representation has the same five degrees of freedom. In other words, a circle, an ellipse, and even its center of mass can be expressed in the form of a moment.

[0168] There is also Theorem 1:

[0169] Given a reversible polynomial function D:(x,y)-→(x′,y′) in the domain X, let Transformed into Ax′y′ by D. For any m, n∈Z*, there exist cij(D)∈R and p,q∈Z* such that

[0170]

[0171] This means that for any polynomial mapping, the moments of the transformed shape can always be expressed as linear combinations of the moments of the original shape. The number of p and q required depends on the order of the polynomial function.

[0172] So: Although it is impossible to describe the distorted ellipse in any analytical form (definite linear mathematical expression), its moment representation always exists by theorem. The ellipse imaged by the camera can still be represented in the form of moments. Understanding this sentence will help you understand this method.

[0173] To detect the image coordinates of the centroid (center) of the distorted circular calibration plate, let An be the shape in the normalized plane consisting of points (xn,yn) and let Ad be the deformed shape consisting of points (xd,yd). Using Theorem 1, the center of the deformed ellipse in the normalized plane can be calculated as follows:

[0174]

[0175] Where M stands for moment representation. nd is the order of the defined distortion parameter. See the following derivation and calculation for details:

[0176]

[0177] x d =kx n

[0178] y d =ky n ,

[0179]

[0180]

[0181] |A i |=f x f y |A d |,

[0182]

[0183] Therefore, the center of mass of the distorted ellipse on the imaging plane [ˉxi, yˉi] can be found. However, the center of mass found may not be completely accurate, and there may not be only one. The next step is to establish a statistical model to make an unbiased estimate of the position of the center of mass and find the position of the optimal point.

[0184] Therefore, to construct an unbiased estimator of [ˉxi,yˉi], we only need

[0185]

[0186] For each integer r from 0 to 3nd, define a vector: This vrn is actually the unbiased estimate, and its elements can be used to calculate the position of the center of mass. When vrn meets the unbiased estimate, the image moment under the unbiased estimate can be obtained from it. The center of mass can be found by the first-order moment of the image, which is equivalent to finding the true center of mass position of the distorted ellipse under the unbiased estimate.

[0187]

[0188] Computing vrn directly from the ellipse on the normalized plane is not straightforward; therefore, we divide the process into two steps. For any ellipse Qn, its moments can be obtained from the moments of another standard ellipse Q0 at the origin. This process can be described as a rotational equivariance. For any 2D rotation transformation R:(xs,ys)→(xn,yn), there exists α∈[0,2π] such that:

[0189] x n =cosαx s -sinαy s

[0190] y n = sinαx s +cosαy s

[0191]

[0192] This means that if we can calculate the vector vrs for any unrotated ellipse As with its major and minor axes parallel to the axes of the coordinate system, we can find vrn for any ellipse An.

[0193] In fact, the whole process can be briefly described as follows: in order to find the exact position of the center of mass of the circle after distortion, the closed form nth-order moment of the quadratic curve is introduced. The center of mass of the deformed ellipse is represented by a linear combination of the original moments. A statistical model is established for one link in this linear combination representation for unbiased estimation. Finally, the image moment under unbiased estimation is found, and then the true center of mass of the deformed ellipse is obtained.

[0194] This method can find the centroid of the distorted ellipse on the normalized plane.

[0195] Furthermore, when using this method, we found that its accuracy is higher than that of the checkerboard method. Its reprojection error is not only stable but also very small.

[0196] This concludes the introduction of Algorithm ②.

[0197] Algorithm ③ Distortion evaluation algorithm based on linearity verification, suitable for all types of cameras

[0198] In intrinsic calibration, distortion reflects the degree of image distortion. In previous intrinsic calibrations, the distortion was not verified after being modeled. This algorithm proposes a verification method that can be used to evaluate the quality of distortion correction. Together with the reprojection error, it is used as feedback for intrinsic calibration to determine the quality of calibration.

[0199] A distortion evaluation algorithm based on straight line deviation rate is proposed to help evaluate the calibration quality. The smaller the deviation rate, the better the calibration quality. Its prior knowledge is that an object that is a straight line in the real world still contains all the information of the straight line after imaging. Even if there is distortion, it is still a straight line after the distortion is restored.

[0200] By shooting multiple straight lines and detecting them in the image, using the straight line detection algorithm, detecting the positions of multiple straight lines in the image, and sampling along these straight lines, the coordinates of the points on the straight lines in the real world are all known, and the internal and external parameters are all known. All of them are reprojected. At the same time, the full frame is orthogonalized, and then the straight line detection algorithm is used to detect these known straight lines, and then the expression of the straight line is obtained. The root mean square distance of the reprojected points in the real world and this straight line represents the straight line deviation rate. The smaller this straight line deviation rate is, the better the quality of the parameters obtained is.

[0201] Here is the mathematical expression of this method:

[0202] Assume that the set of all points on a line on the calibration board is S_board[p1,p2,p3...], where p represents point. Sample the point set S_board at equal intervals to obtain some discrete points on the line. The set of these sampled points is called S_board_sub[p1,p2,p3...]. Obviously, S_board_sub is a subset of S_board. Note that the points here are the three-dimensional point coordinates of the real world, and because the points are on the calibration board, their Z = 0. Assume that the length (or capacity) of S_board_sub is N.

[0203] After calibration, the points on the calibration board can be projected onto the image through the calibration parameters (intrinsic matrix, distortion coefficient). This projection mathematical transformation is called F(P), where P represents the point and F represents the projection process. The point set after F projection of S_board_sub is called: S_image_sub. Its capacity is the same as S_board_sub, but it becomes a two-dimensional structure [xi,yi].

[0204] At the same time, the calibration parameters are used to dedistort the full frame, and the straight line on the calibration plate will also be dedistorted. At this time, the straight line is detected using a straight line detection algorithm. The specific algorithm for accurately detecting the straight line is not described in detail here, and the expression of the straight line is obtained.

[0205] αx+βy-γ=0 Linear Expression

[0206] α=sinθ

[0207] β=cosθ

[0208] γ=Ax sinθ+Ay cosθ

[0209] Define Si = αxi + βyi - γ

[0210] Where xi, yi is a point in S_image_sub. Assuming there are L such lines, we have:

[0211]

[0212] Therefore, the RMSE (root-mean-square error) of the straight line is defined as d:

[0213]

[0214] Where NT represents the number of sampling points on all lines reprojected onto the image, and:

[0215]

[0216] dmax measures the maximum error. Figure 6 shown.

[0217] This method is essentially a measure of the quality of linearity after calibration. If the root mean square error is very small, it means that the point still maintains good linearity after projection. If the root mean square error is large, it means that the linearity is not good.

[0218] At the same time, if there are multiple sets of parameters, and their full-image reprojection errors are similar, the above method can be used to measure the quality of the calibration parameters. This patent has been verified through experiments that this method can select the best one from multiple sets of better parameters.

[0219] The above three algorithms are the core algorithms supporting this patent, and their coordination is the key to joint calibration.

[0220] The specific implementation steps of internal and external reference calibration are described in detail below; Internal reference calibration:

[0221] Internal reference calibration Figure 7 As shown, the main purpose is to calibrate the camera's intrinsic parameter matrix M and distortion coefficient D. The present invention uses a special multi-angle multi-block "circular--straight line" calibration plate, whose structure and appearance are shown in FIG. Figure 8 and Fig. 9 .

[0222] Figure 8 To calibrate the overall appearance of the board, Fig. 9 It is a schematic diagram of external parameter calibration. It can be observed that a single small plate is composed of 16 black circles and 10 black straight lines. The small plate is a square. The square is divided into 4 equal parts along the horizontal and vertical axes and drawn to obtain 16 small squares of equal size and shape. A black perfect circle pattern with a diameter of half the small square is set with the center of the diagonal of the small square as the center of the circle. These circles and straight lines constitute a single small plate.

[0223] At the same time, 9 small plates with different postures are combined and connected by mechanical structures to form a complete internal reference calibration plate. Among them, the small plate numbered B1_05 is used as the reference, and the three axes of the 8 small plates around it are rotated and translated with multiple degrees of freedom. Note: The coordinate system is a Cartesian coordinate system. For example, the small plate numbered B1_01 is based on B1_05. In the right-hand coordinate system (the center of the B1_05 small plate is the coordinate origin, the Z axis is perpendicular to the screen and outward, the X axis is perpendicular to the Z axis and to the right, and the Y axis is perpendicular to the X axis and upward), it is obtained by rotating 45° along the X axis, 45° along the Y axis, and 45° along the Z axis. Similarly, the remaining small plates are rotated at different angles. B1_01 to B1_09 have 9 different postures, which constitute a complete internal reference calibration plate.

[0224] After entering the intrinsic calibration phase, first, the intrinsic calibration plate image will be segmented. The large calibration plate has 9 small calibration plates with different postures. First, use algorithm ① to extract the sub-images of these 9 parts. Since the sub-images have different postures, it is equivalent to taking 9 calibration plate images at different positions at one time. Then, use algorithm ② to obtain the center of mass of multiple circles on the small calibration plate. Subsequently, according to the type of camera, a mathematical model for solution is established, and then Zhang's method is used to establish the calibration equation group. After the solution is completed, if the reprojection error is less than the set threshold, enter the next step and use algorithm ③ for distortion evaluation. If the straight line deviation rate is less than the set threshold, it is considered that the intrinsic calibration is qualified and the internal parameters are output. The output internal parameters include the camera internal parameter matrix and distortion coefficient.

[0225] Then enter the external parameter calibration. The external parameters of the vehicle camera depend on the internal parameters calibrated in the previous step. The entire process flow chart of the external parameter calibration is described as follows:

[0226] External parameter calibration:

[0227] like Fig. 9 As shown in the figure, when entering the external parameter calibration, the position of the external parameter calibration plate will be detected using algorithm ① first. After the position of the calibration plate is detected, the traditional algorithm will be used to accurately solve the position of the corner points on the external parameter calibration plate. The precise image coordinates of the corner points on the external parameter calibration plate are known, the world coordinates of the real-world calibration plate are known, the camera mathematical model is input, the internal parameters and distortion coefficients calibrated in the internal parameter calibration step are input, and the external parameters are solved by SolvePnP. After the solution is successful, the accuracy of the external parameter calibration is judged based on the reprojection error. If the reprojection error is less than the set threshold, the calibration is considered successful, the external parameters and internal parameters are written to the file and encrypted, and the process ends.

[0228] The image coordinates of the corner points on the external calibration plate and the world coordinates of the calibration plate are input into the camera mathematical model, and the external parameters are solved by SolvePnP according to the obtained internal parameters and distortion coefficients, and the reprojection error is obtained, including the following process:

[0229] Given n 3D spatial reference points and the corresponding imaging points of each point on the camera image, find the spatial relationship between the coordinate system of the reference point and the camera.

[0230] Given condition 1: Given a pair of matching points: n 3D point coordinates in the real world coordinate system and their corresponding 2D point coordinates in the image coordinate system. These point coordinates are strictly one-to-one in space and order.

[0231] Known condition 2: camera's intrinsic parameter matrix and distortion coefficient.

[0232] Known condition 3: mathematical model of the camera, such as KB fisheye camera model, Pinhole camera model.

[0233] Solution goal: the pose transformation relationship between the world coordinate system and the camera coordinate system, that is, the external parameter.

[0234] For the convenience of explanation, a pinhole camera model is used to derive and explain the process of solvePnPd.

[0235] The homogeneous coordinates of the 3D reference point in the world coordinate system are

[0236]

[0237] The homogeneous coordinates of the 2D projection point in the image coordinate system are

[0238]

[0239] The intrinsic parameters of the camera are

[0240]

[0241] Then the projection from 3D point to 2D point can be expressed as

[0242]

[0243] Although [R|t] has 6 degrees of freedom, R has 9 parameters, but only 3 degrees of freedom, because the rotation matrix has orthogonal constraints. Using the direct linear transformation algorithm, first ignore the orthogonal constraints of R and calculate according to [R|t] with 12 unknown parameters, then:

[0244]

[0245] Expand and solve the equation:

[0246]

[0247] Simplified

[0248]

[0249] This can be written in matrix form as:

[0250]

[0251] From the above derivation, we can see that a pair of 3D-2D point pairs provides two equations. When the number of point pairs is greater than 6, the equation Ax=0 is generated, where the size of A is 2n*12. This equation cannot be solved exactly, but a least squares solution under the constraint of |x|=1 can be obtained. Specifically, SVD decomposition is performed on equation A.

[0252] [U∑V]=SVD(A)

[0253] The last column of the V matrix is ​​the solution, then the rotation part:

[0254]

[0255] It is an orthogonal matrix with scale. In order to find the optimal rotation matrix, it is decomposed by SVD.

[0256]

[0257] The optimal rotation matrix is

[0258] R=±UV T

[0259] Theoretically, the diagonals of ∑ should be very close, so we take the average and solve for the proportionality coefficient:

[0260] β=±1 / (tr(∑) / 3)

[0261] In addition, there is a constraint: the 3D point should be in front of the camera

[0262]

[0263] This way, the scale factor and the ± sign of the rotation matrix can be determined, and the translation vector can be obtained:

[0264]

[0265] The above is the process of solving RT. If distortion is considered, the distortion relationship can be imported into the camera coordinates and image coordinates during projection.

[0266] After solving the extrinsic parameters, the quality of the extrinsic parameters needs to be verified. The RT and camera intrinsic parameters obtained by the solution are used to project the known 3D points on the calibration plate to the image plane according to the camera projection equation, and the image coordinates of these 3D points after reprojection are obtained. Then, they are compared with the 2D image coordinates of the calibration plate obtained by the corner point solving algorithm, and the Euclidean distance between the two is calculated. The Euclidean distances of all points in the point set are averaged to obtain the reprojection error. The smaller the reprojection error, the more accurate the extrinsic parameters are.

[0267] Note: The external reference calibration plate is placed on the ground. It is a special-shaped calibration plate. There are two different types, AprilTag and chessboard. Fig.10 shown.

[0268] It is obvious that the calibration plate is special. The small plates on the four corners are AprilTag plates, which are similar to QR codes. By identifying these four plates, information can be obtained. This information includes but is not limited to: vehicle model, vehicle parameters, coordinates of the corner points on each calibration plate in the vehicle coordinate system, production line number, etc. At the same time, the coordinates of these corner points will also be directly involved in the calculation.

[0269] The above is the process of joint calibration of internal and external parameters.

[0270] This patent uses a variety of combined methods to optimize the process of vehicle camera production line calibration. Compared with the previous method, the current method can calibrate the internal and external parameters in one shot, and has both speed and stability. This process can be reused in any production workshop to help calibrate the vehicle camera when the vehicle is off the line.

[0271] The above is only a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the form disclosed herein, and should not be regarded as excluding other embodiments, but can be used in various other combinations, modifications and environments, and can be modified within the scope of the concept described herein through the above teachings or the technology or knowledge of the relevant field. The changes and modifications made by those skilled in the art shall not deviate from the spirit and scope of the present invention, and shall be within the scope of protection of the claims attached to the present invention.

Claims

1. A joint calibration method for internal and external parameters of vehicle-mounted cameras. It is characterized in that The steps include: Step 1: The vehicle enters the calibration station, and the on-board camera collects the calibration plate image, divides the collected calibration plate image into the internal reference calibration plate image and the external reference calibration plate image, sends the internal reference calibration plate image to the internal reference calibration module, and sends the external reference calibration plate image to the external reference calibration module, and then enters step 2; Step 2: Segment the internal reference calibration plate image. The internal reference calibration plate includes a plurality of small calibration plates in different postures. The small calibration plate includes a plurality of black circles and a plurality of black straight lines. The small calibration plate images of various parts in the internal reference calibration plate image are extracted by a multi-type calibration plate adaptive detection-segmentation method based on deep learning; Step 3: The center of mass of multiple circles on the small calibration plate is obtained by using the center of mass detection algorithm of the circle calibration plate based on unbiased estimation of image moments. According to the type of vehicle-mounted camera, a camera mathematical model is established. The intrinsic parameter matrix M and distortion coefficient D of the vehicle-mounted camera are solved by Zhang's calibration method to obtain the reprojection error. If the reprojection error is less than the set threshold, proceed to step 4, otherwise, return to step 2. Step 4: Distortion evaluation is performed using a distortion evaluation algorithm based on linearity verification to obtain a straight line deviation rate. If the straight line deviation rate is less than the set threshold, the internal parameter calibration is qualified and the internal parameter is output. The output internal parameter includes the camera internal parameter matrix and the distortion coefficient. Otherwise, return to step 2. Step 5, detecting the position of the external reference calibration plate by a multi-type calibration plate adaptive detection-segmentation method based on deep learning, and obtaining the image coordinates of the corner points on the external reference calibration plate after detecting the position of the calibration plate; the external reference calibration plate includes AprilTag and a checkerboard image; Step 6: Input the image coordinates of the corner points on the extrinsic calibration plate and the world coordinates of the calibration plate into the camera mathematical model. According to the obtained intrinsic parameters and distortion coefficients, the extrinsic parameters are solved by SolvePnP, and the reprojection error is obtained. If the reprojection error is less than the set threshold, the extrinsic calibration of the vehicle-mounted camera is successful, and proceed to step 7. Otherwise, return to step five; Step 7: Write the obtained external and internal parameters into a file and encrypt it to complete the joint calibration of the internal and external parameters of the vehicle-mounted camera.

2. A vehicle-mounted camera internal and external parameter joint calibration method according to claim 1, It is characterized in that The multi-type calibration plate adaptive detection-segmentation method based on deep learning is used to extract small calibration plate images of various parts in the internal reference calibration plate image, including: The deep learning-based adaptive detection-segmentation method for multiple types of calibration plates is as follows: multiple vehicle-mounted cameras are used to collect different types of calibration plate images, and data augmentation is performed, followed by data annotation. The augmented data is divided into three parts: training, verification, and testing. The training set and the verification set are used to train the neural network to obtain a stable neural network model for detecting and segmenting various types of calibration plates in the image; the small calibration plate images of each part of the internal reference calibration plate image are extracted by the trained neural network model.

3. A vehicle-mounted camera internal and external parameter joint calibration method according to claim 2, It is characterized in that The method of obtaining the centroids of multiple circles on the small calibration plate by using the centroid detection algorithm of the circle center calibration plate based on unbiased estimation of image moments includes: Modeling the camera: Where K represents the intrinsic parameter matrix of the camera, T cw represents the camera rotation and translation, p i is a pixel in the image with coordinates (u,v,1); The origin of the world coordinate system is on the calibration plate and Z w Equal to 0, so the projection relationship is established Then, the camera distortion process is: where d i is the distortion parameter, D is the distortion function, n d The value is the maximum order of the distortion parameter; Use the first-order moment to estimate the center of mass of the circle: The shape Axy is a set of points enclosed by a closed curve in the xy plane. |Axy| is the interior area of ​​the closed curve, and the moments of the image are: For any m, n∈Z∫ (the set of non-negative integers), is the (m+n)th moment of Axy The first-order moment factors (M1, 0 and M0, 1) are the center points of the shapes, and the second-order moment factors (M2, 0, M1, 1 and M0, 2) are related to the covariance of the shapes. The first-order and second-order moment factors are used to describe the ellipse. Given a reversible polynomial function D:(x,y)-→(x′,y′) in the domain X, let By transforming D into Ax′y′, for any m, n∈Z*, there exist cij(D)∈R and p,q∈Z* such that: Assume A n is the shape in the normalized plane consisting of the points (xn,yn), A d is a deformed shape consisting of points (xd, yd), then the center of the deformed ellipse in the normalized plane is: Where M represents moment representation, n d is the order of the defined distortion parameter; then the centroid of the distortion ellipse on the imaging plane is for: x d =kx n yes d =ky n , |A i |=f x f y |A d |, By building a statistical model, we can make an unbiased estimate of the center of mass and find the optimal point, which is the true center of mass of the ellipse.

4. A vehicle-mounted camera internal and external parameter joint calibration method according to claim 3, It is characterized in that The distortion evaluation algorithm based on linearity verification is used to perform distortion evaluation to obtain the straight line deviation rate, including: Suppose the set of all points on a straight line on the calibration board is S_board[p1,p2,p3...], where p represents a point. Perform equal-interval sampling on the point set S_board to obtain discrete points on the straight line. The point set of discrete points on the straight line is S_board_sub[p1,p2,p3...], where the ordinate Z in the point coordinates is 0; let the length of S_board_sub be N; After calibration, the points on the calibration board are projected onto the image through the calibration internal parameter matrix and distortion coefficient. The projection mathematical transformation is F(P), where P represents the point and F represents the projection process. Then the point set after F projection of S_board_sub is S_image_sub. The capacity of S_image_sub is consistent with S_board_sub, and the point coordinates are in the two-dimensional structure [xi,yi]. At the same time, the calibration parameters are used to dedistort the full frame, and the straight line on the calibration plate will also be dedistorted. The straight line is detected using the straight line detection algorithm, and the expression of the straight line is obtained: αx+βy-γ=0 α=sinθ β=cosθ γ=Ax sinθ+Ay cosθ Si=αxi+βyi-γ Where xi, yi is a point in S_image_sub, and there are L such straight lines, then: Then, the root mean square error d of the straight line is: Where N T Represents the number of sampling points on all lines reprojected onto the image, then: dmax is the maximum root mean square error.

5. A combined calibration device for internal and external parameters of a vehicle-mounted camera, It is characterized in that A vehicle-mounted camera internal and external parameter joint calibration method according to any one of claims 1 to 4, comprising: an internal parameter calibration board, an external parameter calibration board and a vehicle-mounted camera; The internal parameter calibration plate and the external parameter calibration plate are combined and arranged at a calibration station; the vehicle-mounted camera is used to collect a combined image of the internal parameter calibration plate and the external parameter calibration plate.

6. A vehicle-mounted camera internal and external parameter joint calibration system, It is characterized in that A vehicle-mounted camera internal and external parameter joint calibration device according to claim 5, comprising a host computer, a domain controller port, a vehicle-mounted camera recognition module, a calibration module and a communication module; The domain controller port, the vehicle-mounted camera identification module, and the communication module are respectively connected to the calibration module; the host computer is communicatively connected to the communication module; and the vehicle-mounted camera internal and external parameter joint calibration device is connected to the calibration module.

Citation Information

Cited By

  • Calibration method and device, electronic equipment, medium and program product

    CN119180871A

  • Camera calibration method, system and device based on image processing

    CN119295563A

  • Outfield-free continuous calibration method for traffic scene

    CN121120801A