High-robustness and high-precision camera calibration board and angular point detection method

By combining ArUco QR code and black and white checkerboard, and using sub-pixel algorithm to optimize the corner position, it solves the problems of poor camera calibration robustness and insufficient sub-pixel detection in the existing technology, and achieves high-precision and efficient camera calibration.

CN118674789AActive Publication Date: 2024-09-20NANJING UNIV OF SCI & TECH

Patent Information

Application Number
CN202410348361.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-26
Publication Date
2024-09-20
Estimated Expiration
2044-03-26

AI Technical Summary

Technical Problem

Among the existing camera calibration methods, when using a black and white checkerboard pattern, the robustness is poor and it is easily affected by illumination and defects, resulting in missing corner points. However, the ArUco QR code cannot perform sub-pixel detection, resulting in an inability to match the corner point sequence.

Method used

Design a highly robust and high-precision camera calibration board that combines ArUco QR code and black and white checkerboard, optimizes the corner position of black and white checkerboard through ArUco QR code detection and sub-pixel algorithm, establishes a projection transformation matrix, and calculates precise pixel coordinates , to achieve camera calibration.

Benefits of technology

It improves the robustness and accuracy of calibration, avoids the problems of missing corner points and insufficient sub-pixel detection, and ensures the accuracy and efficiency of camera calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118674789A
    Figure CN118674789A
Patent Text Reader

Abstract

The invention discloses a high-robustness and high-precision camera calibration board and a corner detection method. The method comprises the following steps: forming an expected calibration board through the combination of an ArUco code pattern and a black and white checkerboard pattern; establishing a calibration plate coordinate system, and setting coordinates of ArUco code pattern angular points on the calibration plate; acquiring an image of the calibration plate to obtain pixel coordinates of angular points of the ArUco code pattern; solving a projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system by using the calibration plate coordinate and the pixel coordinate; calculating the pixel coordinates of the black and white checkerboard angular points by using the projection transformation matrix T and the known model of the calibration board; and obtaining accurate pixel coordinates of the black and white checkerboard angular points by adopting a sub-pixel algorithm. The method solves the problems that the ArUco code pattern corner coordinate precision is not high, the number of corner points is small, and the black and white checkerboard pattern is prone to being affected by environment interference, placing postures, backlight, local shadows and the like, so that detection fails and corner points are lost.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of computer vision, and in particular, relates to a highly robust and high-precision camera calibration plate and a corner point detection method. Background Art

[0002] With the development of computer vision, visual positioning, 3D reconstruction, and environmental perception have also been widely used. In order to achieve better results, it is necessary to obtain accurate camera parameters in advance, that is, to perform accurate camera calibration.

[0003] In the field of calibration, black and white checkerboards or ArUco QR codes are generally used for calibration. In the traditional calibration process, black and white checkerboards are used to complete the calibration. The number of black and white checkerboard corner points is large and dense, so sub-pixel detection can be performed to obtain accurate detection results, thereby completing the calibration. However, using black and white checkerboards for calibration is prone to missing some corner point information, that is, it is impossible to detect and track all marks on the black and white checkerboard. This may be caused by differences in lighting conditions or the black and white checkerboard pattern is blocked or damaged. Using ArUco QR codes for calibration detection is simple, fast, and has strong robustness. ArUco QR codes are easily detected in images, and their calibration is not affected by the environment, vegetation, local occlusion, reflective conditions, etc., but ArUco QR codes cannot perform sub-pixel detection.

[0004] In this context, many new methods have emerged. For example, Chinese invention patent CN111179356A discloses a binocular camera calibration method, device, system and calibration board based on ArUco QR code, which uses the ChArUco calibration board that combines ArUco QR code with a checkerboard for calibration. The ChArUco calibration board uses the method of embedding the ArUco QR code into the white squares of the checkerboard. The method described in it first obtains the ArUco QR code ID, obtains the corner point ID, and then performs sub-pixel corner point extraction on the original image, and finally corresponds the checkerboard corner point coordinates to the camera coordinate system coordinates one by one to complete the calibration. However, this calibration board has some defects. For example, if the ArUco QR code is too small, the ArUco QR code area image is not clear enough, and the ID cannot be read correctly, the ArUco QR code needs to be maximized. In addition, this calibration board has poor robustness and relies on the detection effect of the ArUco QR code during the calibration process. Since the ArUco QR code is embedded in the white squares of the checkerboard, the ArUco QR code is limited in size and difficult to detect. The missed detection of the ArUco QR code leads to the mismatch of the corner point sequence, which interferes with the overall calibration result.

