Camera calibration method, platform and device

By obtaining the coordinate information of the calibration object and the camera, determining the offset result, and controlling the camera to take pictures, the calibration problem of relying on standard cameras in the prior art is solved, and fast and accurate camera calibration is achieved.

CN113570669BActive Publication Date: 2025-04-11SHENZHEN COLIBRI TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202010354895.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-04-29
Publication Date
2025-04-11
Estimated Expiration
2040-04-29

AI Technical Summary

Technical Problem

The existing camera calibration methods rely on standard cameras, and the preparation and screening process of standard cameras is slow, affecting the calibration process of camera testing equipment.

Method used

By obtaining the coordinate information of the calibration object and the preset coordinate information of the camera, determining the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, controlling the camera to take a picture of the calibration object, obtain the calibration image, and obtain the calibration result of the camera based on the calibration image and the offset result.

Benefits of technology

It realizes accurate calibration of the camera without a standard camera, improves the efficiency and accuracy of the calibration process, does not rely on standard cameras, and is suitable for calibration of various camera test equipment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113570669B_ABST
    Figure CN113570669B_ABST
Patent Text Reader

Abstract

The present invention discloses a camera calibration method, platform and device. The method determines the offset result of the camera calibration platform by acquiring the coordinate information of the calibration object and the preset coordinate information of the camera, and then controls the camera to take a picture of the calibration object to obtain a calibration image. The overall offset result of the camera is obtained according to the calibration image. The offset result of the camera calibration platform is subtracted from the overall offset result to obtain the offset result of the camera, which is the calibration result of the camera. The camera calibration does not depend on the calibrated standard camera, and the camera calibration can be completed quickly at any stage of production. The camera calibration device can be used as a substitute for the standard camera, so that the calibration of the camera test equipment does not depend on the standard camera or the standard product, and the equipment calibration can be completed quickly at the early stage of production wiring. The method is generally applicable to the calibration of various camera test equipment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of camera calibration, and in particular to a camera calibration method, platform and device. Background Art

[0002] Calibration of the center position and inclination of the camera and the test chart of the test equipment in the camera test equipment is an indispensable process before the camera leaves the factory. Through calibration, the center of the image captured by the camera is aligned with the center of the test chart, and the plane of the camera and the test chart are as parallel as possible, so that the data tested by the camera in the camera test equipment has high accuracy and precision, and good repeatability and reproducibility. Among them, the common method of existing camera calibration is to first pre-select multiple cameras to be calibrated for testing on a standard camera test equipment, select a standard camera whose calibration data meets the standard, place the standard camera in the camera test equipment to be calibrated, and shoot an image containing the test chart through the camera, and then obtain the offset result between the center of the image and the center of the test chart through the calibration algorithm. The offset result includes the deviation in the X, Y, and Z directions in the world coordinate system and the parameters such as the rotation angle. According to the offset result, the camera test equipment to be calibrated is adjusted to be within the specified offset range, and the calibrated camera test equipment can be obtained. After all camera test equipment is calibrated according to the above method, it can be used for testing in the later camera test production line.

[0003] However, in the above camera calibration method, the standard camera test equipment needs to rely on the standard camera during calibration, and the preparation and screening process of the standard camera is very slow when the total number of cameras is small in the initial stage of production and assembly, which affects the calibration process of the entire camera test equipment. Summary of the invention

[0004] The main technical problem solved by the present invention is how to calibrate a camera in the absence of a standard camera.

[0005] According to a first aspect, an embodiment provides a camera calibration method, which is applied to a camera calibration platform, wherein the camera calibration platform includes a camera and a calibration object; the method includes:

[0006] Acquire the coordinate information of the calibration object and the preset coordinate information of the camera;

[0007] Determine, according to the coordinate information of the calibration object and the preset coordinate information of the camera, an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, wherein the offset result is used to calibrate the camera calibration platform;

[0008] Controlling the camera to take a picture of the calibration object to obtain a calibration image;

[0009] A calibration result of the camera is obtained according to the calibration image and the offset result.

[0010] Optionally, determining the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera includes:

[0011] Convert the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system;

[0012] In the same coordinate system, the coordinate information of the calibration object and the preset coordinate information of the camera are compared to obtain an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera.

[0013] Optionally, obtaining a calibration result of the camera according to the calibration image and the offset result includes:

