WO2022143283A1 - Camera calibration method and apparatus, and computer device and storage medium - Google Patents

Camera calibration method and apparatus, and computer device and storage medium Download PDF

Info

Publication number
WO2022143283A1
WO2022143283A1 PCT/CN2021/139944 CN2021139944W WO2022143283A1 WO 2022143283 A1 WO2022143283 A1 WO 2022143283A1 CN 2021139944 W CN2021139944 W CN 2021139944W WO 2022143283 A1 WO2022143283 A1 WO 2022143283A1
Authority
WO
WIPO (PCT)
Prior art keywords
calibration
target
initial
camera
image
Prior art date
Application number
PCT/CN2021/139944
Other languages
French (fr)
Chinese (zh)
Inventor
杨勇
吴泽晓
曾浩宇
Original Assignee
深圳市杉川机器人有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳市杉川机器人有限公司 filed Critical 深圳市杉川机器人有限公司
Publication of WO2022143283A1 publication Critical patent/WO2022143283A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras

Definitions

  • the present application relates to the technical field of camera calibration, and in particular, to a camera calibration method, device, computer equipment and storage medium.
  • the parameters in M are the camera parameters. Usually, these parameters are obtained through experiments and calculations. This process of solving parameters is called camera calibration.
  • the camera calibration method in the traditional technology needs to use the camera to be calibrated to take pictures of the calibration board at various angles. Each time you shoot, you need to manually adjust the placement and angle of the calibration board to ensure that the calibration board image captured by the camera can cover all direction.
  • the present application proposes a camera calibration method, device, computer equipment and storage medium to improve the camera calibration efficiency.
  • the present application proposes a camera calibration method, the method includes: acquiring an initial image collected by a camera to be calibrated; the initial image shooting a plurality of non-overlapping calibration plates by the to-be-calibrated camera obtained, and a separation mark is set between the plurality of calibration plates; the initial image is separated according to the separation mark, and the target image unit corresponding to each of the calibration plates is obtained; the target image The unit contains all the calibration information in the corresponding calibration board; the calibration information in each of the target image units is detected respectively, and based on the detection results, the calibration information of each of the target image units is selected from the calibration information that meets the calibration conditions. target calibration information; the camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
  • the calibration plates in the initial image are presented at different angles and positions, and at the same time, in order to Multiple calibration plates are used to distinguish, and a separation mark is also set.
  • separating the logos multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting.
  • the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated.
  • the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
  • the present application proposes a camera calibration device, the device includes: acquiring an initial image collected by a camera to be calibrated; the initial image is captured by the camera to be calibrated on a plurality of non-overlapping calibration plates obtained, and a separation mark is set between the plurality of calibration plates; the initial image is separated according to the separation mark, and the target image unit corresponding to each of the calibration plates is obtained; the target image The unit contains all the calibration information in the corresponding calibration board; the calibration information in each of the target image units is detected respectively, and based on the detection results, the calibration information of each of the target image units is selected from the calibration information that meets the calibration conditions. target calibration information; the camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
  • the calibration plates in the initial image are presented at different angles and positions. Multiple calibration plates are used to distinguish, and a separation mark is also set.
  • separating the logos multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions.
  • the process of shooting is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated.
  • the above scheme first performs feature point detection on the picture of the calibration board before calibration, which reduces the error points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
  • the present application proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor implements the following steps: acquiring the initial data collected by the camera to be calibrated image; the initial image is obtained by shooting a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates; the initial image is recorded according to the separation mark Perform separation processing to obtain target image units corresponding to each of the calibration plates; the target image units contain all the calibration information in the corresponding calibration plate; respectively, detect the calibration information in each of the target image units , and screen out target calibration information that satisfies the calibration conditions from the calibration information of each target image unit based on the detection result; calibrate the camera to be calibrated based on the target calibration information in each target image unit.
  • the calibration plates in the initial image are presented at different angles and positions.
  • Zhang calibration plate to distinguish, and also set the separation mark.
  • multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions.
  • the process of shooting is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated.
  • the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
  • the present application proposes a computer-readable storage medium on which a computer program is stored.
  • the computer program is executed by a processor, the following steps are implemented: acquiring an initial image collected by a camera to be calibrated; The image is obtained by photographing a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates; the initial image is separated according to the separation mark, and the obtained A target image unit corresponding to each of the calibration plates; the target image unit contains all the calibration information in the corresponding calibration plate; the calibration information in each of the target image units is detected respectively, and based on the detection results The target calibration information that satisfies the calibration conditions is selected from the calibration information of each of the target image units; the camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
  • the calibration plates in the initial image are presented at different angles and positions.
  • separating the logos multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting.
  • the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated.
  • the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
  • 1 is an application environment diagram of a camera calibration method in one embodiment
  • FIG. 2 is a schematic flowchart of a camera calibration method in one embodiment
  • Fig. 3 is a schematic diagram of setting the position and angle of the calibration plate photographed in one embodiment
  • FIG. 4 is a structural block diagram of a camera calibration device in one embodiment
  • FIG. 5 is a diagram of the internal structure of a computer device in one embodiment.
  • the camera calibration method provided in this application can be applied to the application environment shown in FIG. 1 .
  • the terminal 102 and the camera 104 can communicate. After the camera 104 shoots the calibration plate array 106 , the initial image obtained by shooting is transmitted to the terminal 102 for processing. After the terminal 102 completes the processing and obtains the target calibration information, it is then used to calibrate the camera 104 .
  • the terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and may also be various hardware devices that need to be equipped with cameras for corresponding operations.
  • the camera calibration method of the traditional solution needs to use the camera to take pictures of the calibration board at various angles, and the position and angle of the calibration board need to be manually adjusted for each shot to ensure that the calibration board pictures captured by the camera can cover all directions.
  • the camera calibration method of the traditional solution needs to frequently move the position of the calibration plate when taking pictures, so as to ensure that the camera can capture calibration plates in different orientations, and the angle of the calibration plate needs to be adjusted continuously.
  • the feature point detection on the calibration board has not been processed.
  • Initial image The original image obtained by the camera to be calibrated shooting the calibration plate.
  • Segmentation mark a mark symbol used to distinguish different calibration boards and determine the division boundaries of different calibration boards.
  • Target image unit a partial image separated from the initial image, including one and only one complete calibration plate image.
  • Calibration information information contained in the target image unit that can be used to calibrate the camera to be calibrated, including at least one of position, color, and size.
  • Target calibration information target calibration information that satisfies the calibration conditions obtained after the calibration information in the target image unit is screened.
  • a camera calibration method is provided, and the method is applied to the terminal 102 in FIG. 1 as an example for description, including the following steps:
  • Step S202 acquiring an initial image collected by the camera to be calibrated; the initial image is obtained by photographing a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates.
  • the calibration board needs to be processed first.
  • multiple pieces of different angle information of the calibration plate need to be captured at one time.
  • multiple calibration boards are prevented from overlapping each other, so as to ensure that all the information on each calibration board is exposed within the field of view of the camera.
  • the plurality of non-overlapping calibration plates include an initial calibration plate and a control calibration plate; before the initial image is captured by the camera to be calibrated, the plurality of non-overlapping calibration plates are set within the field of view of the camera to be calibrated , and the initial calibration plate among the multiple non-overlapping calibration plates is located at the center position, and the control calibration plates except the initial calibration plate among the multiple non-overlapping calibration plates are evenly distributed around the initial calibration plate.
  • the above-mentioned calibration plates include an initial calibration plate and a comparison calibration plate, wherein the initial calibration plate is generally located at the center of the field of view for judging the camera to be calibrated, and the comparison calibration plate surrounds the The initial calibration plate is set to ensure the reasonable and uniform position of the calibration plate within the field of view, and further improve the image quality of the initial image obtained by the camera to be calibrated.
  • the separation marks provided between the two calibration plates are located at the apex of the included angle between the adjacent comparison calibration plates, and/or, the planes where each comparison calibration plate is located are respectively different from those of the initial calibration plate. There is an included angle of 10 degrees to 30 degrees between the planes.
  • the separation marks are set on two The apex of the angle between two adjacent calibration plates, for example, in the boundary area of any adjacent two, three or more calibration plates at the edge of the calibration plate, is mainly used to separate different calibration plates.
  • the angle between the plane where the calibration plate is located and the plane where the initial calibration plate is located is 10 degrees to 30 degrees. .
  • the angle of the calibration plate is generally greater than 10 degrees and less than 30 degrees, and the angle between the plane where the reference calibration plate is located and the plane where the initial calibration plate is located is generally greater than 10 degrees.
  • the calibration plate has an angle, which is less than 30 degrees to ensure that the size of the feature points of the calibration plate is not very different on the same picture. If the angle is too large and close to 80 degrees, the feature points above the calibration board will be very small and the ones below will be very large, which will seriously affect the accuracy of the target calibration information.
  • the reference calibration plates of other orientations are inclined downward or upward by 25 degrees (in this embodiment, it is not required that the reference calibration plates are all located on the same side of the plane where the initial calibration plate is located), and a piece of size is pasted between every two calibration plates. 5 cm black rectangles are used as dividers. Then use the camera to be calibrated to take a picture to ensure that all the dots on the calibration board in the picture can be taken without omission, which is the initial image.
  • Step S204 Perform separation processing on the initial image according to the separation identifier to obtain target image units corresponding to each calibration plate respectively; the target image unit contains all the calibration information in the corresponding calibration plate.
  • the terminal After obtaining the initial image, the terminal also needs to process the initial image and divide it into a plurality of target image units corresponding to the information in the calibration board.
  • the separation mark is mainly used to process the initial image to obtain multiple target image units. Since the separation marks are located in the boundary areas of different calibration boards when they are set, the terminal can cut the initial image through the separation marks, and obtain a target image unit containing all the calibration information in the corresponding calibration board.
  • performing separation processing on the initial image according to the separation mark to obtain target image units corresponding to each calibration plate including: detecting the initial image, identifying the separation mark in the initial image; determining the initial image by the separation mark A plurality of target cropping lines are provided, wherein each target cropping line has at least one separation mark; the initial image is cropped according to the plurality of target cropping lines to obtain target image units corresponding to each calibration plate respectively.
  • the terminal in the process of cropping the initial image by using the separation mark, the terminal first needs to detect the initial image and identify the separation mark contained therein. Then, the target cropping lines are divided, each target cropping line passes through at least one separation mark, and then the initial image is segmented by the target cropping lines to obtain target image units corresponding to each calibration board respectively. In this way, it can be ensured that the target clipping line will pass through the boundary area of the calibration board where the separation mark is located, which reduces the difficulty of identifying specific calibration board information from the initial image and improves the calibration efficiency.
  • each target cutting line must pass at least one separation mark, and each cutting line can is a ray whose origin is inside the original image and extends outward.
  • determining a plurality of target crop lines of the initial image by the separation mark includes: delimiting a plurality of initial crop lines of the initial image by the separation mark; and the plurality of initial crop lines divide the initial image into a plurality of calibration plates Multiple initial image units with an equal number; multiple initial image units are detected to determine whether each initial image unit contains all the calibration information in the corresponding calibration board; when there is a defective image unit in the initial image unit, change Initial cropping line, re-divide the initial image, and detect multiple initial image units obtained by re-dividing; the defective image unit is an image unit that does not include all the calibration information of a complete calibration plate; when the initial unit is When there is no defective image unit, the initial image unit is saved as the target image unit for calibrating the camera to be calibrated.
  • the terminal can determine a plurality of cropping lines by separating the identifiers, but the initial image only needs to be divided into initial image units corresponding to the number of calibration boards. Therefore, when the cropping line is determined by using the separation mark, the number of initial image units obtained by division can be determined correspondingly. Since the setting form of the calibration board and the position of the separation mark are not completely fixed, and a complete calibration board information is required during the calibration process, after obtaining the initial image cropping scheme, the terminal also needs to detect it, Make sure that the cropped initial image unit corresponds to the complete image information of each calibration plate.
  • the calibration plate information in the initial image unit is incomplete, or it is found that the initial image unit contains images that do not belong to the current corresponding calibration plate. If the calibration information is displayed, it means that the current image cropping scheme is not the optimal scheme. At this time, the initial cropping line will be re-determined according to the separation mark, until it is detected that there is no defective image unit in the initial image unit. At this time, the initial image unit corresponding to the current cropping scheme can be saved as the target image unit for calibrating the camera to be calibrated.
  • each target image unit is an image unit including all the calibration information of a complete calibration plate in the cropping stage, thereby improving the Efficiency and accuracy of the entire calibration process.
  • step S206 the calibration information in each target image unit is detected respectively, and based on the detection result, the target calibration information that satisfies the calibration condition is selected from the calibration information of each target image unit.
  • the terminal in order to apply the target image unit to a specific camera calibration, the terminal also needs to detect the calibration information in the target image unit according to the calibration information, and filter out the target calibration information that satisfies the calibration conditions.
  • the calibration information in each target image unit is respectively detected, and the target calibration information that satisfies the calibration condition is selected from the calibration information of each target image unit based on the detection result, including:
  • the calibration information in the unit is detected to extract the initial feature points in each image unit; for each image unit, based on the position, color, and size of the initial feature points in the corresponding image unit, the initial feature points are screened out.
  • Set the number of target feature points take the position information of the selected target feature points as the target calibration information of the corresponding image unit.
  • the terminal for each target image unit, the terminal first obtains initial feature points that may be valid feature points in each target image unit. Since the feature points in the calibration board have corresponding calibration information, including one or more of parameters such as position, color, and size, through these calibration information, the terminal can screen out several qualified feature points from the initial feature points. A number of feature points screened by the terminal also need to be counted. Only when the number is the same as the preset number can they be determined as target feature points.
  • the purpose of detecting and screening the feature points by the terminal is to further improve the accuracy of the calibration information, thereby improving the accuracy of the calibration result and reducing the error.
  • the feature points included in each calibration plate are arranged in a regular array, and the number of the feature points is fixed. After the above screening, the obtained calibration information can be used to calibrate the camera to be calibrated.
  • Step S208 the camera to be calibrated is calibrated based on the target calibration information in each target image unit.
  • the purpose of the target calibration information obtained by the terminal based on the above process is to apply it to the calibration process of the to-be-calibrated camera, so as to complete the calibration of the to-be-calibrated camera.
  • calibrating the camera to be calibrated based on the target calibration information in each image unit includes: converting the target calibration information into targets corresponding to the world coordinate system, the camera coordinate system, the image coordinate system and the pixel coordinate system respectively Coordinate information; based on the target coordinate information corresponding to the world coordinate system, camera coordinate system, image coordinate system and pixel coordinate system, calculate the external parameter matrix and internal parameter matrix of the camera to be calibrated; Camera calibration.
  • the process of camera calibration is the process of solving the camera parameter matrix to be calibrated.
  • the terminal obtains the target calibration information, it has corresponding target coordinate information in the world coordinate system, camera coordinate system, image coordinate system and pixel coordinate system respectively, and these target coordinate information are associated with each other correspondingly.
  • the matrix relationship constitutes the external parameter matrix and the internal parameter matrix of the camera to be calibrated.
  • the external parameter matrix and the internal parameter matrix can be used to capture any item, and the corresponding matrix position of the item in other coordinate systems can be obtained.
  • the above camera calibration method limits the positions and angles of multiple calibration boards, so that the calibration boards in the initial image are presented at different angles and positions. Distinguish, and also set the separation flag. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions.
  • the process of shooting At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated.
  • the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
  • a camera calibration device including: an image module 402, a separation module 404, a detection module 406, and a calibration module 408, wherein:
  • the image module 402 is used to obtain an initial image collected by a camera to be calibrated; the initial image is obtained by photographing a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates;
  • the separation module 404 is used to perform separation processing on the initial image according to the separation identification, and obtain the target image unit corresponding to each calibration plate respectively; the target image unit contains all the calibration information in the corresponding calibration plate;
  • the detection module 406 is used to detect the calibration information in each target image unit respectively, and screen out the target calibration information that satisfies the calibration conditions from the calibration information of each target image unit based on the detection result;
  • the calibration module 408 is configured to calibrate the camera to be calibrated based on the target calibration information in each target image unit.
  • the above camera calibration device by restricting the positions and angles of multiple calibration plates, allows the calibration plates in the initial image to be presented at different angles and positions. Distinguish, and also set the separation flag. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions.
  • the process of shooting At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated.
  • the above-mentioned scheme first performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
  • the plurality of non-overlapping calibration plates include an initial calibration plate and a control calibration plate; before the initial image is captured by the camera to be calibrated, the plurality of non-overlapping calibration plates are set within the field of view of the camera to be calibrated , and the initial calibration plate among the multiple non-overlapping calibration plates is located at the center position, and the control calibration plates except the initial calibration plate among the multiple non-overlapping calibration plates are evenly distributed around the initial calibration plate.
  • the above-mentioned calibration plate includes an initial calibration plate and a comparison calibration plate, wherein the initial calibration plate is generally located in the center of the field of view for judging the camera to be calibrated, and the comparison calibration plate Set around the initial calibration plate to ensure the reasonable and uniform position of the calibration plate within the field of view, and further improve the image quality of the initial image obtained by the camera to be calibrated.
  • the separation marks provided between the two calibration plates are located at the apex of the included angle between the adjacent comparison calibration plates, and/or, the planes where each comparison calibration plate is located are respectively different from those of the initial calibration plate. There is an included angle of 10 degrees to 30 degrees between the planes.
  • the initial image captured by the camera to be calibrated contains information of multiple calibration plates
  • the initial image can be guaranteed by setting the different angles of the calibration plate and using the separation mark located in the boundary area of the calibration plate.
  • the information of the calibration plate collected in the data is easy to be segmented and meets the specific calibration requirements.
  • the separation module is further configured to: detect the initial image, and identify the separation mark in the initial image; determine a plurality of target crop lines of the initial image by using the separation mark, Wherein, each target cropping line has at least one separation mark; the initial image is cropped according to the plurality of target cropping lines to obtain target image units corresponding to each of the calibration boards respectively.
  • the initial image in the process of cropping the initial image by using the separation marks, the initial image is first detected, the separation marks contained therein are identified, and then the target cropping lines are divided, and each target cropping line passes at least one separation mark, Then, the initial image is segmented by the target crop line, and the target image units corresponding to each calibration plate are obtained.
  • the separation module is further configured to: demarcate a plurality of initial crop lines of the initial image by using the separation identifier; and the plurality of initial crop lines divide the initial image into different parts from the plurality of initial crop lines A plurality of initial image units with the same number of calibration plates; the plurality of initial image units are detected to determine whether each of the initial image units contains all the calibration information in the corresponding calibration plate; when the initial image units are in When there is a defective image unit, the initial crop line is changed, the initial image is re-divided, and the plurality of initial image units obtained by re-dividing are detected; the defective image unit does not include a complete image unit.
  • each target image unit is an image unit including all the calibration information of a complete calibration plate in the cropping stage, thereby improving the Efficiency and accuracy of the entire calibration process.
  • the detection module is further configured to: detect the calibration information in each of the image units respectively, so as to extract the initial feature points in each of the image units; for each image unit, based on the corresponding image The position, color, and size of the initial feature points in the unit, and a preset number of target feature points are screened from the initial feature points; the position information of the screened target feature points is used as the target calibration information of the corresponding image unit.
  • the purpose of detecting and screening feature points is to further improve the accuracy of calibration information, thereby improving the accuracy of calibration results and reducing errors.
  • the calibration module is further configured to: convert the target calibration information into target coordinate information corresponding to the world coordinate system, the camera coordinate system, the image coordinate system and the pixel coordinate system respectively; system, camera coordinate system, image coordinate system and pixel coordinate system respectively corresponding target coordinate information, calculate the external parameter matrix and internal parameter matrix of the camera to be calibrated; according to the external parameter matrix and the internal parameter matrix, realize the Calibration of the camera to be calibrated.
  • All or part of the modules in the above camera calibration device can be implemented by software, hardware and combinations thereof.
  • the above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
  • a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 5 .
  • the computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus.
  • the processor of the computer device is used to provide computing and control capabilities.
  • the memory of the computer device includes a non-volatile storage medium, an internal memory.
  • the nonvolatile storage medium stores an operating system and a computer program.
  • the internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium.
  • the communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies.
  • the computer program implements a camera calibration method when executed by the processor.
  • the display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
  • FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
  • a computer device including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
  • a computer-readable storage medium is also provided, and a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like.
  • Volatile memory may include random access memory (RAM) or external cache memory.
  • the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)
  • Studio Devices (AREA)