[0005] For example, Chinese invention patent 108765328A discloses a high-plane multi-feature template and its distortion optimization and calibration method. The ChArUco calibration board with an ArUco QR code embedded in the white area of ​​the checkerboard is used. On this basis, the 5×3 grid in the middle area is changed into an area filled with random points. The middle area is a Random template, which is suitable for external parameter calibration and zoom lens calibration. In this patent, in addition to using corner points and feature points, line features are also introduced, combining point features and line features for calibration. The pattern of this patent is divided into 4 parts: ArUco QR code, checkerboard, the middle Random module, and the straight and oblique line features added to the outermost periphery. This calibration board uses a lot of feature information. The use of point features and line features not only brings rich feature information, but also makes the calibration process not convenient and fast enough, and the overall calibration efficiency is low, which is not easy to implement. Summary of the invention

[0006] The purpose of the present invention is to provide a highly robust and high-precision camera calibration plate and corner point detection method to solve the problem that the robustness is poor when using a black and white chessboard for calibration, and the corner points are missed due to the influence of lighting, defects, etc. when detecting corner points. The present application provides a highly robust and high-precision camera calibration plate, and the calibration plate includes:

[0007] 1 or more ArUco QR codes;

[0008] Arrange one or more black and white checkerboards in the blank area around the ArUco QR code;

[0009] There is a gap between the ArUco QR code pattern and the black and white checkerboard pattern.

[0010] The present application also provides a corner point detection method, which is implemented based on the calibration plate provided in the present application, and includes:

[0011] The expected calibration plate is formed by combining the ArUco QR code pattern and the black and white checkerboard pattern;

[0012] Establish the calibration plate coordinate system and set the calibration plate coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco QR code pattern in the calibration plate coordinate system;

[0013] Collect the calibration plate image, detect the ArUco QR code in the image, and obtain the pixel coordinates (x1[i], y1[i]) of the corner points of the ArUco QR code pattern in the pixel coordinate system;

[0014] Using the calibration plate coordinates (X1[i], Y1[i], Z1[i]) and pixel coordinates (x1[i], y1[i]), solve the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system;

[0015] Use the projection transformation matrix T and the known model of the calibration plate to calculate the pixel coordinates (x2[i], y2[i]) of the corner points of the black and white chessboard;

[0016] The sub-pixel algorithm is used to optimize the pixel coordinates (x2[i], y2[i]) to obtain the precise pixel coordinates of the corner points of the black and white chessboard for camera calibration operations.

[0017] Furthermore, a calibration plate coordinate system is established, and the calibration plate coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco two-dimensional code pattern in the calibration plate coordinate system are set, including:

[0018] The calibration plate coordinate system is established with the upper left corner of the calibration plate as the coordinate origin, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane upward;

[0019] The coordinates of each corner point of the ArUco QR code in the calibration plate coordinate system (X1[i], Y1[i], Z1[i]) are:

[0020] D1=(m,n,0)

[0021] D2=(m+A,n,0)

[0022] D3=(m+A,n+A,0)

[0023] D4=(m,n+A,0)

[0024] Among them, A is the side length of the ArUco two-dimensional code, and D1, D2, D3, and D4 are the upper left, upper right, lower left, and lower right coordinates.

[0025] Furthermore, the calibration plate coordinates (X1[i], Y1[i], Z1[i]) and pixel coordinates (x1[i], y1[i]) are used to solve the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system, including:

