Camera calibration method, device and electronic equipment

Through automated camera calibration methods and devices, the marking points and ring marks on the calibration board are used to realize automatic calibration of multiple cameras, solving the problems of traditional calibration being inefficient and relying on manual skills, and improving calibration efficiency and accuracy. .

CN118657841BActive Publication Date: 2024-10-25MAXWELL TECH (ZHUHAI) CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411140630.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-20
Publication Date
2024-10-25
Estimated Expiration
2044-08-20

AI Technical Summary

Technical Problem

Traditional vision module calibration requires long-term operation and verification by professionals. It is inefficient and relies on manual skills. It cannot be automated, making the calibration process time-consuming and error-prone.

Method used

Provide a camera calibration method and device that utilizes a ring layout of multiple cameras with no overlapping fields of view, and automatically determines the calibration parameters of the camera by obtaining the mark point area and ring mark on the calibration board, including extracting pixel coordinates, row and column coordinate information and Affine transformation to achieve automatic calibration.

Benefits of technology

No manual intervention is required, which improves calibration efficiency and accuracy, avoids errors caused by manual operations, and realizes automatic calibration of the camera.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118657841B_ABST
    Figure CN118657841B_ABST
Patent Text Reader

Abstract

The present application relates to a camera calibration method, device and electronic device. It obtains a calibration plate corresponding to the working platform, and obtains the first image within the corresponding field of view collected by each camera to be calibrated, determines the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring mark area in the first image, extracts the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determines the row and column coordinate information of each marking point in the calibration plate, and determines the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each marking point and the row and column coordinate information in the calibration plate. It determines the pixel position of the center point of the calibration plate in the image expansion area by using the circular ring mark in the calibration plate, and determines the calibration parameters of the camera accordingly. The entire process does not require manual intervention, which not only improves the calibration efficiency, but also avoids errors caused by manual operation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] In modern industrial production, the application of automated vision modules is becoming more and more widespread, especially in non-standard automated machines, where the calibration of vision modules is particularly important. The calibration of vision modules refers to the process of converting the image information acquired by the camera into actual physical space information through certain methods and algorithms, so as to facilitate subsequent measurement and control. In this process, the vision module needs to be accurately parameterized and calibrated to ensure that it can accurately acquire and process image information.

[0003] In traditional technology, the calibration of vision modules usually requires long-term operation and supervision by professional calibrators. First, the calibrators need to manually set various parameters of the vision module, and then manually verify through a large amount of data to ensure the accuracy of the calibration. Although this method can obtain relatively accurate calibration results, it is time-consuming, labor-intensive, inefficient, and requires high professional skills and experience from the calibrators. Summary of the invention

[0004] Based on this, it is necessary to provide a camera calibration method, device, electronic device, computer-readable storage medium and computer program product that can automatically calibrate in order to solve the above technical problems.

[0005] In a first aspect, the present application provides a camera calibration method, the method being used for automatic calibration of multiple cameras with non-overlapping fields of view, the multiple cameras being arranged in a ring relative to a work platform, the method comprising:

[0006] Obtain a calibration plate corresponding to the work platform, wherein the calibration plate includes a marking point area and a circular ring mark arranged on the outer circle of the marking point area, the center of the circular ring mark coincides with the center point of the calibration plate, and the marking point area is provided with a plurality of marking points evenly arranged in rows and columns;

[0007] Acquire a first image within a corresponding field of view captured by each camera to be calibrated, wherein the first image includes a partial marking point area and a partial ring marking area;

[0008] Determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image, wherein the center point of the calibration plate is outside the field of view of the camera to be calibrated;

[0009] Extracting the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determining the row and column coordinate information of each marking point in the calibration plate;

[0010] According to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate, the calibration parameters of the corresponding camera to be calibrated are determined.

[0011] In one embodiment, determining the pixel position of the center point of the calibration plate based on the pixel coordinates of the partial circular ring marked area in the first image includes: extracting the pixel coordinates located on the inner ring and the pixel coordinates located on the outer ring in the partial circular ring marked area; fitting the pixel coordinates on the inner ring and the pixel coordinates on the outer ring to obtain the fitted ring center coordinates; and determining the ring center coordinates as the pixel position of the center point of the calibration plate.

[0012] In one embodiment, determining the row and column coordinate information of each marking point located in the calibration plate includes: sorting each marking point in rows and columns according to the pixel coordinates of each marking point in the partial marking point area to obtain a sorting result; obtaining the corresponding row spacing and column spacing according to the sorting result; obtaining the row and column coordinate information of each marking point located in the calibration plate according to the pixel coordinates of each marking point, the pixel position of the center point of the calibration plate, the row spacing and the column spacing.

[0013] In one of the embodiments, the marking points include pre-set reference marking points; and according to the pixel coordinates of each marking point in the partial marking point area, each marking point is sorted in rows and columns to obtain a sorting result, including: identifying the pixel coordinates of the reference marking point among the marking points; rotating each marking point based on the pixel coordinates of the reference marking point; and sorting the marking points according to the size of the horizontal coordinates and the size of the vertical coordinates corresponding to the pixel coordinates of the rotated marking points to obtain a sorting result.

[0014] In one embodiment, the marking points include pre-set reference marking points, and the reference marking points have preset coordinate characteristics; after determining the row and column coordinate information of each of the marking points in the calibration plate, the method further includes: identifying the row and column coordinate information of the reference marking points in the marking points; when the row and column coordinate information of the reference marking points does not meet the preset coordinate characteristics, adjusting the parameters of the camera to be calibrated; acquiring the first image within the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted, and returning to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular marking area in the first image, until the row and column coordinate information of the reference marking points meets the preset coordinate characteristics, and calibrating the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate.

[0015] In one of the embodiments, after determining the row and column coordinate information of each of the marking points in the calibration plate, the method further includes: determining the affine transformation relationship from the pixel coordinates of the camera to be calibrated to the calibration plate coordinate system according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate; based on the affine transformation relationship, performing an affine transformation on the pixel coordinates located on the outer ring in the partial circular ring marking area in the first image captured by the camera to be calibrated to obtain a transformed coordinate point set; fitting the coordinate point set to obtain the fitted center coordinates; and obtaining The method comprises the following steps: determining a standard deviation between each coordinate point in the coordinate point set and the coordinates of the center of the circle; adjusting the parameters of the camera to be calibrated when the standard deviation is greater than a set threshold; obtaining a first image within the corresponding field of view acquired by the camera to be calibrated after adjusting the parameters, and returning to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image until the standard deviation is less than or equal to the set threshold, and calibrating the corresponding camera to be calibrated according to the pixel coordinates of each marked point in the partial marked point area and the row and column coordinate information of each marked point in the calibration plate.