[0014] Obtaining, according to the calibration image, an offset result of the center of the calibration image relative to the center of the calibration object in the calibration image;

[0015] The camera calibration result is obtained according to the offset result of the calibration image center relative to the center of the calibration object in the calibration image and the offset result of the camera calibration platform.

[0016] Optionally, before controlling the camera to take a photo of the calibration object, the method further includes:

[0017] Focus and align the camera.

[0018] According to the second aspect, an embodiment provides a camera calibration platform, including:

[0019] Calibration object;

[0020] A controller is used to obtain the coordinate information of the calibration object; determine the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera according to the coordinate information of the calibration object and the preset coordinate information of the camera, and the offset result is used to calibrate the camera calibration platform; control the camera to take a picture of the calibration object to obtain a calibration image; and obtain the calibration result of the camera according to the calibration image and the offset result.

[0021] Optionally, the preset coordinate information of the camera is in a first coordinate system, and the coordinate information of the calibration object is in a second coordinate system;

[0022] The controller determines the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, including:

[0023] Convert the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system;

[0024] In the same coordinate system, the coordinate information of the calibration object and the preset coordinate information of the camera are compared to obtain an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera.

[0025] Optionally, it further comprises: a first area and a second area arranged relatively to each other, the first area is used to set a camera, the second area is used to set a calibration object, and at least three first reference points arranged in the first area and at least three second reference points arranged in the second area;

[0026] The controller converts the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system, including:

[0027] Obtaining coordinate information of a first reference point in a first coordinate system;

[0028] Obtaining coordinate information of a second reference point in a second coordinate system;

[0029] Acquire coordinate information of a first reference point and a second reference point in a third coordinate system; the origin positions of the first coordinate system, the second coordinate system and the third coordinate system are different;

[0030] Obtaining a first rotation and translation matrix for converting the third coordinate system to the first coordinate system according to coordinate information of the first reference point in the first coordinate system and the third coordinate system;

[0031] According to the first rotation and translation matrix, the coordinate information of the second reference point in the third coordinate system is converted to the first coordinate system to obtain the coordinate information of the second reference point in the first coordinate system;

[0032] Obtaining a second rotation and translation matrix for converting the second coordinate system to the first coordinate system according to coordinate information of the second reference point in the first coordinate system and the second coordinate system;

[0033] According to the second rotation and translation matrix, the coordinate information of the calibration object in the second coordinate system is converted to the first coordinate system to obtain the position information of the calibration object in the first coordinate system.

[0034] Optionally, the controller obtains coordinate information of a first reference point in a first coordinate system through a coordinate measuring machine; the controller obtains coordinate information of a second reference point in a second coordinate system through an optical image measuring instrument; the controller obtains coordinate information of the first reference point and the second reference point in a third coordinate system through a laser tracker.

[0035] Optionally, the controller obtains a calibration result of the camera according to the calibration image and the offset result, comprising:

[0036] Obtaining, according to the calibration image, an offset result of the center of the calibration image relative to the center of the calibration object in the calibration image;

[0037] The camera calibration result is obtained according to the offset result of the calibration image center relative to the center of the calibration object in the calibration image and the offset result of the camera calibration platform.

[0038] According to a third aspect, an embodiment provides a camera calibration device, including:

[0039] A camera, used to capture calibration images;

[0040] An image processing chip, used for processing the calibration image;

[0041] A processor, configured to obtain coordinate information of a calibration object and preset coordinate information of a camera; determine an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera according to the coordinate information of the calibration object and the preset coordinate information of the camera; control the camera to take a picture of the calibration object to obtain a calibration image; and obtain a calibration result of the camera calibration device according to the calibration image and the offset result;

[0042] USB interface, used to communicate with the host computer.

[0043] According to the camera calibration method, platform and device of the above-mentioned embodiment, the offset result of the camera calibration platform is determined by acquiring the coordinate information of the calibration object and the preset coordinate information of the camera, and then the camera is controlled to take a picture of the calibration object to obtain a calibration image, and the overall offset result of the camera is obtained according to the calibration image. The offset result of the camera calibration platform is subtracted from the overall offset result to obtain the offset result of the camera, which is the calibration result of the camera. This makes it possible for the camera calibration to be independent of the calibrated standard camera, and the camera calibration can be quickly completed at any stage of production. In addition, the camera calibration device can be used as a substitute for the standard camera, so that the calibration of the camera test equipment is independent of the standard camera or the standard product, and the equipment calibration can be quickly completed at the early stage of production wiring, and is generally applicable to the calibration of various camera test equipment. BRIEF DESCRIPTION OF THE DRAWINGS