[0026] The different corner points of the ArUco QR code pattern are located by the anisotropy of the ArUco QR code pattern. The coordinates of the same corner point in the calibration plate coordinate system (X1[i], Y1[i], Z1[i]) and its coordinates in the pixel coordinate system (x1[i], y1[i]) are used to solve the PnP problem and obtain the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system. The solution method is:

[0027]

[0028] in, is the rotation matrix, is the translation matrix, t x , t y , t zThey represent the x-axis, y-axis, and z-axis distances from the origin of the calibration plate coordinate system to the origin of the pixel coordinate system, respectively. 11 , r 21 , r 31 ) T 、(r 12 , r 22 , r 32 ) T 、(r 13 , r 23 , r 33 ) T They respectively represent the coordinates of the unit vectors of the x-axis, y-axis, and z-axis of the calibration plate coordinate system in the pixel coordinate system.

[0029] Furthermore, the pixel coordinates (x2[i], y2[i]) of the corner points of the black and white checkerboard are calculated using the projection transformation matrix T and the known model of the calibration plate, including:

[0030] According to the width of the ArUco QR code, the side length of each square in the black and white checkerboard pattern, and the interval width between the black and white checkerboard pattern and the ArUco QR code pattern, the coordinates of each black and white checkerboard corner point in the calibration plate coordinate system (X2[i], Y2[i], Z2[i]) are set, and the coordinates of each corner point in the pixel coordinate system (x2[i], y2[i]) are calculated using the projection transformation matrix T; the solution method is:

[0031]

[0032] Wherein, the definition of the projection transformation matrix T is consistent with that in claim 4;

[0033] The sub-pixel algorithm is used to refine the calculated coordinates of each corner point in the pixel coordinate system (x2[i], y2[i]) to obtain the precise coordinates of the corner points of the black and white chessboard (x2′[i], y2′[i]), which is what we are looking for.

[0034] Furthermore, the method further includes, when the number of ArUco two-dimensional codes is n, and n>=2, dispersing the ArUco two-dimensional codes; if one of the ArUco two-dimensional codes cannot be detected, performing secondary detection processing.

[0035] Furthermore, the secondary detection process includes:

[0036] S71: Set the number of ArUco two-dimensional codes to be detected in the image N=n, detect the ArUco two-dimensional codes in the image, and record the number k of the detected ArUco two-dimensional codes; if the number k is not equal to N, then m=Nk, and execute step S71, otherwise execute step S74;

[0037] S72: Calculate the projection transformation matrix Tk using the coordinates of the corner points of the bounding boxes of the k ArUco two-dimensional codes and their corresponding coordinates in the template coordinate system;

[0038] S73: m=m-1, if m<0, execute step S74; otherwise, infer the position G of the next lost ArUco QR code in the image based on the projection transformation matrix Tk and the IDs of the k ArUco QR codes that have been detected and the relative position relationship of the N ArUco QR codes; when there are multiple ArUco QR codes near the inferred ArUco QR code position G, sort the distances from the ArUco QR codes to the position G from near to far, and record the inferred ArUco QR code position sequence as F, and select the one with the shortest distance, that is, the first element in F;

[0039] S74: Fill the area outside the inferred ArUco QR code position G in the image with the background color, and perform ArUco QR code detection again on the filled image; if the ID of the detected ArUco QR code is not equal to the IDs of the k ArUco QR codes that have been detected, then k=k+1; if k=N, end, otherwise execute step S71; if no detection is possible, delete the first element in F and execute step S72.

[0040] The present invention provides a highly robust and high-precision camera calibration plate. This calibration plate combines ArUco two-dimensional code on the basis of black and white chessboard. Compared with directly detecting corner points on the black and white chessboard, ArUco two-dimensional code is easily detected in the image, and is not affected by the environment, vegetation, local occlusion, reflective conditions, etc., and can perform simple and rapid calibration detection when the calibration plate is fixed and the camera zooms and shoots, so that the calibration plate has high robustness. In addition, the black and white chessboard makes up for the defect that ArUco two-dimensional code cannot perform sub-pixel corner point screening. The number of black and white chessboard corner points is large and dense, and sub-pixel detection can be performed to obtain accurate detection results, so that the calibration plate has high accuracy when calculating the pixel coordinates of the black and white chessboard corner points, thereby completing the calibration.

