Calibration plate and calibration method for camera parameter calibration
By designing a camera calibration board with different identification codes for odd and even rows, combining Shi-Tomasi algorithm and Zhang Zhengyou calibration method, the problems of low accuracy of camera parameters and complex encoding in the existing technology are solved, and high-precision, simple encoding and camera parameter calibration that allows partial occlusion are achieved.
Patent Information
- Application Number
- CN202510442475.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-05-09
- Estimated Expiration
- 2045-04-10
AI Technical Summary
In the existing camera calibration methods, the checkerboard calibration plate and the ChArUco calibration plate have shortcomings in terms of accuracy and coding complexity, and the calibration plate is not allowed to be partially blocked, resulting in a lower accuracy of camera parameter calibration.
A calibration plate for camera parameter calibration is designed, including a first identification code and a second identification code set in a white grid of odd and even rows on the substrate, and the number of identification codes in a white grid of odd and even rows in an order of increasing along the row and column. The Shi-Tomasi algorithm is used to identify corner points, and the decoding area of corner points is extracted for decoding, the unique number of corner points is obtained, and the camera parameter calibration is completed using Zhang Zhengyou calibration method.
It improves the accuracy and stability of camera parameter calibration, allows the calibration plate to be partially blocked, simplifies the encoding and decoding process of the identification code, and lowers the threshold for use.
Smart Images