[0044] Figure 1 A schematic diagram of the structure of a camera calibration platform according to an embodiment;

[0045] Figure 2 A schematic diagram of coordinate conversion according to an embodiment;

[0046] Figure 3 is a structural block diagram of a camera calibration device according to an embodiment;

[0047] Figure 4 is a structural diagram of a camera calibration device according to an embodiment;

[0048] Figure 5 A flowchart of a camera calibration method according to an embodiment;

[0049] Figure 6 The present invention is a flowchart of a camera calibration method according to another embodiment. DETAILED DESCRIPTION

[0050] The present invention is further described in detail below by specific embodiments in conjunction with the accompanying drawings. Wherein similar elements in different embodiments adopt associated similar element numbers. In the following embodiments, many detailed descriptions are for making the present application better understood. However, those skilled in the art can easily recognize that some features can be omitted in different situations, or can be replaced by other elements, materials, methods. In some cases, some operations related to the present application are not shown or described in the specification, this is to avoid the core part of the present application being overwhelmed by too much description, and for those skilled in the art, it is not necessary to describe these related operations in detail, and they can fully understand the related operations according to the description in the specification and the general technical knowledge in the art.

[0051] In addition, the features, operations or characteristics described in the specification can be combined in any appropriate manner to form various implementations. At the same time, the steps or actions in the method description can also be interchanged or adjusted in a manner that is obvious to those skilled in the art. Therefore, the various sequences in the specification and the drawings are only for the purpose of clearly describing a certain embodiment and are not meant to be a required sequence, unless otherwise specified that a certain sequence must be followed.

[0052] The serial numbers of the components in this document, such as "first", "second", etc., are only used to distinguish the objects described and do not have any order or technical meaning. The "connection" and "coupling" mentioned in this application, unless otherwise specified, include direct and indirect connections (couplings).

[0053] In the embodiment of the present invention, the offset result of the calibration platform is determined by acquiring the coordinate information of the calibration object and the preset coordinate information of the camera, and the offset result of the entire camera calibration system is determined according to the calibration image taken by the camera. The offset result of the calibration platform is subtracted from the offset result of the entire camera calibration system to obtain the calibration result of the camera, and the camera is calibrated according to the calibration result. Among them, the preset coordinate information of the camera is the theoretical coordinate information of the camera on the calibration platform. When the camera is actually placed, it is hoped that the actual coordinate information of the camera is as close to the theoretical coordinate information as possible.

[0054] Since the camera is mounted on the calibration platform for calibration, and the calibration platform itself is not a standard device, the calibration result obtained by direct calibration has a large error. In this embodiment, the offset result of the calibration platform is determined, and the offset result of the calibration platform is subtracted from the offset result of the calibration platform by the offset result of the entire camera calibration system. The offset result at this time is the calibration result of the camera, which improves the calibration accuracy of the camera and does not rely on a standard calibration camera to calibrate the calibration platform.

[0055] The camera shape in this embodiment includes but is not limited to a smartphone, a tablet computer, a smart mobile wearable terminal, etc.

[0056] Embodiment 1:

[0057] Please refer to Figure 1 , Figure 1 The present invention is a schematic structural diagram of a camera calibration platform according to an embodiment, comprising: a first area 201 and a second area 202 which are arranged relatively to each other, a calibration object 203, and a controller. The first area 201 is used to set the camera 10, and the second area 202 is used to set the calibration object 203, that is, the camera 10 is set at a position opposite to the calibration object 203. A theoretical position for placing the camera 10, that is, a preset position of the camera 10, is arranged in the first area 201. The calibration object 203 in the second area 202 is an existing test drawing in an embodiment. For example, the figure on the test drawing is a plurality of concentric circles, and a mark of the center of the test drawing is marked at the center of the concentric circles.