[0041] The calibration board provided in this application has the following advantages:

[0042] 1. ArUco QR codes are easily detected in images, and their calibration is not affected by the environment, vegetation, partial occlusion, reflective conditions, etc. It can perform simple and fast calibration detection when the calibration board is fixed and the camera is zoomed, making the calibration board highly robust.

[0043] 2. The black and white checkerboard makes up for the defect that ArUco QR code cannot perform sub-pixel corner point screening. The black and white checkerboard corner points are numerous and dense, so sub-pixel detection can be performed to obtain accurate detection results. This enables the calibration board to have higher accuracy when calculating the pixel coordinates of the black and white checkerboard corner points, thereby completing the calibration.

[0044] The corner point detection method provided by the present invention has the following advantages:

[0045] 1. The corner positions of the black and white checkerboard pattern in this patent are calculated rather than detected, so there will be no problem of missing corner points;

[0046] 2. It solves the problem in the prior art that when the calibration plate only uses a black and white checkerboard pattern, it is easily affected by environmental interference, placement posture, backlight, local shadows, etc., resulting in calibration plate detection failure and corner point loss;

[0047] 3. The problem that the corner point coordinates are not accurate and the number of corner points is small when the calibration plate only uses the ArUco two-dimensional code pattern in the prior art is solved. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 A schematic diagram of the structure of the first camera calibration board provided in an embodiment of the present application.

[0049] Figure 2 A schematic diagram of the structure of the second camera calibration board provided in an embodiment of the present application.

[0050] Figure 3 A flowchart of a highly robust and high-precision camera calibration plate and a corner point detection method thereof provided in an embodiment of the present application. DETAILED DESCRIPTION

[0051] In order to make the purpose, technical solutions and advantages of the present application more clear, the present invention is further described in detail below through specific embodiments in conjunction with the accompanying drawings.

[0052] Embodiment 1, as Figure 1 As shown, it is a schematic diagram of the structure of a calibration board provided in an embodiment of the present application. In this embodiment, the pattern size of the calibration board is set to 9cm×13cm, the upper left corner and the lower right corner of the calibration board are ArUco two-dimensional codes, the lower left corner and the upper right corner are black and white checkerboards, the number of squares of the black and white checkerboard template is 10×8, the side length of each square is 4mm, the side length of the ArUco two-dimensional code is 40mm, and the horizontal and vertical intervals between the two patterns are both 3mm. The number of squares of the black and white checkerboard pattern is not limited to the number described in this embodiment, and can be changed according to actual needs.

[0053] The calibration plate coordinate system is established with the upper left corner of the calibration plate as the origin, right as x, down as y, the calibration plane as the xoy plane, and the z axis perpendicular to the calibration plane upward. The coordinates of the four corner points of the upper left corner ArUco QR code are (0,0,0), (40,0,0), (40,40,0), (0,40,0), and the coordinates of the four corner points of the lower right corner ArUco QR code are (43,35,0), (83,35,0), (83,75,0), (43,75,0).

[0054] Embodiment 2, as Figure 2 As shown, it is a schematic diagram of the structure of another calibration board provided in an embodiment of the present application. In this embodiment, the pattern size of the calibration board is set to 9cm×13cm, the middle of the calibration board is an ArUco two-dimensional code, and 8 4x4 black and white checkerboards of the same size as the ArUco two-dimensional code are set around the ArUco two-dimensional code. The side length of each square is 20mm, and the side length of the ArUco two-dimensional code is 80mm. The horizontal and vertical intervals between the two patterns are both 10mm. The number of squares of the black and white checkerboard pattern is not limited to the number described in this embodiment, and can be changed according to actual needs.

[0055] The calibration plate coordinate system is established with the upper left corner of the calibration plate as the origin, right as x, down as y, the calibration plane as the xoy plane, and the z axis perpendicular to the calibration plane upward. The coordinates of the four corner points of the middle ArUco QR code are (90, 90, 0), (170, 90, 0), (170, 170, 0), (90, 170, 0).