Abstract

A camera calibration method and apparatus, and a computer device and a storage medium, which relate to the technical field of camera calibration. The method comprises: acquiring an initial image collected by a camera to be calibrated, wherein the initial image is obtained by means of said camera photographing a plurality of non-overlapping calibration plates, and a separation identifier is arranged between each two of the plurality of calibration plates; performing separation processing on the initial image according to the separation identifiers, so as to obtain a target image unit respectively corresponding to each calibration plate, wherein each target image unit includes all calibration information of the corresponding calibration plate; respectively detecting the calibration information in each target image unit, and screening, from the calibration information of the target image units and on the basis of detection results, target calibration information that meets a calibration condition; and calibrating said camera on the basis of the target calibration information.

Description

摄像头标定方法、装置、计算机设备和存储介质Camera calibration method, device, computer equipment and storage medium
相关申请的交叉引用CROSS-REFERENCE TO RELATED APPLICATIONS
本申请要求于2020年12月30日提交的申请号为202011625915.3,名称为“摄像头标定方法、装置、计算机设备和存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。This application claims the priority of the Chinese Patent Application No. 202011625915.3 and entitled "Camera Calibration Method, Apparatus, Computer Equipment and Storage Medium" filed on December 30, 2020, the entire contents of which are incorporated in this application by reference .
技术领域technical field
本申请涉及摄像头标定技术领域,特别涉及一种摄像头标定方法、装置、计算机设备和存储介质。The present application relates to the technical field of camera calibration, and in particular, to a camera calibration method, device, computer equipment and storage medium.
背景技术Background technique
无论是在图像测量或者机器视觉应用中,相机参数的标定都是非常关键的环节,其标定结果的精度及算法的稳定性直接影响相机工作产生结果的准确性。因此,做好相机标定是做好后续工作的前提,提高标定精度是科研工作的重点所在。相机标定,就是利用摄像机所拍摄到的图像来还原空间中的物体。不妨假设摄像机所拍摄到的图像与三维空间中的物体之间存在以下一种简单的线性关系:[像]=M[物],这里的矩阵M可以看成是摄像机成像的几何模型。M中的参数就是摄像机参数。通常,这些参数是要通过实验与计算来得到的。这个求解参数的过程就称为摄像机标定。Whether in image measurement or machine vision applications, the calibration of camera parameters is a very critical link. The accuracy of the calibration results and the stability of the algorithm directly affect the accuracy of the results produced by the camera work. Therefore, doing a good job in camera calibration is the premise of the follow-up work, and improving the calibration accuracy is the focus of scientific research. Camera calibration is to use the images captured by the camera to restore objects in space. It may be assumed that there is a simple linear relationship between the image captured by the camera and the object in the three-dimensional space: [image]=M[object], where the matrix M can be regarded as the geometric model of camera imaging. The parameters in M are the camera parameters. Usually, these parameters are obtained through experiments and calculations. This process of solving parameters is called camera calibration.
传统技术中的相机标定方法,需要利用待标定的摄像头拍摄各个角度的标定板的图片,每拍摄一次都需要手动调整标定板的摆放位置和角度,以保证摄像头拍摄的标定板图片能涵盖各个方向。The camera calibration method in the traditional technology needs to use the camera to be calibrated to take pictures of the calibration board at various angles. Each time you shoot, you need to manually adjust the placement and angle of the calibration board to ensure that the calibration board image captured by the camera can cover all direction.
但是,由于目前的摄像头标定方法在拍摄图片的时候需要频繁移动标定板的位置、且不断调整标定板的角度,才能保证摄像头能够拍摄到不同方位的标定板,并且需要不断调整标定板的角度。人工操作繁琐,存在标定效率低的问题。However, because the current camera calibration method needs to frequently move the position of the calibration plate and constantly adjust the angle of the calibration plate when taking pictures, in order to ensure that the camera can capture the calibration plates in different directions, and the angle of the calibration plate needs to be adjusted continuously. Manual operation is cumbersome, and there is a problem of low calibration efficiency.
公开内容public content
本申请提出了一种摄像头标定方法、装置、计算机设备和存储介质,以提高摄像头标定效率。The present application proposes a camera calibration method, device, computer equipment and storage medium to improve the camera calibration efficiency.
第一方面,本申请提出了一种摄像头标定方法,所述方法包括:获取通过待标定摄像头采集得到的初始图像;所述初始图像通过所述待标定摄像头对多个不重叠的标定板进行拍摄得到,且所述多个标定板两两之间设置有分隔标识;根据所述分隔标识对所述初始图像 进行分隔处理,得到与各所述标定板分别对应的目标图像单元;所述目标图像单元包含有对应的标定板中全部的标定信息;分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。In a first aspect, the present application proposes a camera calibration method, the method includes: acquiring an initial image collected by a camera to be calibrated; the initial image shooting a plurality of non-overlapping calibration plates by the to-be-calibrated camera obtained, and a separation mark is set between the plurality of calibration plates; the initial image is separated according to the separation mark, and the target image unit corresponding to each of the calibration plates is obtained; the target image The unit contains all the calibration information in the corresponding calibration board; the calibration information in each of the target image units is detected respectively, and based on the detection results, the calibration information of each of the target image units is selected from the calibration information that meets the calibration conditions. target calibration information; the camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
根据本申请实施例的摄像头标定方法,通过对多个标定板摆放的位置、角度等进行限制,让初始图像中的标定板以不同的角度和位置呈现,同时为了对同一张初始图像中的多张标定板进行区分,还设置了分隔标识。通过分隔标识,就可以将初始图像中的多个标定板区分开来,对应裁剪成多个单独的目标图像单元,这样就避免了需要利用待标定摄像头多次从不同角度、不同位置对标定板进行拍摄的过程。同时,对于每个单独的目标图像单元,还对其进行了标定信息检测,以保证每个目标图像单元中对应包含有一个完整的标定板中所具有的目标标定信息,然后基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。这样,由于通过一张初始图像即可完成对多角度、不同距离的标定板的图像采集,避免了多次人为改变标定板所带来的误差,提高了摄像头标定的效率和一致性。且上述方案在标定之前先对标定板的图片进行特征点检测,降低了因为灯光不足或者镜头分辨率不高引入的错点,提高了标定板上特征点检测的准确性。According to the camera calibration method of the embodiment of the present application, by restricting the positions, angles, etc. of the multiple calibration plates, the calibration plates in the initial image are presented at different angles and positions, and at the same time, in order to Multiple calibration plates are used to distinguish, and a separation mark is also set. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting. At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated. In this way, since the image acquisition of the multi-angle and different distance calibration plates can be completed through an initial image, errors caused by multiple manual changes of the calibration plates are avoided, and the efficiency and consistency of camera calibration are improved. In addition, the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
第二方面,本申请提出了一种摄像头标定装置,所述装置包括:获取通过待标定摄像头采集得到的初始图像;所述初始图像通过所述待标定摄像头对多个不重叠的标定板进行拍摄得到,且所述多个标定板两两之间设置有分隔标识;根据所述分隔标识对所述初始图像进行分隔处理,得到与各所述标定板分别对应的目标图像单元;所述目标图像单元包含有对应的标定板中全部的标定信息;分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。In a second aspect, the present application proposes a camera calibration device, the device includes: acquiring an initial image collected by a camera to be calibrated; the initial image is captured by the camera to be calibrated on a plurality of non-overlapping calibration plates obtained, and a separation mark is set between the plurality of calibration plates; the initial image is separated according to the separation mark, and the target image unit corresponding to each of the calibration plates is obtained; the target image The unit contains all the calibration information in the corresponding calibration board; the calibration information in each of the target image units is detected respectively, and based on the detection results, the calibration information of each of the target image units is selected from the calibration information that meets the calibration conditions. target calibration information; the camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
根据本申请实施例的摄像头标定装置,通过对多个标定板摆放的位置、角度等进行限制,让初始图像中的标定板以不同的角度和位置呈现,同时为了对同一张初始图像中的多张标定板进行区分,还设置了分隔标识。通过分隔标识,就可以将初始图像中的多个标定板区分开来,对应裁剪成多个单独的目标图像单元,这样就避免了需要利用待标定摄像头多次从不同角度、不同位置对标定板进行拍摄的过程。同时,对于每个单独的目标图像单元,还对其进行了标定信息检测,以保证每个目标图像单元中对应包含有一个完整的标定板中所具有的目标标定信息,然后基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。这样,由于通过一张初始图像即可完成对多角度、不同距离的标定板的图像采集,避免了多次人为改变标定板所带来的误差,提高了摄像头标定的效率和一致性。且上述方案在标定之前先对标定板的图片进行特征点检测,降低了因为灯光不足或者镜头 分辨率不高引入的错点,提高了标定板上特征点检测的准确性。According to the camera calibration device of the embodiment of the present application, by restricting the positions, angles, etc. of the plurality of calibration plates, the calibration plates in the initial image are presented at different angles and positions. Multiple calibration plates are used to distinguish, and a separation mark is also set. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting. At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated. In this way, since the image acquisition of the multi-angle and different distance calibration plates can be completed through an initial image, errors caused by multiple manual changes of the calibration plates are avoided, and the efficiency and consistency of camera calibration are improved. Moreover, the above scheme first performs feature point detection on the picture of the calibration board before calibration, which reduces the error points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
第三方面,本申请提出了一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现以下步骤:获取通过待标定摄像头采集得到的初始图像;所述初始图像通过所述待标定摄像头对多个不重叠的标定板进行拍摄得到,且所述多个标定板两两之间设置有分隔标识;根据所述分隔标识对所述初始图像进行分隔处理,得到与各所述标定板分别对应的目标图像单元;所述目标图像单元包含有对应的标定板中全部的标定信息;分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。In a third aspect, the present application proposes a computer device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the processor implements the following steps: acquiring the initial data collected by the camera to be calibrated image; the initial image is obtained by shooting a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates; the initial image is recorded according to the separation mark Perform separation processing to obtain target image units corresponding to each of the calibration plates; the target image units contain all the calibration information in the corresponding calibration plate; respectively, detect the calibration information in each of the target image units , and screen out target calibration information that satisfies the calibration conditions from the calibration information of each target image unit based on the detection result; calibrate the camera to be calibrated based on the target calibration information in each target image unit.
根据本申请实施例的计算机设备,通过对多个标定板摆放的位置、角度等进行限制,让初始图像中的标定板以不同的角度和位置呈现,同时为了对同一张初始图像中的多张标定板进行区分,还设置了分隔标识。通过分隔标识,就可以将初始图像中的多个标定板区分开来,对应裁剪成多个单独的目标图像单元,这样就避免了需要利用待标定摄像头多次从不同角度、不同位置对标定板进行拍摄的过程。同时,对于每个单独的目标图像单元,还对其进行了标定信息检测,以保证每个目标图像单元中对应包含有一个完整的标定板中所具有的目标标定信息,然后基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。这样,由于通过一张初始图像即可完成对多角度、不同距离的标定板的图像采集,避免了多次人为改变标定板所带来的误差,提高了摄像头标定的效率和一致性。且上述方案在标定之前先对标定板的图片进行特征点检测,降低了因为灯光不足或者镜头分辨率不高引入的错点,提高了标定板上特征点检测的准确性。According to the computer device of the embodiment of the present application, by restricting the positions, angles, etc. of the plurality of calibration plates, the calibration plates in the initial image are presented at different angles and positions. Zhang calibration plate to distinguish, and also set the separation mark. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting. At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated. In this way, since the image acquisition of the multi-angle and different distance calibration plates can be completed through an initial image, errors caused by multiple manual changes of the calibration plates are avoided, and the efficiency and consistency of camera calibration are improved. In addition, the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
第四方面,本申请提出了一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行时实现以下步骤:获取通过待标定摄像头采集得到的初始图像;所述初始图像通过所述待标定摄像头对多个不重叠的标定板进行拍摄得到,且所述多个标定板两两之间设置有分隔标识;根据所述分隔标识对所述初始图像进行分隔处理,得到与各所述标定板分别对应的目标图像单元;所述目标图像单元包含有对应的标定板中全部的标定信息;分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。In a fourth aspect, the present application proposes a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the following steps are implemented: acquiring an initial image collected by a camera to be calibrated; The image is obtained by photographing a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates; the initial image is separated according to the separation mark, and the obtained A target image unit corresponding to each of the calibration plates; the target image unit contains all the calibration information in the corresponding calibration plate; the calibration information in each of the target image units is detected respectively, and based on the detection results The target calibration information that satisfies the calibration conditions is selected from the calibration information of each of the target image units; the camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
根据本申请实施例的计算机可读存储介质,通过对多个标定板摆放的位置、角度等进行限制,让初始图像中的标定板以不同的角度和位置呈现,同时为了对同一张初始图像中的多张标定板进行区分,还设置了分隔标识。通过分隔标识,就可以将初始图像中的多个标定板区分开来,对应裁剪成多个单独的目标图像单元,这样就避免了需要利用待标定摄像 头多次从不同角度、不同位置对标定板进行拍摄的过程。同时,对于每个单独的目标图像单元,还对其进行了标定信息检测,以保证每个目标图像单元中对应包含有一个完整的标定板中所具有的目标标定信息,然后基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。这样,由于通过一张初始图像即可完成对多角度、不同距离的标定板的图像采集,避免了多次人为改变标定板所带来的误差,提高了摄像头标定的效率和一致性。且上述方案在标定之前先对标定板的图片进行特征点检测,降低了因为灯光不足或者镜头分辨率不高引入的错点,提高了标定板上特征点检测的准确性。According to the computer-readable storage medium of the embodiment of the present application, by restricting the positions, angles, etc. of the plurality of calibration plates, the calibration plates in the initial image are presented at different angles and positions. There are multiple calibration boards in the system to distinguish, and a separation mark is also set. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting. At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated. In this way, since the image acquisition of the multi-angle and different distance calibration plates can be completed through an initial image, errors caused by multiple manual changes of the calibration plates are avoided, and the efficiency and consistency of camera calibration are improved. In addition, the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
本申请的附加方面和优点将在下面的描述中部分给出,部分将从下面的描述中变得明显,或通过本申请的实践了解到。Additional aspects and advantages of the present application will be set forth, in part, from the following description, and in part will become apparent from the following description, or may be learned by practice of the present application.
附图说明Description of drawings
本申请的上述和/或附加的方面和优点从结合下面附图对实施例的描述中将变得明显和容易理解,其中:The above and/or additional aspects and advantages of the present application will become apparent and readily understood from the following description of embodiments in conjunction with the accompanying drawings, wherein:
图1为一个实施例中摄像头标定方法的应用环境图;1 is an application environment diagram of a camera calibration method in one embodiment;
图2为一个实施例中摄像头标定方法的流程示意图;2 is a schematic flowchart of a camera calibration method in one embodiment;
图3为一个实施例中拍摄的标定板位置角度设置示意图;Fig. 3 is a schematic diagram of setting the position and angle of the calibration plate photographed in one embodiment;
图4为一个实施例中摄像头标定装置的结构框图;4 is a structural block diagram of a camera calibration device in one embodiment;
图5为一个实施例中计算机设备的内部结构图。FIG. 5 is a diagram of the internal structure of a computer device in one embodiment.
具体实施方式Detailed ways
为了使本申请的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本申请进行进一步详细说明。应当理解,此处描述的具体实施例仅仅用以解释本申请,并不用于限定本申请。In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application will be described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application, but not to limit the present application.
本申请提供的摄像头标定方法,可以应用于如图1所示的应用环境中。其中,终端102与摄像头104之间能够进行通信。摄像头104对标定板阵列106进行拍摄后,将拍摄得到的初始图像传递给终端102进行处理,终端102处理完成获得目标标定信息后,再将其用于对摄像头104进行标定。其中,终端102可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备,也可以是各类需要搭载摄像头进行相应操作的硬件设备。The camera calibration method provided in this application can be applied to the application environment shown in FIG. 1 . Wherein, the terminal 102 and the camera 104 can communicate. After the camera 104 shoots the calibration plate array 106 , the initial image obtained by shooting is transmitted to the terminal 102 for processing. After the terminal 102 completes the processing and obtains the target calibration information, it is then used to calibrate the camera 104 . The terminal 102 may be, but is not limited to, various personal computers, notebook computers, smart phones, tablet computers, and portable wearable devices, and may also be various hardware devices that need to be equipped with cameras for corresponding operations.
为了可以更好的理解本申请,在对本申请的摄像头标定方法进行描述之前,先介绍下传统方案中的摄像头标定是如何完成的。一般来说,传统技术方案中,首先需要利用摄像头拍摄各个角度的标定板的图片,每拍摄一次都需要手动调整标定板的摆放位置和角度,以 保证摄像头拍摄的标定板图片能涵盖各个方向。但是在这个过程中,由于传统方案的摄像头标定方法在拍摄图片的时候需要频繁移动标定板的位置,才能保证摄像头能够拍摄到不同方位的标定板,并且需要不断调整标定板的角度。标定板上的特征点检测没有经过处理,在光线不好或者摄像头分辨率不高的情况下,容易出现标定板的特征点检测不出来的现象。人为摆放标定板的位置和调整标定板的方向不能保证一致,所以有多个摄像头需要标定的时候没办法保证参数的一致性。In order to better understand the present application, before describing the camera calibration method of the present application, it is introduced how the camera calibration in the traditional solution is completed. Generally speaking, in the traditional technical solution, the camera first needs to use the camera to take pictures of the calibration board at various angles, and the position and angle of the calibration board need to be manually adjusted for each shot to ensure that the calibration board pictures captured by the camera can cover all directions. . However, in this process, the camera calibration method of the traditional solution needs to frequently move the position of the calibration plate when taking pictures, so as to ensure that the camera can capture calibration plates in different orientations, and the angle of the calibration plate needs to be adjusted continuously. The feature point detection on the calibration board has not been processed. In the case of poor light or low resolution of the camera, it is easy to cause the phenomenon that the feature points of the calibration board cannot be detected. The position of artificially placing the calibration board and the direction of adjusting the calibration board cannot be guaranteed to be consistent, so there is no way to ensure the consistency of parameters when there are multiple cameras that need to be calibrated.
本申请就是基于对上述场景所存在的一些问题进行改进而得到的方案。在对本申请中的摄像头标定方法进行描述之前,首先对本申请的实施例中涉及到的部分名词作如下解释:The present application is a solution obtained by improving some problems existing in the above scenarios. Before describing the camera calibration method in this application, some terms involved in the embodiments of this application are explained as follows:
初始图像:待标定摄像头对标定板进行拍摄所获得的原始图像。Initial image: The original image obtained by the camera to be calibrated shooting the calibration plate.
分割标识:用于对不同标定板进行区分,确定不同标定板分割界限的标记符号。Segmentation mark: a mark symbol used to distinguish different calibration boards and determine the division boundaries of different calibration boards.
目标图像单元:从初始图像中分离出来的部分图像,其中有且仅有一张完整的标定板图像。Target image unit: a partial image separated from the initial image, including one and only one complete calibration plate image.
标定信息:目标图像单元中所包含的可以用于对待标定摄像头进行标定的信息,包括位置、颜色、和大小中的至少一种。Calibration information: information contained in the target image unit that can be used to calibrate the camera to be calibrated, including at least one of position, color, and size.
目标标定信息:目标图像单元中的标定信息筛选后获得的满足标定条件的目标标定信息。Target calibration information: target calibration information that satisfies the calibration conditions obtained after the calibration information in the target image unit is screened.
在一个实施例中,如图2所示,提供了一种摄像头标定方法,以该方法应用于前述图1中的终端102为例进行说明,包括以下步骤:In one embodiment, as shown in FIG. 2, a camera calibration method is provided, and the method is applied to the terminal 102 in FIG. 1 as an example for description, including the following steps:
步骤S202,获取通过待标定摄像头采集得到的初始图像;初始图像通过待标定摄像头对多个不重叠的标定板进行拍摄得到,且多个标定板两两之间设置有分隔标识。Step S202, acquiring an initial image collected by the camera to be calibrated; the initial image is obtained by photographing a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates.
也就是说,在终端通过待标定摄像头采集得到初始图像之前,需要先对标定板进行处理。为了减少人为多次摆放标定板所带来的问题,提高标定效率,实现待标定摄像头的快速标定,本实施例中需要一次拍摄多张标定板的不同角度信息。为了保证每张标定板中的信息都能满足相机标定的要求,多张标定板相互之间不重叠地防止,以保证每张标定板上的全部信息都暴露在摄像头的视野范围内。That is to say, before the terminal acquires the initial image through the camera to be calibrated, the calibration board needs to be processed first. In order to reduce the problems caused by placing the calibration plate manually for many times, improve the calibration efficiency, and realize the rapid calibration of the camera to be calibrated, in this embodiment, multiple pieces of different angle information of the calibration plate need to be captured at one time. In order to ensure that the information in each calibration board can meet the requirements of camera calibration, multiple calibration boards are prevented from overlapping each other, so as to ensure that all the information on each calibration board is exposed within the field of view of the camera.
在一个实施例中,多个不重叠的标定板中包括有初始标定板和对照标定板;在通过待标定摄像头采集初始图像之前,多个不重叠的标定板被设置于待标定摄像头视野范围内,且多个不重叠的标定板中的初始标定板位于中心位置,多个不重叠的标定板中除初始标定板之外的对照标定板均匀地分布在初始标定板的四周。In one embodiment, the plurality of non-overlapping calibration plates include an initial calibration plate and a control calibration plate; before the initial image is captured by the camera to be calibrated, the plurality of non-overlapping calibration plates are set within the field of view of the camera to be calibrated , and the initial calibration plate among the multiple non-overlapping calibration plates is located at the center position, and the control calibration plates except the initial calibration plate among the multiple non-overlapping calibration plates are evenly distributed around the initial calibration plate.
本实施例中,为了能够更好地对多个标定板进行处理,上述标定板中包括有初始标定板和对照标定板,其中初始标定板一般位于判断待标定摄像头的视野中心,对照标定板围绕初始标定板设置,以保证视野范围内标定板位置的合理和均匀,进一步提高待标定摄像头 所获取的初始图像的图像质量。In this embodiment, in order to better process multiple calibration plates, the above-mentioned calibration plates include an initial calibration plate and a comparison calibration plate, wherein the initial calibration plate is generally located at the center of the field of view for judging the camera to be calibrated, and the comparison calibration plate surrounds the The initial calibration plate is set to ensure the reasonable and uniform position of the calibration plate within the field of view, and further improve the image quality of the initial image obtained by the camera to be calibrated.
在一个实施例中,两两标定板之间设置的分隔标识位于两两相邻的对照标定板之间的夹角顶点,和/或,每个对照标定板所处平面分别与初始标定板所处平面之间具有10度至30度大小的夹角。In one embodiment, the separation marks provided between the two calibration plates are located at the apex of the included angle between the adjacent comparison calibration plates, and/or, the planes where each comparison calibration plate is located are respectively different from those of the initial calibration plate. There is an included angle of 10 degrees to 30 degrees between the planes.
由于待标定摄像头所拍摄的初始图像中包含有多个标定板的信息,为了保证初始图像中采集到的标定板信息便于分割,且符合具体的标定要求,上述实施例中,分隔标识设置于两两相邻的标定板之间的夹角顶点,例如任意相邻的两个、三个或多个标定板边缘标定板分界区域里,其主要用于对不同的标定板进行分隔。此外,为了进一步保证每个方向上采集到的标定板图像信息都能够满足具体的标定要求,对照标定板所处平面与初始标定板所处平面之间设置的夹角为10度至30度大小。Since the initial image captured by the camera to be calibrated contains the information of multiple calibration plates, in order to ensure that the calibration plate information collected in the initial image is easy to be segmented and meets the specific calibration requirements, in the above embodiment, the separation marks are set on two The apex of the angle between two adjacent calibration plates, for example, in the boundary area of any adjacent two, three or more calibration plates at the edge of the calibration plate, is mainly used to separate different calibration plates. In addition, in order to further ensure that the image information of the calibration plate collected in each direction can meet the specific calibration requirements, the angle between the plane where the calibration plate is located and the plane where the initial calibration plate is located is 10 degrees to 30 degrees. .
上述实施例中,标定板的角度除了正中间的初始标定板,四周的对照标定板所处平面与初始标定板所处平面之间的夹角一般大于10度小于30度,大于10度是为了标定板有角度,小于30度是为了保证标定板的特征点大小在同一张图片上差异不大。如果角度太大接近80度,标定板上方的特征点会很小下方的会很大,严重影响目标标定信息的准确性。In the above embodiment, except for the initial calibration plate in the middle, the angle of the calibration plate is generally greater than 10 degrees and less than 30 degrees, and the angle between the plane where the reference calibration plate is located and the plane where the initial calibration plate is located is generally greater than 10 degrees. The calibration plate has an angle, which is less than 30 degrees to ensure that the size of the feature points of the calibration plate is not very different on the same picture. If the angle is too large and close to 80 degrees, the feature points above the calibration board will be very small and the ones below will be very large, which will seriously affect the accuracy of the target calibration information.
例如,如图3所示,将九张标定板在摄像头的视野范围内的上、下、左、右、左上、右上、左下、右下及正中间摆放,除了正中心的初始标定板保持水平,其他方位的对照标定板都向下或向上倾斜25度(本实施例中不要求对照标定板全部位于初始标定板所在平面的同侧),每两块标定板之间贴一张大小为5厘米的黑色矩形作为分隔标志。然后利用待标定的摄像头拍摄一张图片,保证图片中标定板上的圆点都能拍全,不能出现遗漏的情况,即为初始图像。For example, as shown in Figure 3, nine calibration plates are placed in the upper, lower, left, right, upper left, upper right, lower left, lower right and the center of the camera's field of view, except that the initial calibration plate in the center remains Horizontally, the reference calibration plates of other orientations are inclined downward or upward by 25 degrees (in this embodiment, it is not required that the reference calibration plates are all located on the same side of the plane where the initial calibration plate is located), and a piece of size is pasted between every two calibration plates. 5 cm black rectangles are used as dividers. Then use the camera to be calibrated to take a picture to ensure that all the dots on the calibration board in the picture can be taken without omission, which is the initial image.
步骤S204,根据分隔标识对初始图像进行分隔处理,得到与各标定板分别对应的目标图像单元;目标图像单元包含有对应的标定板中全部的标定信息。Step S204: Perform separation processing on the initial image according to the separation identifier to obtain target image units corresponding to each calibration plate respectively; the target image unit contains all the calibration information in the corresponding calibration plate.
也就是说,由于初始图像中包含有多张标定板,在具体对待标定摄像头进行标定的时候,需要以单张标定板中的信息作为输入来完成标定。终端在获得了初始图像后还需要对初始图像进行处理,将其分割成多个对应的标定板中的信息的目标图像单元。分隔标识主要用于对初始图像进行处理,获得多个目标图像单元。由于分隔标识在设置的时候就是位于不同的标定板分界区域里,终端通过分隔标识可以实现对初始图像进行裁剪,获得包含有对应的标定板中全部的标定信息的目标图像单元。That is to say, since the initial image contains multiple calibration plates, when calibrating the camera to be calibrated, the information in a single calibration plate needs to be used as input to complete the calibration. After obtaining the initial image, the terminal also needs to process the initial image and divide it into a plurality of target image units corresponding to the information in the calibration board. The separation mark is mainly used to process the initial image to obtain multiple target image units. Since the separation marks are located in the boundary areas of different calibration boards when they are set, the terminal can cut the initial image through the separation marks, and obtain a target image unit containing all the calibration information in the corresponding calibration board.
在一个实施例中,根据分隔标识对初始图像进行分隔处理,得到与各标定板分别对应的目标图像单元,包括:对初始图像进行检测,识别初始图像中的分隔标识;通过分隔标识确定初始图像的多条目标裁剪线,其中,每条目标裁剪线上具有至少一个分隔标识;根据多条目标裁剪线对初始图像进行裁剪,得到与各标定板分别对应的目标图像单元。In one embodiment, performing separation processing on the initial image according to the separation mark to obtain target image units corresponding to each calibration plate, including: detecting the initial image, identifying the separation mark in the initial image; determining the initial image by the separation mark A plurality of target cropping lines are provided, wherein each target cropping line has at least one separation mark; the initial image is cropped according to the plurality of target cropping lines to obtain target image units corresponding to each calibration plate respectively.
本实施例中,终端在利用分隔标识对初始图像进行裁剪的过程中,首先需要对初始图像进行检测,识别其中所包含的分隔标识。然后划分目标裁剪线,每条目标裁剪线至少通过一个分隔标识,然后利用目标裁剪线对初始图像进行分割,得到与各个标定板分别对应的目标图像单元。这样可以保证目标裁剪线一定会通过分隔标识所在的标定板分界区域里,降低了从初始图像中识别出具体的标定板信息的难度,提高了标定效率。In this embodiment, in the process of cropping the initial image by using the separation mark, the terminal first needs to detect the initial image and identify the separation mark contained therein. Then, the target cropping lines are divided, each target cropping line passes through at least one separation mark, and then the initial image is segmented by the target cropping lines to obtain target image units corresponding to each calibration board respectively. In this way, it can be ensured that the target clipping line will pass through the boundary area of the calibration board where the separation mark is located, which reduces the difficulty of identifying specific calibration board information from the initial image and improves the calibration efficiency.
本实施例中对于分隔标识的数量并不做具体的限定,对于目标裁剪线的条数也不做具体的限定,但是每条目标裁剪线一定会通过至少一个分隔标识,且每条裁剪线可以是起点位于初始图像内部向外延伸的射线。In this embodiment, there is no specific limitation on the number of separation marks, nor is there any specific limitation on the number of target cutting lines, but each target cutting line must pass at least one separation mark, and each cutting line can is a ray whose origin is inside the original image and extends outward.
在一个实施例中,通过分隔标识确定初始图像的多条目标裁剪线,包括:通过分隔标识划定初始图像的多条初始裁剪线;多条初始裁剪线将初始图像划分为与多个标定板数量相等的多个初始图像单元;对多个初始图像单元进行检测,判断各个初始图像单元中是否包含有对应的标定板中全部的标定信息;当初始图像单元中存在瑕疵图像单元时,则更改初始裁剪线,重新对初始图像进行划分,并对重新划分得到的多个初始图像单元进行检测;瑕疵图像单元为未包括有一个完整的标定板的全部的标定信息的图像单元;当初始单元中不存在瑕疵图像单元时,则将初始图像单元保存为用于对待标定摄像头进行标定的目标图像单元。In one embodiment, determining a plurality of target crop lines of the initial image by the separation mark includes: delimiting a plurality of initial crop lines of the initial image by the separation mark; and the plurality of initial crop lines divide the initial image into a plurality of calibration plates Multiple initial image units with an equal number; multiple initial image units are detected to determine whether each initial image unit contains all the calibration information in the corresponding calibration board; when there is a defective image unit in the initial image unit, change Initial cropping line, re-divide the initial image, and detect multiple initial image units obtained by re-dividing; the defective image unit is an image unit that does not include all the calibration information of a complete calibration plate; when the initial unit is When there is no defective image unit, the initial image unit is saved as the target image unit for calibrating the camera to be calibrated.
本实施例中,终端通过分隔标识可以确定多条裁剪线,但是初始图像只需要划分成与标定板数量相对应数量的初始图像单元。因此在利用分隔标识确定裁剪线的时候,即可对应确定划分所得的初始图像单元数量。由于标定板的设置形式、分隔标识的位置并不完全固定不变,且标定的过程中需要一个完整的标定板信息,因此在获得初始的图像剪裁方案以后,终端还需要对其进行检测,以确保剪裁得到的初始图像单元是对应包含有各个标定板完整的图像信息的。在检测的过程中,如果发现所得到的初始图像单元中存在瑕疵图像单元,即该初始图像单元中的标定板信息不完整,或者是发现该初始图像单元中包含有不属于当前对应标定板的标定信息,则说明当前的图像剪裁方案不是最优方案。此时会重新根据分隔标识来确定初始裁剪线,直至检测初始图像单元中不存在瑕疵图像单元。此时,可以将当前裁剪方案对应得到的初始图像单元保存为用于对待标定摄像头进行标定的目标图像单元。In this embodiment, the terminal can determine a plurality of cropping lines by separating the identifiers, but the initial image only needs to be divided into initial image units corresponding to the number of calibration boards. Therefore, when the cropping line is determined by using the separation mark, the number of initial image units obtained by division can be determined correspondingly. Since the setting form of the calibration board and the position of the separation mark are not completely fixed, and a complete calibration board information is required during the calibration process, after obtaining the initial image cropping scheme, the terminal also needs to detect it, Make sure that the cropped initial image unit corresponds to the complete image information of each calibration plate. In the process of detection, if it is found that there is a defective image unit in the obtained initial image unit, that is, the calibration plate information in the initial image unit is incomplete, or it is found that the initial image unit contains images that do not belong to the current corresponding calibration plate. If the calibration information is displayed, it means that the current image cropping scheme is not the optimal scheme. At this time, the initial cropping line will be re-determined according to the separation mark, until it is detected that there is no defective image unit in the initial image unit. At this time, the initial image unit corresponding to the current cropping scheme can be saved as the target image unit for calibrating the camera to be calibrated.
在上述实施例中,通过对图像剪裁得到的初始图像单元进行检测,可以在裁剪阶段就确保每个目标图像单元都是包括有一个完整的标定板的全部的标定信息的图像单元,从而提高了整个标定过程的效率和准确率。In the above embodiment, by detecting the initial image unit obtained by image cropping, it can be ensured that each target image unit is an image unit including all the calibration information of a complete calibration plate in the cropping stage, thereby improving the Efficiency and accuracy of the entire calibration process.
步骤S206,分别对每个目标图像单元中的标定信息进行检测,并基于检测结果从各目标图像单元的标定信息中筛选出满足标定条件的目标标定信息。In step S206, the calibration information in each target image unit is detected respectively, and based on the detection result, the target calibration information that satisfies the calibration condition is selected from the calibration information of each target image unit.
也就是说,为了将目标图像单元应用于具体的摄像头标定,终端还需要根据标定信息对目标图像单元中的标定信息进行检测,筛选出其中满足标定条件的目标标定信息。That is, in order to apply the target image unit to a specific camera calibration, the terminal also needs to detect the calibration information in the target image unit according to the calibration information, and filter out the target calibration information that satisfies the calibration conditions.
在一个实施例中,分别对每个目标图像单元中的标定信息进行检测,并基于检测结果从各目标图像单元的标定信息中筛选出满足标定条件的目标标定信息,包括:分别对每个图像单元中的标定信息进行检测,以提取各图像单元中的初始特征点;对于每张图像单元,基于相应图像单元中的初始特征点的位置、颜色、和大小,从初始特征点中筛选出预设数量的目标特征点;将筛选出的目标特征点的位置信息作为相应图像单元的目标标定信息。In one embodiment, the calibration information in each target image unit is respectively detected, and the target calibration information that satisfies the calibration condition is selected from the calibration information of each target image unit based on the detection result, including: The calibration information in the unit is detected to extract the initial feature points in each image unit; for each image unit, based on the position, color, and size of the initial feature points in the corresponding image unit, the initial feature points are screened out. Set the number of target feature points; take the position information of the selected target feature points as the target calibration information of the corresponding image unit.
本实施例中,在这个过程中,对于每张目标图像单元,终端首先要获得每张目标图像单元中可能是有效的特征点的初始特征点。由于标定板中的特征点对应具有标定信息,包括位置、颜色、和大小等参数中的一种或多种,通过这些标定信息,终端可以从初始特征点中筛选出符合条件的若干特征点。终端筛选出来的若干特征点,还需要对其进行数量统计,只有数量与预设数量相同,才能将其确定为目标特征点。In this embodiment, in this process, for each target image unit, the terminal first obtains initial feature points that may be valid feature points in each target image unit. Since the feature points in the calibration board have corresponding calibration information, including one or more of parameters such as position, color, and size, through these calibration information, the terminal can screen out several qualified feature points from the initial feature points. A number of feature points screened by the terminal also need to be counted. Only when the number is the same as the preset number can they be determined as target feature points.
在上述实施例中,终端对特征点进行检测并筛选的目的在于进一步提高标定信息的准确性,从而提高标定结果的准确性,降低误差。In the above-mentioned embodiment, the purpose of detecting and screening the feature points by the terminal is to further improve the accuracy of the calibration information, thereby improving the accuracy of the calibration result and reducing the error.
例如,在图3中,每个标定板上所包含的特征点是具有一定规律的阵列排布形式,其数量固定不变。经过上述筛选后,所获得的标定信息,方可用于对待标定摄像头进行标定。For example, in FIG. 3 , the feature points included in each calibration plate are arranged in a regular array, and the number of the feature points is fixed. After the above screening, the obtained calibration information can be used to calibrate the camera to be calibrated.
步骤S208,基于每个目标图像单元中的目标标定信息对待标定摄像头进行标定。Step S208, the camera to be calibrated is calibrated based on the target calibration information in each target image unit.
也就是说,终端基于上述过程所获得的目标标定信息,其目的是将其应用于待标定摄像头的标定过程,从而完成对待标定摄像头的标定。That is to say, the purpose of the target calibration information obtained by the terminal based on the above process is to apply it to the calibration process of the to-be-calibrated camera, so as to complete the calibration of the to-be-calibrated camera.
在一个实施例中,基于每个图像单元中的目标标定信息对待标定摄像头进行标定,包括:将目标标定信息转换为与世界坐标系、相机坐标系、图像坐标系和像素坐标系分别对应的目标坐标信息;基于与世界坐标系、相机坐标系、图像坐标系和像素坐标系分别对应的目标坐标信息,计算待标定摄像头的外参矩阵和内参矩阵;根据外参矩阵和内参矩阵,实现对待标定摄像头的标定。In one embodiment, calibrating the camera to be calibrated based on the target calibration information in each image unit includes: converting the target calibration information into targets corresponding to the world coordinate system, the camera coordinate system, the image coordinate system and the pixel coordinate system respectively Coordinate information; based on the target coordinate information corresponding to the world coordinate system, camera coordinate system, image coordinate system and pixel coordinate system, calculate the external parameter matrix and internal parameter matrix of the camera to be calibrated; Camera calibration.
相机标定的过程即为求解待标定摄像头参数矩阵的过程。对于同一具体对象而言,终端获取目标标定信息以后,其在世界坐标系、相机坐标系、图像坐标系和像素坐标系中分别具有对应的目标坐标信息,将这些目标坐标信息相互对应关联起来的矩阵关系,就构成了待标定摄像头的外参矩阵和内参矩阵。对标定完成的摄像头来说,利用外参矩阵和内参矩阵,即可实现对任意物品进行拍摄,并对应获得该物品对应在其他坐标系中的矩阵位置。The process of camera calibration is the process of solving the camera parameter matrix to be calibrated. For the same specific object, after the terminal obtains the target calibration information, it has corresponding target coordinate information in the world coordinate system, camera coordinate system, image coordinate system and pixel coordinate system respectively, and these target coordinate information are associated with each other correspondingly. The matrix relationship constitutes the external parameter matrix and the internal parameter matrix of the camera to be calibrated. For the camera that has been calibrated, the external parameter matrix and the internal parameter matrix can be used to capture any item, and the corresponding matrix position of the item in other coordinate systems can be obtained.
上述摄像头标定方法,通过对多个标定板摆放的位置、角度等进行限制,让初始图像中的标定板以不同的角度和位置呈现,同时为了对同一张初始图像中的多张标定板进行区分,还设置了分隔标识。通过分隔标识,就可以将初始图像中的多个标定板区分开来,对应裁 剪成多个单独的目标图像单元,这样就避免了需要利用待标定摄像头多次从不同角度、不同位置对标定板进行拍摄的过程。同时,对于每个单独的目标图像单元,还对其进行了标定信息检测,以保证每个目标图像单元中对应包含有一个完整的标定板中所具有的目标标定信息,然后基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。这样,由于通过一张初始图像即可完成对多角度、不同距离的标定板的图像采集,避免了多次人为改变标定板所带来的误差,提高了摄像头标定的效率和一致性。且上述方案在标定之前先对标定板的图片进行特征点检测,降低了因为灯光不足或者镜头分辨率不高引入的错点,提高了标定板上特征点检测的准确性。The above camera calibration method limits the positions and angles of multiple calibration boards, so that the calibration boards in the initial image are presented at different angles and positions. Distinguish, and also set the separation flag. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting. At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated. In this way, since the image acquisition of the multi-angle and different distance calibration plates can be completed through an initial image, errors caused by multiple manual changes of the calibration plates are avoided, and the efficiency and consistency of camera calibration are improved. In addition, the above scheme performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
应该理解的是,虽然图2的流程图中的各个步骤按照箭头的指示依次显示,但是这些步骤并不是必然按照箭头指示的顺序依次执行。除非本文中有明确的说明,这些步骤的执行并没有严格的顺序限制,这些步骤可以以其它的顺序执行。而且,图2中的至少一部分步骤可以包括多个步骤或者多个阶段,这些步骤或者阶段并不必然是在同一时刻执行完成,而是可以在不同的时刻执行,这些步骤或者阶段的执行顺序也不必然是依次进行,而是可以与其它步骤或者其它步骤中的步骤或者阶段的至少一部分轮流或者交替地执行。It should be understood that although the various steps in the flowchart of FIG. 2 are shown in sequence according to the arrows, these steps are not necessarily executed in the sequence shown by the arrows. Unless explicitly stated herein, the execution of these steps is not strictly limited to the order, and these steps may be performed in other orders. Moreover, at least a part of the steps in FIG. 2 may include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but may be executed at different times, and the execution sequence of these steps or stages is also It does not have to be performed sequentially, but may be performed alternately or alternately with other steps or at least a portion of the steps or stages within the other steps.
在一个实施例中,如图4所示,提供了一种摄像头标定装置,包括:图像模块402,分隔模块404,检测模块406,标定模块408,其中:In one embodiment, as shown in FIG. 4, a camera calibration device is provided, including: an image module 402, a separation module 404, a detection module 406, and a calibration module 408, wherein:
图像模块402,用于获取通过待标定摄像头采集得到的初始图像;初始图像通过待标定摄像头对多个不重叠的标定板进行拍摄得到,且多个标定板两两之间设置有分隔标识;The image module 402 is used to obtain an initial image collected by a camera to be calibrated; the initial image is obtained by photographing a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates;
分隔模块404,用于根据分隔标识对初始图像进行分隔处理,得到与各标定板分别对应的目标图像单元;目标图像单元包含有对应的标定板中全部的标定信息;The separation module 404 is used to perform separation processing on the initial image according to the separation identification, and obtain the target image unit corresponding to each calibration plate respectively; the target image unit contains all the calibration information in the corresponding calibration plate;
检测模块406,用于分别对每个目标图像单元中的标定信息进行检测,并基于检测结果从各目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;The detection module 406 is used to detect the calibration information in each target image unit respectively, and screen out the target calibration information that satisfies the calibration conditions from the calibration information of each target image unit based on the detection result;
标定模块408,用于基于每个目标图像单元中的目标标定信息对待标定摄像头进行标定。The calibration module 408 is configured to calibrate the camera to be calibrated based on the target calibration information in each target image unit.
上述摄像头标定装置,通过对多个标定板摆放的位置、角度等进行限制,让初始图像中的标定板以不同的角度和位置呈现,同时为了对同一张初始图像中的多张标定板进行区分,还设置了分隔标识。通过分隔标识,就可以将初始图像中的多个标定板区分开来,对应裁剪成多个单独的目标图像单元,这样就避免了需要利用待标定摄像头多次从不同角度、不同位置对标定板进行拍摄的过程。同时,对于每个单独的目标图像单元,还对其进行了标定信息检测,以保证每个目标图像单元中对应包含有一个完整的标定板中所具有的目标标定信息,然后基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。这样,由于通过一张初始图像即可完成对多角度、不同距离的标定板的图像采集,避免了多次人为改变标定板所带来的误差,提高了摄像头标定的效率和一致性。且上述方案在标 定之前先对标定板的图片进行特征点检测,降低了因为灯光不足或者镜头分辨率不高引入的错点,提高了标定板上特征点检测的准确性。The above camera calibration device, by restricting the positions and angles of multiple calibration plates, allows the calibration plates in the initial image to be presented at different angles and positions. Distinguish, and also set the separation flag. By separating the logos, multiple calibration boards in the initial image can be distinguished, and correspondingly cropped into multiple individual target image units, thus avoiding the need to use the camera to be calibrated multiple times from different angles and different positions. The process of shooting. At the same time, for each individual target image unit, the calibration information detection is also carried out to ensure that each target image unit corresponds to the target calibration information contained in a complete calibration plate, and then based on each The target calibration information in the target image unit calibrates the camera to be calibrated. In this way, since the image acquisition of the multi-angle and different distance calibration plates can be completed through an initial image, errors caused by multiple manual changes of the calibration plates are avoided, and the efficiency and consistency of camera calibration are improved. In addition, the above-mentioned scheme first performs feature point detection on the picture of the calibration board before calibration, which reduces the wrong points introduced due to insufficient lighting or low resolution of the lens, and improves the accuracy of feature point detection on the calibration board.
在一个实施例中,多个不重叠的标定板中包括有初始标定板和对照标定板;在通过待标定摄像头采集初始图像之前,多个不重叠的标定板被设置于待标定摄像头视野范围内,且多个不重叠的标定板中的初始标定板位于中心位置,多个不重叠的标定板中除初始标定板之外的对照标定板均匀地分布在初始标定板的四周。In one embodiment, the plurality of non-overlapping calibration plates include an initial calibration plate and a control calibration plate; before the initial image is captured by the camera to be calibrated, the plurality of non-overlapping calibration plates are set within the field of view of the camera to be calibrated , and the initial calibration plate among the multiple non-overlapping calibration plates is located at the center position, and the control calibration plates except the initial calibration plate among the multiple non-overlapping calibration plates are evenly distributed around the initial calibration plate.
在上述实施例中,为了能够更好地对多个标定板进行处理,上述标定板中包括有初始标定板和对照标定板,其中初始标定板一般位于判断待标定摄像头的视野中心,对照标定板围绕初始标定板设置,以保证视野范围内标定板位置的合理和均匀,进一步提高待标定摄像头所获取的初始图像的图像质量。In the above embodiment, in order to better process multiple calibration plates, the above-mentioned calibration plate includes an initial calibration plate and a comparison calibration plate, wherein the initial calibration plate is generally located in the center of the field of view for judging the camera to be calibrated, and the comparison calibration plate Set around the initial calibration plate to ensure the reasonable and uniform position of the calibration plate within the field of view, and further improve the image quality of the initial image obtained by the camera to be calibrated.
在一个实施例中,两两标定板之间设置的分隔标识位于两两相邻的对照标定板之间的夹角顶点,和/或,每个对照标定板所处平面分别与初始标定板所处平面之间具有10度至30度大小的夹角。In one embodiment, the separation marks provided between the two calibration plates are located at the apex of the included angle between the adjacent comparison calibration plates, and/or, the planes where each comparison calibration plate is located are respectively different from those of the initial calibration plate. There is an included angle of 10 degrees to 30 degrees between the planes.
在上述实施例中,由于待标定摄像头所拍摄的初始图像中包含有多个标定板的信息,通过对照标定板的不同角度设置,并利用位于标定板分界区域里的分隔标识,能够保证初始图像中采集到的标定板信息便于分割,且符合具体的标定要求。In the above-mentioned embodiment, since the initial image captured by the camera to be calibrated contains information of multiple calibration plates, the initial image can be guaranteed by setting the different angles of the calibration plate and using the separation mark located in the boundary area of the calibration plate. The information of the calibration plate collected in the data is easy to be segmented and meets the specific calibration requirements.
在一个实施例中,分隔模块,还用于:对所述初始图像进行检测,识别所述初始图像中的所述分隔标识;通过所述分隔标识确定所述初始图像的多条目标裁剪线,其中,每条目标裁剪线上具有至少一个分隔标识;根据所述多条目标裁剪线对所述初始图像进行裁剪,得到与各所述标定板分别对应的目标图像单元。In one embodiment, the separation module is further configured to: detect the initial image, and identify the separation mark in the initial image; determine a plurality of target crop lines of the initial image by using the separation mark, Wherein, each target cropping line has at least one separation mark; the initial image is cropped according to the plurality of target cropping lines to obtain target image units corresponding to each of the calibration boards respectively.
本实施例中,在利用分隔标识对初始图像进行裁剪的过程中,首先对初始图像进行检测,识别其中所包含的分隔标识,然后划分目标裁剪线,每条目标裁剪线至少通过一个分隔标识,然后利用目标裁剪线对初始图像进行分割,得到与各个标定板分别对应的目标图像单元。In this embodiment, in the process of cropping the initial image by using the separation marks, the initial image is first detected, the separation marks contained therein are identified, and then the target cropping lines are divided, and each target cropping line passes at least one separation mark, Then, the initial image is segmented by the target crop line, and the target image units corresponding to each calibration plate are obtained.
在上述实施例中,这样可以保证目标裁剪线一定会通过分隔标识所在的标定板分界区域里,降低了从初始图像中识别出具体的标定板信息的难度,提高了标定效率。In the above embodiment, it can be ensured that the target crop line will pass through the boundary area of the calibration plate where the separation mark is located, which reduces the difficulty of identifying specific calibration plate information from the initial image and improves the calibration efficiency.
在一个实施例中,分隔模块,还用于:通过所述分隔标识划定所述初始图像的多条初始裁剪线;所述多条初始裁剪线将所述初始图像划分为与所述多个标定板数量相等的多个初始图像单元;对所述多个初始图像单元进行检测,判断各个所述初始图像单元中是否包含有对应的标定板中全部的标定信息;当所述初始图像单元中存在瑕疵图像单元时,则更改所述初始裁剪线,重新对所述初始图像进行划分,并对重新划分得到的所述多个初始图像单元进行检测;所述瑕疵图像单元为未包括有一个完整的标定板的全部的标定信息的图像 单元;当所述初始单元中不存在所述瑕疵图像单元时,则将所述初始图像单元保存为用于对待标定摄像头进行标定的目标图像单元。In one embodiment, the separation module is further configured to: demarcate a plurality of initial crop lines of the initial image by using the separation identifier; and the plurality of initial crop lines divide the initial image into different parts from the plurality of initial crop lines A plurality of initial image units with the same number of calibration plates; the plurality of initial image units are detected to determine whether each of the initial image units contains all the calibration information in the corresponding calibration plate; when the initial image units are in When there is a defective image unit, the initial crop line is changed, the initial image is re-divided, and the plurality of initial image units obtained by re-dividing are detected; the defective image unit does not include a complete image unit. The image unit of all the calibration information of the calibration board; when the defective image unit does not exist in the initial unit, the initial image unit is saved as the target image unit for calibrating the camera to be calibrated.
在上述实施例中,通过对图像剪裁得到的初始图像单元进行检测,可以在裁剪阶段就确保每个目标图像单元都是包括有一个完整的标定板的全部的标定信息的图像单元,从而提高了整个标定过程的效率和准确率。In the above embodiment, by detecting the initial image unit obtained by image cropping, it can be ensured that each target image unit is an image unit including all the calibration information of a complete calibration plate in the cropping stage, thereby improving the Efficiency and accuracy of the entire calibration process.
在一个实施例中,检测模块,还用于:分别对每个所述图像单元中的标定信息进行检测,以提取各所述图像单元中的初始特征点;对于每张图像单元,基于相应图像单元中的初始特征点的位置、颜色、和大小,从所述初始特征点中筛选出预设数量的目标特征点;将筛选出的目标特征点的位置信息作为相应图像单元的目标标定信息。In one embodiment, the detection module is further configured to: detect the calibration information in each of the image units respectively, so as to extract the initial feature points in each of the image units; for each image unit, based on the corresponding image The position, color, and size of the initial feature points in the unit, and a preset number of target feature points are screened from the initial feature points; the position information of the screened target feature points is used as the target calibration information of the corresponding image unit.
在上述实施例中,对特征点进行检测并筛选的目的在于进一步提高标定信息的准确性,从而提高标定结果的准确性,降低误差。In the above embodiment, the purpose of detecting and screening feature points is to further improve the accuracy of calibration information, thereby improving the accuracy of calibration results and reducing errors.
在上述实施例中,标定模块,还用于:将所述目标标定信息转换为与世界坐标系、相机坐标系、图像坐标系和像素坐标系分别对应的目标坐标信息;基于与所述世界坐标系、相机坐标系、图像坐标系和像素坐标系分别对应的目标坐标信息,计算所述待标定摄像头的外参矩阵和内参矩阵;根据所述外参矩阵和所述内参矩阵,实现对所述待标定摄像头的标定。In the above embodiment, the calibration module is further configured to: convert the target calibration information into target coordinate information corresponding to the world coordinate system, the camera coordinate system, the image coordinate system and the pixel coordinate system respectively; system, camera coordinate system, image coordinate system and pixel coordinate system respectively corresponding target coordinate information, calculate the external parameter matrix and internal parameter matrix of the camera to be calibrated; according to the external parameter matrix and the internal parameter matrix, realize the Calibration of the camera to be calibrated.
关于上述摄像头标定装置的具体限定可以参见上文中对于摄像头标定方法的限定,在此不再赘述。上述摄像头标定装置中的各个模块可全部或部分通过软件、硬件及其组合来实现。上述各模块可以硬件形式内嵌于或独立于计算机设备中的处理器中,也可以以软件形式存储于计算机设备中的存储器中,以便于处理器调用执行以上各个模块对应的操作。For the specific limitations of the above camera calibration device, reference may be made to the limitations on the camera calibration method above, which will not be repeated here. All or part of the modules in the above camera calibration device can be implemented by software, hardware and combinations thereof. The above modules can be embedded in or independent of the processor in the computer device in the form of hardware, or stored in the memory in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
在一个实施例中,提供了一种计算机设备,该计算机设备可以是终端,其内部结构图可以如图5所示。该计算机设备包括通过系统总线连接的处理器、存储器、通信接口、显示屏和输入装置。其中,该计算机设备的处理器用于提供计算和控制能力。该计算机设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机程序。该内存储器为非易失性存储介质中的操作系统和计算机程序的运行提供环境。该计算机设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、NFC(近场通信)或其他技术实现。该计算机程序被处理器执行时以实现一种摄像头标定方法。该计算机设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该计算机设备的输入装置可以是显示屏上覆盖的触摸层,也可以是计算机设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, a computer device is provided, and the computer device may be a terminal, and its internal structure diagram may be as shown in FIG. 5 . The computer equipment includes a processor, memory, a communication interface, a display screen, and an input device connected by a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium, an internal memory. The nonvolatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the execution of the operating system and computer programs in the non-volatile storage medium. The communication interface of the computer device is used for wired or wireless communication with an external terminal, and the wireless communication can be realized by WIFI, operator network, NFC (Near Field Communication) or other technologies. The computer program implements a camera calibration method when executed by the processor. The display screen of the computer equipment may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer equipment may be a touch layer covered on the display screen, or a button, a trackball or a touchpad set on the shell of the computer equipment , or an external keyboard, trackpad, or mouse.
本领域技术人员可以理解,图5中示出的结构,仅仅是与本申请方案相关的部分结构的框图,并不构成对本申请方案所应用于其上的计算机设备的限定,具体的计算机设备可以 包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 5 is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer equipment to which the solution of the present application is applied. Include more or fewer components than shown in the figures, or combine certain components, or have a different arrangement of components.
在一个实施例中,还提供了一种计算机设备,包括存储器和处理器,存储器中存储有计算机程序,该处理器执行计算机程序时实现上述各方法实施例中的步骤。In one embodiment, a computer device is also provided, including a memory and a processor, where a computer program is stored in the memory, and the processor implements the steps in the foregoing method embodiments when the processor executes the computer program.
在一个实施例中,还提供了一种计算机可读存储介质,其上存储有计算机程序,计算机程序被处理器执行时实现上述各方法实施例中的步骤。In one embodiment, a computer-readable storage medium is also provided, and a computer program is stored thereon, and when the computer program is executed by a processor, the steps in the foregoing method embodiments are implemented.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机程序来指令相关的硬件来完成,所述的计算机程序可存储于一非易失性计算机可读取存储介质中,该计算机程序在执行时,可包括如上述各方法的实施例的流程。其中,本申请所提供的各实施例中所使用的对存储器、存储、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或外部高速缓冲存储器。作为说明而非局限,RAM可以是多种形式,比如静态随机存取存储器(Static Random Access Memory,SRAM)或动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage In the medium, when the computer program is executed, it may include the processes of the above-mentioned method embodiments. Wherein, any reference to memory, storage, database or other media used in the various embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory, or optical memory, and the like. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, the RAM may be in various forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. In order to make the description simple, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features It is considered to be the range described in this specification.
以上所述实施例仅表达了本申请的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对申请专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本申请构思的前提下,还可以做出若干变形和改进,这些都属于本申请的保护范围。因此,本申请专利的保护范围应以所附权利要求为准。The above-mentioned embodiments only represent several embodiments of the present application, and the descriptions thereof are relatively specific and detailed, but should not be construed as a limitation on the scope of the patent application. It should be pointed out that for those skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the scope of protection of the patent of the present application shall be subject to the appended claims.

