Processing Method, Device and Computer Readable Storage Medium for Camera Calibration Chart

By encoding and convolution processing of the calibration graph card, the correspondence between the first and second identification codes is generated, and the problem of poor compatibility of the calibration graph card in the prior art is solved, and efficient calibration in different scenarios is achieved.

CN115272489BActive Publication Date: 2025-07-25GEER TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210935731.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-04
Publication Date
2025-07-25
Estimated Expiration
2042-08-04

AI Technical Summary

Technical Problem

In the prior art, when using a rectangular black and white chess grid as a calibration chart card, the compatibility is poor and it cannot adapt to scenes with large camera distortion, resulting in calibration failure.

Method used

By encoding the calibration pattern of the calibration pattern card, a first identification code is generated, and a second identification code is generated based on the image captured by the camera, the correspondence between the two is determined, and the convolution process is used to reduce encoding duplication, and a diverse calibration pattern is designed to improve compatibility.

Benefits of technology

It improves the compatibility of calibration diagram cards and the accuracy of camera calibration to meet calibration requirements in different scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272489B_ABST
    Figure CN115272489B_ABST
Patent Text Reader

Abstract

The present invention discloses a method, apparatus, and computer-readable storage medium for processing a camera calibration chart. Among them, the method includes encoding according to a calibration pattern in the calibration chart to generate a first identification code; obtaining a captured image of the camera capturing the calibration chart; encoding according to the calibration pattern in the captured image to generate a second identification code; and determining the corresponding relationship between the first identification code and the second identification code. The present invention aims to improve the compatibility of the calibration chart.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing, and particularly to a method and apparatus for processing a camera calibration card and a computer-readable storage medium. Background Art

[0002] In the process of image measurement and machine vision applications, it is necessary to determine the mutual relationship between the three-dimensional geometric position of a certain point on the surface of a spatial object and its corresponding point in the image. Simply put, it is to determine the mapping relationship between the camera shooting scene and the captured image.

[0003] In the related art, a rectangular black and white checkerboard is generally used as the calibration card. Then, the camera shoots the rectangular black and white checkerboard, and calibrates the corner points in the black and white checkerboard to determine the mapping relationship between the shooting scene and the captured image. However, this method is limited to the black and white checkerboard with a single color and a single pattern, and the black and white checkerboard is not applicable in some application scenarios. For example, when the distortion effect of the camera is too large, the lines of the black and white checkerboard will be distorted, and the corner points cannot be determined. Therefore, the black and white checkerboard cannot be compatible with such a scenario, resulting in poor compatibility of the calibration card.

[0004] The above content is only used to assist in understanding the technical solution of the present invention, and does not represent an admission that the above content is the prior art. Summary of the Invention

[0005] The main purpose of the present invention is to provide a method and apparatus for processing a camera calibration card and a computer-readable storage medium, aiming to achieve the effect of improving the compatibility of the camera calibration card.

[0006] To achieve the above object, the present invention provides a method for processing a camera calibration card, and the method for processing the camera calibration card includes:

[0007] Encoding according to the calibration pattern in the calibration card to generate a first identification code;

[0008] Obtaining a captured image obtained by the camera shooting the calibration card;

[0009] Encoding according to the calibration pattern in the captured image to generate a second identification code;

[0010] Determining the corresponding relationship between the first identification code and the second identification code. Optionally,

[0011] Optionally, the step of encoding according to the pattern on the calibration card to generate a first identification code includes:

[0012] Obtaining the graphic information of the calibration pattern in the calibration card and a preset graphic mapping relationship;

[0013] Determine the graphic code corresponding to the calibration chart card according to the graphic information and the mapping relationship;

[0014] Perform convolution processing on the graphic code to generate the first identification code.

[0015] Optionally, the step of performing convolution processing on the graphic code to generate the first identification code includes:

[0016] Perform convolution processing on the graphic code to generate an initial identification code;

[0017] Determine whether there are identical values in the initial identification code;

[0018] If there are no identical values in the initial identification code, determine the initial identification code as the first identification code;

[0019] If there are identical values in the initial identification code, modify the convolution kernel and re - execute the step of performing convolution on the graphic code according to the convolution sum to generate an initial identification code.

[0020] Optionally, the step of determining the graphic code corresponding to the calibration chart card according to the graphic information and the mapping relationship includes:

[0021] Determine the positional relationship between the various graphics on the calibration chart card according to the graphic information;

[0022] Determine the graphic numbers corresponding to the various graphics on the calibration chart card according to the mapping relationship;

[0023] Determine the graphic code according to the graphic numbers and the positional relationship.

[0024] Optionally, the step of performing convolution processing on the graphic code to generate the first identification code includes:

[0025] Determine the target code in the graphic code and the codes around the target code;

[0026] Determine the kernel size, moving step, convolution function, and kernel elements of the convolution kernel according to the code and the codes around the target code;

[0027] Perform convolution on the graphic code according to the convolution kernel to generate the first identification code.

[0028] Optionally, the step of encoding according to the pattern on the calibration chart card to generate the first identification code includes:

[0029] Obtain the color information of the calibration pattern in the calibration chart card and the preset color mapping relationship;

[0030] Determine the color code corresponding to the calibration chart card according to the color information and the mapping relationship;

[0031] Perform convolution processing on the color code to generate the first identification code.

[0032] Optionally, the step of determining the graphic code corresponding to the calibration chart card according to the color information and the mapping relationship includes:

[0033] Determine the positional relationship between the respective color regions on the calibration chart card according to the color information;

[0034] Determine the color numbers of the respective color regions on the calibration chart card according to the mapping relationship;

[0035] Determine the color code according to the color numbers and the positional relationship.

[0036] Optionally, after the step of determining the corresponding relationship between the first identification code and the second identification code, further include:

[0037] Determine the positional change between the first identification code and the second identification code according to the corresponding relationship;

[0038] Determine the distortion parameters of the camera according to the positional change;

[0039] Determine the calibration parameters of the camera according to the distortion parameters.

[0040] In addition, to achieve the above object, the present invention further provides a processing device for a camera calibration chart card. The processing device for a camera calibration chart card includes a memory, a processor, and a processing program for a camera calibration chart card stored on the memory and executable on the processor. When the processing program for a camera calibration chart card is executed by the processor, the steps of the above-mentioned processing method for a camera calibration chart card are implemented.

[0041] In addition, to achieve the above object, the present invention further provides a camera calibration system, the camera calibration system includes:

[0042] A calibration chart card, the calibration pattern on the calibration chart card includes at least two different-shaped graphics;

[0043] A camera;

[0044] The processing device for a camera calibration chart card as described above;

[0045] A controller, the controller is used to control the camera to photograph the calibration chart card, and adjust the photographing angle and photographing parameters of the camera according to the corresponding relationship.

[0046] In addition, to achieve the above object, the present invention further provides a computer-readable storage medium, on which a processing program for a camera calibration card is stored. When the processing program for the camera calibration card is executed by a processor, the steps of the above-mentioned processing method for the camera calibration card are implemented.

[0047] A processing method, device and computer-readable storage medium for a camera calibration card provided by an embodiment of the present invention encode according to a calibration pattern in the calibration card to generate a first identification code; obtain a captured image obtained by the camera capturing the calibration card; encode according to the calibration pattern in the captured image to generate a second identification code; and determine the correspondence between the first identification code and the second identification code. In this way, by encoding the calibration pattern of the calibration card and encoding the calibration pattern on the captured image of the calibration card captured by the camera using the same encoding method, and corresponding the two obtained identification codes to obtain the correspondence, it is not necessary to limit to finding the corners of a rectangular black and white chessboard grid for correspondence, and the calibration pattern of the calibration card can be freely designed according to different scenarios, thereby improving the compatibility of the calibration card. BRIEF DESCRIPTION OF THE DRAWINGS

[0048] Figure 1 is a schematic diagram of the terminal structure of the hardware operating environment involved in the solution of the embodiment of the present invention;

[0049] Figure 2 is a schematic flowchart of an embodiment of the processing method for the camera calibration card of the present invention;

[0050] Figure 3 is a schematic flowchart of another embodiment of the processing method for the camera calibration card of the present invention;

[0051] Figure 4 is a schematic diagram of the calibration card involved in the embodiment of the present invention;

[0052] Figure 5 is a schematic diagram of the graphic encoding involved in the embodiment of the present invention;

[0053] Figure 6 is a schematic flowchart of the identification code generation process involved in the embodiment of the present invention;

[0054] Figure 7 is an example diagram of graphic encoding convolution involved in the embodiment of the present invention;