[0058] In one embodiment, a clamp for fixing the camera 10 is provided in the first area 201 of the camera calibration platform, and the clamp can fix the camera 10. In this embodiment, the position of the camera can be adjusted by adjusting the position of the clamp. The preset position of the camera can be the position of the clamp in the initial state, or the position after the clamp is manually adjusted according to the position of the center of the test drawing, or the empirical position of the clamp after multiple tests. The second area 202 of the camera calibration platform can be a plane that can fix the test drawing, and the four corners of the test drawing are fixed on the plane of the second area 202 by dispensing glue. The first area 201 and the second area 202 are theoretically parallel, but there will be errors in the actual positions. Therefore, the above-mentioned position error of the clamp for fixing the camera 10 and the position error between the first area and the second area are factors that cause the error of the camera calibration platform. Only by removing the error of the camera calibration platform can an accurate camera calibration result be obtained.

[0059] The controller is used to obtain the coordinate information of the calibration object 203; determine the offset result of the coordinate information of the calibration object 203 relative to the preset coordinate information of the camera according to the coordinate information of the calibration object 203 and the preset coordinate information of the camera, and the offset result is used to calibrate the camera calibration platform; control the camera to take a picture of the calibration object 203 to obtain a calibration image; obtain the calibration result of the camera according to the calibration image and the offset result. The controller in this embodiment can be a host computer (PC) connected to the camera calibration platform, and can also be a main control chip set on the camera calibration platform.

[0060] In one embodiment, the preset coordinate information of the camera 10 and the coordinate information of the calibration object 203 can be measured by an existing instrument that can measure the shape and coordinates of an object, such as a coordinate measuring machine (CMM). After the preset coordinate information of the camera 10 and the coordinate information of the calibration object 203 are measured, the controller obtains the coordinate information. Since the positions of the camera 10 and the calibration object are not in the same plane, the preset coordinate information of the camera 10 and the coordinate information of the calibration object 203 measured by the coordinate measuring instrument are not in the same coordinate system. For example, The preset coordinate information is in the first coordinate system, and the coordinate information of the calibration object 203 is in the second coordinate system; therefore, before determining the offset result of the coordinate information of the calibration object 203 relative to the preset coordinate information of the camera 10, the coordinate information of the calibration object 203 and the preset coordinate information of the camera 10 must be converted to the same coordinate system; in this way, in the same coordinate system, the controller compares the coordinate information of the calibration object 203 with the preset coordinate information of the camera 10 to obtain the offset result of the coordinate information of the calibration object 203 relative to the preset coordinate information of the camera 10.

[0061] In order to convert the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system, the controller first needs to obtain the rotation and translation matrix between the two coordinate systems. This embodiment takes the conversion of the coordinate information of the calibration object 203 in the second coordinate system into the first coordinate system as an example to illustrate the coordinate conversion between the coordinate information of the calibration object and the preset coordinate information of the camera. In order to facilitate the calculation of the rotation and translation matrix from the second coordinate system to the first coordinate system, this embodiment randomly sets three first reference points in the first area and three second reference points in the second area. In specific implementation, target balls can be set in the first area and the second area as the first reference point and the second reference point respectively, wherein the distribution positions of the first reference point and the second reference point are set as close to the area edges of the first area and the second area as possible but not exceeding the area range.

[0062] Specifically, it includes: obtaining the coordinate information of three first reference points in the first coordinate system and the coordinate information of three second reference points in the second coordinate system. In this embodiment, a coordinate measuring machine (CMM) is used to collect the coordinate information of each first reference point. Since the calibration object is a plane pattern, an optical image measuring instrument (OMM) is used in this embodiment to collect the coordinate information of each second reference point and the calibration object. Specifically, the size and center coordinates of each first reference point (target ball) on the first area fixture are measured by CMM, that is, the coordinate information of the first reference point is the coordinate information of the center of the target ball, and according to the 3D design drawing of the fixture, the preset coordinate information corresponding to the theoretical position of the camera is obtained; then the size and center coordinates of each second reference point (target ball) in the second area are measured by OMM, that is, the coordinate information of the second reference point is the coordinate information of the center of the target ball, and OMM also needs to measure the position information of the calibration object in the second area, that is, the center (concentric circle center) position information of the test drawing; finally, a laser tracker is used to simultaneously measure the coordinate information of the first reference point, the second reference point, and the calibration object.