[0056] Taking the calibration plate proposed in Example 1 as an example, the highly robust and high-precision camera calibration plate corner point detection method proposed in the present invention includes:

[0057] S1, the expected calibration plate is formed by combining the ArUco QR code pattern and the black and white checkerboard pattern:

[0058] Construct a calibration template based on the ArUco QR code and the black and white checkerboard template, and print it on the same template plane, with a gap between the ArUco QR code pattern and the black and white checkerboard pattern. Specifically include:

[0059] S101, construct two black and white checkerboard templates with a number of squares of 10×8 and place them in the lower left corner and upper right corner of the calibration plate;

[0060] S102, placing the ArUco QR code at the upper left corner and the lower right corner of the calibration plate, and leaving a certain width of space between the black and white checkerboard template to complete the construction of the camera calibration plate.

[0061] S2, establish the calibration plate coordinate system, set the coordinates of the corner points of the ArUco code pattern in the calibration plate coordinate system (X1[i], Y1[i], Z1[i]):

[0062] S201, establish a calibration plate coordinate system with the upper left corner of the calibration plate as the coordinate origin, rightward as x, downward as y, the calibration plane as the xoy plane, and the z axis perpendicular to the calibration plane upward as the z axis;

[0063] S202, taking the ArUco two-dimensional code located in the upper left corner as an example, the coordinates of each corner point of the ArUco two-dimensional code in the calibration plate coordinate system (X1[i], Y1[i], Z1[i]) are:

[0064] D1=(0,0,0)

[0065] D2=(A,0,0)

[0066] D3 = (0, A, 0)

[0067] D4=(A,A,0)

[0068] Among them, A is the side length of the ArUco two-dimensional code, and D1, D2, D3, and D4 are the upper left, upper right, lower left, and lower right coordinates.

[0069] S3, collect the calibration plate image, detect the ArUco code in the image, and obtain the pixel coordinates (x1[i], y1[i]) of the corner points of the ArUco code pattern in the pixel coordinate system:

[0070] S301, extracting the ID information and the pixel coordinates of the corner points of the bounding box of each ArUco two-dimensional code in the image information of the camera calibration plate through the detectMarkers function in OpenCV.

[0071] S4, using (X1[i], Y1[i], Z1[i]) and (x1[i], y1[i]), solve the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system:

[0072] S401, locate different corners of the ArUco QR code pattern by anisotropy of the ArUco QR code pattern, select the coordinates of the calibration plate coordinate system (X1[i], Y1[i], Z1[i]) and the pixel coordinate system coordinates (x1[i], y1[i]) of the same corner point, solve the PnP problem, and obtain the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system. The solution method is:

[0073]

[0074] in, is the rotation matrix, is the translation matrix, t x , t y, t z They represent the x-axis, y-axis, and z-axis distances from the origin of the calibration plate coordinate system to the origin of the pixel coordinate system, respectively. 11 ,r 21 ,r 31 ) T 、(r 12 ,r 22 ,r 32 ) T 、(r 13 ,r 23 ,r 33 ) T They respectively represent the coordinates of the unit vectors of the x-axis, y-axis, and z-axis of the calibration plate coordinate system in the pixel coordinate system.

[0075] S402, extract the ArUco two-dimensional code, and according to its corner point information and the corresponding coordinates of each corner point in the calibration plate coordinate system, combine the intrinsic parameters and distortion parameters of the camera and substitute them into the solvePnP function to determine the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system, and obtain the conversion relationship between the calibration plate coordinate system and the pixel coordinate system.

[0076] Among them, the steps of solving the intrinsic parameters and distortion parameters of the camera can be calculated according to the Zhang Zhengyou method of the prior art. The Zhang Zhengyou method generally includes: setting a calibration template; rotating the calibration plate or the camera to collect the calibration template image; detecting image feature points; estimating 5 camera intrinsic parameters and 5 distortion parameters; maximum likelihood estimation parameter optimization, and the specific process will not be repeated here;