[0055] Figure 8 is a schematic diagram of an application scenario of an embodiment of the processing method for the camera calibration card of the present invention.

[0056] The realization, functional features and advantages of the object of the present invention will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0057] It should be understood that the specific embodiments described herein are merely used to explain the present invention and are not intended to limit the present invention.

[0058] In the related art, a rectangular black-and-white chessboard is generally used as a calibration chart. Then, the rectangular black-and-white chessboard is photographed by a camera, and the corner points on the black-and-white chessboard are calibrated to determine the mapping relationship between the shooting scene and the captured image. However, this method is limited to the black-and-white chessboard with a single color and a single pattern, and is not applicable in some scenarios, resulting in poor compatibility of the calibration chart.

[0059] In order to improve the compatibility of the camera calibration chart, an embodiment of the present invention provides a processing method, device, and computer-readable storage medium for a camera calibration chart. The main steps of the method include:

[0060] Encode according to the calibration pattern in the calibration chart to generate a first identification code;

[0061] Obtain a captured image of the calibration chart taken by the camera;

[0062] Encode according to the calibration pattern in the captured image to generate a second identification code;

[0063] Determine the corresponding relationship between the first identification code and the second identification code.

[0064] In this way, by encoding the calibration pattern of the calibration chart and encoding the calibration pattern on the captured image of the calibration chart taken by the camera using the same encoding method, and corresponding the two obtained identification codes to obtain the corresponding relationship, the calibration pattern of the calibration chart can be freely designed according to different scenarios, thereby improving the compatibility of the calibration chart.

[0065] The following will describe in detail the content protected by the claims of the present invention with reference to the accompanying drawings.

[0066] As Figure 1 shown, Figure 1 is a schematic diagram of the terminal structure of the hardware operating environment involved in the embodiment of the present invention.

[0067] The terminal in the embodiment of the present invention may be a processing device for a camera calibration chart.

[0068] As Figure 1As shown in the figure, the terminal may include: a processor 1001, such as a CPU, a memory 1003, and a communication bus 1002. Among them, the communication bus 1002 is used to realize the connection and communication between these components. The memory 1003 may be a high-speed RAM memory or a stable memory (non-volatile memory), such as a disk memory. Optionally, the memory 1003 may also be a storage device independent of the aforementioned processor 1001.

[0069] Those skilled in the art can understand that Figure 1 the terminal structure shown in does not constitute a limitation on the terminal, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0070] As Figure 1 shown, the memory 1003, as a computer storage medium, may include an operating system and a processing program for the camera calibration card.

[0071] In Figure 1 the terminal shown, the processor 1001 may be used to call the processing program for the camera calibration card stored in the memory 1003 and perform the following operations:

[0072] Encode according to the calibration pattern in the calibration card to generate a first identification code;

[0073] Obtain the captured image obtained by the camera shooting the calibration card;

[0074] Encode according to the calibration pattern in the captured image to generate a second identification code;

[0075] Determine the correspondence between the first identification code and the second identification code.

[0076] Further, the processor 1001 may call the processing program for the camera calibration card stored in the memory 1003 and further perform the following operations:

[0077] Obtain the graphic information of the calibration pattern in the calibration card and a preset graphic mapping relationship;

[0078] Determine the graphic code corresponding to the calibration card according to the graphic information and the mapping relationship;

[0079] Perform convolution processing on the graphic code to generate the first identification code.

[0080] Further, the processor 1001 may call the processing program for the camera calibration card stored in the memory 1003 and further perform the following operations:

[0081] Perform convolution processing on the graphic code to generate an initial recognition code;

[0082] Determine whether there are identical numerical values in the initial recognition code;

[0083] If there are no identical numerical values in the initial recognition code, determine the initial recognition code as the first recognition code;

[0084] If there are identical numerical values in the initial recognition code, modify the convolution kernel and re - execute the step of performing convolution on the graphic code according to the convolution sum to generate an initial recognition code.

[0085] Further, the processor 1001 can call the processing program of the camera calibration card stored in the memory 1003 and also perform the following operations:

[0086] Determine the positional relationship between the various graphics on the calibration card according to the graphic information;

[0087] Determine the graphic numbers corresponding to the various graphics on the calibration card according to the mapping relationship;

[0088] Determine the graphic code according to the graphic number and the positional relationship;