[0063] Please refer to Figure 2 , the first coordinate system is the CMM coordinate system, the second coordinate system is the OMM coordinate system, and the third coordinate system is the Laser Tracker coordinate system. In this embodiment, the coordinates of the first reference point in the Laser Tracker coordinate system (third coordinate system) are first used as the original coordinates, and the coordinates of the first reference point in the CMM coordinate system (first coordinate system) are first used as the new coordinates, and the 7-parameter least squares method is used to obtain the rotation and translation matrix from the Laser Tracker coordinate system (third coordinate system) to the CMM coordinate system (first coordinate system), which is the first rotation and translation matrix. Then, according to the first rotation and translation matrix, the coordinate information of the second reference point in the Laser Tracker coordinate system (third coordinate system) is converted to the CMM coordinate system (first coordinate system), that is, the coordinate information of the second reference point in the CMM coordinate system (first coordinate system) is obtained; then the coordinate information of the second reference point in the OMM coordinate system (second coordinate system) is used as the original coordinate, and the coordinate information of the second reference point in the CMM coordinate system (first coordinate system) is used as the new coordinate, and the rotation and translation matrix from the OMM coordinate system (second coordinate system) to the CMM coordinate system (first coordinate system) is obtained, that is, the second rotation and translation matrix. Finally, according to the second rotation and translation matrix, the coordinate information of the calibration object (test drawing) in the OMM coordinate system (second coordinate system) is converted to the CMM coordinate system (first coordinate system). Since the CMM has previously obtained the preset position information of the camera in the CMM coordinate system (first coordinate system), the preset position coordinate information of the camera and the coordinate information of the calibration object belong to the first coordinate system at this time, and the next step of coordinate comparison can be carried out. It should be noted that, in this embodiment, the coordinate information of the camera, the calibration object, the first reference point, and the second reference point are all three-dimensional coordinate information.

[0064] In this embodiment, the preset position coordinate information of the camera and the coordinate information of the calibration object are compared in the first coordinate system, and the offset, rotation amount and inclination angle of the X direction, Y direction and Z direction of the theoretical position of the camera and the position of the calibration object in the first coordinate system can be obtained. The offset, inclination angle and rotation amount are the offset results of the camera calibration platform.

[0065] The controller controls the camera to capture images of the calibration object, and inputs the captured images into the existing calibration algorithm to calculate the offset, rotation, and tilt angles in the X, Y, and Y directions between the camera center and the calibration object center (test chart center). The offset result of the camera calibration platform is removed to obtain the actual calibration result of the camera. Based on the calibration result, the calibration chart in the camera test equipment that performs performance testing on the camera can be calibrated later.

[0066] According to the above analysis, in this embodiment, an external coordinate measuring instrument is introduced to determine the coordinate information of the calibration object 203 and the preset coordinate information of the camera 10, and a reference point is introduced on the calibration platform to obtain the coordinate rotation and translation matrix of the coordinate system of the calibration object 203 and the coordinate system of the camera 10. The coordinate information of the calibration object and the preset coordinate information of the camera are converted to the same coordinate system according to the coordinate rotation and translation matrix. According to the theoretical situation, in the same coordinate system, the center of the calibration object should coincide with the center of the camera head in the camera. After comparison according to the benchmark, the offset result obtained is the offset result of the camera calibration platform. The image containing the calibration object obtained by taking a photo with the camera is calibrated to obtain the offset result after image calibration. The offset result after image calibration minus the offset result of the camera calibration platform is the calibration result of the camera.

[0067] In this embodiment, before calibrating the camera, the camera head needs to be focused and aligned. The process of focusing and aligning the camera is performed on an existing focusing and aligning device, which cannot adjust the rotation amount and the offset in the Z direction of the camera. The focusing and aligning includes the following steps:

[0068] The controller controls the camera to capture an image of a calibration object set on the focusing and alignment device; based on the image, the offset between the camera center of the camera and the center of the calibration object in the X direction and the Y direction is calculated, and the offset of the camera in the camera in the X direction and the Y direction is adjusted according to the offset to complete the focusing and alignment of the camera.

[0069] Embodiment 2:

[0070] Please refer to Figure 3 , Figure 33 is a structural block diagram of a camera calibration device of an embodiment, comprising: a camera 301, an image processing chip 302, a processor 303 and a USB interface 304. The camera calibration device in this embodiment is arranged in the first area 201 on the camera calibration platform provided in the first embodiment, and can be fixed by a clamp in the first area 201.