[0077] S403, specifically, establish a calibration plate coordinate system with the upper left corner of the calibration plate as the coordinate origin, the right as x, the bottom as y, the calibration plane as the xoy plane, and the z axis perpendicular to the calibration plane upward as the z axis.

[0078] S404, the PnP problem is solved by the P3P method based on the eight corner points of the two ArUco QR codes in the upper left corner and the lower right corner. When only one of the two ArUco QR codes is detected or both are not detected, the algorithm compares the original serial number of the ArUco QR code with the serial number of the detected ArUco QR code to determine which ArUco QR codes are the missed ArUco QR codes, and then roughly calculates the coordinates of the corner points of the undetected ArUco QR codes based on the adjacent detected ArUco QR codes.

[0079] S405, the positions of the corner points of the ArUco two-dimensional code in the calibration plate coordinate system are known, and the projection transformation matrix T is obtained by establishing an equation, thereby obtaining the conversion relationship between the calibration plate coordinate system and the pixel coordinate system.

[0080] S5, use the projection transformation matrix T and the known model of the calibration plate to calculate the pixel coordinates (x2[i], y2[i]) of the corner points of the black and white chessboard:

[0081] S501, according to the width A of the ArUco two-dimensional code, the side length H of each square in the black and white checkerboard pattern, and the interval width I between the black and white checkerboard pattern and the ArUco two-dimensional code pattern, set the coordinates (X2[i], Y2[i], Z2[i]) of each black and white checkerboard corner point in the calibration board coordinate system, and use the projection transformation matrix T to calculate the pixel coordinates (x2[i], y2[i]) of each corner point in the pixel coordinate system. The solution method is:

[0082]

[0083] The definition of the projection transformation matrix T is consistent with that described in claim 4.

[0084] S502, the pixel coordinates (x2[i], y2[i]) of each corner point in the pixel coordinate system are refined using a sub-pixel algorithm to obtain the precise coordinates (x2′[i], y2′[i]) of the corner points of the black and white chessboard, which is what is required.

[0085] S6, using the sub-pixel algorithm to optimize (x2[i], y2[i]) to obtain the precise pixel coordinates of the corner points of the black and white chessboard for camera calibration:

[0086] S601, specifically, the original calibration image is first gray-scaled, and then the cornerSubPix function in OpenCV is used to set the size of the corner point precision screening area to N×N, N=(winSize×2+1), winSize is the size of the screening box, and the maximum number of iterations and the minimum value of the corner point position change are used as the criterion for stopping the iteration. The sub-pixel precise position of the corner or radial saddle point is found through iteration, so as to obtain the final corner point position.

[0087] The present application has the characteristics of high robustness and high precision. It combines the ArUco two-dimensional code and the black and white checkerboard, solving the problem in the prior art that when only the black and white checkerboard is used for calibration, some corner points will be missed, which will lead to the mismatch of the overall corner point number; when only the ArUco two-dimensional code is used for calibration, the corner point information is scarce and the sub-pixel corner point detection cannot be achieved.

[0088] This application first uses the ArUco QR code to calculate the projection transformation matrix of the camera, combines the relative position relationship between the black and white checkerboard and the ArUco QR code in the calibration plate model, calculates the rough pixel coordinates of the corner points of the black and white checkerboard, and uses the sub-pixel algorithm to obtain the precise coordinates of the corner points of the black and white checkerboard. The set black and white checkerboard corner points will inevitably obtain the corresponding positions in the pixel coordinate system after calculation, so no missing points will be caused.

[0089] Taking the calibration plate described in Example 1 as an example, this paper proposes an ArUco two-dimensional code secondary detection method. There are two ArUco two-dimensional codes in the calibration plate, which are arranged in a diagonal scattered manner; when n>=2, a scattered arrangement is adopted.

[0090] If m, m>=1 ArUco two-dimensional codes cannot be detected, the following method is used to perform supplementary detection on the m ArUco two-dimensional codes that have not been detected.

