A high-robustness high-precision camera calibration board and a corner point detection method
By combining ArUco QR codes and black and white checkerboard patterns, and utilizing projection transformation matrix T and sub-pixel algorithm optimization, the problems of insufficient robustness and accuracy in camera calibration were solved, achieving efficient and accurate corner detection.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- NANJING UNIV OF SCI & TECH
- Filing Date
- 2024-03-26
- Publication Date
- 2026-06-05
AI Technical Summary
Existing camera calibration methods suffer from poor robustness when using a black and white checkerboard pattern, are easily affected by lighting and occlusion, and have low accuracy and cannot perform sub-pixel detection when using ArUco QR codes, resulting in incomplete corner detection.
By combining ArUco QR codes and a black and white checkerboard pattern, the pixel coordinates of the corner points of the checkerboard pattern are calculated through the projection transformation matrix T. Sub-pixel algorithm optimization is adopted, and secondary detection processing is combined to ensure that all corner points are detected.
It achieves high robustness and high precision camera calibration in complex environments, avoiding the problems of corner point omission and insufficient accuracy, and improving calibration efficiency and accuracy.
Smart Images

Figure CN118674789B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer vision, and specifically relates to a robust and high-precision camera calibration board and corner detection method. Background Technology
[0002] With the development of computer vision, visual positioning, 3D reconstruction, and environmental perception have been widely used. In order to achieve better results, it is necessary to obtain the precise parameters of the camera in advance, that is, to perform precise camera calibration.
[0003] In the field of calibration, black and white checkerboard patterns or ArUco QR codes are generally used. Traditional calibration uses black and white checkerboard patterns because the large number and density of corner points allow for sub-pixel detection, resulting in accurate results. However, using checkerboard patterns can easily miss some corner point information, meaning it's impossible to detect and track all marks on the checkerboard. This could be due to differences in lighting conditions, occlusion of the checkerboard pattern, or damage to the checkerboard itself. Using ArUco QR codes for calibration is simple, fast, and highly robust. ArUco QR codes are easily detected in images, and their calibration is unaffected by environmental factors, vegetation, partial occlusion, or reflective conditions. However, ArUco QR codes cannot be used for sub-pixel detection.
[0004] Against this backdrop, 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 codes. It uses a ChArUco calibration board that combines ArUco QR codes with a checkerboard pattern for calibration. The ChArUco calibration board embeds the ArUco QR code into the white squares of the checkerboard. The method described therein first obtains the ArUco QR code ID, then obtains the corner point ID, extracts sub-pixel corner points on the original image, and finally maps the checkerboard corner point coordinates to the camera coordinate system coordinates to complete the calibration. However, this calibration board has some drawbacks. For example, if the ArUco QR code is too small, the image of the ArUco QR code area is not clear enough, making it impossible to correctly read the ID; therefore, the ArUco QR code needs to be maximized. Furthermore, this calibration board has poor robustness and relies on the detection effect of the ArUco QR code during the calibration process. Due to the design of the ArUco QR code being embedded in the white squares of the checkerboard pattern, the size of the ArUco QR code is limited and it is not easy to detect. In addition, the failure to detect the ArUco QR code leads to the inability to match 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. It uses a ChArUco calibration board with ArUco QR codes embedded within a checkerboard-like white area. Based on this, the central 5×3 grid is transformed into an area filled with random points. The central area is a Random template, suitable for extrinsic parameter calibration and zoom lens calibration. In this patent, in addition to using corner points and feature points, line features are introduced, combining point and line features for calibration. The pattern in this patent is divided into four parts: ArUco QR codes, a checkerboard grid, the central Random module, and the outermost added straight and diagonal line features. This calibration board uses a large amount of feature information. While the use of point and line features brings rich feature information, it also makes the calibration process inconvenient and slow, resulting in low overall calibration efficiency and making it difficult to implement. Summary of the Invention
[0006] The purpose of this invention is to provide a robust and high-precision camera calibration board and a corner detection method, solving the problems of poor robustness when using a checkerboard pattern for calibration, and the inability to detect corners due to factors such as lighting and defects. This application provides a robust and high-precision camera calibration board, comprising:
[0007] One or more ArUco QR codes;
[0008] Arrange one or more black and white checkerboard squares in the blank area around the ArUco QR code;
[0009] There are gaps between the ArUco QR code pattern and the black and white checkerboard pattern.
[0010] This application also provides a corner detection method, which is implemented based on the calibration board provided in this application, and the method includes:
[0011] The desired calibration board is formed by combining the ArUco QR code pattern and the black and white checkerboard pattern;
[0012] Establish a calibration board coordinate system and set the calibration board coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco QR code pattern in the calibration board coordinate system;
[0013] Acquire the calibration board image, detect the ArUco QR code in the image, and obtain the pixel coordinates (x1[i], y1[i]) of the corner point 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 for the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system;
[0015] 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 board;
[0016] A subpixel 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 checkerboard, which are then used for camera calibration.
[0017] Furthermore, a calibration board coordinate system is established, and the coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco QR code pattern in the calibration board coordinate system are set, including:
[0018] Establish a coordinate system for the calibration plate with the upper left corner of the calibration plate as the origin, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane and pointing upwards.
[0019] The coordinates (X1[i], Y1[i], Z1[i]) of each corner point of the ArUco QR code in the coordinate system of the calibration board 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] Where A is the side length of the ArUco QR code, and D1, D2, D3, and D4 are the coordinates of the top left, top right, bottom left, and bottom right, respectively.
[0025] Furthermore, using the calibration plate coordinates (X1[i], Y1[i], Z1[i]) and pixel coordinates (x1[i], y1[i]), the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system is solved, including:
[0026] By anisotropically locating different corner points of the ArUco QR code pattern, and using the coordinates (X1[i], Y1[i], Z1[i]) of the same corner point in the calibration board coordinate system and its coordinates (x1[i], y1[i]) in the pixel coordinate system, the PnP problem is solved to obtain the projection transformation matrix T from the calibration board coordinate system to the pixel coordinate system; the solution method is as follows:
[0027]
[0028] in, For rotation matrix, Let t be the translation matrix. x , t y , t zThese represent the x-axis, y-axis, and z-axis distances from the origin of the calibration board 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 These represent the coordinates of the unit vectors of the x-axis, y-axis, and z-axis of the calibration board coordinate system in the pixel coordinate system, respectively.
[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 board, including:
[0030] Based on the width of the ArUco QR code, the side length of each square in the black and white checkerboard pattern, and the spacing between the black and white checkerboard pattern and the ArUco QR code pattern, the coordinates (X2[i], Y2[i], Z2[i]) of each black and white checkerboard corner point in the calibration board coordinate system are set. The coordinates (x2[i], y2[i]) of each corner point in the pixel coordinate system are calculated using the projection transformation matrix T. The solution method is as follows:
[0031]
[0032] The definition of the projection transformation matrix T is consistent with that in claim 4;
[0033] The calculated 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 checkerboard, which is the desired result.
[0034] Furthermore, the method also includes, when there are n ArUco QR codes, n>=2, the ArUco QR codes are distributed in a dispersed manner; if one of the ArUco QR codes cannot be detected, a second detection process is performed.
[0035] Furthermore, secondary detection and processing includes:
[0036] S71: Set the number of ArUco QR codes to be detected in the image to N = n, detect the ArUco QR codes in the image, and record the number of detected ArUco QR codes k; 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 bounding box corners of k ArUco QR codes and their corresponding coordinates in the template coordinate system;
[0038] S73: m = m-1. If m < 0, proceed to step S74. Otherwise, based on the projection transformation matrix Tk, the IDs of the k detected ArUco QR codes, and the relative positions of the N ArUco QR codes, infer the position G of the next lost ArUco QR code in the image. When there are multiple ArUco QR codes near the inferred ArUco QR code position G, sort the ArUco QR codes from the nearest to the farthest from position G, and denote the inferred ArUco QR code position sequence as F. Select the closest one, i.e., the first element in F.
[0039] S74: Fill the area outside the predicted ArUco QR code position G in the image with the background color, and perform ArUco QR code detection again on the image after filling; if the ID of the detected ArUco QR code is not equal to the ID of the k detected ArUco QR codes, then k = k + 1; if k = N, then end, otherwise proceed to step S71; if no code is detected, delete the first element in F and proceed to step S72.
[0040] This invention provides a highly robust and high-precision camera calibration board. This calibration board incorporates ArUco QR codes into a black and white checkerboard pattern. Compared to directly detecting corner points on the checkerboard, ArUco QR codes are easily detected in images and are unaffected by environmental factors, vegetation, partial occlusion, or reflective conditions. It allows for simple and rapid calibration detection even when the calibration board is fixed and the camera is zooming, thus giving the calibration board high robustness. Furthermore, the black and white checkerboard pattern overcomes the limitation of ArUco QR codes in achieving sub-pixel level corner point selection. The numerous and dense corner points of the checkerboard enable sub-pixel detection, yielding accurate results. This allows the calibration board to calculate the pixel coordinates of the checkerboard corner points with high precision, thereby completing the calibration process.
[0041] The calibration plate 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, or reflective conditions. They can be easily and quickly calibrated and detected when the calibration board is fixed and the camera is zoomed, giving the calibration board high robustness.
[0043] 2. The black and white checkerboard pattern overcomes the limitation of ArUco QR codes in not being able to perform sub-pixel level corner point screening. The black and white checkerboard pattern has a large number of dense corner points, which can be used for sub-pixel detection to obtain accurate detection results. This gives the calibration board high accuracy in calculating the pixel coordinates of the black and white checkerboard corner points, thus completing the calibration.
[0044] The corner detection method provided by this invention has the following advantages:
[0045] 1. In this patent, the corner positions of the black and white checkerboard pattern are calculated rather than detected, so there will be no problem of missing corner points;
[0046] 2. This solves the problem in the existing technology where the calibration board is easily affected by environmental interference, placement posture, backlighting, local shadows, etc. when only a black and white checkerboard pattern is used, which leads to calibration board detection failure and corner point loss;
[0047] 3. This solves the problem of low corner coordinate accuracy and a small number of corner points when the calibration board only uses the ArUco QR code pattern in the existing technology. Attached Figure Description
[0048] Figure 1 This is a schematic diagram of the structure of the first type of camera calibration board provided in the embodiments of this application.
[0049] Figure 2 This is a schematic diagram of the structure of a second type of camera calibration board provided in an embodiment of this application.
[0050] Figure 3 This is a flowchart illustrating a highly robust and precise camera calibration board and its corner detection method, provided as an embodiment of this application. Detailed Implementation
[0051] To make the objectives, technical solutions, and advantages of this application clearer, the present invention will be further described in detail below through specific embodiments and in conjunction with the accompanying drawings.
[0052] Example 1, as Figure 1 The diagram shown is a structural schematic of a calibration board provided in an embodiment of this application. In this embodiment, the size of the calibration board pattern is set to 9cm × 13cm. The upper left and lower right corners of the calibration board are ArUco QR codes, and the lower left and upper right corners are black and white checkerboard patterns. The black and white checkerboard pattern has 10 × 8 squares, with each square having a side length of 4mm. The ArUco QR code has a side length of 40mm, and the horizontal and vertical spacing between the two patterns is 3mm. The number of squares in 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] Establish a calibration plate coordinate system with the top left corner of the calibration plate as the origin, x to the right as x, y down as y, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane and pointing upwards as z. The coordinates of the four corner points of the top left 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 bottom right ArUco QR code are (43,35,0), (83,35,0), (83,75,0), (43,75,0).
[0054] Example 2, as Figure 2 The diagram shows another calibration board provided in this embodiment. In this embodiment, the calibration board pattern size is set to 9cm × 13cm. An ArUco QR code is placed in the center of the calibration board. Around the ArUco QR code are eight 4x4 black and white checkerboard squares of the same size as the ArUco QR code. Each square has a side length of 20mm, and the ArUco QR code has a side length of 80mm. The horizontal and vertical spacing between the two patterns is 10mm. The number of squares in 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] Establish a calibration plate coordinate system with the top left corner of the calibration plate as the origin, x to the right as x, y down as y, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane and pointing upwards as the z-axis. The coordinates of the four corner points of the ArUco QR code in the center are (90, 90, 0), (170, 90, 0), (170, 170, 0), (90, 170, 0).
[0056] Taking the calibration board proposed in Example 1 as an example, the corner detection method for the high-robustness and high-precision camera calibration board proposed in this invention includes:
[0057] S1, the desired calibration board 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 a black and white checkerboard pattern, and print them on the same template plane, with a gap between the ArUco QR code pattern and the black and white checkerboard pattern. Specifically, this includes:
[0059] S101, construct two black and white checkerboard templates with 10×8 squares each, and place them in the lower left and upper right corners of the calibration board;
[0060] S102. Place ArUco QR codes in the upper left and lower right corners of the calibration board, and maintain a certain width of gap between them and the black and white checkerboard template to complete the construction of the camera calibration board.
[0061] S2, Establish the calibration board coordinate system and set the coordinates (X1[i], Y1[i], Z1[i]) of the corner points of the ArUco code pattern in the calibration board coordinate system:
[0062] S201. Establish a coordinate system for the calibration plate with the upper left corner of the calibration plate as the origin, x to the right, y downwards, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane and pointing upwards.
[0063] S202, taking the ArUco QR code located at the top left corner as an example, the coordinates (X1[i], Y1[i], Z1[i]) of each corner point of the ArUco QR code in the coordinate system of the calibration board are:
[0064] D1 = (0, 0, 0)
[0065] D2 = (A, 0, 0)
[0066] D3 = (0, A, 0)
[0067] D4 = (A, A, 0)
[0068] Where A is the side length of the ArUco QR code, and D1, D2, D3, and D4 are the coordinates of the top left, top right, bottom left, and bottom right, respectively.
[0069] S3, acquire the calibration board 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 uses the detectMarkers function in OpenCV to extract the ID information of each ArUco QR code and the pixel coordinates of the bounding box corners from the image information of the camera calibration board.
[0071] S4, using (X1[i],Y1[i],Z1[i]) and (x1[i],y1[i]), solve for the projection transformation matrix T from the calibration board coordinate system to the pixel coordinate system:
[0072] S401, based on the anisotropic positioning of the ArUco QR code pattern, different corner points of the ArUco QR code pattern are located. The coordinates (X1[i], Y1[i], Z1[i]) of the calibration board coordinate system and the coordinates (x1[i], y1[i]) of the pixel coordinate system at the same corner point are selected. The PnP problem is solved to obtain the projection transformation matrix T from the calibration board coordinate system to the pixel coordinate system. The solution method is as follows:
[0073]
[0074] in, For rotation matrix, Let t be the translation matrix. x , t y, t z These represent the x-axis, y-axis, and z-axis distances from the origin of the calibration board 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 These represent the coordinates of the unit vectors of the calibration board coordinate system along the x, y, and z axes in the pixel coordinate system.
[0075] S402, extract the ArUco QR code, and based on its corner information and the corresponding coordinates of each corner in the calibration board coordinate system, combine the camera's intrinsic parameters and distortion parameters and substitute them into the solvePnP function to determine the projection transformation matrix T from the calibration board coordinate system to the pixel coordinate system, thus obtaining the transformation relationship between the calibration board coordinate system and the pixel coordinate system.
[0076] The solution steps for the camera's intrinsic parameters and distortion parameters can be calculated using the Zhang Zhengyou method in the existing technology. The Zhang Zhengyou method generally includes: setting a calibration template; rotating the calibration plate or camera and acquiring the calibration template image; detecting image feature points; estimating 5 camera intrinsic parameters and 5 distortion parameters; and optimizing the parameters by maximum likelihood estimation. The specific process will not be elaborated here.
[0077] S403, specifically, the calibration plate coordinate system is established with the upper left corner of the calibration plate as the origin, x to the right, y downwards, the calibration plane as the xoy plane, and the z-axis perpendicular to the calibration plane and pointing upwards.
[0078] S404 uses the P3P method to solve the PnP problem based on the eight corner points of the two ArUco QR codes in the upper left and lower right corners. When only one of the two ArUco QR codes is detected or neither is detected, the algorithm compares the original sequence number of the ArUco QR code with the sequence number of the detected ArUco QR code to determine which sequence numbers of the ArUco QR code were missed. Then, it performs a coarse calculation of the corner point coordinates of the undetected ArUco QR code based on the neighboring detected ArUco QR codes.
[0079] The positions of the corner points of the S405,ArUco QR code in the calibration board coordinate system are known. By establishing equations, the projection transformation matrix T is obtained, thus obtaining the transformation relationship between the calibration board coordinate system and the pixel coordinate system.
[0080] S5, using the projection transformation matrix T and the known model of the calibration board, calculate the pixel coordinates (x2[i], y2[i]) of the corner points of the black and white checkerboard:
[0081] S501, based on the width A of the ArUco QR code, the side length H of each square in the black and white checkerboard pattern, and the spacing I between the black and white checkerboard pattern and the ArUco QR code pattern, set the coordinates (X2[i], Y2[i], Z2[i]) of each corner point in the calibration board coordinate system, and calculate the pixel coordinates (x2[i], y2[i]) of each corner point in the pixel coordinate system using the projection transformation matrix T. The solution method is as follows:
[0082]
[0083] The definition of the projection transformation matrix T is consistent with that in claim 4.
[0084] S502, the pixel coordinates (x2[i], y2[i]) of each corner point in the pixel coordinate system are refined by the sub-pixel algorithm to obtain the precise coordinates (x2′[i], y2′[i]) of the corner points of the black and white chessboard, which is the desired result.
[0085] S6 uses a sub-pixel algorithm to optimize (x2[i], y2[i]) to obtain the precise pixel coordinates of the corner points of the black and white checkerboard, which are used for camera calibration operations:
[0086] S601, specifically, firstly, the original calibration image is converted to grayscale, and then the cornerSubPix function in OpenCV is used to set the size of the corner fine screening area to N×N, N=(winSize×2+1), where winSize is the size of the screening box. The maximum number of iterations and the minimum value of the corner position change are used as the criteria for stopping the iteration. The sub-pixel precise position of the corner or radial saddle point is found through iteration, thereby obtaining the final corner position.
[0087] This application features high robustness and high precision. It combines ArUco QR codes with a black and white checkerboard pattern, which solves the problem in the prior art that when only using a black and white checkerboard pattern for calibration, some corner points are missed, which leads to the overall corner point sequence not matching; and when only using ArUco QR codes for calibration, corner point information is scarce, making it impossible to achieve sub-pixel corner point detection.
[0088] This application first uses the ArUco QR code to calculate the projection transformation matrix of the camera. Combining the relative positional relationship between the black and white checkerboard grid and the ArUco QR code in the calibration board model, it calculates the rough pixel coordinates of the corner points of the black and white checkerboard grid. Then, it uses a sub-pixel algorithm to obtain the precise coordinates of the corner points of the black and white checkerboard grid. The calculated corner points of the black and white checkerboard grid will inevitably obtain the positions in the corresponding pixel coordinate system, so no points will be missed.
[0089] Taking the calibration board described in Example 1 as an example, this paper proposes a secondary detection method for ArUco QR codes. There are two ArUco QR codes in the calibration board, which are arranged diagonally. When n>=2, they are arranged in a dispersed manner.
[0090] If m, where m>=1, are not detected, then the following method shall be used to supplement the detection of the m undetected ArUco QR codes.
[0091] For example, if one ArUco QR code is not detected, the following method is used to supplement the detection of the undetected ArUco QR code: The projection transformation matrix Tk is calculated using the coordinates of the bounding box corners of the detected ArUco QR code and their corresponding coordinates in the template coordinate system; the position G of the next missing ArUco QR code in the image is inferred based on the projection transformation matrix Tk, the ID of the detected ArUco QR code, and the relative position of the undetected ArUco QR code; the area outside the inferred ArUco QR code position G in the image is filled with the background color, and ArUco QR code detection is performed again on the filled image.
[0092] The advantages of this invention are: the black and white checkerboard pattern has a dense distribution of corner points, providing rich corner point features; the ArUco QR code pattern is much larger than the size of each square in the black and white checkerboard, facilitating detection; the corner points of the black and white checkerboard are calculated, not detected, thus avoiding the problem of missed corner points. During the design of the calibration board, because the ArUco QR code cannot be detected at the sub-pixel level and the black and white checkerboard pattern is prone to missing points affecting the final calibration results, this invention addresses this issue by arranging one or more black and white checkerboard patterns in the blank area surrounding the ArUco QR code and using a calculation method to detect the corner points of the black and white checkerboard.
[0093] Those skilled in the art will clearly understand that the techniques in the embodiments of this application can be implemented using software plus necessary general-purpose hardware platforms. Based on this understanding, the technical solutions in the embodiments of this application, or the parts that contribute to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments of this application or some parts of the embodiments.
[0094] The same or similar parts between the various embodiments in this specification can be referred to mutually. In particular, the service building apparatus and service loading apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple, and the relevant parts can be referred to the description in the method embodiments.
[0095] The embodiments described above do not constitute a limitation on the scope of protection of this application.
Claims
1. A highly robust and high-precision camera calibration board, characterized in that, The calibration plate includes: ArUco QR code and black and white checkerboard pattern; The ArUco QR code and the black and white checkerboard are independent of each other; the ArUco QR code is not embedded in any individual square of the black and white checkerboard. The size of the ArUco QR code is larger than the size of a single square on a black and white checkerboard. ArUco QR codes are used to locate corner coordinates; There are gaps between the ArUco QR code pattern and the black and white checkerboard pattern.
2. A corner detection method, said method being implemented based on the calibration board of claim 1, said method comprising: The desired calibration board is formed by combining the ArUco QR code pattern and the black and white checkerboard pattern; Establish a calibration plate coordinate system and set the calibration plate coordinates of the corner points of the ArUco QR code pattern in the calibration plate coordinate system. ; Acquire images of the calibration board, detect the ArUco QR codes in the images, and obtain the pixel coordinates of the corner points of the ArUco QR code pattern. ; Using calibration plate coordinates and pixel coordinates Solve for the projection transformation matrix T from the calibration plate coordinate system to the pixel coordinate system; Calculate the pixel coordinates of the corner points of the black and white checkerboard using the projection transformation matrix T and the known model of the calibration board. ; Using sub-pixel algorithm to determine pixel coordinates Optimization is performed to obtain the precise pixel coordinates of the corner points of the black and white checkerboard grid, which are then used for camera calibration.
3. The corner detection method according to claim 2, characterized in that... Establish a calibration plate coordinate system and set the calibration plate coordinates of the corner points of the ArUco QR code pattern in the calibration plate coordinate system. ,include: With the upper left corner of the calibration plate as the origin, the calibration plane is... The surface, perpendicular to the calibration plane and upwards, is Establish the calibration plate coordinate system along the axes; ArUco QR code corner point calibration board coordinates for: ; ; ; ; Where A is the side length of the ArUco QR code, and D1, D2, D3, and D4 are the coordinates of the top left, top right, bottom left, and bottom right, respectively.
4. The corner detection method according to claim 2, characterized in that, Using calibration plate coordinates and pixel coordinates Solve for the projection transformation matrix T from the calibration board coordinate system to the pixel coordinate system, including: ArUco QR code pattern anisotropically locates different corner points of the ArUco QR code pattern, and uses the coordinates of the same corner point in the calibration plate coordinate system. Its coordinates in the pixel coordinate system Solve the PnP problem to obtain the projection transformation matrix T from the calibration board coordinate system to the pixel coordinate system; the solution method is as follows: ; in, Rot Let Trans be the rotation matrix. It is a translation matrix. These represent the distances from the origin of the calibration board coordinate system to the origin of the pixel coordinate system, respectively. axis, axis, Axial distance, T , T , T These represent the coordinate systems of the calibration plate. axis, axis, The coordinates of the unit vector of the axis in the pixel coordinate system.
5. The corner detection method according to claim 2, characterized in that, Calculate the pixel coordinates of the corner points of the black and white checkerboard using the projection transformation matrix T and the known model of the calibration board. ,include: Based on the width of the ArUco QR code, the side length of each square in the black and white checkerboard pattern, and the spacing between the black and white checkerboard pattern and the ArUco QR code pattern, set the coordinates of each corner point of the black and white checkerboard pattern in the calibration board coordinate system. The coordinates of each corner point in the pixel coordinate system are calculated using the projection transformation matrix T. The solution method is as follows: ; T is the projection transformation matrix from the calibration board coordinate system to the pixel coordinate system; The calculated coordinates of each corner point in the pixel coordinate system The precise coordinates of the corner points of the black and white checkerboard are obtained by refining the sub-pixel algorithm. That is what we seek.
6. The corner detection method according to claim 2, characterized in that, The method further includes, when there are n ArUco QR codes, and n>=2, arranging the ArUco QR codes in a distributed manner; If one of the ArUco QR codes cannot be detected, a second detection process will be performed.
7. The corner detection method according to claim 6, characterized in that, Secondary detection and processing includes: S71: Set the number of ArUco QR codes to be detected in the image to N=n, detect the ArUco QR codes in the image, and record the number of detected ArUco QR codes k; if the number of codes 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 bounding box corners of k ArUco QR codes and their corresponding coordinates in the template coordinate system; S73: m = m - 1. If m < 0, proceed to step S74. Otherwise, based on the projection transformation matrix Tk, the IDs of the k detected ArUco QR codes, and the relative positions of the N ArUco QR codes, infer the position G of the next lost ArUco QR code in the image. When there are multiple ArUco QR codes near the inferred ArUco QR code position G, sort the ArUco QR codes from the nearest to the farthest from position G, and denote the inferred ArUco QR code position sequence as F. Select the closest one, i.e., the first element in F. S74: Fill the area outside the predicted ArUco QR code position G in the image with the background color, and perform ArUco QR code detection again on the image after filling; if the ID of the detected ArUco QR code is not equal to the ID of the k detected ArUco QR codes, then k=k+1; if k=N, then end, otherwise proceed to step S71; if no code is detected, delete the first element in F and proceed to step S72.