[0016] In one embodiment, after determining the calibration parameters of the corresponding camera to be calibrated, the method further includes: the motion axis is located at an initial position in the work platform, and a second image in a corresponding field of view captured by the camera to be calibrated is obtained, wherein the initial position includes the position of the motion axis relative to the first direction and the position relative to the second direction; based on the calibration parameters of the camera to be calibrated, an affine transformation is performed on the second image to determine the row and column numbers and the corresponding first coordinates of each marking point in the second image located in the calibration plate; the motion axis is controlled to move a first set distance relative to the first direction, and a third image in a corresponding field of view captured by the camera to be calibrated is obtained, and a second coordinate of the same marking point corresponding to the row and column number is determined; according to the first coordinate, the second coordinate and the first set distance of the same marking point, a first direction unit motion vector of the motion axis relative to the first direction is determined; the motion axis is controlled to move a second set distance relative to the second direction, and a fourth image in a corresponding field of view captured by the camera to be calibrated is obtained, and a third coordinate of the same marking point corresponding to the row and column number is determined; according to the first coordinate, the third coordinate and the second set distance of the same marking point, a second direction unit motion vector of the motion axis relative to the second direction is determined.

[0017] In one of the embodiments, the marking points include pre-set reference marking points; after determining the calibration parameters of the corresponding camera to be calibrated, the method further includes: controlling the motion axis of the work platform to rotate, and respectively obtaining the image before rotation and the image after rotation captured by the camera to be calibrated; performing affine transformation on the image before rotation and the image after rotation based on the calibration parameters of the camera to be calibrated, and obtaining the coordinate information of the target reference marking points in the image before rotation and the image after rotation respectively located on the calibration plate; fitting the coordinate information of the target reference marking points respectively located on the calibration plate, and determining the position of the rotation center of the work platform.

[0018] In a second aspect, the present application further provides a camera calibration device, which is used for automatic calibration of multiple cameras with non-overlapping fields of view, wherein the multiple cameras are arranged in a ring relative to a work platform, and the device comprises:

[0019] A calibration plate acquisition module, used to acquire a calibration plate corresponding to the work platform, wherein the calibration plate includes a marking point area and a circular ring mark arranged on the outer circle of the marking point area, the center of the circular ring mark coincides with the center point of the calibration plate, and the marking point area is provided with a plurality of marking points evenly arranged in rows and columns;

[0020] An image acquisition module, used to acquire a first image within a corresponding field of view captured by each camera to be calibrated, wherein the first image includes a partial marking point area and a partial ring marking area;

[0021] A center point determination module, used to determine the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image, wherein the center point of the calibration plate is outside the field of view of the camera to be calibrated;

[0022] A coordinate conversion module, used to extract the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determine the row and column coordinate information of each marking point in the calibration plate;

[0023] The calibration parameter determination module is used to determine the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate.

[0024] In a third aspect, the present application further provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the above method when executing the computer program.

[0025] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the above method when executed by a processor.

[0026] In a fifth aspect, the present application also provides a computer program product, including a computer program, which implements the steps of the above method when executed by a processor.

[0027] The camera calibration method, device, electronic device, computer-readable storage medium and computer program product described above obtain a calibration plate corresponding to the work platform and obtain a first image within the corresponding field of view captured by each camera to be calibrated, determine the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring mark area in the first image, extract the pixel coordinates of each mark point in the partial mark point area based on the pixel position of the center point of the calibration plate, and determine the row and column coordinate information of each mark point in the calibration plate, and determine the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each mark point in the partial mark point area and the row and column coordinate information of each mark point in the calibration plate. It determines the pixel position of the center point of the calibration plate in the image expansion area by using the circular ring mark in the calibration plate, and determines the calibration parameters of the camera accordingly. The entire process does not require manual intervention, which not only improves the calibration efficiency, but also avoids errors caused by manual operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the drawings required for use in the embodiments of the present application or related technical descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.

[0029] Figure 1 A diagram showing an application environment of a camera calibration method in one embodiment;

[0030] Figure 2 is a schematic flow chart of a camera calibration method in one embodiment;

[0031] Figure 3A is a schematic diagram of a calibration plate in one embodiment;

[0032] Figure 3B is a schematic diagram of a calibration plate in another embodiment;

[0033] Figure 4 A schematic diagram of image mapping in one embodiment;

[0034] Figure 5 A schematic diagram of a flow chart of a step of determining row and column coordinate information of a marking point in one embodiment;

[0035] Figure 6 A schematic diagram of sorting marking points in one embodiment;

[0036] Figure 7 It is a schematic diagram of a flow chart of a step of calibrating a motion ratio of a working platform in one embodiment;

[0037] Figure 8 is a structural block diagram of a camera calibration device in one embodiment;

[0038] Fig. 9 FIG. 4 is a diagram showing the internal structure of an electronic device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0040] The camera calibration method provided in the embodiment of the present application can be applied to Figure 1In the application environment shown. Among them, multiple cameras are arranged in a ring relative to the work platform. In the figure, the work platform is a circular work platform as an example. The imaging surface of each camera (i.e., the camera field of view) is parallel to the work surface of the work platform, and the field of view of each camera does not overlap. The method of the present application is used to automatically calibrate each camera without manual teaching.

[0041] In one embodiment, Figure 2 As shown, a camera calibration method is provided, the method comprising the following steps:

[0042] Step 202, obtaining a calibration plate corresponding to the work platform.

[0043] Among them, the calibration plate is a tool used for camera calibration, which usually contains a series of known geometric patterns. The calibration plate is used to help determine the internal parameters (focal length, principal point coordinates, etc.) and external parameters (position and orientation of the camera relative to the calibration plate) of the camera. In this embodiment, the calibration plate is of the same size and shape as the work platform. For example, if the work platform is circular, the calibration plate can be a circle of the corresponding size.