[0091] For example, if one ArUco QR code cannot be detected, the following method is used to perform supplementary detection on the undetected ArUco QR code, including calculating the projection transformation matrix Tk using the coordinates of the detected ArUco QR code's bounding box corner points and their corresponding coordinates in the template coordinate system; inferring the position G of the next lost ArUco QR code in the image based on the projection transformation matrix Tk and the ID of the detected ArUco QR code and the relative position relationship of the undetected ArUco QR code; filling the area outside the inferred ArUco QR code position G in the image with the background color, and performing ArUco QR code detection again on the filled image.

[0092] The advantages of the present invention are: the number of black and white checkerboard corner points is densely distributed, with rich corner point features; the ArUco two-dimensional code pattern is much larger than the size of each square in the black and white checkerboard, which is easy to detect; the corner points of the black and white checkerboard are calculated, not detected, so there is no problem of missing corner points. In the process of designing the calibration board, since the ArUco two-dimensional code cannot perform sub-pixel detection and the black and white checkerboard is prone to leaking points, affecting the final calibration result, in order to solve this problem, the present invention arranges one or more black and white checkerboards in the blank area around the ArUco two-dimensional code, and uses a calculation method to detect the corner points of the black and white checkerboard.

[0093] Those skilled in the art can clearly understand that the technology in the embodiments of the present application can be implemented by means of software plus a necessary general hardware platform. Based on this understanding, the technical solution in the embodiments of the present application is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present application or some parts of the embodiments.

[0094] In this specification, the same or similar parts between the various embodiments can be referred to each other. In particular, for the service construction device and service loading device embodiments, since they are basically similar to the method embodiments, the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.

[0095] The above-described embodiments of the present application do not constitute a limitation on the protection scope of the present application.

Claims

1. A highly robust and high-precision camera calibration plate, characterized in that: The calibration plate comprises: 1 or more ArUco QR codes; Arrange one or more black and white checkerboards in the blank area around the ArUco QR code; There is a gap between the ArUco QR code pattern and the black and white checkerboard pattern.

2. A corner point detection method, the method is implemented based on the calibration plate according to claim 1, the method comprising: The expected calibration plate is formed by combining the ArUco QR code pattern and the black and white checkerboard pattern; Establish the calibration plate coordinate system and set the calibration plate coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco QR code pattern in the calibration plate coordinate system; Collect the calibration plate image, detect the ArUco QR code in the image, and obtain the pixel coordinates (x1[i], y1[i]) of the corner points of the ArUco QR code pattern; Using the calibration plate coordinates (X1[i], Y1[i], Z1[i]) and pixel coordinates (x1[i], y1[i]), solve the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system; Use the projection transformation matrix T and the known model of the calibration plate to calculate the pixel coordinates (x2[i], y2[i]) of the corner points of the black and white chessboard; The sub-pixel algorithm is used to optimize the pixel coordinates (x2[i], y2[i]) to obtain the precise pixel coordinates of the corner points of the black and white chessboard for camera calibration operations.

3. The corner point detection method according to claim 2, characterized in that Establish the calibration plate coordinate system and set the calibration plate coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco QR code pattern in the calibration plate coordinate system, including: The calibration plate coordinate system is established with the upper left corner of the calibration plate as the coordinate origin, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane upward; The coordinates of each corner point of the ArUco QR code in the calibration plate coordinate system (X1[i], Y1[i], Z1[i]) are: D1=(m,n,0) D2=(m+A,n,0) D3=(m+A,n+A,0) D4=(m,n+A,0) Among them, A is the side length of the ArUco two-dimensional code, and D1, D2, D3, and D4 are the upper left, upper right, lower left, and lower right coordinates.