[0089] Further, the processor 1001 can call the processing program of the camera calibration card stored in the memory 1003 and also perform the following operations:

[0090] Determine the target code in the graphic code and the codes around the target code;

[0091] Determine the kernel size, moving step, convolution function, and kernel elements of the convolution kernel according to the code and the codes around the target code;

[0092] Perform convolution on the graphic code according to the convolution kernel to generate the first recognition code.

[0093] Further, the processor 1001 can call the processing program of the camera calibration card stored in the memory 1003 and also perform the following operations:

[0094] Further, the processor 1001 can call the processing program of the camera calibration card stored in the memory 1003 and also perform the following operations:

[0095] Obtain the color information of the calibration pattern in the calibration card and a preset color mapping relationship;

[0096] Determine the color code corresponding to the calibration card according to the color information and the mapping relationship;

[0097] Perform convolution processing on the color coding to generate the first identification code.

[0098] Further, the processor 1001 may call the processing program of the camera calibration chart stored in the memory 1003 and further perform the following operations:

[0099] The step of determining the graphic coding corresponding to the calibration chart according to the color information and the mapping relationship includes:

[0100] Determine the positional relationship between the respective color regions on the calibration chart according to the color information;

[0101] Determine the color numbers of the respective color regions on the calibration chart according to the mapping relationship;

[0102] Determine the color coding according to the color numbers and the positional relationship.

[0103] Further, the processor 1001 may call the processing program of the camera calibration chart stored in the memory 1003 and further perform the following operations:

[0104] Determine the positional change between the first identification code and the second identification code according to the corresponding relationship;

[0105] Determine the distortion parameters of the camera according to the positional change;

[0106] Determine the calibration parameters of the camera according to the distortion parameters.

[0107] In the process of image measurement and machine vision applications, it is necessary to determine the mutual relationship between the three-dimensional geometric position of a certain point on the surface of a spatial object and its corresponding point in the image. Simply put, it is to determine the mapping relationship between the camera shooting scene and the captured image, and this will use a calibration chart.

[0108] In the related art, a rectangular black and white checkerboard is generally used as the calibration chart. Then, the rectangular black and white checkerboard is photographed by the camera, and the corner points in the black and white checkerboard are calibrated. Furthermore, the distortion of the black and white checkerboard in the captured image by the camera is determined, so as to determine the mapping relationship between the shooting scene and the captured image. However, this method is limited to the black and white checkerboard with a single color and a single pattern, and the black and white checkerboard is not applicable in some scenarios, so the compatibility of the calibration chart is too poor.

[0109] It can be seen that there are the above-mentioned defects in the related calibration chart processing methods. The embodiments of the present invention propose a processing method for a camera calibration chart to solve the above defects, aiming to achieve the effect of giving the design space of the calibration chart by encoding the calibration pattern, improving the diversity of the calibration chart, and thus improving the compatibility of the calibration chart.

[0110] Hereinafter, through specific exemplary solutions, the content claimed in the claims of the present invention will be explained and illustrated so that those skilled in the art can better understand the protection scope of the claims of the present invention. It can be understood that the following exemplary solutions do not limit the protection scope of the present invention and are only used to explain the present invention.

[0111] Exemplarily, referring to Figure 2 , in an embodiment of the method for processing a camera calibration card of the present invention, the method for processing the camera calibration card includes the following steps:

[0112] Step S10: Encode according to the calibration pattern in the calibration card to generate a first identification code;

[0113] In this embodiment, the calibration card is a pre-designed card. Referring to Figure 4 , there is a calibration pattern in the calibration card. Various preset graphics or regions with different colors are designed in the calibration pattern. Each image or color region corresponds to a preset value. Therefore, encoding can be performed according to the calibration pattern at the position where the calibration pattern is located to generate a first identification code composed of multiple values with position information, and there are no identical values in the first identification code.

[0114] Optionally, obtain the graphic information of the calibration pattern in the calibration card and the preset graphic mapping relationship; determine the graphic code corresponding to the calibration card according to the graphic information and the mapping relationship; perform convolution processing on the graphic code to generate the first identification code.