[0044] Specifically, Figure 3A and Figure 3B As shown, the calibration plate includes a marking point area and a circular mark set on the outer circle of the marking point area, the center of the circular mark coincides with the center point of the calibration plate, and the marking point area is provided with a plurality of marking points marks arranged evenly in rows and columns. The size and shape of the mark can be set based on the field of view of the camera, for example, the mark can be set to be circular or square, etc. In this embodiment, the mark is circular, and its diameter is 1mm to adapt to the field of view of the camera, and its row and column spacing can be set to 2mm. The true value coordinate of the center point of the calibration plate is recorded as (0, 0), and a Cartesian coordinate system is established with the row as the X direction and the column as the Y direction. The true value coordinate of each mark is the distance from the center of the mark to the center of the calibration plate. When the true value coordinate of the mark has a preset coordinate feature, a circle with a diameter of 0.5mm can be dug out from the center of the mark to form a hollow mark, that is, a reference marking point. Specifically, the coordinate feature can be the law corresponding to the true value coordinate of the mark, for example, when the true value coordinate of the mark is a multiple of 10, it can be determined as a reference marking point. In addition, a circular mark is set on the outer circle of the marking point area, the width of the circular mark is 2mm, and the center of the circular mark coincides with the center point of the calibration plate. It can be understood that the parameter setting of the above calibration plate is for a better understanding of the solution of this application, which can be adjusted and adapted based on actual application scenarios such as the shape and size of the work platform and the size of the camera field of view.

[0045] Step 204: Acquire a first image within a corresponding field of view captured by each camera to be calibrated.

[0046] Specifically, when the camera needs to be calibrated, the first image within the corresponding field of view captured by each camera to be calibrated can be obtained. Figure 4 As shown, the first image includes a partial marking point area and a partial circular ring marking area.

[0047] Step 206: determine the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image.

[0048] The pixel coordinates are the positions of pixels in the image, which are coordinates determined by the image coordinate system. The pixel coordinates of the partial circular ring marked area in the first image may specifically be the positions of the pixels corresponding to the partial circular ring marked area in the first image in the first image.

[0049] In this embodiment, by fitting the pixel coordinates corresponding to the circular marked area in the first image, the pixel position (Px0, Py0) of the center point of the entire calibration plate in the image extension area can be calculated. The image extension area is the image outside the first image, that is, the center point of the calibration plate is outside the first image, that is, the center point of the calibration plate is outside the field of view of the camera to be calibrated.

[0050] Step 208: extract the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determine the row and column coordinate information of each marking point in the calibration plate.

[0051] The row and column coordinate information is related information determined by the calibration plate coordinate system, including row and column position information of the corresponding marking point in the calibration plate and the corresponding coordinate information. In this embodiment, the pixel coordinates of each marking point in the partial marking point area in the first image can be extracted based on the pixel position of the center point of the calibration plate, and then the row and column coordinate information of each marking point in the calibration plate can be calculated.

[0052] Step 210: determining the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each marker point in the partial marker point area and the row and column coordinate information of each marker point located in the calibration plate.

[0053] The calibration parameters include the camera's internal parameters (such as focal length, principal point coordinates, etc.) and external parameters (the position and direction of the camera relative to the calibration plate). Specifically, the calibration parameters of the corresponding camera to be calibrated can be determined based on the pixel coordinates of each marker point in the partial marker area and the row and column coordinate information of each marker point in the calibration plate.

[0054] It can be understood that when calibrating a certain camera, the first image within the field of view captured by the corresponding camera is obtained. When multiple cameras need to be calibrated, the above processing is performed separately on the first image within the field of view captured by each camera to determine the calibration parameters of each camera to complete the calibration of each camera.

[0055] In the above camera calibration method, by obtaining a calibration plate corresponding to the work platform and obtaining the first image within the corresponding field of view captured by each camera to be calibrated, the pixel position of the center point of the calibration plate is determined according to the pixel coordinates of the partial circular ring mark area in the first image, the pixel coordinates of each mark point in the partial mark point area are extracted based on the pixel position of the center point of the calibration plate, and the row and column coordinate information of each mark point in the calibration plate is determined, and the calibration parameters of the corresponding camera to be calibrated are determined according to the pixel coordinates of each mark point in the partial mark point area and the row and column coordinate information of each mark point in the calibration plate. It determines the pixel position of the center point of the calibration plate in the image expansion area by using the circular ring mark in the calibration plate, and determines the calibration parameters of the camera accordingly. The entire process does not require manual intervention, which not only improves the calibration efficiency, but also avoids errors caused by manual operation.

[0056] In an exemplary embodiment, in step 206, the pixel position of the center point of the calibration plate is determined based on the pixel coordinates of the partial circular ring marked area in the first image, which may specifically include: extracting the pixel coordinates on the inner ring and the pixel coordinates on the outer ring in the partial circular ring marked area; fitting the pixel coordinates on the inner ring and the pixel coordinates on the outer ring to obtain the fitted ring center coordinates; and determining the ring center coordinates as the pixel position of the center point of the calibration plate.

[0057] Specifically, the pixel coordinates located on the inner ring and the pixel coordinates located on the outer ring in the part of the circular ring marked area in the first image can be extracted by image processing technology (such as edge detection), and the center of the corresponding inner circle can be estimated based on the pixel coordinates on the inner ring, and the center of the corresponding outer circle can be estimated based on the pixel coordinates on the outer ring. The center of the circle can be estimated based on the centroid of the edge point (i.e., the average value of the coordinates of all points) as the initial estimate of the center of the circle. Since the circular ring mark is composed of two concentric circles, their centers should be the same. Therefore, the position of the center of the circle can be further refined through geometric relationships. One method is to use the intersection of the tangents of the outer circle edge point and the inner circle edge point as the center of the circle. The least squares method can also be used to fit the center of the circle, that is, for each circle, a set of equations can be established, in which the unknown number is the coordinate of the center of the circle, and these equations are solved by minimizing the sum of the squares of the distances from all points to the circle. The final solution is the coordinate of the center of the ring after fitting. Since the center of the circular ring mark coincides with the center point of the calibration plate, the coordinate of the center of the ring obtained after fitting can be determined as the pixel position of the center point of the calibration plate. In this embodiment, when the imaging effect is good, the difference between the two circle centers generally does not exceed 10 pixels. If the index is not met, the uniformity of the light source needs to be adjusted.

[0058] In an exemplary embodiment, Figure 5 As shown, in step 208, determining the row and column coordinate information of each marking point in the calibration plate may specifically include:

[0059] Step 502, sorting each marking point in rows and columns according to the pixel coordinates of each marking point in the partial marking point area to obtain a sorting result.