Claims (10)

  1. 一种摄像头标定方法,所述方法包括:A camera calibration method, the method comprising:
    获取通过待标定摄像头采集得到的初始图像;所述初始图像通过所述待标定摄像头对多个不重叠的标定板进行拍摄得到,且所述多个标定板两两之间设置有分隔标识;acquiring an initial image collected by a camera to be calibrated; the initial image is obtained by shooting a plurality of non-overlapping calibration plates by the camera to be calibrated, and a separation mark is set between the plurality of calibration plates;
    根据所述分隔标识对所述初始图像进行分隔处理,得到与各所述标定板分别对应的目标图像单元;所述目标图像单元包含有对应的标定板中全部的标定信息;Perform separation processing on the initial image according to the separation identification to obtain target image units corresponding to each of the calibration plates; the target image units contain all the calibration information in the corresponding calibration plate;
    分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;Detecting the calibration information in each of the target image units respectively, and screening out target calibration information that satisfies the calibration conditions from the calibration information of each of the target image units based on the detection results;
    基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。The camera to be calibrated is calibrated based on the target calibration information in each of the target image units.
  2. 根据权利要求1所述的方法,其中,所述多个不重叠的标定板中包括有初始标定板和对照标定板;在通过所述待标定摄像头采集初始图像之前,所述多个不重叠的标定板被设置于待标定摄像头视野范围内,且所述多个不重叠的标定板中的初始标定板位于中心位置,所述多个不重叠的标定板中除所述初始标定板之外的对照标定板均匀地分布在所述初始标定板的四周。The method according to claim 1, wherein the plurality of non-overlapping calibration plates include an initial calibration plate and a control calibration plate; before collecting an initial image by the camera to be calibrated, the plurality of non-overlapping calibration plates The calibration plate is set in the field of view of the camera to be calibrated, and the initial calibration plate in the plurality of non-overlapping calibration plates is located at the center position, and the plurality of non-overlapping calibration plates except for the initial calibration plate. The control calibration plate is evenly distributed around the initial calibration plate.
  3. 根据权利要求2所述的方法,其中,所述两两标定板之间设置的分隔标识位于两两相邻的对照标定板之间的夹角顶点,和/或,The method according to claim 2, wherein the separation marks set between the two calibration plates are located at the apex of the included angle between the adjacent comparison calibration plates, and/or,
    每个所述对照标定板所处平面分别与所述初始标定板所处平面之间具有10度至30度大小的夹角。There is an included angle of 10 degrees to 30 degrees between the plane where each control calibration plate is located and the plane where the initial calibration plate is located.
  4. 根据权利要求1至3中任一项所述的方法,其中,所述根据所述分隔标识对所述初始图像进行分隔处理,得到与各所述标定板分别对应的目标图像单元,包括:The method according to any one of claims 1 to 3, wherein the performing separation processing on the initial image according to the separation identification to obtain target image units corresponding to each of the calibration plates, comprising:
    对所述初始图像进行检测,识别所述初始图像中的所述分隔标识;Detecting the initial image, and identifying the separation mark in the initial image;
    通过所述分隔标识确定所述初始图像的多条目标裁剪线,其中,每条目标裁剪线上具有至少一个分隔标识;A plurality of target crop lines of the initial image are determined by the separation marks, wherein each target crop line has at least one separation mark;
    根据所述多条目标裁剪线对所述初始图像进行裁剪,得到与各所述标定板分别对应的目标图像单元。The initial image is cropped according to the multiple target cropping lines to obtain target image units corresponding to each of the calibration boards respectively.
  5. 根据权利要求4所述的方法,其中,所述通过所述分隔标识确定所述初始图像的多条目标裁剪线,包括:The method according to claim 4, wherein the determining a plurality of target crop lines of the initial image by the separation identification comprises:
    通过所述分隔标识划定所述初始图像的多条初始裁剪线;所述多条初始裁剪线将所述初始图像划分为与所述多个标定板数量相等的多个初始图像单元;A plurality of initial cropping lines of the initial image are delineated by the separation marks; the plurality of initial cropping lines divide the initial image into a plurality of initial image units equal to the number of the plurality of calibration plates;
    对所述多个初始图像单元进行检测,判断各个所述初始图像单元中是否包含有对应的标定板中全部的标定信息;Detecting the plurality of initial image units, and judging whether each of the initial image units contains all the calibration information in the corresponding calibration plate;
    当所述初始图像单元中存在瑕疵图像单元时,则更改所述初始裁剪线,重新对所述初 始图像进行划分,并对重新划分得到的所述多个初始图像单元进行检测;所述瑕疵图像单元为未包括有一个完整的标定板的全部的标定信息的图像单元;When there is a defective image unit in the initial image unit, the initial crop line is changed, the initial image is re-divided, and the plurality of initial image units obtained by re-dividing are detected; the defective image The unit is an image unit that does not include all the calibration information of a complete calibration plate;
    当所述初始单元中不存在所述瑕疵图像单元时,则将所述初始图像单元保存为用于对待标定摄像头进行标定的目标图像单元。When the defective image unit does not exist in the initial unit, the initial image unit is saved as a target image unit for calibrating the camera to be calibrated.
  6. 根据权利要求1至5中任一项所述的方法,其中,所述分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息,包括:The method according to any one of claims 1 to 5, wherein the calibration information in each of the target image units is detected separately, and based on the detection result, the calibration information of each of the target image units is obtained from the calibration information. Filter out target calibration information that meets calibration conditions, including:
    分别对每个所述图像单元中的标定信息进行检测,以提取各所述图像单元中的初始特征点;Detecting the calibration information in each of the image units respectively, to extract the initial feature points in each of the image units;
    对于每张图像单元,基于相应图像单元中的初始特征点的位置、颜色、和大小,从所述初始特征点中筛选出预设数量的目标特征点;For each image unit, based on the position, color, and size of the initial feature points in the corresponding image unit, filter out a preset number of target feature points from the initial feature points;
    将筛选出的目标特征点的位置信息作为相应图像单元的目标标定信息。The position information of the selected target feature points is used as the target calibration information of the corresponding image unit.
  7. 根据权利要求1至6中任一项所述的方法,其中,所述基于每个所述图像单元中的目标标定信息对所述待标定摄像头进行标定,包括:The method according to any one of claims 1 to 6, wherein the calibrating the camera to be calibrated based on the target calibration information in each of the image units comprises:
    将所述目标标定信息转换为与世界坐标系、相机坐标系、图像坐标系和像素坐标系分别对应的目标坐标信息;Converting the target calibration information into target coordinate information corresponding to the world coordinate system, the camera coordinate system, the image coordinate system and the pixel coordinate system respectively;
    基于与所述世界坐标系、相机坐标系、图像坐标系和像素坐标系分别对应的目标坐标信息,计算所述待标定摄像头的外参矩阵和内参矩阵;Calculate the external parameter matrix and the internal parameter matrix of the camera to be calibrated based on the target coordinate information corresponding to the world coordinate system, the camera coordinate system, the image coordinate system and the pixel coordinate system respectively;
    根据所述外参矩阵和所述内参矩阵,实现对所述待标定摄像头的标定。The calibration of the camera to be calibrated is realized according to the external parameter matrix and the internal parameter matrix.
  8. 一种摄像头标定装置,所述装置包括:A camera calibration device, the device comprising:
    图像模块,用于获取通过待标定摄像头采集得到的初始图像;所述初始图像通过所述待标定摄像头对多个不重叠的标定板进行拍摄得到,且所述多个标定板两两之间设置有分隔标识;The image module is used to obtain the initial image collected by the camera to be calibrated; the initial image is obtained by shooting a plurality of non-overlapping calibration plates by the camera to be calibrated, and the plurality of calibration plates are set between two There is a separation mark;
    分隔模块,用于根据所述分隔标识对所述初始图像进行分隔处理,得到与各所述标定板分别对应的目标图像单元;所述目标图像单元包含有对应的标定板中全部的标定信息;a separation module, configured to perform separation processing on the initial image according to the separation identification to obtain target image units corresponding to each of the calibration plates; the target image units contain all the calibration information in the corresponding calibration plate;
    检测模块,用于分别对每个所述目标图像单元中的标定信息进行检测,并基于检测结果从各所述目标图像单元的标定信息中筛选出满足标定条件的目标标定信息;a detection module, configured to detect the calibration information in each of the target image units respectively, and screen out target calibration information that satisfies the calibration conditions from the calibration information of each of the target image units based on the detection result;
    标定模块,用于基于每个所述目标图像单元中的目标标定信息对所述待标定摄像头进行标定。A calibration module, configured to calibrate the camera to be calibrated based on the target calibration information in each of the target image units.
  9. 一种计算机设备,包括存储器和处理器,所述存储器存储有计算机程序,所述处理器执行所述计算机程序时实现权利要求1至7中任一项所述的方法的步骤。A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the steps of the method of any one of claims 1 to 7 when the processor executes the computer program.
  10. 一种计算机可读存储介质,其上存储有计算机程序,所述计算机程序被处理器执行 时实现权利要求1至7中任一项所述的方法的步骤。A computer-readable storage medium having stored thereon a computer program that, when executed by a processor, implements the steps of the method of any one of claims 1 to 7.