[0115] If the calibration patterns on the designed calibration card are composed of different graphics, referring to Figure 4 , including triangles and rhombuses, and the preset graphic mapping relationship is that a triangle represents the value "1" and a rhombus represents the value "0", and the positions without graphics are filled with "0". According to image recognition, determine the graphic information on the calibration pattern, and according to the preset mapping relationship, map the images on the calibration card to values to generate a graphic code, which is also composed of multiple values with position information. Referring to Figure 5 . However, it is easy for the graphic code to have the situation of repeated values due to the limited preset relationship and the number of graphics, which is not conducive to the subsequent correspondence of the identification code. Therefore, by performing convolution processing on the graphic code to change the sizes of each value, referring to Figure 6 , the possibility of repeated values in the graphic code is reduced, and thus the first identification code is generated. It should be noted that the convolution kernel is not only in the format of 3×3, but can be a convolution sum of any value, a convolution kernel that can perform convolution, and the convolution method can also be set randomly, as long as the data values in the finally obtained identification code are preferably not repeated. Therefore, Figure 6 the identification code in

[0116] It should be noted that the graphics are arranged in a row-column form, but are not limited to being rectangular in shape. The shapes may vary, and the position information between the mapped image codes also corresponds to the position information of the graphics. The image codes are not necessarily matrix codes. Refer to Figure 7 . However, convolution processing can still be performed. When performing convolution, the kernel elements of the convolution kernel will be calculated corresponding to the recognition codes to be convolved. If there is no recognition code that can correspond to the kernel elements for calculation, the calculation steps of the kernel elements and the recognition codes will be ignored. If there is a recognition code that can correspond to the kernel elements, the calculation will be performed normally.

[0117] Optionally, perform convolution processing on the graphic code to generate an initial recognition code; determine whether there are the same values in the initial recognition code; if there are no same values in the initial recognition code, determine the initial recognition code as the first recognition code; if there are the same values in the initial recognition code, modify the convolution kernel and re-execute the step of performing convolution on the graphic code according to the convolution sum to generate an initial recognition code.

[0118] When performing convolution processing on the graphic code according to the set convolution kernel, an initial recognition code corresponding to the graphic code in terms of position relationship needs to be generated after convolution, but there are still the same values in the initial recognition code. In order to ensure that the first recognition code of the graphic card and the second recognition code of the captured image can correspond, there should be no same values in the recognition code, and there may still be cases where the values are the same after one convolution. First, determine whether there are the same values in the initial recognition code. If there are no same values in the initial recognition code, the initial recognition code can be used as the first recognition code. If there are the same values in the initial recognition code, the initial recognition code cannot be used as the first recognition code, and the convolution kernel needs to be modified. Specifically, the kernel elements, convolution function, moving step size, etc. of the convolution kernel can be changed, and the convolution kernel can be continuously adjusted and convolved to change the values of the initial recognition code until there are no same values in the initial recognition code and it can be used as the first recognition code.

[0119] It can be understood that the magnitude of the value in the recognition code is not important. What is important is that it is the only value in the recognition code and is a value that exists in both the first recognition code and the second recognition code.

[0120] Optionally, determine the target code in the graphic code and the codes around the target code; determine the kernel size, moving step size, convolution function, and kernel elements of the convolution kernel according to the codes and the codes around the target code; perform convolution on the graphic code according to the convolution kernel to generate the first recognition code.

[0121] Before performing convolution on image encoding, it is necessary to determine the relevant parameters of the convolution kernel, including the kernel size, moving step, convolution function, kernel elements, etc., for calculation. A preset convolution kernel can be obtained to perform convolution on the image encoding. The preset convolution kernel can be continuously modified according to the generated initial recognition code, and convolution is performed according to the modified convolution kernel so that the initial recognition code can be used as the first recognition code. Alternatively, select the encoding whose position information in the graphic encoding is not the boundary as the target encoding. Determine the relevant parameters of the convolution kernel according to the target encoding and the numerical repetition amount in the encodings near the target encoding. The larger the numerical repetition amount, for example, among 9 encodings, 8 encodings have the same numerical value, the higher the complexity level of the convolution sum-related parameters. Conversely, the lower the complexity level. In this way, when the repetition is high, a convolution kernel with a higher complexity level can be given according to the repetition amount to reduce the number of convolutions. When the repetition degree is low, a convolution kernel with a lower complexity level can be given according to the repetition to reduce the convolution difficulty, which can reduce the calculation cost and improve the encoding efficiency.

[0122] Optionally, determine the positional relationship between the various graphics on the calibration card according to the graphic information; determine the graphic numbers corresponding to the various graphics on the calibration card according to the mapping relationship; determine the graphic encoding according to the graphic numbers and the positional relationship.