[0060] Specifically, the pixel coordinates of the reference marking points among the marking points are identified, and each marking point is rotated based on the pixel coordinates of the reference marking points; the marking points are sorted according to the sizes of the horizontal coordinates and the vertical coordinates corresponding to the pixel coordinates of the rotated marking points to obtain a sorting result.

[0061] Since the reference mark point is a hollow mark, the reference mark point can be determined based on the grayscale value of the pixel at the mark coordinate. Specifically, the grayscale value range can be divided into two types: light and dark, which are higher than the median and lower than the median, where the light is a solid mark and the dark is a hollow mark. This allows the reference mark point to be identified and the pixel coordinates of the reference mark point to be extracted.

[0062] Then, all the markers are sorted using the pixel coordinates of the reference markers. Specifically, by searching for the closest line segment (such as Figure 6The red or blue line in the middle is calculated, and the complementary angle between the inclination of the line segment and 90° is calculated to obtain the angle θ between the row of the mark point arrangement and the horizontal line. The rotation transformation is used to rotate all the mark points -θ to change them into a horizontal and vertical arrangement. Then, the pixel X coordinates of all the mark points after rotation are sorted, and the sorted sequence table Index is recorded (the equal X values ​​do not need to be sorted before and after), and any mark point in the sequence table Index is selected as the row reference point, and a new sequence table Indexsub is put into it. According to the sequence number in Index, check whether the mark is in the same row one by one (the difference between the Y value of the coordinate after the mark is rotated and the Y value of the selected mark is less than the threshold), and the sequence numbers of the marks in the same row are recorded in the new sequence table Indexsub in sequence, and the corresponding sequence numbers in the sequence table Index are deleted at the same time. Repeat the previous step until all the points in the sequence table Index are filtered and become empty, that is, all the points in the same row are sorted. Then take out the Y coordinate of the first sequence mark in each row sequence table Indexsub and sort it. After the sorting is completed, the order of each row and the order of the column can be obtained, that is, the sorting result can be obtained.

[0063] Step 504: Obtain corresponding row spacing and column spacing according to the sorting result.

[0064] The row spacing and column spacing are based on the above sorting results. The adjacent row and column marks are found according to the row and column numbers, and the pixel distances in two directions are calculated. For example, the pixel distance between the mark in the first row (horizontally) and the mark in the same column in the next row can be calculated to obtain the row spacing. Similarly, the pixel distance between the mark in the first row and the mark in the adjacent column in the same row can be calculated to obtain the column spacing.

[0065] Step 506, obtaining row and column coordinate information of each marking point in the calibration plate according to the pixel coordinates of each marking point, the pixel position of the center point of the calibration plate, the row spacing and the column spacing.

[0066] The row and column coordinate information includes the row and column position information of the corresponding marking point in the calibration plate and the corresponding coordinate information. Specifically, the row and column position information can be calculated based on the following formula:

[0067] Column position information Rx = round((Px - Px0) / Dx)

[0068] Row position information Ry = round((Py - Py0) / Dy)

[0069] Among them, round is rounding calculation, Px0 is the pixel position of the first direction (i.e. horizontal direction or X direction) of the center point of the calibration plate, Py0 is the pixel position of the second direction (i.e. vertical direction or Y direction) of the center point of the calibration plate, (Px, Py) is the pixel coordinate of the corresponding marking point, Dx is the column spacing, and Dy is the row spacing.

[0070] Since the row and column spacing of the marks in the calibration plate is fixed (such as Figure 3B The row and column spacing is set to 2mm). Therefore, based on the row and column position information of the marking point in the calibration plate and the row and column spacing of the mark in the calibration plate, the coordinate information of the corresponding mark can be obtained by calculation. For example, the Y coordinate of the corresponding mark can be obtained by multiplying the column position information Rx with the row and column spacing, and the X coordinate of the corresponding mark can be obtained by multiplying the row position information Ry with the row and column spacing.

[0071] In an exemplary embodiment, the marking points include pre-set reference marking points, and the reference marking points have preset coordinate features; then in step 208, after determining the row and column coordinate information of each marking point in the calibration plate, the above method may also include: identifying the row and column coordinate information of the reference marking points in the marking points; when the row and column coordinate information of the reference marking points does not meet the preset coordinate features, adjusting the parameters of the camera to be calibrated; and obtaining the first image within the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted, returning to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular marking area in the first image, until the row and column coordinate information of the reference marking points meets the preset coordinate features, and then calibrating the corresponding camera to be calibrated according to the pixel coordinates of each marking point in the partial marking point area and the row and column coordinate information of each marking point in the calibration plate.

[0072] Specifically, taking the preset coordinate feature of the reference marker point as the true value coordinate of the marker point satisfying a multiple of 10 as an example, after determining the row and column coordinate information of each marker point in the calibration plate, the row and column coordinate information of the marker point in the calibration plate can be verified based on the preset coordinate feature. Specifically, it can be verified whether the row and column coordinate information of the reference marker point satisfies the preset coordinate feature, for example, it can be verified whether the coordinate information corresponding to the reference marker point is a multiple of 10. If it is a multiple of 10, it means that the row and column coordinate information of the marker point in the corresponding image is calculated correctly, so the subsequent steps can be performed to determine the calibration parameters of the camera.

[0073] If a remainder appears (i.e., it is not a multiple of 10), it means that the row and column coordinate information of the marking point in the corresponding image is calculated incorrectly, and the camera verticality and focus are adjusted to ensure the parallelism between the imaging surface and the working surface. The first image in the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted is obtained, and the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular marking area in the first image is returned to execute until the row and column coordinate information of the reference marking point meets the preset coordinate characteristics, and then the calibration parameters of the corresponding camera to be calibrated are determined according to the pixel coordinates of each marking point in the partial marking point area and the row and column coordinate information of each marking point in the calibration plate. This realizes automatic calibration during the camera calibration process, and improves the accuracy of calibration and the quality of camera focus.

[0074] In an exemplary embodiment, in step 208, after determining the row and column coordinate information of each marker point in the calibration plate, the method may further include: determining an affine transformation relationship between the pixel coordinates of the camera to be calibrated and the calibration plate coordinate system according to the pixel coordinates of each marker point in the partial marker point area and the row and column coordinate information of each marker point in the calibration plate; performing an affine transformation on the pixel coordinates located on the outer ring in the partial ring marker area in the first image captured by the corresponding camera to be calibrated based on the affine transformation relationship to obtain a transformed coordinate point set; fitting the coordinate point set to obtain the fitted center coordinates of the circle; obtaining a standard deviation between each coordinate point in the coordinate point set and the center coordinates of the circle; adjusting the parameters of the camera to be calibrated when the standard deviation is greater than a set threshold; obtaining a first image in the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted, and returning to the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial ring marker area in the first image until the standard deviation is less than or equal to the set threshold, and determining the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each marker point in the partial marker point area and the row and column coordinate information of each marker point in the calibration plate.

[0075] Among them, affine transformation is a very important linear transformation in geometry, which keeps the relative position relationship between points, lines and planes unchanged. Affine transformation can include operations such as translation, rotation, scaling and shearing. In this embodiment, based on the pixel coordinates of each marker point in the partial marker point area in the first image and the row and column coordinate information of each marker point in the calibration plate, the transformation matrix from the pixel coordinates of the camera to be calibrated to the calibration plate coordinate system can be determined, thereby obtaining the corresponding affine transformation relationship.

[0076] Specifically, through the affine transformation relationship of the true value calibration, the pixel coordinates on the outer ring in the circular ring mark area within the field of view of each camera can be mapped to the calibration plate coordinate system to obtain the transformed coordinate point set, and then the coordinate point set in the calibration plate coordinate system is fitted to the outer circle in the corresponding calibration plate coordinate system using the RANSAC (Random Sample Consensus, an iterative method for fitting a model from a set of data containing outliers. In the case of fitting a circle, the RANSAC algorithm can accurately fit a circle from edge points containing noise and outliers) algorithm, and the fitted center coordinates are obtained. Then, the standard deviation of each point to the fitted center coordinates is calculated. When the standard deviation is less than or equal to the set threshold, it means that the row and column coordinate information of the marked point in the corresponding image is calculated correctly, so the subsequent steps can be performed to determine the calibration parameters of the camera.

[0077] When the standard deviation is greater than the set threshold, it means that the true value calibration result is poor, and the camera focus and flatness need to be readjusted to improve the image sharpness and the matching degree of the true value affine transformation. The first image in the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted is obtained, and the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring mark area in the first image is returned to execute until the standard deviation is less than or equal to the set threshold, and the calibration parameters of the corresponding camera to be calibrated are determined according to the pixel coordinates of each marking point in the partial marking point area and the row and column coordinate information of each marking point in the calibration plate. Thereby, automatic calibration is realized in the camera calibration process, and the accuracy of calibration and the quality of camera focus are improved.

[0078] In an exemplary embodiment, Figure 7 As shown, in step 210, after determining the calibration parameters of the corresponding camera to be calibrated, the above method may further include:

[0079] Step 702: When the motion axis is at an initial position in the working platform, a second image within a corresponding field of view captured by the camera to be calibrated is acquired.

[0080] The initial position includes the position of the movement axis relative to the first direction and the position relative to the second direction. The first direction and the second direction are perpendicular to each other. In this embodiment, the first direction is the horizontal direction and the second direction is the vertical direction.

[0081] Specifically, the movement axis of the working platform is controlled to move to a certain initial position, and the second images within the corresponding field of view taken by each camera are acquired.

[0082] Step 704: perform affine transformation on the second image based on the calibration parameters of the camera to be calibrated, and determine the row and column numbers of each marking point in the second image located in the calibration plate and the corresponding first coordinates.

[0083] Specifically, based on the reference mark point, i.e., the hollow mark, in the second image within the field of view of each camera, the global row and column number of the hollow mark is calculated using the outer ring, the pixel coordinates of the hollow mark are mapped to the calibration plate coordinate system using the calibration parameters of each camera, and the global row and column number of each hollow mark and the corresponding first coordinate after mapping are recorded.

[0084] Step 706, control the moving axis to move a first set distance relative to the first direction, obtain a third image within the corresponding field of view captured by the camera to be calibrated, and determine the second coordinates of the same marking point corresponding to the row and column numbers.

[0085] Specifically, the motion axis of the working platform is controlled to move a first set distance relative to the first direction, and the third image within the corresponding field of view captured by each camera is obtained again. The large circle is used to calculate the pixel coordinates of the hollow mark corresponding to the global row and column number recorded in the previous step (it may be outside the field of view, and the image without the large circle does not participate in the calculation), and mapped to the calibration plate coordinate system, that is, the second coordinate of the hollow mark corresponding to the global row and column number in the previous step, that is, the same reference mark point, is obtained.

[0086] Step 708: Determine a first-direction unit motion vector of the motion axis relative to the first direction according to the first coordinates, the second coordinates, and the first set distance of the same marking point.

[0087] Specifically, calculate the motion vector of the coordinate point before and after the hollow mark corresponding to each global row and column number is moved. If it is recorded as V, then calculate the average vector of all V vectors to obtain the precise movement of the platform in the calibration plate coordinate system. .in:

[0088]

[0089] The motion vector V is obtained based on the difference between the coordinates of a hollow mark before and after it moves. For example, if the first coordinate of the mark in the image before the move corresponds to the row and column number Id0, and the second coordinate of the mark in the image after the move corresponds to the row and column number Id1, then the row and column numbers before the move are traversed, and the corresponding mark coordinates are found in the row and column number table after the move, and the two points P1 and P2 of the same mark in the calibration plate coordinate system before and after the move are obtained. With P1 as the starting point and P2 as the end point, the coordinates are subtracted to obtain the P1P2 vector, which is the motion vector V of the single point. Indicates shared A hollow mark, Indicates The X-direction component of the motion vector in the hollow mark, Indicates The Y component of the motion vector in the hollow mark.

[0090] Then Divide by the movement length of the moving axis during calibration, that is, the first set distance of the moving axis relative to the first direction, and obtain the vector (S) of the movement of 1 unit length on the first direction, that is, on the X-axis, in the calibration plate coordinate system. xx , S xy ), that is, obtaining the first direction unit motion vector of the motion axis relative to the first direction.

