Automatic calibration method and system for multiple cameras
By displaying and controlling the calibration diagrams taken by multiple cameras on the calibration screen, automatic and rapid calibration of multiple cameras is realized, which solves the problems of long calibration time, low accuracy and manual participation in the existing technology, and improves calibration efficiency and accuracy. .
Patent Information
- Application Number
- CN202010888109.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-08-28
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2040-08-28
AI Technical Summary
The automated rapid calibration system for multiple cameras in the existing technology has not yet been implemented. Calibration takes a long time, and the low contrast and curved surface of the checkerboard cause loss of accuracy. Rotation and translation images cannot be automatically generated, and manual participation in rotation and translation is impossible. Automatically capture and save.
By displaying the calibration map on the calibration screen, using multiple cameras to shoot and displaying control instructions to rotate and translate the images until a preset number is reached, the calibration is automatically performed to ensure that the camera position is fixed, and a calibration screen with a flat surface is used to improve accuracy.
It realizes the automatic generation, automatic rotation and translation of the calibration chart, shortens the calibration time, ensures the simultaneous shooting of multiple cameras and automatic saving of pictures, improves the calibration accuracy and stability, avoids camera shaking, and uses a calibration screen with a flat surface. This ensures distortion-free and high-contrast checkerboard patterns.
Smart Images