4. The corner point detection method according to claim 2, characterized in that: Using the calibration plate coordinates (X1[i], Y1[i], Z1[i]) and pixel coordinates (x1[i], y1[i]), solve the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system, including: The different corner points of the ArUco QR code pattern are located by the anisotropy of the ArUco QR code pattern. The coordinates of the same corner point in the calibration plate coordinate system (X1[i], Y1[i], Z1[i]) and its coordinates in the pixel coordinate system (x1[i], y1[i]) are used to solve the PnP problem and obtain the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system. The solution method is: in, is the rotation matrix, is the translation matrix, t x , t y , t z They represent the x-axis, y-axis, and z-axis distances from the origin of the calibration plate coordinate system to the origin of the pixel coordinate system, respectively. 11 ,t 21 ,r 31 ) T 、(r 12 ,r 22 ,r 32 ) T 、(r 13 ,r 23 ,r 33 ) T They respectively represent the coordinates of the unit vectors of the x-axis, y-axis, and z-axis of the calibration plate coordinate system in the pixel coordinate system.

5. The corner point detection method according to claim 2, characterized in that: The pixel coordinates (x2[i], y2[i]) of the corner points of the black and white chessboard are calculated using the projection transformation matrix T and the known model of the calibration plate, including: According to the width of the ArUco QR code, the side length of each square in the black and white checkerboard pattern, and the interval width between the black and white checkerboard pattern and the ArUco QR code pattern, the coordinates of each black and white checkerboard corner point in the calibration plate coordinate system (X2[i], Y2[i], Z2[i]) are set, and the coordinates of each corner point in the pixel coordinate system (x2[i], y2[i]) are calculated using the projection transformation matrix T; the solution method is: Wherein, the definition of the projection transformation matrix T is consistent with that in claim 4; The sub-pixel algorithm is used to refine the calculated coordinates of each corner point in the pixel coordinate system (x2[i], y2[i]) to obtain the precise coordinates of the corner points of the black and white chessboard (x2'[i], y2'[i]), which is what we are looking for.

6. The corner point detection method according to claim 2, characterized in that: The method further includes, when the number of ArUco two-dimensional codes is n, and n>=2, adopting a dispersed arrangement for the ArUco two-dimensional codes; If one of the ArUco QR codes cannot be detected, a secondary detection process is performed.

7. The corner point detection method according to claim 6, characterized in that: Secondary detection processing, including: S71: Set the number of ArUco two-dimensional codes to be detected in the image N=n, detect the ArUco two-dimensional codes in the image, and record the number k of the detected ArUco two-dimensional codes; if the number k is not equal to N, then m=Nk, and execute step S71, otherwise execute step S74; S72: Calculate the projection transformation matrix Tk using the coordinates of the corner points of the bounding boxes of the k ArUco two-dimensional codes and their corresponding coordinates in the template coordinate system; S73: m=m-1, if m<0, execute step S74; otherwise, infer the position G of the next lost ArUco QR code in the image based on the projection transformation matrix Tk and the IDs of the k ArUco QR codes that have been detected and the relative position relationship of the N ArUco QR codes; when there are multiple ArUco QR codes near the inferred ArUco QR code position G, sort the distances from the ArUco QR codes to the position G from near to far, record the inferred ArUco QR code position sequence as F, and select the one with the shortest distance, that is, the first element in F; S74: Fill the area outside the inferred ArUco QR code position G in the image with the background color, and perform ArUco QR code detection again on the filled image; if the ID of the detected ArUco QR code is not equal to the IDs of the k ArUco QR codes that have been detected, then k=k+1; if k=N, end, otherwise execute step S71; if no detection is possible, delete the first element in F and execute step S72.

Citation Information

Patent Citations

  • Method for recognizing cylindrical surface two-dimensional code

    CN108345817A

  • Plane calibration plate, calibration data acquisition method and calibration data acquisition system

    CN110660107A

  • Target tracking method, system and robot

    CN115170646A

  • Detection method and device, electronic equipment and storage medium

    CN116559176A

  • Calibration data generation method and device, electronic equipment and storage medium

    CN116912331A

Cited By

  • Angular point extraction method and system based on checkerboard

    CN119251516A

  • High-speed scanning splicing method, system and equipment based on dynamic deformation compensation

    CN120725862A

  • High-speed scanning splicing method, system and device based on dynamic deformation compensation

    CN120725862B

  • Camera calibration method and device, electronic equipment and storage medium

    CN121353425A

  • Camera calibration methods, devices, electronic equipment, and storage media

    CN121353425B