[0123] Determine the graphic information on the calibration pattern according to image recognition. According to the graphic information, the position information of each graphic on the calibration card can be determined, and then the positional relationship between the various graphics can be determined. Determine the graphic numbers corresponding to the various graphics according to the preset mapping relationship, and set the graphic numbers corresponding to the various graphics according to the positional relationship to obtain the graphic encoding.

[0124] Step S20: Obtain the captured image of the calibration card taken by the camera;

[0125] In this embodiment, the calibration card is a pre-designed card including a calibration pattern, which can be generated by printing or by displaying the calibration card through a display device. The calibration pattern in the calibration card is standard and conforms to the pre-designed pattern. Capturing the calibration card by the camera will also obtain a captured image including the calibration pattern. However, due to the camera shooting angle and the structure of the camera itself, the captured image will be distorted, and the calibration pattern in the captured image will also be distorted. For example, if the lens of the camera is circular, the image boundary of the captured image will be magnified. In some scenarios, the function of camera calibration can correct the distortion.

[0126] It should be understood that when the camera shoots the calibration card facing it directly, there will be a certain amount of distortion, but the amount of distortion is very small and will not affect the recognition of the calibration pattern in the captured image.

[0127] Step S30: Perform the encoding based on the calibration pattern in the captured image to generate a second identification code;

[0128] In this embodiment, the captured image is obtained by photographing a calibration card. Therefore, there is also a calibration pattern in the captured image. The same encoding method as that for the calibration pattern in the calibration card is used for the calibration pattern in the captured image to generate a second captured pattern. That is, for the calibration pattern in the captured image, the same image recognition mechanism and model as those for the calibration pattern in the calibration card are adopted, the image encoding is generated using the same mapping relationship, and the image encoding is convolved using the same convolution kernel and number of convolution times to obtain a second convolution code.

[0129] Optionally, obtain the graphic information of the calibration pattern in the captured image and a preset graphic mapping relationship; determine the graphic code corresponding to the calibration card according to the graphic information and the mapping relationship; perform convolution processing on the graphic code to generate the second identification code. Or, obtain the color information of the calibration pattern in the captured image and a preset color mapping relationship; determine the color code corresponding to the calibration card according to the color information and the mapping relationship; perform convolution processing on the color code to generate the second identification code.

[0130] Step S40: Determine the corresponding relationship between the first identification code and the second identification code.

[0131] In this embodiment, both the first identification code and the second identification code are codes composed of multiple numerical values with position information. The calibration pattern in the calibration card is standard and conforms to the pre-designed pattern. The calibration image in the captured image has the same individual graphics or color regions as the calibration pattern in the calibration card, but there will be a certain distortion between the graphics or color regions. Since the same encoding method is adopted, the numerical values of the first identification code and the second identification code can correspond one by one. However, due to the distortion between the graphics or color regions, the position information of the numerical values will be different. Refer to Figure 8 , the corresponding relationship between the first identification code and the second identification code includes the corresponding relationship between the numerical values, and after determining the corresponding relationship between the numerical values, the corresponding relationship of the position information between the numerical values is determined. Other steps of camera calibration can be continued according to the corresponding relationship between the first identification code and the second identification code.

[0132] In the technical solution disclosed in this embodiment, encoding is performed according to the calibration pattern in the calibration card to generate a first identification code; a captured image obtained by the camera capturing the calibration card is acquired; encoding is performed according to the calibration pattern in the captured image to generate a second identification code; and the corresponding relationship between the first identification code and the second identification code is determined. In this way, by encoding the calibration pattern of the calibration card and encoding the calibration pattern on the captured image of the calibration card captured by the camera using the same encoding method, the two obtained identification codes are corresponded to obtain the corresponding relationship. In this way, it is not necessary to limit to finding the corners of the rectangular black and white chessboard grid for correspondence. The calibration pattern of the calibration card can be freely designed according to different scenarios, improving the customizability of the calibration image, thereby improving the compatibility of the calibration card, improving the efficiency of camera calibration, making the calibration card more adaptable in some scenarios, and thus also improving the accuracy of camera calibration.

[0133] Optionally, referring to Figure 3 , based on any of the above embodiments, in another embodiment of the method for processing a camera calibration card of the present invention, the method for processing the camera calibration card further includes:

[0134] Step S11: Acquire the color information of the calibration pattern in the calibration card and a preset color mapping relationship;

[0135] Step S12: Determine the color code corresponding to the calibration card according to the color information and the mapping relationship;

[0136] Step S13: Perform convolution processing on the color code to generate the first identification code.

[0137] In this embodiment, when customizing the design of the calibration pattern of the calibration card, in addition to customizing the graphics of the calibration pattern, the color can also be customized, not limited to black and white. Determine multiple regions in the calibration card, the shape of the region is not limited, the shapes of each region can be the same or different, but the colors of each region include multiple types. Acquire the color information of the calibration pattern in the calibration card, and based on the color mapping relationship, determine the color code corresponding to the calibration card. Since the color difference setting is limited, there will still be a situation where the encoded numbers are repeated. Therefore, convolution processing is also performed on the color code to generate the first identification code. The convolution process is the same as above. If there are the same values in the initially generated identification code, the relevant parameters of the convolution kernel are modified, and the initial identification code is convolved again until there are no same values in the initial identification code, which can be used as the first identification code.

[0138] Optionally, determine the positional relationship between the color regions on the calibration chart according to the color information; determine the color numbers of the color regions on the calibration chart according to the mapping relationship; and determine the color code according to the color numbers and the positional relationship.

[0139] According to the color information, the color regions of the calibration pattern on the calibration chart and the position information of each color region can be determined. Similar to the encoding method based on the graph, in the mapping process, the positional relationship between the color regions is also determined according to the position information, the color numbers corresponding to the color regions are determined according to the color mapping relationship, and the color numbers corresponding to the color regions are set according to the positional relationship to obtain the color code.

[0140] It should be noted that when encoding and processing the calibration image of the captured image later, the same encoding method should also be adopted. If the first identification code of the calibration chart is encoded according to the color region, the second identification code of the captured image is encoded according to the color region; if the first identification code of the calibration chart is encoded according to the graph, the second identification code of the captured image is encoded according to the graph.

[0141] In the technical solution disclosed in this embodiment, obtain the color information of the calibration pattern in the calibration chart and the preset color mapping relationship; determine the color code corresponding to the calibration chart according to the color information and the mapping relationship; perform convolution processing on the color code to generate the first identification code. In this way, not only can encoding be performed according to the graph, but also encoding can be performed by changing different colors. It not only realizes the custom design of the calibration image graph of the calibration chart, but also realizes the custom design of the calibration image color of the calibration chart, thereby further improving the customizability and compatibility of the calibration chart, improving the camera calibration efficiency, making the calibration chart more adaptable in the camera calibration scenario that requires color recognition, and also improving the accuracy of camera calibration.

[0142] In addition, an embodiment of the present invention also provides a processing device for a camera calibration chart. The processing device for the camera calibration chart includes a memory, a processor, and a processing program for the camera calibration chart stored on the memory and executable on the processor. When the processing program for the camera calibration chart is executed by the processor, the steps of the processing method for the camera calibration chart described in each of the above embodiments are implemented.

[0143] In addition, to achieve the above object, the present invention further provides a camera calibration system, which includes: a calibration chart, where the calibration pattern on the calibration chart includes at least two different-shaped graphics; a camera; a processing device for the camera calibration chart as described above; and a controller, which is used to control the camera to photograph the calibration chart and adjust the shooting angle and shooting parameters of the camera according to the corresponding relationship.

[0144] Optionally, the calibration parameters of the camera can be determined according to the corresponding relationship. The calibration parameters are the mapping relationship between the shooting scene and the captured image. In this way, the distortion parameters of the camera can be determined. Due to reasons such as the shooting angle or the lens of the camera, the camera is distorted. According to the mapping relationship, the shooting angle and shooting parameters of the camera are adjusted to balance the distortion of the objects in the image caused by the camera shooting.

[0145] In addition, an embodiment of the present invention further proposes a computer-readable storage medium, on which a processing program for the camera calibration chart is stored. When the processing program for the camera calibration chart is executed by a processor, the steps of the processing method for the camera calibration chart described in each of the above embodiments are implemented.

[0146] It should be noted that in this article, the terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not expressly listed, or further includes elements inherent to such process, method, article or system. Without further limitation, an element defined by the statement "including one..." does not exclude the existence of another identical element in the process, method, article or system including that element.