[0071] Among them, the camera 301 is used to shoot a calibration image, and the calibration image is an image containing a calibration object. The calibration object in this embodiment is set in the second area of ​​the camera calibration platform provided in Example 1. The camera 301 in this embodiment includes a camera lens 3011 and a lens holder 3012, wherein the camera lens can be an existing lens. The camera in this embodiment supports USB driver, without the need to install any additional driver, or MIPI communication or other communication modules, with more than 13 million pixels (selected according to accuracy requirements), meeting the camera lens distortion of <1%, adjustable focal length, and the lens holder can be fine-tuned in X, Y, Z directions and rotation after the lens is installed.

[0072] The image processing chip 302 is used to perform image processing on the calibration image captured by the camera, and input the processed image into the processor.

[0073] The processor 303 is used to obtain the coordinate information of the calibration object and the preset coordinate information of the camera; according to the coordinate information of the calibration object and the preset coordinate information of the camera, determine the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, wherein the offset result is used to calibrate the calibration platform; control the camera to take a picture of the calibration object to obtain a calibration image; according to the calibration image and the offset result, obtain the calibration result of the camera. The processor obtains the coordinate information of the calibration object and the preset coordinate information of the camera by the existing external coordinate measuring instrument, wherein the coordinate information of the calibration object is the coordinate information of the center of the calibration object, and the preset coordinate information of the camera is the preset coordinate information of the center of the camera. The processor in this embodiment can be a computing chip with storage and communication functions and capable of executing the above method, such as a Raspberry Pi chip. The specific implementation of the method executed by the processor has been described in detail in Example 1, and will not be repeated in this embodiment.

[0074] The USB interface 304 is used to communicate with the host computer. The camera calibration device provided in this embodiment also includes a communication line 305, which is used to connect the image processing chip and the processor to realize the transmission of image data. Figure 4 , Figure 4 A structural diagram of a camera calibration device according to an embodiment.

[0075] After completing the calibration of the camera calibration device, this embodiment also places the calibrated camera calibration device into a verification device (similar in appearance to the camera calibration platform) to verify consistency and repeatability. The fixture and test chart in the verification device do not need to be calibrated, but they cannot be moved during verification. The same or several different camera calibration devices are placed in the fixture for repeated testing 3-10 times. The software records the camera X offset, Y offset, Z offset and rotation, as well as the tilt angles in the X and Y directions, and performs repeatability and reproducibility calculations on the data of all camera calibration devices tested. The camera calibration device that meets the preset accuracy range can be used as a standard camera calibration device.

[0076] In addition, after the camera calibration device provided in this embodiment completes the calibration of the camera, it can be used in various camera testing devices such as smart phones, tablet computers, smart mobile wearable terminals, etc., and the external dimensions of the camera calibration device can be adjusted according to different devices to suit the calibration of different test devices.

[0077] Embodiment three:

[0078] Please refer to Figure 5 , Figure 5 The flowchart of a camera calibration method applied to a camera calibration platform in one embodiment is shown. The camera calibration platform in this embodiment includes a camera and a calibration object. It should be noted that the camera in this embodiment can be a separate camera or the camera calibration device provided in the second embodiment. In one implementation manner, when the camera is an ordinary camera, the method includes the following steps:

[0079] S101, the controller obtains the coordinate information of the calibration object and the preset coordinate information of the camera; wherein the calibration object is a drawing set on the calibration platform for calibrating the camera, and the drawing is drawn with a graphic with a logo, such as concentric circles or black and white squares. In this embodiment, the preset coordinate information of the camera is the coordinate information of the theoretical position of the camera. Under ideal conditions, the actual position of the camera coincides with the theoretical position, but in actual operation, there will always be an error between the theoretical position and the actual position. In this embodiment, the coordinate information of the position of the calibration object and the theoretical position of the camera is measured by an existing displacement measuring instrument, such as a displacement measuring machine, etc. The controller obtains the preset coordinate information of the calibration object and the theoretical position of the camera from the existing displacement measuring instrument, and performs coordinate conversion on the coordinate information of the two, so that the position information of the calibration object and the preset position information of the camera are in the same coordinate system. This method has been described in detail in Example 1 and will not be repeated here.

[0080] S102: According to the coordinate information of the calibration object and the preset coordinate information of the camera, the controller determines an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, wherein the offset result is used to calibrate the calibration platform.