PCT/CN2021/139944 2020-12-30 2021-12-21 Camera calibration method and apparatus, and computer device and storage medium WO2022143283A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202011625915.3A CN112581546A (en) 2020-12-30 2020-12-30 Camera calibration method and device, computer equipment and storage medium
CN202011625915.3 2020-12-30

Publications (1)

Publication Number Publication Date
WO2022143283A1 true WO2022143283A1 (en) 2022-07-07

Family

ID=75144415

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/139944 WO2022143283A1 (en) 2020-12-30 2021-12-21 Camera calibration method and apparatus, and computer device and storage medium

Country Status (2)

Country Link
CN (1) CN112581546A (en)
WO (1) WO2022143283A1 (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115713555A (en) * 2022-11-09 2023-02-24 中国南方电网有限责任公司超高压输电公司昆明局 Method and device for determining installation position of image acquisition equipment and computer equipment
CN115908589A (en) * 2023-02-23 2023-04-04 深圳佑驾创新科技有限公司 Multi-sensor calibration system and method
CN115937332A (en) * 2023-03-09 2023-04-07 江西明天高科技股份有限公司 Multi-camera rapid calibration method and three-dimensional calibration object
CN116503493A (en) * 2023-06-27 2023-07-28 季华实验室 Multi-camera calibration method, high-precision equipment and computer readable storage medium

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112581546A (en) * 2020-12-30 2021-03-30 深圳市杉川机器人有限公司 Camera calibration method and device, computer equipment and storage medium
CN113470116B (en) * 2021-06-16 2023-09-01 杭州海康威视数字技术股份有限公司 Verification method, device, equipment and storage medium for calibration data of camera device
CN113643377B (en) * 2021-07-12 2024-03-19 杭州易现先进科技有限公司 Single lens consistency error analysis method and system based on multiple calibration

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8619144B1 (en) * 2012-03-14 2013-12-31 Rawles Llc Automatic camera calibration
CN106815873A (en) * 2017-01-19 2017-06-09 宁波维森智能传感技术有限公司 The determination method and apparatus of camera internal reference
CN108257185A (en) * 2018-01-03 2018-07-06 上海兴芯微电子科技有限公司 More checkerboard angle point detection process and camera marking method
CN109584311A (en) * 2018-11-30 2019-04-05 Oppo广东移动通信有限公司 Camera calibration method, device, electronic equipment and computer readable storage medium
CN112132907A (en) * 2020-09-22 2020-12-25 北京的卢深视科技有限公司 Camera calibration method and device, electronic equipment and storage medium
CN112581546A (en) * 2020-12-30 2021-03-30 深圳市杉川机器人有限公司 Camera calibration method and device, computer equipment and storage medium

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107067441B (en) * 2017-04-01 2020-02-11 海信集团有限公司 Camera calibration method and device
CN110717942B (en) * 2018-07-11 2022-06-10 Oppo广东移动通信有限公司 Image processing method and device, electronic equipment and computer readable storage medium
CN111861980B (en) * 2020-05-29 2022-02-01 合肥联宝信息技术有限公司 Imaging detection method, electronic equipment and computer readable storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8619144B1 (en) * 2012-03-14 2013-12-31 Rawles Llc Automatic camera calibration
CN106815873A (en) * 2017-01-19 2017-06-09 宁波维森智能传感技术有限公司 The determination method and apparatus of camera internal reference
CN108257185A (en) * 2018-01-03 2018-07-06 上海兴芯微电子科技有限公司 More checkerboard angle point detection process and camera marking method
CN109584311A (en) * 2018-11-30 2019-04-05 Oppo广东移动通信有限公司 Camera calibration method, device, electronic equipment and computer readable storage medium
CN112132907A (en) * 2020-09-22 2020-12-25 北京的卢深视科技有限公司 Camera calibration method and device, electronic equipment and storage medium
CN112581546A (en) * 2020-12-30 2021-03-30 深圳市杉川机器人有限公司 Camera calibration method and device, computer equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
ANDREAS GEIGER ; FRANK MOOSMANN ; OMER CAR ; BERNHARD SCHUSTER: "Automatic camera and range sensor calibration using a single shot", ROBOTICS AND AUTOMATION (ICRA), 2012 IEEE INTERNATIONAL CONFERENCE ON, IEEE, 14 May 2012 (2012-05-14), pages 3936 - 3943, XP032194165, ISBN: 978-1-4673-1403-9, DOI: 10.1109/ICRA.2012.6224570 *

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115713555A (en) * 2022-11-09 2023-02-24 中国南方电网有限责任公司超高压输电公司昆明局 Method and device for determining installation position of image acquisition equipment and computer equipment
CN115713555B (en) * 2022-11-09 2023-12-08 中国南方电网有限责任公司超高压输电公司昆明局 Image acquisition equipment installation position determining method and device and computer equipment
CN115908589A (en) * 2023-02-23 2023-04-04 深圳佑驾创新科技有限公司 Multi-sensor calibration system and method
CN115937332A (en) * 2023-03-09 2023-04-07 江西明天高科技股份有限公司 Multi-camera rapid calibration method and three-dimensional calibration object
CN115937332B (en) * 2023-03-09 2023-08-15 江西明天高科技股份有限公司 Multi-camera quick calibration method and three-dimensional calibration object
CN116503493A (en) * 2023-06-27 2023-07-28 季华实验室 Multi-camera calibration method, high-precision equipment and computer readable storage medium
CN116503493B (en) * 2023-06-27 2023-10-20 季华实验室 Multi-camera calibration method, high-precision equipment and computer readable storage medium

Also Published As

Publication number Publication date
CN112581546A (en) 2021-03-30

Similar Documents

Publication Publication Date Title
WO2022143283A1 (en) Camera calibration method and apparatus, and computer device and storage medium
US9275281B2 (en) Mobile image capture, processing, and electronic form generation
JP4772839B2 (en) Image identification method and imaging apparatus
CN110189322B (en) Flatness detection method, device, equipment, storage medium and system
WO2017076106A1 (en) Method and device for image splicing
CN111507200A (en) Body temperature detection method, body temperature detection device and dual-optical camera
CN108257186B (en) Method and device for determining calibration image, camera and storage medium
WO2021184302A1 (en) Image processing method and apparatus, imaging device, movable carrier, and storage medium
WO2022002262A1 (en) Character sequence recognition method and apparatus based on computer vision, and device and medium
CN111080571B (en) Camera shielding state detection method, device, terminal and storage medium
WO2022267939A1 (en) Image processing method and apparatus, and computer-readable storage medium
US20170352132A1 (en) Method and apparatus for correcting tilt of subject ocuured in photographing, mobile terminal, and storage medium
WO2019029573A1 (en) Image blurring method, computer-readable storage medium and computer device
WO2022206680A1 (en) Image processing method and apparatus, computer device, and storage medium
CN111127358B (en) Image processing method, device and storage medium
US20190197713A1 (en) Method and apparatus for depth-map estimation
WO2024002186A1 (en) Image fusion method and apparatus, and storage medium
WO2020135097A1 (en) Method and apparatus for channel switch detection of display terminal
CN111885371A (en) Image occlusion detection method and device, electronic equipment and computer readable medium
WO2023151210A1 (en) Image processing method, electronic device and computer-readable storage medium
JP2018014572A (en) Information processing apparatus, image processing system, and program
WO2022206679A1 (en) Image processing method and apparatus, computer device and storage medium
CN112637587B (en) Dead pixel detection method and device
CN116993654A (en) Camera module defect detection method, device, equipment, storage medium and product
CN110971785B (en) Camera shielding state detection method and device, terminal and storage medium

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21914022

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 15.11.2023)