[0091] Step 710, control the moving axis to move a second set distance relative to the second direction, obtain a fourth image within the corresponding field of view captured by the camera to be calibrated, and determine the third coordinates of the same marking point corresponding to the row and column numbers.

[0092] Specifically, the motion axis of the working platform is controlled to move a second set distance relative to the second direction, and the fourth image within the corresponding field of view collected by each camera again is obtained. The large circle is used to calculate the pixel coordinates of the hollow mark corresponding to the global row and column number recorded in the previous step (it may be outside the field of view, and the image without the large circle does not participate in the calculation), and mapped to the calibration plate coordinate system, that is, the third coordinate of the hollow mark corresponding to the global row and column number in the previous step, that is, the same reference mark point, is obtained.

[0093] Step 712: Determine a second direction unit motion vector of the motion axis relative to the second direction according to the first coordinate, the third coordinate and the second set distance of the same marking point.

[0094] According to the first coordinate, the third coordinate and the second set distance of the same marking point, a vector (S yx , S yy ), that is, the second direction unit motion vector of the motion axis relative to the second direction is obtained.

[0095] It can be determined that in the calibration plate coordinate system, the equivalent motion axis distance of the motion (m, n) length is (V x ,V y ),in:

[0096]

[0097]

[0098] In the above embodiment, after determining the calibration parameters of each camera, the position of any pixel of any camera can be mapped to the fixed coordinate system of the work platform, i.e., the calibration plate coordinate system, and the two positions of any mark in the calibration plate coordinate system before and after the axis moves to a fixed length can be obtained, thereby calibrating the scaling ratio and angle of the axis movement. In the traditional method, the calibration operator is required to manually teach a specific mark and control the axis so that the mark moves to the upper, lower, left, and right of the field of view during calibration, but cannot exceed the field of view. Not only is the operation cumbersome and there is only one mark coordinate calculation, but the calibrated axis can only move in a small range, resulting in low accuracy. In this embodiment, the same row and column calculation method as the calibration parameters is used to automatically calculate the positions of each hollow mark appearing in the field of view of multiple cameras in the calibration plate coordinate system before and after the axis movement and correspond one to one, so as to more accurately calculate the proportional relationship and angle between the motion axis and the calibration plate coordinate system. Even if the corresponding hollow mark moves out of the field of view, the coordinate position of the hollow mark outside the field of view can be calculated through the row and column pixel spacing and mapped to the calibration plate coordinate system. The entire calibration process is fully automatic, without the need for tedious manual confirmation and interaction, and without limiting the angle of the calibration plate. It can realize the calibration of the motion axis beyond the field of view and has good robustness.