[0081] After the controller converts the coordinate information of the calibration object and the preset coordinate information of the camera to the same coordinate system, under standard conditions, the position of the center of the calibration object in the same coordinate system should coincide with the theoretical center position of the camera. Under this benchmark, the coordinate information of the center of the calibration object and the coordinate information of the theoretical center position of the camera are compared to obtain a comparison result, which is the offset result of the camera calibration platform. In one embodiment, the controller can calibrate the camera calibration platform according to the offset result of the camera calibration platform to calibrate the camera calibration platform as a standard camera calibration platform, and then calibrate the camera on the standard camera calibration platform. In another embodiment, in order to reduce the workload of the controller, this embodiment can also perform the following steps:

[0082] S103, the controller controls the camera to take a picture of the calibration object to obtain a calibration image; the calibration image is transmitted to the controller through a communication line connected to the camera. In one embodiment, if the controller is a host computer, the calibration image is uploaded to the host computer through serial communication, USB communication, socket communication, etc.; in another embodiment, if the controller is a processor chip, the calibration image is uploaded to the processor chip through a data line, etc.

[0083] S104, the controller obtains the calibration result of the camera according to the calibration image and the offset result. The controller inputs the calibration image into the existing calibration algorithm to obtain the offset result between the center of the calibration image and the center of the calibration object, and subtracts the offset result of the camera calibration platform from the offset result to obtain the calibration result of the camera.

[0084] In another specific implementation, if the camera is a camera calibration device, please refer to Figure 6 , Figure 6 In another embodiment, a camera calibration method includes the following steps:

[0085] S201, the processor in the camera calibration device obtains the coordinate information of the calibration object and the preset coordinate information of the camera. In this embodiment, the preset position information of the camera is the coordinate information of the theoretical position of the camera when the camera calibration device is fixed on the fixture of the camera calibration platform.

[0086] S202, based on the coordinate information of the calibration object and the preset coordinate information of the camera, the processor determines the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, wherein the offset result is used to calibrate the calibration platform. The external displacement measuring instrument transmits the coordinate information of the calibration object and the preset coordinate information of the camera to the processor of the camera calibration device through a USB interface or other communication interface.

[0087] S203, the processor controls the camera to take a picture of the calibration object to obtain a calibration image; in this embodiment, the processor controls the camera to start, power on and take pictures, and the camera takes pictures and then transmits the pictures to the processor through the communication line.

[0088] S204: The processor obtains a calibration result of the camera calibration device according to the calibration image and the offset result.

[0089] Those skilled in the art will appreciate that all or part of the functions of the various methods in the above-mentioned embodiments can be implemented by hardware or by computer programs. When all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can be stored in a computer-readable storage medium, and the storage medium can include: read-only memory, random access memory, disk, optical disk, hard disk, etc., and the program is executed by a computer to implement the above-mentioned functions. For example, the program is stored in the memory of the device, and when the program in the memory is executed by the processor, all or part of the above-mentioned functions can be implemented. In addition, when all or part of the functions in the above-mentioned embodiments are implemented by computer programs, the program can also be stored in a storage medium such as a server, another computer, disk, optical disk, flash disk or mobile hard disk, and can be downloaded or copied and saved in the memory of the local device, or the system of the local device is updated, and when the program in the memory is executed by the processor, all or part of the functions in the above-mentioned embodiments can be implemented.

[0090] The above specific examples are used to illustrate the present invention, which is only used to help understand the present invention and is not intended to limit the present invention. For those skilled in the art, according to the concept of the present invention, some simple deductions, modifications or substitutions can be made.

Claims

1. A camera calibration method, applied to a camera calibration platform, characterized in that: The camera calibration platform includes a camera and a calibration object; the method includes: Acquire the coordinate information of the calibration object and the preset coordinate information of the camera; Determine, according to the coordinate information of the calibration object and the preset coordinate information of the camera, an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, wherein the offset result is used to calibrate the camera calibration platform; Controlling the camera to take a picture of the calibration object to obtain a calibration image; Obtaining a calibration result of the camera according to the calibration image and the offset result; Wherein, obtaining the calibration result of the camera according to the calibration image and the offset result includes: Obtaining, according to the calibration image, an offset result of the center of the calibration image relative to the center of the calibration object in the calibration image; The camera calibration result is obtained according to the offset result of the calibration image center relative to the center of the calibration object in the calibration image and the offset result of the camera calibration platform.