Figure CN112102416B
Abstract
Description
Technical Field
[0001] The present invention relates to the field of machine vision technology, and in particular to an automatic calibration method and system for multiple cameras. Background Art
[0002] In the prior art, an automatic calibration system consisting of two freely movable parallel plates is introduced. The hardware consists of two upper and lower parallel glass plates with adjustable heights. The upper glass plate is freely movable and there is a chessboard calibration map in the middle; the lower glass plate is fixed, and a camera is placed on the lower glass plate to shoot the movable upper glass plate calibration map to complete the calibration.
[0003] A high-precision automated calibration plate and calibration method are introduced in the prior art. The first side is provided with a black and white checkerboard pattern. The white checkerboard represents binary information or is used for feature recognition by drawing simple graphics or blanks inside. The black and white checkerboards are arranged alternately for coordinate calibration. A high-precision automated calibration method is provided, which disperses the QR code information into the white squares of the checkerboard, retains the high-density coordinates of the checkerboard, and independent sub-chessboards can independently establish world coordinates, providing a denser checkerboard array and improving the calibration accuracy.
[0004] In the prior art, a printed or factory-made calibration plate is used. Due to problems with the manufacturing process, the calibration accuracy is impaired due to the different sizes of the checkerboard or the bending of the calibration plate surface. The calibration plate with paper-printed checkerboard or PET material has a curved surface, too low contrast, and reflective surface, which impairs the accuracy of the calibration plate checkerboard.
[0005] Although the above calibration methods have their own characteristics, there is no system specifically used for automated rapid calibration of multiple cameras. Calibration usually requires taking at least one calibration image, and each image requires moving and rotating the calibration plate, which takes a long time and requires the participation of calibration personnel. If one of the multiple cameras shakes, multiple cameras need to be recalibrated. The calibration image cannot be automatically generated and automatically rotated and translated on the calibration screen. Multiple cameras cannot automatically take pictures after the calibration image is transformed, and the pictures taken cannot be automatically saved. When using a calibration plate or a paper-printed checkerboard, the accuracy of the calibration plate checkerboard is impaired. Summary of the invention
[0006] In order to overcome the shortcomings of the prior art, the present invention provides an automatic calibration method and system for multiple cameras. The specific technical solution is as follows:
[0007] An automatic calibration method for multiple cameras comprises the following steps:
[0008] S1: Initialize settings for multiple cameras;
[0009] S2: displaying a calibration image on a calibration screen, and photographing the calibration image using a plurality of cameras;
[0010] S3: by displaying a control instruction, causing the calibration image on the calibration screen to produce a rotation and / or translation effect, and using the multiple cameras to photograph the calibration image again; the positions of the multiple cameras and the calibration screen remain fixed;
[0011] S4: repeat step S3 to obtain more pictures;
[0012] S5: Check whether the number of pictures reaches a preset threshold. If the detection result is no, return to step S4. If the judgment result is yes, execute step S6.
[0013] S6: Calibrate the multiple cameras using the obtained images.
[0014] In a specific embodiment, the step of “causing the calibration image on the calibration screen to produce a rotation and / or translation effect, and using a plurality of cameras to photograph the calibration image again” in S3 includes:
[0015] photographing the calibration image by using a plurality of cameras to obtain a plurality of images;
[0016] The pictures are stored, and the stored calibration diagram can be automatically generated on the calibration screen. The calibration diagram can calibrate the multiple cameras by rotation and / or translation.
[0017] In a specific embodiment, the step of “causing the calibration image on the calibration screen to produce a rotation and / or translation effect, and using a plurality of cameras to photograph the calibration image again” in S3 includes:
[0018] Before and after the calibration image is rotated and / or translated, the size of the calibration image on the calibration screen remains unchanged.
[0019] In a specific embodiment, the positions of the plurality of cameras and the calibration map remain fixed.
[0020] In a specific embodiment, the plurality of cameras are arranged at preset positions so that the plurality of cameras can capture the entire display area of the calibration screen.
[0021] In a specific embodiment, the calibration image is in the shape of a rectangle, and the calibration image includes a plurality of checkerboard grids.
[0022] In a specific embodiment, the chessboard is in the shape of a square; and the colors of two adjacent chessboards in the calibration image are different.
[0023] In a specific embodiment, an automatic calibration system for multiple cameras includes a camera fixing frame, multiple cameras and a calibration screen, wherein the camera fixing frame includes at least one supporting structure, the multiple cameras are fixed on the supporting structure, the calibration screen is fixed at a preset position, the multiple cameras face the calibration screen to shoot a calibration image on the calibration screen, and also includes a control module, wherein the control module includes:
[0024] An initialization unit, used for initializing settings of multiple cameras;
[0025] A shooting control unit, used to display a calibration image on a calibration screen, use a plurality of the cameras to shoot the calibration image, and through display control instructions, make the calibration image on the calibration screen produce a rotation and / or translation effect, use a plurality of the cameras to shoot the calibration image again, and repeat this process to obtain more images, until the number of detection images reaches a preset threshold;
[0026] A calibration unit is used to calibrate the multiple cameras using the acquired pictures.
[0027] In a specific embodiment, the calibration screen includes a flat panel display.
[0028] In a specific embodiment, the calibration screen is connected to a preset computer host to display different calibration diagrams in sequence under the control of the computer host.
[0029] The present invention has at least the following beneficial effects:
[0030] The calibration map can be automatically generated and rotated and / or translated on the calibration screen. The calibrator can control the start of calibration in front of the computer and observe the entire calibration process. The calibrator does not need to participate in the rotation and / or translation of the calibration screen. Multiple cameras can automatically and synchronously shoot the calibration map after the calibration map is transformed, and the captured images are automatically saved. The program can be run once to complete the calibration map shooting of multiple cameras. The position of the camera is fixed on the supporting structure, and there will be no shaking that affects the calibration of multiple cameras. The use of a calibration screen with a completely flat surface can ensure that the checkerboard is distortion-free and has high contrast.
[0031] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0032] In order to more clearly illustrate the technical solution of the present invention, the drawings required for use in the embodiments are briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0033] Figure 1 is a schematic diagram of the automatic calibration method of multiple cameras in Example 1;
[0034] Figure 2 is a schematic diagram of an automatic calibration system for multiple cameras in Example 1;
[0035] Figure 3 Schematic diagram of the automatic calibration system for multiple cameras in Example 2 in another state.
[0036] Description of main component symbols:
[0037] 1-Support structure; 2-Calibration screen; 3-Calibration diagram; 4-Camera. DETAILED DESCRIPTION
[0038] Example 1
[0039] like Figure 1-2 As shown, this embodiment provides an automatic calibration method and system for multiple cameras, and the specific technical solution is as follows:
[0040] An automatic calibration method for multiple cameras comprises the following steps:
[0041] S1: Initialize the settings of multiple cameras 4;
[0042] S2: Display calibration on calibration screen 2 Figure 3 , using multiple cameras 4 to shoot the calibration Figure 3 ;
[0043] S3: Through the display control command, the calibration on the calibration screen 2 Figure 3 To generate rotation and / or translation effects, use multiple cameras 4 to re-shoot calibration Figure 3 ;
[0044] S4: repeat step S3 to obtain more pictures;
[0045] S5: Check whether the number of pictures reaches a preset threshold. If the detection result is no, return to step S4. If the judgment result is yes, execute step S6.
[0046] S6: Calibrate multiple cameras 4 using the obtained images.
[0047] First, multiple cameras 4 and the calibration screen 2 are fixed in position, and the calibration screen 2 is connected to a preset computer host, and then the calibration screen 2 is controlled to generate a calibration image. Figure 3 , and then control multiple cameras 4 to simultaneously shoot this calibration Figure 3 After shooting, set the calibration on the calibration screen 2 Figure 3 Perform rotation and / or translation to control multiple cameras 4 to capture the next set of calibrations Figure 3 , and repeat this process until the shooting is completed.
[0048] The entire calibration process can be completed within 30 seconds. Compared with manually moving the calibration plate, which takes at least 10 minutes, this embodiment can shorten the calibration time; compared with moving the calibration plate by a mechanical arm, robot or mechanical structure, this embodiment is more stable and less likely to shake.
[0049] Preferably, multiple cameras 4 and calibration Figure 3 The position remains fixed.
[0050] Preferably, the calibration screen 2 is connected to a preset computer host to sequentially display different calibrations under the control of the computer host. Figure 3 .
[0051] Preferably, the multiple cameras 4 are initialized, and a script is written in Python combined with OpenCV to control the opening of the multiple cameras 4. The multiple cameras 4 are automatically initialized and configured internally. The script needs to wait for a few seconds until the internal initialization of the multiple cameras 4 is completed. The multiple cameras 4 are set to a resolution of 640*480 and a frame rate of 30FPS.
[0052] Preferably, calibration Figure 3 The shape is a rectangle, Figure 3 It includes multiple chessboards. The shape of the chessboard is square. Figure 3 The colors of two adjacent chessboard squares are different.
[0053] Use Python combined with OpenCV to write a script to calibrate the checkerboard display of screen 2, and control the calibration of the appropriate size to be displayed on the calibration screen 2 Figure 3 After the multiple cameras 4 shoot, the chessboard is rotated and / or translated. The number of points and the specific size of the chessboard are determined by the actual size. Here, a chessboard with 7*4 points and a grid size of 28mm*28mm is used.
[0054] Preferably, S3 "enables the calibration on the calibration screen 2 Figure 3 To generate rotation and / or translation effects, use multiple cameras 4 to re-shoot calibration Figure 3 "include:
[0055] Calibration by multiple cameras Figure 3 Take pictures and get multiple pictures;
[0056] The images are stored and multiple cameras 4 are calibrated using the stored images. A script is written using Python combined with OpenCV to control multiple cameras 4 to simultaneously shoot the checkerboard on the calibration screen 2. After each change of the checkerboard on the calibration screen 2, multiple cameras 4 are used to simultaneously shoot the checkerboard and store it. Calibration after storage Figure 3 Can be automatically generated on the calibration screen 2, calibration Figure 3 The multiple cameras 4 can be calibrated by rotation and / or translation.
[0057] Preferably, the camera synchronous shooting module is written in Python combined with OpenCV, but if control software or language is used, it also falls within the protection scope of the present invention.
[0058] like Figure 2 As shown, this embodiment provides an automatic calibration system for multiple cameras 4, including a camera fixing frame, multiple cameras 4 and a calibration screen 2, the camera fixing frame includes at least one supporting structure 1, the multiple cameras 4 are fixed on the supporting structure 1, and the multiple cameras 4 face the calibration screen 2 to shoot the calibration on the calibration screen. Figure 3 , further comprising a control module, the control module comprising:
[0059] An initialization unit, used for initializing the multiple cameras 4;
[0060] Shooting control unit, used to display the calibration on the calibration screen 2 Figure 3 , using multiple cameras 4 to shoot calibration Figure 3 , through the display control command, the calibration on the calibration screen 2 Figure 3 Produce a rotation and / or translation effect, use multiple cameras 4 to take the calibration image again, and repeat this cycle to obtain a larger number of images until the number of detection images reaches a preset threshold;
[0061] The calibration unit is used to calibrate the multiple cameras 4 using the acquired pictures.
[0062] The multiple cameras 4 are arranged at preset positions so that the multiple cameras 4 can capture the entire display area of the calibration screen 2 .
[0063] The supporting structure 1 of the camera fixing frame has a size of 1m*1m*1m and is made of aluminum alloy. It is used to fix multiple cameras 4 and has a stable structure, which is convenient for camera installation.
[0064] The calibration screen 2 is an advertising machine with a flat back, an RGB color screen, a size of 32 inches, a length of 0.73m, a width of 0.43m, and a height of 0.05m. It can directly display the computer screen and has an HDMI interface. The checkerboard is directly displayed on the calibration screen 2.
[0065] Preferably, the calibration screen 2 includes a flat panel display, and the calibration screen 2 and its installation and fixation specifically adopt a flat panel advertising machine, but if other types of flat panel display devices are adopted, they also fall within the protection scope of the present invention.
[0066] The calibration screen with a completely flat surface is used with high precision to ensure that the chessboard is completely distortion-free and has high contrast.
[0067] The installation and fixation of the calibration screen 2 is to place the calibration screen 2 on the ground to ensure that the calibration image projected on the calibration screen 2 Figure 3 It can be completely captured by multiple cameras 4 at the same time.
[0068] The frame rate of the multiple cameras 4 supports 60FPS, the resolution supports 1920*1080, and the interface is USB3.0. The multiple cameras 4 are tilted downward and face the calibration screen 2.
[0069] Preferably, the multiple cameras 4 and their installation and fixation specifically adopt a 4-camera solution, and the four cameras shoot synchronously, which is more efficient, and the calibration map shooting of the four cameras can be completed by running the program once. However, if other numbers of cameras are used, it also falls within the protection scope of the present invention.
[0070] Example 2
[0071] like Figure 3 As shown, this embodiment provides an automatic calibration method and system for multiple cameras. Compared with Embodiment 1, the main differences of this embodiment are:
[0072] In particular, S3 "enables the calibration on the calibration screen 2 Figure 3 To generate rotation and / or translation effects, use multiple cameras 4 to re-shoot calibration Figure 3 "include:
[0073] Calibration Figure 3 Before and after rotation and / or translation, calibration Figure 3 The size of the calibration screen 2 remains unchanged.
[0074] The other features of this embodiment are the same as those of Embodiment 1 and will not be described in detail.
[0075] Those skilled in the art will appreciate that the accompanying drawings are merely schematic diagrams of a preferred implementation scenario, and the modules or processes in the accompanying drawings are not necessarily required for implementing the present invention.
[0076] Those skilled in the art will appreciate that the modules in the device in the implementation scenario can be distributed in the device in the implementation scenario according to the implementation scenario description, or can be changed accordingly and located in one or more devices different from the implementation scenario. The modules in the above implementation scenario can be combined into one module, or can be further split into multiple sub-modules.
[0077] The above serial numbers of the present invention are only for description and do not represent the advantages or disadvantages of the implementation scenarios.
[0078] The above disclosure is only a few specific implementation scenarios of the present invention, but the present invention is not limited thereto, and any changes that can be conceived by those skilled in the art should fall within the protection scope of the present invention.
Claims
1. An automatic calibration method for multiple cameras, characterized in that: The following steps are involved: S1: Initialize settings for multiple cameras; S2: displaying a calibration image on a calibration screen, and photographing the calibration image using a plurality of cameras; S3: by displaying a control instruction, the calibration image on the calibration screen is rotated and / or translated, and the calibration image is photographed again using the multiple cameras; the positions of the multiple cameras and the calibration screen are kept fixed; the multiple cameras are set at preset positions so that the multiple cameras can photograph the entire display area of the calibration screen; S4: repeat step S3 to obtain more pictures; S5: Check whether the number of pictures reaches a preset threshold. If the detection result is no, return to step S4. If the judgment result is yes, execute step S6. S6: Calibrate the multiple cameras using the obtained images; The step of causing the calibration image on the calibration screen to produce a rotation and / or translation effect and using the plurality of cameras to photograph the calibration image again in S3 includes: photographing the calibration image by using a plurality of cameras to obtain a plurality of images; The pictures are stored, and the stored calibration diagram can be automatically generated on the calibration screen. The calibration diagram can calibrate the multiple cameras by rotation and / or translation.
2. The automatic calibration method for multiple cameras according to claim 1, characterized in that: S3 causing the calibration image on the calibration screen to produce a rotation and / or translation effect, and using the multiple cameras to photograph the calibration image again comprises: Before and after the calibration image is rotated and / or translated, the size of the calibration image on the calibration screen remains unchanged.
3. The automatic calibration method for multiple cameras according to claim 1, characterized in that: The positions of the multiple cameras and the calibration map remain fixed.
4. The automatic calibration method for multiple cameras according to claim 1, characterized in that: The calibration diagram is in the shape of a rectangle and includes a plurality of checkerboard grids.
5. The automatic calibration method for multiple cameras according to claim 4, characterized in that: The chessboard is in the shape of a square; and the colors of two adjacent chessboards in the calibration image are different.
6. An automatic calibration system for multiple cameras, characterized in that: The device comprises a camera fixing frame, a plurality of cameras and a calibration screen, wherein the camera fixing frame comprises at least one supporting structure, the plurality of cameras are fixed on the supporting structure, the positions of the plurality of cameras and the calibration screen are kept fixed, the plurality of cameras face the calibration screen and are used to shoot the calibration image on the calibration screen, and the plurality of cameras are arranged at preset positions so that the plurality of cameras can shoot the entire display area of the calibration screen; Also included is a control module, the control module comprising: An initialization unit, used for initializing settings of multiple cameras; A shooting control unit, used for displaying a calibration diagram on a calibration screen, using a plurality of the cameras to shoot the calibration diagram, causing the calibration diagram on the calibration screen to produce a rotation and / or translation effect by displaying control instructions, using a plurality of the cameras to shoot the calibration diagram again, and repeating this cycle to obtain a greater number of pictures until the number of detected pictures reaches a preset threshold; causing the calibration diagram on the calibration screen to produce a rotation and / or translation effect, and using a plurality of cameras to shoot the calibration diagram again comprises: shooting the calibration diagram with a plurality of the cameras to obtain a plurality of pictures; storing the pictures, and the stored calibration diagram can be automatically generated on the calibration screen, and the calibration diagram can calibrate a plurality of cameras by rotation and / or translation; A calibration unit is used to calibrate the multiple cameras using the acquired pictures.
7. The automatic calibration system for multiple cameras according to claim 6, characterized in that: The calibration screen includes a flat panel display.
8. The automatic calibration system for multiple cameras according to claim 6, characterized in that: The calibration screen is connected to a preset computer host to display different calibration diagrams in sequence under the control of the computer host.
Citation Information
Patent Citations
Multifunctional camera calibration method and device based on optical projector
CN104376560A
High-precision motion platform-based multi-camera calibration method
CN106097300A
High-precision calibration method for stereoscopic vision three-dimensional digital image correlation measurement
CN106352806A
Calibration method and calibration system of multiple cameras, storage medium and electronic device
CN108717714A
Camera multifunctional calibration device based on optical projector
CN204303031U