[0099] In an exemplary embodiment, in step 210, after determining the calibration parameters of the corresponding camera to be calibrated, the method may further include: controlling the motion axis of the work platform to rotate, and respectively acquiring the image before rotation and the image after rotation captured by the camera to be calibrated; performing affine transformation on the image before rotation and the image after rotation based on the calibration parameters of the camera to be calibrated, and acquiring the coordinate information of the target reference mark points in the image before rotation and the image after rotation located on the calibration plate; fitting the coordinate information of the target reference mark points located on the calibration plate, and determining the position of the rotation center of the work platform.

[0100] Among them, the target reference mark point is a reference mark point with the same center distance, that is, a hollow mark. In this embodiment, by recording the coordinates corresponding to multiple hollow marks with the same center distance after the work platform rotates multiple times, and fitting circles of multiple landing points of the hollow marks with the same center distance in the calibration plate coordinate system, the precise position of the rotation center of the work platform in the calibration plate coordinate system can be obtained, thereby realizing the calibration of the rotation center of the work platform. However, the traditional calibration method can only limit the movement of the mark with the same name within the field of view of a single camera, resulting in a very small range of the turning angle and a large calibration accuracy error. However, this embodiment can bind multiple cameras to the same "calibration plate coordinate system" to realize multi-camera fusion calibration, so that a higher calibration accuracy can be achieved.

[0101] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0102] Based on the same inventive concept, the embodiment of the present application also provides a camera calibration device for implementing the camera calibration method involved above. The implementation solution provided by the device to solve the problem is similar to the implementation solution recorded in the above method, so the specific limitations in one or more camera calibration device embodiments provided below can refer to the limitations of the camera calibration method above, and will not be repeated here.

[0103] In an exemplary embodiment, Figure 8 As shown, a camera calibration device is provided, which is used for automatic calibration of multiple cameras with non-overlapping fields of view, wherein the multiple cameras are arranged in a ring relative to the working platform, and the device comprises: a calibration plate acquisition module 802, an image acquisition module 804, a center point determination module 806, a coordinate conversion module 808 and a calibration parameter determination module 810, wherein:

[0104] The calibration plate acquisition module 802 is used to acquire a calibration plate corresponding to the work platform, wherein the calibration plate includes a marking point area and a circular ring mark arranged on the outer circle of the marking point area, the center of the circular ring mark coincides with the center point of the calibration plate, and the marking point area is provided with a plurality of marking points evenly arranged in rows and columns;

[0105] An image acquisition module 804 is used to acquire a first image within a corresponding field of view captured by each camera to be calibrated, wherein the first image includes a partial marking point area and a partial ring marking area;

[0106] A center point determination module 806 is used to determine the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image, and the center point of the calibration plate is outside the field of view of the camera to be calibrated;

[0107] A coordinate conversion module 808 is used to extract the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determine the row and column coordinate information of each marking point in the calibration plate;

[0108] The calibration parameter determination module 810 is used to determine the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate.

[0109] In an exemplary embodiment, the center point determination module is specifically used to: extract the pixel coordinates located on the inner ring and the pixel coordinates located on the outer ring in the partial circular ring marking area; fit the pixel coordinates on the inner ring and the pixel coordinates on the outer ring to obtain the fitted ring center coordinates; and determine the ring center coordinates as the pixel position of the center point of the calibration plate.

[0110] In an exemplary embodiment, the coordinate conversion module is specifically used to: sort each of the marking points in the partial marking point area according to the pixel coordinates of each of the marking points in rows and columns to obtain a sorting result; obtain the corresponding row spacing and column spacing according to the sorting result; obtain the row and column coordinate information of each of the marking points in the calibration plate according to the pixel coordinates of each of the marking points, the pixel position of the center point of the calibration plate, the row spacing and the column spacing.

[0111] In an exemplary embodiment, the marking points include pre-set reference marking points; the coordinate conversion module is also used to: identify the pixel coordinates of the reference marking points among the marking points; rotate each of the marking points based on the pixel coordinates of the reference marking points; sort the marking points according to the size of the horizontal coordinates and the size of the vertical coordinates corresponding to the pixel coordinates of the rotated marking points to obtain a sorting result.

