CN-115272479-B - Camera calibration system
Abstract
The invention provides a camera calibration system which comprises an image acquisition module, a sub-pixel edge determination module, a pixel coordinate generation module and a parameter calculation module, wherein the image acquisition module acquires a target calibration plate image which is projected forward relative to a camera, a plurality of first ROI areas are cut out from the target calibration plate image, each first ROI area comprises a calibration icon, the sub-pixel edge determination module is used for extracting a gradient image and an edge pixel point of the calibration icon, finding out a gradient maximum point on the edge pixel point according to the gradient image, determining a sub-pixel edge point of the calibration icon according to the gradient maximum point, the pixel coordinate generation module is used for determining a center point pixel of the calibration icon according to sub-pixel edge point fitting of the calibration icon, further generating a center point pixel coordinate relative to the camera back projection, and the parameter calculation module is used for acquiring a label and a center point pixel coordinate of each calibration icon and determining internal and external parameters of the camera according to the label of the calibration icon and the center point pixel coordinate. According to the invention, the accuracy of camera calibration can be improved, and the camera can be conveniently applied to the picking robot.
Inventors
- HUANG YU
- YANG GUANG
- SU GONGZHE
- ZHOU JIAJI
Assignees
- 星猿哲科技(上海)有限公司
Dates
- Publication Date
- 20260512
- Application Date
- 20220713
Claims (10)
- 1. A camera calibration system, comprising the following modules: The image acquisition module is used for acquiring a target calibration plate image which is orthographic projected relative to the camera, a plurality of first ROI areas are intercepted in the target calibration plate image, and each first ROI area comprises a calibration icon; The sub-pixel edge determining module is used for extracting a gradient map and edge pixel points of the calibration icon, finding out a gradient maximum value point on the edge pixel points according to the gradient map, and determining sub-pixel edge points of the calibration icon according to the gradient maximum value point; The pixel coordinate generation module is used for determining a center point pixel of the calibration icon according to sub-pixel edge point fitting of the calibration icon, and further generating a center point pixel coordinate relative to the back projection of the camera; And the parameter calculation module is used for acquiring the label of each calibration icon and the pixel coordinate of the central point, and determining the internal and external parameters of the target of the camera according to the label of the calibration icon and the pixel coordinate of the central point.
- 2. The camera calibration system according to claim 1, wherein the image acquisition module comprises an image acquisition unit for acquiring a plurality of pre-acquired calibration plate images, the calibration plate images being acquired under a camera coordinate system, a camera parameter unit for acquiring preliminary internal and external parameters generated by preliminary calibration of the camera, and a first image projection unit for projecting the calibration plate images to a calibration plate coordinate system according to the preliminary internal and external parameters to generate a target calibration plate image, and causing the target calibration plate image to be in a front view state in the calibration plate coordinate system.
- 3. The camera calibration system according to claim 1, wherein the sub-pixel edge determination module comprises an edge pixel extraction module for extracting a gradient map and edge pixel points of the calibration icon, a gradient value point extraction module for finding a gradient maximum point on the edge pixel points according to the gradient map, and selecting a second ROI area with the gradient maximum point as a center, and a sub-pixel determination module for taking a centroid of the second ROI area as the sub-pixel edge point.
- 4. The camera calibration system according to claim 1, wherein the pixel coordinate generation module comprises a preliminary coordinate generation module for determining a center point pixel of the calibration icon and generating a center point pixel preliminary coordinate according to sub-pixel edge point fitting of the calibration icon, a camera parameter unit for acquiring preliminary internal and external parameters generated by preliminary calibration of the camera, and a second image projection unit for projecting the center point pixel preliminary coordinate to a camera coordinate system according to the preliminary internal and external parameters to generate a center point pixel coordinate.
- 5. The camera calibration system of claim 1, further comprising an iterative execution module configured to control the image acquisition module, the subpixel edge determination module, the pixel coordinate generation module, and the parameter calculation module to iteratively calculate the target internal and external parameters a plurality of times until the number of executions reaches a preset execution number threshold, or until a target internal and external parameter error of the camera converges to an error minimum.
- 6. The camera calibration system according to claim 1, wherein the label generation of the calibration icons is performed by a label generation module, and the label generation module comprises a gray value calculation unit for generating a plurality of third ROI areas by taking each center point pixel as a center of a circle, an icon distinguishing unit for sequencing the average pixel gray values to generate a gray value sequence, a first calibration icon area and a second calibration icon area in the calibration plate image according to the gray value sequence, a first calibration icon determination unit for calculating the center point pixel distance between every two of the plurality of first calibration icon areas, numbering the first calibration icon areas according to the center point pixel distances, an angle end icon determination unit for determining second calibration icon areas positioned at four angle ends of the calibration plate according to the distance between the center point pixel of the second calibration icon area and the connecting line of the two first calibration icon areas, and a unit for performing all the calibration icon areas according to the second calibration icon areas positioned at the four angle ends of the calibration plate.
- 7. The camera calibration system of claim 6, wherein the diameter of the third ROI area is determined from an average of center distances between all adjacent calibration icon areas.
- 8. The camera calibration system according to claim 5, wherein the error minimum value is an error minimum value determined when a difference between an error of the target internal and external parameters calculated in the current iteration and an error of the target internal and external parameters calculated in the previous iteration is smaller than a preset difference threshold.
- 9. The camera calibration system of claim 6, wherein the first calibration icon area is a large circle area, the second calibration icon area is a small circle area, and the plurality of calibration icon areas before the ranking is the pixel positions of the large circle area.
- 10. The camera calibration system according to claim 9, wherein the first calibration icon determining module determines a plurality of distance values by calculating distances between two centers of circles of the large circle area, sequences the plurality of distance values, respectively finds two pairs of coordinates of centers of circles with minimum and maximum distance values, marks a pair of center points with minimum distance values as a second large circle and a third large circle, marks a pair of center points with maximum distance values as a fourth large circle and a fifth large circle, and marks the remaining large circle area as a first straight line, respectively calculates distances from the centers of the second large circle and the third large circle to the first straight line, marks the short distance as a second large circle, marks the long distance as a third large circle, respectively calculates distances from the centers of circles with the fourth large circle and the fifth large circle to the second straight line, and marks the short distance as a fourth large circle.
Description
Camera calibration system Technical Field The present invention relates to cameras, and in particular to a camera calibration system. Background In image measurement processes and machine vision applications, in order to determine the correlation between the three-dimensional geometric position of a point on the surface of a spatial object and its corresponding point in the image, a geometric model of camera imaging must be established, and these geometric model parameters are camera parameters. Under most conditions, these camera parameters must be obtained through experiments and calculations, and this process of solving the parameters is called camera calibration. In image measurement or machine vision application, calibration of camera parameters is a very critical link, and the accuracy of a calibration result and the stability of an algorithm directly influence the accuracy of a result generated by camera work. When the camera is calibrated, a calibration plate is typically used for calibration. The geometric model of the camera can be obtained by shooting the pattern array flat plate with the fixed space through the camera and calculating through a calibration algorithm, so that high-precision measurement and reconstruction results are obtained. The common calibration plate comprises a checkerboard calibration plate, a round mark point calibration plate, a two-dimensional code calibration plate, a code mark point calibration plate and the like. When the round mark point calibration plate is used for camera calibration, because the round mark point calibration plate images in the camera, the round mark points tend to form elliptical images due to the influences of shooting angles, imaging distortion and the like, and at the moment, when the round mark points are still used as circles for central extraction, the central position extraction errors tend to occur, and the calibration precision is influenced. Disclosure of Invention In view of the drawbacks of the prior art, an object of the present invention is to provide a camera calibration system. The camera calibration system provided by the invention comprises the following modules: The image acquisition module is used for acquiring a target calibration plate image which is orthographic projected relative to the camera, a plurality of first ROI areas are intercepted in the target calibration plate image, and each first ROI area comprises a calibration icon; The sub-pixel edge determining module is used for extracting a gradient map and edge pixel points of the calibration icon, finding out a gradient maximum value point on the edge pixel points according to the gradient map, and determining sub-pixel edge points of the calibration icon according to the gradient maximum value point; The pixel coordinate generation module is used for determining a center point pixel of the calibration icon according to sub-pixel edge point fitting of the calibration icon, and further generating a center point pixel coordinate relative to the back projection of the camera; And the parameter calculation module is used for acquiring the label of each calibration icon and the pixel coordinate of the central point, and determining the internal and external parameters of the target of the camera according to the label of the calibration icon and the pixel coordinate of the central point. Preferably, the image acquisition module comprises the following units: The image acquisition unit is used for acquiring a plurality of pre-acquired calibration plate images, and the calibration plate images are acquired under a camera coordinate system; The camera parameter unit is used for acquiring preliminary internal and external parameters generated by preliminary calibration of the camera; and the first image projection unit is used for projecting the calibration plate image to a calibration plate coordinate system according to the preliminary internal and external parameters to generate a target calibration plate image, and enabling the target calibration plate image to be in a front view state in the calibration plate coordinate system. Preferably, the sub-pixel edge determining module includes the following units: the edge pixel extraction module is used for extracting the gradient map and the edge pixel points of the calibration icon; the gradient value point extraction module is used for finding out a gradient maximum point on the edge pixel points according to the gradient map, and selecting a second ROI region by taking the gradient maximum point as a center; and the sub-pixel determining module is used for taking the centroid of the second ROI area as the sub-pixel edge point. Preferably, the pixel coordinate generating module includes the following units: The primary coordinate generation module is used for determining a center point pixel of the calibration icon according to sub-pixel edge point fitting of the calibration icon and generating a center point pixel primary coor