Figure CN119963659A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of camera parameter calibration, and in particular to a calibration board and a calibration method for camera parameter calibration. Background Art
[0002] Machine vision has a wide range of applications in measurement, detection and other fields. As the main image acquisition execution component, the calibration of the internal and external parameters of the camera has always been the most important basic work in the application field of machine vision. The accuracy of camera parameter calibration will directly affect the accuracy of subsequent measurement, detection and other work. Therefore, how to improve the calibration accuracy of the internal and external parameters of the camera has always been the focus of research in the industry.
[0003] Usually, different camera calibration methods require different types of calibration plates. Currently, the plane calibration plates commonly used for camera calibration mainly include checkerboard calibration plates (such as Figure 1 As shown), ChArUco calibration board (as shown Figure 2 As shown in the figure, various calibration boards such as the checkerboard calibration board and the ArUco calibration board are often used. For the commonly used checkerboard calibration board, it is impossible to provide a unique number for each corner point detected for camera calibration, which easily leads to the problem of mismatch between the corner points extracted from the pictures taken by the camera and their physical size coordinates in the world coordinate system, resulting in low accuracy of the parameters calibrated by the camera. In addition, the checkerboard calibration board does not allow any occlusion. If partial occlusion occurs, the pixel coordinates of the corner points cannot be accurately obtained, so that the corner points cannot be accurately matched with their corresponding physical sizes, which brings inconvenience to the calibration of the camera. As for the ChArUco calibration board, it overcomes the shortcomings of the checkerboard calibration board to a certain extent. However, when using the ChArUco calibration board for camera calibration, it is necessary to accurately identify the ArUco code in each square on the calibration board. When the similarity between two ArUco codes is high or the resolution of the captured ArUco code is low due to the large rotation angle of the ChArUco calibration plate, it is easy to cause the decoding error of the ArUco code, which in turn causes the corner points extracted from the pictures taken by the camera to mismatch their physical size coordinates in the world coordinate system, resulting in low accuracy of the parameters calibrated by the camera. In addition, the encoding and decoding process of the ChArUco calibration plate is complicated. Summary of the invention
[0004] The technical problem to be solved by the present invention is to overcome the deficiencies in the prior art and provide a calibration plate and a calibration method for camera parameter calibration which have high accuracy, simple encoding and decoding principles, and allow the calibration plate to be partially blocked.
[0005] The technical solution adopted by the present invention to solve its technical problems is: a calibration plate for camera parameter calibration, comprising a substrate, wherein the surface of the substrate is arrayed with black and white squares; first identification codes are set in the white squares in odd rows on the substrate, and second identification codes are set in the white squares in even rows on the substrate; the number of first identification codes in the white squares in odd rows on the substrate is exactly the same along the row direction, and the number of second identification codes in the white squares in even rows on the substrate increases successively along the row direction; the number of first identification codes in the white squares in odd columns on the substrate increases successively along the column direction, and the number of second identification codes in the white squares in even columns on the substrate is exactly the same along the column direction.
[0006] Furthermore, the black area of the first identification code is equal to times the black area of the second identification code, where , Take the integer.
[0007] Furthermore, the first identification code is circular, and the second identification code is annular.
[0008] Furthermore, the outer diameter of the first identification code Equal to the outer diameter of the second identification code .
[0009] Furthermore, the sizes of the white squares and the black squares can be freely set.
[0010] Furthermore, the number of second identification codes in the white squares in the even-numbered rows on the substrate increases by 1 in the row direction, and the number of first identification codes in the white squares in the odd-numbered columns on the substrate increases by 1 in the column direction.
[0011] A calibration method for camera parameter calibration, using the above-mentioned calibration plate for camera parameter calibration, comprises the following steps:
[0012] S1. Use a camera to take a picture of the calibration plate, and then use the Shi-Tomasi algorithm to identify all corner points in the picture;
[0013] S2. Taking each corner point as the center, extract the two white squares connected to it as the decoding area of the current corner point number, and obtain the number uniquely corresponding to the current corner point by decoding the identification code in the decoding area;
[0014] S3. According to the number corresponding to each corner point, each corner point is accurately assigned its corresponding physical size coordinates in the world coordinate system, and then the Zhang Zhengyou calibration method is used to complete the camera parameter calibration.
[0015] Furthermore, the step of decoding the identification code in the decoding area in step S2 is as follows:
[0016] S21. Identification and number calculation of identification codes: extract an identification code from each of the two white squares in the decoding area, and calculate the pixel area of the black area of the two identification codes. Identify the first identification code and the second identification code according to the pixel area size of the black area, and then count the number of all closed black areas in the white square where the first identification code is located, and record it as , count the number of all closed black areas in the white square where the second identification code is located, and record it as ;
[0017] S22. Decoding of corner point number: extracting the pixel coordinates of the center point of any first identification code and any second identification code in the decoding area in the picture, respectively, and decoding the current corner point number by decoding rules, wherein the corner point number includes the corner point row number and corner point serial number .
[0018] Furthermore, the decoding rules in step S22 are as follows:
[0019] Corner row number The decoding rules are as follows:
[0020] when , then the row number of the current corner point number ;
[0021] when , then the row number of the current corner point number ;
[0022] Corner point column number The decoding rules are as follows:
[0023] when and , then the column number of the current corner point number ;
[0024] when and , then the column number of the current corner point number ;
[0025] when and , then the column number of the current corner point number ;
[0026] when and , then the column number of the current corner point number ;
[0027] in, Represents the pixel coordinates of the center point of any first identification code; Indicates the pixel coordinates of the center point of any second identification code.
[0028] Furthermore, the specific process of step S1 is as follows:
[0029] Set window and preset threshold ;
[0030] Assume that the pixel coordinates of a point in the window are The movement amount is , grayscale , then the grayscale change function for:
[0031]
[0032] Among them, the window function ;
[0033] Grayscale change function Taylor expansion and ignoring higher-order terms gives:
[0034]
[0035] in, , , ;
[0036] In the formula, , Respectively represent the image grayscale , Gradient value in direction;
[0037] Define the corner response function for:
[0038]
[0039] In the formula, and For the matrix The two eigenvalues of
[0040] The window traverses all pixels in the image. When a certain pixel Value greater than threshold If the pixel is a local maximum in its neighborhood, then the pixel is a Shi-Tomasi feature corner point, and the pixel coordinates are output. .
[0041] The beneficial effects of the present invention are:
[0042] (1) The present invention extracts the decoding area of the corner point number and then decodes the identification code in the decoding area to obtain a number uniquely corresponding to the corner point. The number can then accurately match the physical size coordinates of the corner point in the world coordinate system, thereby completely avoiding the problem of mismatching and improving the accuracy and stability of camera parameter calibration. At the same time, the calibration plate can be partially blocked, thereby improving the convenience of the parameter calibration process.
[0043] (2) In the present invention, first identification codes are set in the white squares of odd-numbered rows on the substrate, and the number of first identification codes in the white squares of odd-numbered rows is exactly the same along the row direction, and the number of first identification codes in the white squares of odd-numbered columns increases successively along the column direction; at the same time, second identification codes are set in the white squares of even-numbered rows on the substrate, and the number of second identification codes in the white squares of even-numbered rows increases successively along the row direction, and the number of second identification codes in the white squares of even-numbered columns is exactly the same along the column direction; such a design makes the layout of the entire calibration plate beautiful and can improve the utilization rate, and at the same time makes the identification code used for corner point numbering have a large degree of distinction and is easy to identify; moreover, the identification code used for corner point numbering has a simple structure, is easy to encode and decode, and reduces the threshold for use.
[0044] (3) The first identification code of the present invention is circular and the second identification code is annular. The distinction between the two is further increased, making them easier to identify, reducing the resolution requirement of the calibration plate image taken, and ensuring that the decoding is always correct. In addition, the setting of the circular identification code and the annular identification code makes it possible for the identification code itself to have no corner features, thereby avoiding the possibility of introducing additional corner points, thereby ensuring the accuracy of the matching between the detected corner points and their corresponding physical size coordinates in the world coordinate system, thereby greatly improving the accuracy of camera parameter calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0046] Figure 1 is a schematic diagram of a checkerboard calibration board;
[0047] Figure 2 This is a schematic diagram of the ChArUco calibration board;
[0048] Figure 3 is a schematic diagram of a calibration plate in the present invention;
[0049] Figure 4 is a schematic diagram of the identification code in the present invention;
[0050] Figure 5 is a flow chart of the calibration method in the present invention;
[0051] Figure 6 is a schematic diagram of a corner point in the present invention;
[0052] Figure 7 It is a schematic diagram of the current corner point decoding area in the present invention. DETAILED DESCRIPTION
[0053] The present invention will now be further described in conjunction with the accompanying drawings and preferred embodiments. These drawings are simplified schematic diagrams, which only illustrate the basic structure of the present invention in a schematic manner, and therefore only show the components related to the present invention.
[0054] Embodiment 1:
[0055] like Figure 3 and Figure 4 As shown, a calibration board for camera parameter calibration includes a substrate, and an array of black and white squares on the surface of the substrate; first identification codes are set in the white squares in the odd-numbered rows of the substrate, and second identification codes are set in the white squares in the even-numbered rows of the substrate; the number of first identification codes in the white squares in the odd-numbered rows of the substrate is exactly the same along the row direction, and the number of second identification codes in the white squares in the even-numbered rows of the substrate increases successively along the row direction; the number of first identification codes in the white squares in the odd-numbered columns of the substrate increases successively along the column direction, and the number of second identification codes in the white squares in the even-numbered columns of the substrate is exactly the same along the column direction.
[0056] Specifically, the sizes of the white squares and the black squares are freely set, wherein the sizes of the white squares and the black squares are usually exactly the same, but not limited to this, and can also be completely different; the first identification code is circular, and the second identification code is annular, and the distinction between the two is further expanded, which is easier to identify, and reduces the resolution requirement of the calibration plate image taken, which can ensure that the subsequent decoding is always correct. At the same time, the setting of the circular identification code and the annular identification code makes the identification code itself have no corner features, avoiding the possibility of introducing additional corner points, thereby ensuring the accuracy of the detected corner points and their corresponding physical size coordinates in the world coordinate system, thereby greatly improving the accuracy of camera parameter calibration; the outer diameter of the first identification code Equal to the outer diameter of the second identification code , the outer diameter of the first identification code , the outer diameter of the second identification code and inner diameter The number of second identification codes in the white squares in the even-numbered rows on the substrate increases by 1 along the row direction, and the number of first identification codes in the white squares in the odd-numbered columns on the substrate increases by 1 along the column direction.
[0057] A first identification code is set in the white squares in the odd rows on the substrate, the number of the first identification codes in the white squares in the odd rows is exactly the same along the row direction, and the number of the first identification codes in the white squares in the odd columns increases successively along the column direction; at the same time, a second identification code is set in the white squares in the even rows on the substrate, the number of the second identification codes in the white squares in the even rows increases successively along the row direction, and the number of the second identification codes in the white squares in the even columns is exactly the same along the column direction; such a design makes the layout of the entire calibration board beautiful and can improve the utilization rate, and at the same time makes the identification code used for corner point numbering have a large degree of distinction and is easy to identify; moreover, the identification code used for corner point numbering has a simple structure, is easy to encode and decode, and lowers the threshold for use.
[0058] The black area of the first identification code is equal to times the black area of the second identification code, where , Such a design facilitates the identification of the first identification code and the second identification code.
[0059] Embodiment 2:
[0060] like Figure 5 As shown, a calibration method for camera parameter calibration, using the calibration plate for camera parameter calibration in Example 1, includes the following steps:
[0061] S1. Use a camera to take a picture of the calibration plate, and then use the Shi-Tomasi algorithm (corner detection algorithm) to identify all corner points in the picture. The specific process is as follows:
[0062] Set window and preset threshold ;
[0063] Assume that the pixel coordinates of a point in the window are The movement amount is , grayscale , then the grayscale change function for:
[0064]
[0065] Among them, the window function ;
[0066] Grayscale change function Taylor expansion and ignoring higher-order terms gives:
[0067]
[0068] in, , , ;
[0069] In the formula, , Respectively represent the image grayscale , Gradient value in direction;
[0070] Define the corner response function for:
[0071]
[0072] In the formula, and For the matrix The two eigenvalues of
[0073] The window traverses all pixels in the image. When a certain pixel Value greater than threshold If the pixel is a local maximum in the neighborhood of the point, then the pixel is a Shi-Tomasi feature corner point, and the coordinates of the pixel are output. .
[0074] Using the Shi-Tomasi algorithm to identify corner points in an image can quickly identify all corner points in the image and improve the accuracy of corner point recognition, thereby ensuring that the identified corner points are the best.
[0075] like Figure 6 As shown in the figure, " are all the corner points detected, The pixel coordinate system of the calibration plate image taken by the camera.
[0076] S2. Taking each corner point as the center, extract the two white squares connected to it as the decoding area of the current corner point number, and obtain the number uniquely corresponding to the current corner point by decoding the identification code in the decoding area.
[0077] S3. According to the number corresponding to each corner point, each corner point is accurately assigned its corresponding physical size coordinate in the world coordinate system, and then the camera parameter calibration is completed using the Zhang Zhengyou calibration method. Specifically, the camera parameter calibration using the Zhang Zhengyou calibration method belongs to the prior art and will not be described in detail here.
[0078] By extracting the decoding area of the corner point number and then decoding the identification code in the decoding area, the number uniquely corresponding to the corner point is obtained, and then the physical size coordinates corresponding to the corner point in the world coordinate system can always be accurately matched through the number, thereby completely avoiding the problem of mismatching and improving the accuracy and stability of camera parameter calibration; at the same time, it can also allow the calibration plate to be partially blocked, thereby improving the convenience of the parameter calibration process.
[0079] The steps of decoding the identification code in the decoding area in step S2 are as follows:
[0080] S21. Identification and number calculation of identification codes: extract an identification code from each of the two white squares in the decoding area, and calculate the pixel area of the black area of the two identification codes. Identify the first identification code and the second identification code according to the pixel area size of the black area, and then count the number of all closed black areas in the white square where the first identification code is located, and record it as , count the number of all closed black areas in the white square where the second identification code is located, and record it as .in, That is, the number of the first identification code; That is the number of the second identification code.
[0081] It should be noted that the pixel area of the black area of the first identification code must be much larger than the pixel area of the black area of the second identification code. Therefore, the first identification code has a larger black area and the second identification code has a smaller black area.
[0082] S22. Decoding of corner point number: extracting the pixel coordinates of the center point of any first identification code and any second identification code in the decoding area in the picture, respectively, and decoding the current corner point number by decoding rules, wherein the corner point number includes the corner point row number and corner point serial number .
[0083] The decoding rules in step S22 are as follows:
[0084] Corner row number The decoding rules are as follows:
[0085] when , then the row number of the current corner point number ;
[0086] when , then the row number of the current corner point number ;
[0087] Corner point column number The decoding rules are as follows:
[0088] when and , then the column number of the current corner point number ;
[0089] when and , then the column number of the current corner point number ;
[0090] when and , then the column number of the current corner point number ;
[0091] when and , then the column number of the current corner point number ;
[0092] in, Represents the pixel coordinates of the center point of any first identification code; Indicates the pixel coordinates of the center point of any second identification code.
[0093] Through the decoding rules, it is always guaranteed that the corner points have unique corresponding numbers, and even if the calibration plate is partially blocked, as long as the decoding area corresponding to the corner point remains intact, the corner point can still be decoded, thereby ensuring that the corner point and its corresponding physical size coordinates are accurately matched.
[0094] The following decode Figure 6 The numbering of the corner points in the circle explains the decoding rules in detail:
[0095] Extract the two white squares connected to the current corner point as the decoding area, as shown in Figure 7 As shown. Figure 6 and Figure 7 It can be seen that Figure 7 The pixel coordinates of the center point of any circular identification code in The pixel coordinates of the center point of any circular identification code compared to, and ,but , , that is, the current corner point is located at the 6th row and 4th column.
[0096] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with this technology to understand the content of the present invention and implement it. They cannot be used to limit the protection scope of the present invention. Any equivalent changes or modifications made according to the spirit of the present invention should be included in the protection scope of the present invention.
Claims
1. A calibration plate for camera parameter calibration, comprising a substrate, wherein the substrate surface is arrayed with black and white squares; characterized in that: A first identification code is set in the white squares in the odd-numbered rows on the substrate, and a second identification code is set in the white squares in the even-numbered rows on the substrate; the number of the first identification codes in the white squares in the odd-numbered rows on the substrate is exactly the same along the row direction, and the number of the second identification codes in the white squares in the even-numbered rows on the substrate increases successively along the row direction; the number of the first identification codes in the white squares in the odd-numbered columns on the substrate increases successively along the column direction, and the number of the second identification codes in the white squares in the even-numbered columns on the substrate is exactly the same along the column direction.
2. The calibration plate for camera parameter calibration according to claim 1, characterized in that: The black area of the first identification code is equal to times the black area of the second identification code, where , Take the integer.
3. The calibration plate for camera parameter calibration according to claim 1 or 2, characterized in that: The first identification code is circular, and the second identification code is annular.
4. The calibration plate for camera parameter calibration according to claim 3, characterized in that: The outer diameter of the first identification code Equal to the outer diameter of the second identification code .
5. The calibration plate for camera parameter calibration according to claim 1, characterized in that: The sizes of the white squares and the black squares can be freely set.
6. The calibration plate for camera parameter calibration according to claim 1, characterized in that: The number of second identification codes in the white squares in the even-numbered rows on the substrate increases by 1 along the row direction, and the number of first identification codes in the white squares in the odd-numbered columns on the substrate increases by 1 along the column direction.
7. A calibration method for camera parameter calibration, characterized in that: The camera parameter calibration calibration board according to any one of claims 1 to 6 is used, comprising the following steps: S1. Use a camera to take a picture of the calibration plate, and then use the Shi-Tomasi algorithm to identify all corner points in the picture; S2. Taking each corner point as the center, extract the two white squares connected to it as the decoding area of the current corner point number, and obtain the number uniquely corresponding to the current corner point by decoding the identification code in the decoding area; S3. According to the number corresponding to each corner point, each corner point is accurately assigned its corresponding physical size coordinates in the world coordinate system, and then the Zhang Zhengyou calibration method is used to complete the camera parameter calibration.
8. The camera parameter calibration method according to claim 7, characterized in that: The steps of decoding the identification code in the decoding area in step S2 are as follows: S21. Identification and number calculation of identification codes: extract an identification code from each of the two white squares in the decoding area, and calculate the pixel area of the black area of the two identification codes. Identify the first identification code and the second identification code according to the pixel area size of the black area, and then count the number of all closed black areas in the white square where the first identification code is located, and record it as , count the number of all closed black areas in the white square where the second identification code is located, and record it as ; S22. Decoding of corner point number: extracting the pixel coordinates of the center point of any first identification code and any second identification code in the decoding area in the picture, respectively, and decoding the current corner point number by decoding rules, wherein the corner point number includes the corner point row number and corner point serial number .
9. The camera parameter calibration method according to claim 8, characterized in that: The decoding rules in step S22 are as follows: Corner row number The decoding rules are as follows: when , then the row number of the current corner point number ; when , then the row number of the current corner point number ; Corner point column number The decoding rules are as follows: when and , then the column number of the current corner point number ; when and , then the column number of the current corner point number ; when and , then the column number of the current corner point number ; when and , then the column number of the current corner point number ; in, Represents the pixel coordinates of the center point of any first identification code; Indicates the pixel coordinates of the center point of any second identification code.
10. The camera parameter calibration method according to claim 7, characterized in that: The specific process of step S1 is as follows: Set window and preset threshold ; Assume that the pixel coordinates of a point in the window are The movement amount is , grayscale , then the grayscale change function for: Among them, the window function ; Grayscale change function Taylor expansion and ignoring higher-order terms gives: in, , , ; In the formula, , Respectively represent the image grayscale , Gradient value in direction; Define the corner response function for: In the formula, and For the matrix The two eigenvalues of The window traverses all pixels in the image. When a certain pixel Value greater than threshold If the pixel is a local maximum in its neighborhood, then the pixel is a Shi-Tomasi feature corner point, and the pixel coordinates are output. .
Citation Information
Patent Citations
Large-scale control field artificial mark point for camera calibration and encoding method thereof
CN110009692A
Combined pattern calibration plate and structured light camera parameter calibration method
CN110827357A
Feature self-recognition calibration plate
CN111508031A
Calibration plate based on concentric circles and camera calibration method
CN117745835A
Robot calibration apparatus for calibrating a robot arm
US9193073B1