2. The camera calibration method according to claim 1, characterized in that: The step of determining the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera includes: Convert the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system; In the same coordinate system, the coordinate information of the calibration object and the preset coordinate information of the camera are compared to obtain an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera.

3. The camera calibration method according to claim 1, wherein: Before controlling the camera to take a photo of the calibration object, the method further includes: Focus and align the camera.

4. A camera calibration platform, characterized in that: include: Calibration object; A controller, used to obtain coordinate information of the calibration object; According to the coordinate information of the calibration object and the preset coordinate information of the camera, determining the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, wherein the offset result is used to calibrate the camera calibration platform; controlling the camera to take a picture of the calibration object to obtain a calibration image; Obtaining a calibration result of the camera according to the calibration image and the offset result; The controller obtains the calibration result of the camera according to the calibration image and the offset result, including: Obtaining, according to the calibration image, an offset result of the center of the calibration image relative to the center of the calibration object in the calibration image; The camera calibration result is obtained according to the offset result of the calibration image center relative to the center of the calibration object in the calibration image and the offset result of the camera calibration platform.

5. The camera calibration platform according to claim 4, characterized in that: The preset coordinate information of the camera is in a first coordinate system, and the coordinate information of the calibration object is in a second coordinate system; The controller determines the offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera, including: Convert the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system; In the same coordinate system, the coordinate information of the calibration object and the preset coordinate information of the camera are compared to obtain an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera.

6. The camera calibration platform according to claim 5, characterized in that: Also includes: A first area and a second area are arranged relatively to each other, the first area is used to set a camera, the second area is used to set a calibration object, and at least three first reference points are arranged in the first area and at least three second reference points are arranged in the second area; The controller converts the coordinate information of the calibration object and the preset coordinate information of the camera into the same coordinate system, including: Obtaining coordinate information of a first reference point in a first coordinate system; Obtaining coordinate information of a second reference point in a second coordinate system; Acquire coordinate information of a first reference point and a second reference point in a third coordinate system; the origin positions of the first coordinate system, the second coordinate system and the third coordinate system are different; Obtaining a first rotation and translation matrix for converting the third coordinate system to the first coordinate system according to coordinate information of the first reference point in the first coordinate system and the third coordinate system; According to the first rotation and translation matrix, the coordinate information of the second reference point in the third coordinate system is converted to the first coordinate system to obtain the coordinate information of the second reference point in the first coordinate system; Obtaining a second rotation and translation matrix for converting the second coordinate system to the first coordinate system according to coordinate information of the second reference point in the first coordinate system and the second coordinate system; According to the second rotation and translation matrix, the coordinate information of the calibration object in the second coordinate system is converted to the first coordinate system to obtain the position information of the calibration object in the first coordinate system.

7. The camera calibration platform according to claim 6, characterized in that: The controller obtains the coordinate information of the first reference point in the first coordinate system through a coordinate measuring machine; the controller obtains the coordinate information of the second reference point in the second coordinate system through an optical image measuring instrument; the controller obtains the coordinate information of the first reference point and the second reference point in the third coordinate system through a laser tracker.

8. A camera calibration device, characterized in that: include: A camera, used to capture calibration images; An image processing chip, used for processing the calibration image; A processor, configured to obtain coordinate information of a calibration object and preset coordinate information of a camera; determine an offset result of the coordinate information of the calibration object relative to the preset coordinate information of the camera according to the coordinate information of the calibration object and the preset coordinate information of the camera; and control the camera to take a picture of the calibration object to obtain a calibration image; Obtaining a calibration result of the camera calibration device according to the calibration image and the offset result; The camera calibration device is a camera; USB interface, used to communicate with the host computer; Wherein, obtaining the calibration result of the camera according to the calibration image and the offset result includes: Obtaining, according to the calibration image, an offset result of the center of the calibration image relative to the center of the calibration object in the calibration image; The camera calibration result is obtained according to the offset result of the calibration image center relative to the center of the calibration object in the calibration image and the offset result of the camera calibration platform.

Citation Information

Patent Citations

  • High-precision motion platform-based multi-camera calibration method

    CN106097300A

  • A hand-eye camera calibration method and device

    CN109671122A