[0112] In an exemplary embodiment, the marking points include pre-set reference marking points, and the reference marking points have preset coordinate features; the device also includes a verification module, which is used to: identify row and column coordinate information of the reference marking points in the marking points; adjust the parameters of the camera to be calibrated when the row and column coordinate information of the reference marking points does not meet the preset coordinate features; obtain the first image within the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted, and return to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular marking area in the first image, until the row and column coordinate information of the reference marking points meets the preset coordinate features, and calibrate the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points located in the calibration plate.

[0113] In an exemplary embodiment, the verification module is further used to: determine the affine transformation relationship between the pixel coordinates of the camera to be calibrated and the calibration plate coordinate system according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate; based on the affine transformation relationship, perform affine transformation on the pixel coordinates located on the outer ring in the partial circular ring marking area in the first image captured by the corresponding camera to be calibrated to obtain a transformed coordinate point set; fit the coordinate point set to obtain the fitted center coordinates of the circle; obtain the standard deviation between each coordinate point in the coordinate point set and the center coordinates of the circle; if the standard deviation is greater than a set threshold, adjust the parameters of the camera to be calibrated; obtain the first image in the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted, and return to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marking area in the first image until the standard deviation is less than or equal to the set threshold, and calibrate the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate.

[0114] In an exemplary embodiment, the device further includes a work platform motion ratio calibration module, which is used to: when the motion axis is located at an initial position in the work platform, obtain a second image within a corresponding field of view captured by the camera to be calibrated, wherein the initial position includes the position of the motion axis relative to the first direction and the position relative to the second direction; perform affine transformation on the second image based on the calibration parameters of the camera to be calibrated, and determine the row and column numbers and corresponding first coordinates of each marking point in the second image located in the calibration plate; control the motion axis to move a first set distance relative to the first direction, obtain a third image within a corresponding field of view captured by the camera to be calibrated, and determine the second coordinates of the same marking point corresponding to the row and column numbers; determine a first direction unit motion vector of the motion axis relative to the first direction according to the first coordinates, the second coordinates and the first set distance of the same marking point; control the motion axis to move a second set distance relative to the second direction, obtain a fourth image within the corresponding field of view captured by the camera to be calibrated, and determine the third coordinates of the same marking point corresponding to the row and column numbers; determine a second direction unit motion vector of the motion axis relative to the second direction according to the first coordinates, the third coordinates and the second set distance of the same marking point.

[0115] In an exemplary embodiment, the device also includes a work platform rotation center calibration module, which is used to: control the motion axis of the work platform to rotate, and respectively obtain the image before rotation and the image after rotation captured by the camera to be calibrated; perform affine transformation on the image before rotation and the image after rotation based on the calibration parameters of the camera to be calibrated, and obtain the coordinate information of the target reference mark points in the image before rotation and the image after rotation located on the calibration plate; fit the coordinate information of the target reference mark points located on the calibration plate, and determine the position of the rotation center of the work platform.

[0116] Each module in the above camera calibration device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in an electronic device in the form of hardware, or can be stored in a memory in an electronic device in the form of software, so that the processor can call and execute operations corresponding to each module.

[0117] In an exemplary embodiment, an electronic device is provided, the internal structure of which can be as shown in FIG. Fig. 9As shown. The electronic device includes a processor, a memory, an input / output interface, a communication interface, a display unit and an input device. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface, the display unit and the input device are connected to the system bus through the input / output interface. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the electronic device is used to exchange information between the processor and an external device. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be implemented through WIFI, a mobile cellular network, near field communication (Near Field Communication, NFC) or other technologies. When the computer program is executed by the processor, a camera calibration method is implemented. The display unit of the electronic device is used to form a visually visible picture, which can be a display screen, a projection device or a virtual reality imaging device. The display screen can be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device can be a touch layer covering the display screen, or a button, trackball or touchpad set on the electronic device casing, or an external keyboard, touchpad or mouse.

[0118] Those skilled in the art will understand that Fig. 9 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the electronic device to which the scheme of the present application is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0119] In an exemplary embodiment, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0121] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0122] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, an artificial intelligence (AI) processor, etc., but are not limited to this.

[0123] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0124] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be construed as limiting the scope of the present application. It should be noted that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A camera calibration method, characterized in that: The method is used for automatic calibration of multiple cameras with non-overlapping fields of view, wherein the multiple cameras are arranged in a ring relative to a work platform, and the method comprises: Obtain a calibration plate corresponding to the work platform, wherein the calibration plate includes a marking point area and a circular ring mark arranged on the outer circle of the marking point area, the center of the circular ring mark coincides with the center point of the calibration plate, and the marking point area is provided with a plurality of marking points evenly arranged in rows and columns; Acquire a first image within a corresponding field of view captured by each camera to be calibrated, wherein the first image includes a partial marking point area and a partial ring marking area; Determine the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image; Extracting the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determining the row and column coordinate information of each marking point in the calibration plate; Determine the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate; The method of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image comprises: extracting the pixel coordinates located on the inner ring and the pixel coordinates located on the outer ring in the partial circular ring marked area; fitting the pixel coordinates on the inner ring and the pixel coordinates on the outer ring to obtain the fitted ring center coordinates; and determining the ring center coordinates as the pixel position of the center point of the calibration plate; After determining the row and column coordinate information of each of the marking points located in the calibration plate, the method further includes: According to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate, determine the affine transformation relationship from the pixel coordinates of the camera to be calibrated to the calibration plate coordinate system; based on the affine transformation relationship, perform affine transformation on the pixel coordinates located on the outer ring in the partial circular ring marking area in the first image collected by the corresponding camera to be calibrated to obtain a transformed coordinate point set; fit the coordinate point set to obtain the fitted center coordinates; obtain the standard deviation between each coordinate point in the coordinate point set and the center coordinates; if the standard deviation is greater than a set threshold, adjust the parameters of the camera to be calibrated; obtain the first image in the corresponding field of view collected by the camera to be calibrated after the parameters are adjusted, and return to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marking area in the first image until the standard deviation is less than or equal to the set threshold, and calibrate the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate; or, The marking points include pre-set reference marking points, and the reference marking points have preset coordinate features, and the row and column coordinate information of the reference marking points in the marking points is identified; when the row and column coordinate information of the reference marking points does not meet the preset coordinate features, the parameters of the camera to be calibrated are adjusted; the first image within the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted is acquired, and the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular marking area in the first image is returned to execute until the row and column coordinate information of the reference marking points meets the preset coordinate features, and the corresponding camera to be calibrated is calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points located in the calibration plate.