[0147] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0148] Through the description of the above embodiments, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform. Of course, they can also be implemented by hardware, but in many cases the former is a better implementation method. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product is stored in a storage medium as described above (such as ROM / RAM, magnetic disk, optical disc), and includes several instructions for causing the processing device of the camera calibration chart to execute the methods described in each embodiment of the present invention.

[0149] The above are only the preferred embodiments of the present invention, and do not limit the patent scope of the present invention accordingly. Any equivalent structure or equivalent process transformation made by using the content of the specification and drawings of the present invention, or directly or indirectly applied in other related technical fields, shall be similarly included in the patent protection scope of the present invention.

Claims

1. A method for processing a camera calibration chart, characterized in that, The processing method of the camera calibration card includes: Encoding according to the calibration pattern in the calibration card to generate a first identification code, including: obtaining the graphic information of the calibration pattern in the calibration card and a preset graphic mapping relationship; determining the graphic code corresponding to the calibration card according to the graphic information and the mapping relationship; performing convolution processing on the graphic code to generate the first identification code; Obtaining a captured image of the calibration card taken by the camera; Encoding according to the calibration pattern in the captured image to generate a second identification code; Determining the corresponding relationship between the first identification code and the second identification code.

2. The processing method of the camera calibration chart according to claim 1, wherein, The step of performing convolution processing on the graphic code to generate the first identification code includes: Performing convolution processing on the graphic code to generate an initial identification code; Judging whether there are the same values in the initial identification code; If there are no same values in the initial identification code, determining the initial identification code as the first identification code; If there are same values in the initial identification code, modifying the convolution kernel and re-executing the step of performing convolution processing on the graphic code to generate the initial identification code.

3. The method for processing a camera calibration chart according to claim 2, wherein, The step of determining the graphic code corresponding to the calibration card according to the graphic information and the mapping relationship includes: Determining the positional relationship between each graphic on the calibration card according to the graphic information; Determining the graphic number corresponding to each graphic on the calibration card according to the mapping relationship; Determining the graphic code according to the graphic number and the positional relationship.

4. The processing method of the camera calibration card according to claim 1, wherein, The step of performing convolution processing on the graphic code to generate the first identification code includes: Determining the target code in the graphic code and the codes around the target code; Determining the kernel size, moving step, convolution function and kernel elements of the convolution kernel according to the codes and the codes around the target code; Performing convolution on the graphic code according to the convolution kernel to generate the first identification code.

5. The processing method of the camera calibration card according to claim 1, characterized in that, The step of encoding according to the calibration pattern in the calibration card to generate the first identification code can also be obtained based on the following steps: Obtaining the color information of the calibration pattern in the calibration card and a preset color mapping relationship; Determining the color code corresponding to the calibration card according to the color information and the mapping relationship; Performing convolution processing on the color code to generate the first identification code.

6. The method for processing a camera calibration chart according to claim 5, wherein, The step of determining the color code corresponding to the calibration card according to the color information and the mapping relationship includes: Determining the positional relationship between each color area on the calibration card according to the color information; Determining the color number of each color area on the calibration card according to the mapping relationship; Determining the color code according to the color number and the positional relationship.

7. A processing device for a camera calibration chart, characterized in that, The processing device of the camera calibration card includes: a memory, a processor, and a processing program of the camera calibration card stored on the memory and operable on the processor. When the processing program of the camera calibration card is executed by the processor, it implements the steps of the processing method of the camera calibration card as described in any one of claims 1 to 6.

8. A camera calibration system, characterized in that, The camera calibration system includes: A calibration chart, where the calibration pattern on the calibration chart includes graphics of at least two different shapes or at least three colors; A camera; A processing device for the camera calibration chart as described in claim 7; A controller, which is used to control the camera to photograph the calibration chart and adjust the shooting angle and shooting parameters of the camera according to the corresponding relationship.

9. A computer-readable storage medium, characterized in that, A processing program for the camera calibration chart is stored on the computer-readable storage medium. When the processing program for the camera calibration chart is executed by a processor, the steps of the processing method for the camera calibration chart as described in any one of claims 1 to 6 are implemented.

Citation Information

Patent Citations

  • Camera calibration method and device, camera and computer readable storage medium

    CN110599548A

  • Camera calibration method, device, equipment and storage medium

    CN112419422A