2. The method according to claim 1, characterized in that The step of determining row and column coordinate information of each of the marking points located on the calibration plate includes: According to the pixel coordinates of each of the marking points in the partial marking point area, each of the marking points is sorted in rows and columns to obtain a sorting result; According to the sorting result, obtain the corresponding row spacing and column spacing; According to the pixel coordinates of each of the marking points, the pixel position of the center point of the calibration plate, the row spacing and the column spacing, the row and column coordinate information of each of the marking points located in the calibration plate is obtained.

3. The method according to claim 2, characterized in that The marking points include pre-set reference marking points; The step of sorting each of the marking points in the partial marking point area according to the pixel coordinates of each of the marking points in the partial marking point area to obtain a sorting result includes: Identify pixel coordinates of the reference marking points among the marking points; Based on the pixel coordinates of the reference marking point, rotating each of the marking points; The marking points are sorted according to the magnitudes of the horizontal coordinates and the vertical coordinates corresponding to the pixel coordinates of the rotated marking points to obtain a sorting result.

4. The method according to claim 1, characterized in that After determining the calibration parameters of the corresponding camera to be calibrated, the method further includes: The motion axis is located at an initial position in the working platform, and a second image within a corresponding field of view captured by the camera to be calibrated is acquired, wherein the initial position includes a position of the motion axis relative to the first direction and a position relative to the second direction; Performing an affine transformation on the second image based on the calibration parameters of the camera to be calibrated, and determining the row and column numbers of each marking point in the second image located in the calibration plate and the corresponding first coordinates; Control the movement axis to move a first set distance relative to the first direction, obtain a third image within the corresponding field of view captured by the camera to be calibrated, and determine the second coordinates of the same marking point corresponding to the row and column numbers; Determine a first-direction unit motion vector of the motion axis relative to the first direction according to the first coordinates, the second coordinates and the first set distance of the same marking point; Control the movement axis to move a second set distance relative to the second direction, obtain a fourth image within the corresponding field of view captured by the camera to be calibrated, and determine the third coordinates of the same marking point corresponding to the row and column numbers; A second-direction unit motion vector of the motion axis relative to the second direction is determined according to the first coordinate, the third coordinate and the second set distance of the same marking point.

5. The method according to claim 1, characterized in that: The marking points include pre-set reference marking points; After determining the calibration parameters of the corresponding camera to be calibrated, the method further includes: Controlling the motion axis of the working platform to rotate, and respectively acquiring the image before rotation and the image after rotation captured by the camera to be calibrated; Based on the calibration parameters of the camera to be calibrated, affine transformation is performed on the image before rotation and the image after rotation, respectively, to obtain coordinate information of target reference mark points in the image before rotation and the image after rotation respectively located on the calibration plate; The coordinate information of the target reference mark points respectively located on the calibration plate is fitted to determine the position of the rotation center of the work platform.

6. A camera calibration device, characterized in that: The device is used for automatic calibration of multiple cameras with non-overlapping fields of view, wherein the multiple cameras are arranged in a ring relative to a working platform, and the device comprises: A calibration plate acquisition module, used to acquire a calibration plate corresponding to the work platform, wherein the calibration plate includes a marking point area and a circular ring mark arranged on the outer circle of the marking point area, the center of the circular ring mark coincides with the center point of the calibration plate, and the marking point area is provided with a plurality of marking points evenly arranged in rows and columns; An image acquisition module, used to acquire a first image within a corresponding field of view captured by each camera to be calibrated, wherein the first image includes a partial marking point area and a partial ring marking area; A center point determination module, used to determine the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marked area in the first image; A coordinate conversion module, used to extract the pixel coordinates of each marking point in the partial marking point area based on the pixel position of the center point of the calibration plate, and determine the row and column coordinate information of each marking point in the calibration plate; A calibration parameter determination module, used to determine the calibration parameters of the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate; The center point determination module is also used to: extract the pixel coordinates located on the inner ring and the pixel coordinates located on the outer ring in the partial circular ring marking area; fit the pixel coordinates on the inner ring and the pixel coordinates on the outer ring to obtain the fitted ring center coordinates; determine the ring center coordinates as the pixel position of the center point of the calibration plate; The device also includes a verification module, which is used to: According to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate, determine the affine transformation relationship from the pixel coordinates of the camera to be calibrated to the calibration plate coordinate system; based on the affine transformation relationship, perform affine transformation on the pixel coordinates located on the outer ring in the partial circular ring marking area in the first image collected by the corresponding camera to be calibrated to obtain a transformed coordinate point set; fit the coordinate point set to obtain the fitted center coordinates; obtain the standard deviation between each coordinate point in the coordinate point set and the center coordinates; if the standard deviation is greater than a set threshold, adjust the parameters of the camera to be calibrated; obtain the first image in the corresponding field of view collected by the camera to be calibrated after the parameters are adjusted, and return to execute the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular ring marking area in the first image until the standard deviation is less than or equal to the set threshold, and calibrate the corresponding camera to be calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points in the calibration plate; or, The marking points include pre-set reference marking points, and the reference marking points have preset coordinate features, and the row and column coordinate information of the reference marking points in the marking points is identified; when the row and column coordinate information of the reference marking points does not meet the preset coordinate features, the parameters of the camera to be calibrated are adjusted; the first image within the corresponding field of view captured by the camera to be calibrated after the parameters are adjusted is acquired, and the step of determining the pixel position of the center point of the calibration plate according to the pixel coordinates of the partial circular marking area in the first image is returned to execute until the row and column coordinate information of the reference marking points meets the preset coordinate features, and the corresponding camera to be calibrated is calibrated according to the pixel coordinates of each of the marking points in the partial marking point area and the row and column coordinate information of each of the marking points located in the calibration plate.

7. The device according to claim 6, characterized in that The coordinate conversion module is specifically used for: According to the pixel coordinates of each of the marking points in the partial marking point area, each of the marking points is sorted in rows and columns to obtain a sorting result; According to the sorting result, obtain the corresponding row spacing and column spacing; According to the pixel coordinates of each of the marking points, the pixel position of the center point of the calibration plate, the row spacing and the column spacing, the row and column coordinate information of each of the marking points located in the calibration plate is obtained.

8. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 5 are implemented.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • High-precision camera calibration method and device based on special annular calibration plate

    CN115409898A

  • Large-view-field camera calibration method based on multiple annular coding point calibration plates

    CN117152264A