Homography Matrix Determination Method, System and Device

The method enhances the accuracy of homography matrix determination by iteratively refining the search radius to ensure sufficient point matching, addressing inaccuracies in existing circular marker-based calibration methods.

CN116468805BActive Publication Date: 2025-07-15SHANGHAI JUYOU SMART INTELLIGENCE TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310471875.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-04-26
Publication Date
2025-07-15
Estimated Expiration
2043-04-26

AI Technical Summary

Technical Problem

In the prior art, when camera calibration is performed using checkerboards and circular pattern calibration plates, corner point extraction is prone to failure, and the accuracy of determining the homographic matrix of circular pattern calibration plates is low, especially when the angle deflection is large, the error matching is serious.

Method used

By collecting the image of the calibration plate, obtaining the circular outline of the circular marking points, determining the radius and center coordinates, performing descending order, selecting the first m circular marking points as positioning circles, obtaining the coordinates of their object points, building a homography matrix, and adjusting the search radius through iteratively to improve accuracy.

Benefits of technology

The accuracy of the homography matrix is improved, thereby improving the accuracy of camera parameter calibration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116468805B_ABST
    Figure CN116468805B_ABST
Patent Text Reader

Abstract

The present application discloses a method, system and device for determining a homography matrix. By obtaining the circular contours of each circular landmark in a selected area of a calibration plate image, determining the radius and center coordinates of the corresponding circular landmark according to each circular contour, determining it as a positioning circle, determining the homography matrix according to the center coordinates of the positioning circle and the object point coordinates, converting each object point of the calibration plate to the corresponding image plane of the calibration plate image according to the homography matrix, if the number of object points falling into the search area after conversion is less than a preset quantity, updating the search radius to Q + ΔQ, re-determining the selected area according to the search center and the updated search radius, and entering the next iteration to obtain a new homography matrix, if the number of object points falling into the search area after conversion is greater than or equal to the preset quantity, then determining the homography matrix between the calibration plate image and the image plane, so as to improve the accuracy of the finally determined homography matrix.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of signal processing technology, and in particular to a method, system and device for determining a homography matrix. Background Art

[0002] Digital development is the trend of future development, and sensors play a key role in it. About 70% of human information is obtained through vision, so visual sensors play the most critical role among all sensors. Visual sensors usually need to be calibrated due to their manufacturing and processing errors. Currently, camera calibration is mostly carried out using calibration plates with checkerboard patterns and circular patterns.

[0003] Currently, most software and open source libraries use a checkerboard pattern calibration plate, which has the following problems:

[0004] 1. If the deflection angle is too large, corner point extraction is likely to fail;

[0005] 2. If the image resolution is too low, corner extraction is likely to fail;

[0006] 3. Corner point extraction does not use a strict mathematical model. Opencv uses quadrilateral connection to find the final corner point, and matlab uses regional growing to find the final corner point;

[0007] The calibration plate with a circular pattern extracts the center of the circle and sorts the center of the circle accordingly, and makes a one-to-one correspondence with the coordinates of the object points to determine the homography matrix, thereby completing the camera calibration. The circular pattern calibration plate is more robust in the calibration process and has certain advantages over the checkerboard calibration plate. The correspondence between the coordinates of the center of the circle in the image plane and the calibration plate plane is a key step.

[0008] Currently, one way to sort circular landmarks is to use the straight line method. This method requires complex matching logic when there are a large number of landmarks and large angle deflections, which is prone to mismatching and results in low accuracy of the determined homography matrix. Summary of the invention

[0009] In view of this, the present application provides a method, system and device for determining a homography matrix to solve the problem that the conventional method easily leads to low accuracy of the determined homography matrix.

[0010] The present application provides a method for determining a homography matrix, and the method for determining a homography matrix comprises the following steps:

[0011] S110, collecting a calibration plate image corresponding to the calibration plate by a camera, wherein the calibration plate includes a plurality of object points, and the calibration plate image includes circular marking points corresponding to the respective object points;

[0012] S120, obtain the circular contours of each circular fiducial point within the selected area of the calibration plate image;

[0013] S130, determine the radius and center coordinates of the corresponding circular fiducial points according to each of the circular contours;

[0014] S140, sort the radii of the circular fiducial points in descending order, and determine the first m circular fiducial points corresponding to the radii as the positioning circles;

[0015] S150, obtain the physical point coordinates of the m positioning circles corresponding to the calibration plate;

[0016] S160, determine the homography matrix according to the center coordinates and physical point coordinates of the m positioning circles;

[0017] S170, take the center of the area determined by the m positioning circles as the search center, determine the search area with a search radius Q, transform each physical point of the calibration plate to the corresponding image plane of the calibration plate image according to the homography matrix. If the number of physical points falling into the search area after transformation is less than the preset quantity, update the search radius Q to Q + ΔQ, re-determine the selected area according to the search center and the updated search radius, and return to execute step S120. If the number of physical points falling into the search area after transformation is greater than or equal to the preset quantity, then determine the current homography matrix as the homography matrix between the calibration plate image and the image plane.

[0018] Optionally, the determining the radius and center coordinates of the corresponding circular fiducial points according to each of the circular contours includes: determining the radius of the corresponding circular fiducial point according to each of the circular contours by using the least squares circle fitting method; determining the center of the corresponding circular fiducial point according to each of the circular contours by using the least squares ellipse fitting method.

[0019] Optionally, the determining the radius of the corresponding circular fiducial point according to each of the circular contours by using the least squares circle fitting method includes: constructing a circular expression: (x - O x ') 2 +(y - O y ') 2 =R 2 , where R represents the radius to be solved, (O x ', O y ') represents the center coordinates corresponding to the circular expression, and (x, y) represents the points on the image plane corresponding to the calibration plate image; set the first parameter a, the second parameter b, and the second parameter c according to the circular expression; determine a set of points to be fitted corresponding to each of the circular contours, and construct an objective function corresponding to each set of the points to be fitted: Among them, F(a, b, c) represents the objective function, (x i , y i ) represents the coordinates of the i-th point in a set of points to be fitted, and n represents the number of points in a set of points to be fitted; calculate the first parameter a, the second parameter b, and the second parameter c that minimize the objective function, and determine the radius R corresponding to a set of the points to be fitted according to the calculated first parameter a, the second parameter b, and the second parameter c.

[0020] Optionally, the radius R is:

[0021] Optionally, determining the center of the corresponding circular mark point according to the least squares ellipse fitting method for each of the circular contours includes: constructing an ellipse expression: Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0, where A, B, C, D, E, and F are ellipse parameters, and (x, y) represents a point on the image plane corresponding to the calibration plate image; calculate each ellipse parameter of the corresponding ellipse according to multiple points on each of the circular contours; determine the ellipse center of the corresponding ellipse according to each ellipse parameter, and determine the ellipse center of the ellipse as the center of the corresponding circular mark.

[0022] Optionally, the center of the circular mark includes: Among them, (o x , o y ) represents the center of the circular mark.

[0023] Optionally, determining the homography matrix according to the center coordinates of the m positioning circles and the object point coordinates includes: constructing a conversion relationship between the center coordinates of each positioning circle and the corresponding object point; determining the equations for solving the elements corresponding to the center coordinates of each positioning circle according to the conversion relationship; calculating the matrix element values of the homography matrix according to the equations corresponding to the four positioning circles respectively, and thereby determining the homography matrix.

[0024] Optionally, the conversion relationship includes:

[0025]

[0026]

[0027] Among them, (u v 1) T is the homogeneous representation of the coordinate system where the image plane is located, (x' y' 1) T is the homogeneous representation of the coordinate system where the calibration plate plane is located, H is the homography matrix, h 11 , h 12 , h 13 , h21 , h 22 , h 23 , h 31 and h 32 are all matrix elements of the homography matrix H.

[0028] This application also provides a homography matrix determination system, which includes:

[0029] An acquisition module, configured to acquire a calibration board image corresponding to a calibration board through a camera. The calibration board includes a plurality of object points, and the calibration board image includes circular fiducial points corresponding to each object point;

[0030] A first acquisition module, configured to acquire the circular contours of each circular fiducial point within a selected area of the calibration board image;

[0031] A first determination module, configured to determine the radius and center coordinates of the corresponding circular fiducial point according to each circular contour;

[0032] An arrangement module, configured to sort the radii of the circular fiducial points in descending order, and determine the first m circular fiducial points with the largest radii as positioning circles;

[0033] A second acquisition module, configured to acquire the object point coordinates corresponding to the m positioning circles on the calibration board;

[0034] A second determination module, configured to determine the homography matrix according to the center coordinates and object point coordinates of the m positioning circles;

[0035] An update module, configured to use the center of the area determined by the m positioning circles as the search center, determine a search area with a search radius Q, convert each object point of the calibration board to the image plane corresponding to the calibration board image according to the homography matrix. If the number of object points falling into the search area after conversion is less than a preset number, update the search radius Q to Q + ΔQ, re-determine the selected area according to the search center and the updated search radius, and return to enter the first acquisition module to continue executing the step of acquiring the circular contours of each circular fiducial point within the selected area of the calibration board image. If the number of object points falling into the search area after conversion is greater than or equal to the preset number, determine the current homography matrix as the homography matrix between the calibration board image and the image plane.

[0036] This application also provides a homography matrix determination device, which includes a processor and a storage medium; a program code is stored on the storage medium; the processor is configured to call the program code stored in the storage medium to execute any one of the above homography matrix determination methods.

[0037] In the above method, system and device for determining the homography matrix of the present application, calibration plate images corresponding to the calibration plate are collected by a camera, circular contours of each circular fiducial point in a selected area of the calibration plate image are obtained, the radius and center coordinates of the corresponding circular fiducial points are determined according to each circular contour, the radii of the circular fiducial points are sorted in descending order, the first m circular fiducial points corresponding to the first m radii are determined as positioning circles, the physical point coordinates corresponding to the m positioning circles on the calibration plate are obtained, the homography matrix is determined according to the center coordinates and physical point coordinates of the m positioning circles, the center of the area determined by the m positioning circles is used as the search center, a search area is determined with a search radius Q as the radius, each physical point of the calibration plate is transformed to the image plane corresponding to the calibration plate image according to the homography matrix, if the number of physical points falling into the search area after transformation is less than a preset quantity, the search radius Q is updated to Q + ΔQ, a selected area is re-determined according to the search center and the updated search radius, and the step of obtaining the circular contours of each circular fiducial point in the selected area of the calibration plate image is returned to and executed continuously, entering the next iteration to obtain a new homography matrix. If the number of physical points falling into the search area after transformation is greater than or equal to the preset quantity, the current homography matrix is determined as the homography matrix between the calibration plate image and the image plane, so as to improve the accuracy of the finally determined homography matrix, and thus improve the accuracy of the camera parameters calibrated based on the homography matrix. Description of the Drawings

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for the description of the embodiments will be briefly introduced below. Obviously, the drawings in the following description are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative efforts.

[0039] Figure 1 It is a schematic flow chart of a method for determining a homography matrix according to an embodiment of the present application;

[0040] Figure 2 It is a schematic diagram of a calibration plate according to an embodiment of the present application;

[0041] Figure 3 It is a schematic diagram of a positioning circle according to an embodiment of the present application;

[0042] Figure 4 It is a schematic diagram of a system for determining a homography matrix according to an embodiment of the present application. Detailed Embodiments

[0043] The following will clearly and completely describe the technical solutions in the embodiments of the present application with reference to the accompanying drawings. Apparently, the described embodiments are only a part of the embodiments of the present application, rather than all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the scope of protection of the present application. Without conflict, the following various embodiments and their technical features can be combined with each other.

[0044] In the first aspect of the present application, a method for determining a homography matrix is provided. The method for determining the homography matrix is used to determine the homography matrix between the calibration board collected by the camera and the image plane corresponding to the image collected by the camera; wherein the homography matrix can be used for calibrating the parameters of the corresponding camera (such as the internal parameters and / or external parameters of the camera). Refer to Figure 1 As shown, the method for determining the homography matrix includes steps S110 to S170.

[0045] S110, collect a calibration board image corresponding to the calibration board through the camera. The calibration board includes a plurality of object points, and the above object points can be dot points, for example, refer to Figure 2 As shown. The calibration board image includes circular fiducial points corresponding to each object point. The camera can include a ToF camera.

[0046] S120, obtain the circular contours of each circular fiducial point in the selected area of the calibration board image. This step can use a morphological method to extract the circular contours of the circular calibration points and identify the coordinates of each point on the circular contour to obtain the contour coordinates. Specifically, the above calibration board image can be an IR image. This step can binarize the collected IR image, then extract the contours of the binary image, and delete all the contours greater than the preset pixel threshold and less than the pixel threshold. What remains is the circular contour.

[0047] S130, determine the radius and center coordinates of the corresponding circular fiducial point according to each circular contour.

[0048] This step can perform circle fitting or ellipse fitting on the points on each circular contour to determine the radius and center coordinates corresponding to each circular contour respectively.

[0049] Optionally, in the above step 130, the sub-pixel coordinates of the circular contour can also be calculated using the circular contour obtained by least squares ellipse fitting, and then the obtained sub-pixel coordinates can be used for least squares ellipse fitting to obtain high-precision center coordinates.

[0050] S140, sort the radii of the circular fiducial points in descending order, and determine the circular fiducial points corresponding to the first m radii as the positioning circles. Where m can be 5. At this time, this step can sort the extracted radii in descending order and take the circular fiducial points corresponding to the first 5 radii. These 5 circular fiducial points are 5 positioning circles.

[0051] S150. Obtain the physical point coordinates corresponding to the m positioning circles on the calibration board.

[0052] Specifically, if m = 5, let the 5 large circles (i.e., positioning circles) be set as A, B, C, D, and E respectively, and construct a coordinate system based on these 5 positioning circles A, B, C, D, and E. For example, the established coordinate system has the straight line DE as the x-axis and the straight line AB as the y-axis, where E is the positive direction of the x-axis and B is the positive direction of the y-axis, as Figure 3 shown. Find the minimum distance and the maximum distance between the 5 positioning circles, so as to determine the positioning circle A, and set the minimum distance as d. According to the two centers of the positioning circle A corresponding to the minimum distance, the positioning circles B and C can be located. According to the two centers of the positioning circle C corresponding to the maximum distance, the positioning circles D and E can be located, and the physical point coordinates corresponding to the positioning circles are known.

[0053] S160. Determine the homography matrix according to the center coordinates and physical point coordinates of the m positioning circles.

[0054] For this step, each matrix element included in the homography matrix can be set for each positioning circle. Based on this homography matrix, a corresponding relationship formula between the center coordinates of the positioning circle and the physical points is constructed, and the corresponding relationship formulas corresponding to each positioning circle are jointly solved to calculate each matrix element included in the homography matrix, so as to determine the homography matrix.

[0055] Through the detected m positioning circles and their corresponding physical point coordinates, a homography matrix H0 can be calculated. The homography matrix H0 obtained by only using 5 points has poor robustness and cannot realize the correspondence between all image points and physical points at one time. Therefore, iteration is required to improve the reliability of the finally obtained homography matrix.

[0056] S170. Take the center of the area determined by the m positioning circles as the search center, and determine the search area with the search radius Q as the radius. According to the current homography matrix, convert each physical point of the calibration board to the image plane corresponding to the calibration board image. If the number of physical points falling into the search area after conversion is less than the preset quantity, update the search radius Q to Q + ΔQ, re-determine the selected area according to the search center and the updated search radius, and return to execute step S120 to enter the next iteration to obtain a new homography matrix; if the number of physical points falling into the search area after conversion is greater than or equal to the preset quantity, it is determined that the iteration ends, and the current homography matrix is determined as the homography matrix between the calibration board image and the image plane.

[0057] Among them, the values of Q and ΔQ can be set according to the size setting of the calibration board and / or relevant accuracy requirements. The preset quantity can be set according to relevant accuracy requirements. For example, it can be set to 99 or the like.

[0058] The above method for determining the homography matrix captures the calibration board image corresponding to the calibration board by the camera, obtains the circular contours of each circular fiducial point within the selected area of the calibration board image, determines the radius and center coordinates of the corresponding circular fiducial point according to each circular contour, arranges the radii of the circular fiducial points in descending order, determines the first m circular fiducial points corresponding to the first m radii as the positioning circles, obtains the object point coordinates corresponding to the m positioning circles on the calibration board, determines the homography matrix according to the center coordinates and object point coordinates of the m positioning circles, takes the center of the area determined by the m positioning circles as the search center, determines the search area with the search radius Q as the radius, converts each object point of the calibration board to the image plane corresponding to the calibration board image according to the homography matrix. If the number of object points falling into the search area after conversion is less than the preset quantity, updates the search radius Q to Q+ΔQ, re-determines the selected area according to the search center and the updated search radius, and returns to continue to execute the step of obtaining the circular contours of each circular fiducial point within the selected area of the calibration board image, enters the next iteration to obtain a new homography matrix. If the number of object points falling into the search area after conversion is greater than or equal to the preset quantity, determines the current homography matrix as the homography matrix between the calibration board image and the image plane, so as to improve the accuracy of the finally determined homography matrix, and thus improve the accuracy of the camera parameters calibrated based on the homography matrix.

[0059] In one embodiment, the determining the radius and center coordinates of the corresponding circular fiducial point according to each circular contour includes: determining the radius of the corresponding circular fiducial point by using the least squares circle fitting method according to each circular contour; determining the center of the corresponding circular fiducial point by using the least squares ellipse fitting method according to each circular contour. This embodiment can improve the accuracy of the determined radius and center.

[0060] In one example, the determining the radius of the corresponding circular fiducial point by using the least squares circle fitting method according to each circular contour includes steps S131 to S134.

[0061] S131, construct a circular expression: (x - O x ') 2 +(y - O y ') 2 =R 2 , where R represents the radius to be solved, (O x ', O y ') represents the center coordinates corresponding to the circular expression, and (x, y) represents the points on the image plane corresponding to the calibration board image.

[0062] S132, set the first parameter a, the second parameter b, and the second parameter c according to the circular expression.

[0063] Specifically, step S132 may include expanding the circular expression to obtain: x 2 -2O x 'x + O x ' 2 + y 2 -2O y 'y + O y ' 2 =R 2 , set a = -2O x ', b = -2O y ', c = O x ' 2 + O y ' 2 -R 2 , then the expanded expression of the circular expression can be written as: x 2 + y 2 + ax + by + c = 0. By solving the first parameter a, the second parameter b, and the second parameter c, the center coordinates (O x ', O y ) and the radius R corresponding to the circular expression can be calculated.

[0064] S133. Determine a set of points to be fitted corresponding to each of the circular contours, and construct an objective function corresponding to each set of the points to be fitted: where F(a, b, c) represents the objective function, (x i , y i ) represents the coordinates of the i-th point in a set of points to be fitted, n represents the number of points in a set of points to be fitted, and i = 1, L, n.

[0065] Specifically, use d i (i = 1, L, n) to represent the distance from the i-th point in a set of points to be fitted to the corresponding center coordinates (O x ', O y '), then

[0066] Use δ i (i = 1, L, n) to represent the difference between the square of the distance from the i-th point in a set of points to be fitted to the corresponding center coordinates (O x ', O y ) and the square of the radius, then δ i = d i 2 - R 2 = (x i - O x ) 2 + (y i - O y ) 2 - R2 = x i 2 + y i 2 + ax i + by i + c。

[0067] Therefore, the least - squares circle fitting is transformed into the problem of finding the minimum value.

[0068] Suppose

[0069] S134, calculate the first parameter a, the second parameter b, and the second parameter c that make the objective function obtain the minimum value, and determine the radius R corresponding to a set of the points to be fitted according to the calculated first parameter a, the second parameter b, and the second parameter c.

[0070] Specifically, the above - mentioned step S134 can take the partial derivatives of the function F(a, b, c) with respect to a, b, and c, and analyze and compare the function values at the extreme points to obtain the corresponding minimum value. For example:

[0071]

[0072]

[0073]

[0074] Solve the above 3 equations, then the first parameter a, the second parameter b, and the second parameter c can be calculated, and the center coordinates (O x ', O y ') of the circular expression and the radius R can be obtained.

[0075] Specifically, the radius R is: Specifically, the center coordinates (O x ', O y ') of the circular expression are:

[0076] In one example, the method for determining the center of the corresponding circular fiducial point by using the least - squares ellipse fitting method according to each of the circular contours includes:

[0077] Construct an ellipse expression: Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0, where A, B, C, D, E, and F are ellipse parameters, and (x, y) represents the points on the image plane corresponding to the calibration plate image;

[0078] Calculate the respective ellipse parameters of the corresponding ellipse based on multiple points on each of the circular contours; for example, least squares processing can be performed on each point on each of the circular contours to solve for the six ellipse parameters A, B, C, D, E, and F of the ellipse equation;

[0079] Determine the ellipse center of the corresponding ellipse based on each ellipse parameter, and determine the ellipse center of the ellipse as the center of the corresponding circular mark.

[0080] Specifically, all ellipse parameters can be divided by F for normalization to obtain the final ellipse center coordinates. In one example, the center of the circular mark includes: where, (o x , o y ) represents the center of the circular mark.

[0081] In one embodiment, the determining the homography matrix based on the center coordinates of the m positioning circles and the object point coordinates includes steps S161 to S163.

[0082] S161, construct a conversion relationship between the center coordinates of each positioning circle and the corresponding object point.

[0083] S162, determine the element solution equations corresponding to the center coordinates of each positioning circle according to the conversion relationship.

[0084] S163, calculate the matrix element values of the homography matrix according to the element solution equations corresponding to the four positioning circles respectively, and thereby determine the homography matrix.

[0085] According to the knowledge in projective geometry, the relationship between corresponding points in two planes can be characterized by a conversion relationship. In one example, the conversion relationship includes:

[0086]

[0087]

[0088] where, (u v 1) T is the homogeneous representation of the coordinate system where the image plane is located, (x' y' 1) T is the homogeneous representation of the coordinate system where the calibration plate plane is located, H is the homography matrix, and h 11 , h 12 , h 13 , h 21 , h 22 , h 23 , h 31 and h 32 are all matrix elements of the homography matrix H.

[0089] The homography matrix H can be obtained based on a known set of corresponding point information, thereby obtaining the corresponding relationship between two planes. The process of solving the homography matrix H may include:

[0090]

[0091]

[0092] After simplification, we get:

[0093] u(h 31 ×x'+h 32 ×y'+1)=h 11 ×x'+h 12 ×y'+h 13 ,

[0094] v(h 31 ×x'+h 32 ×y'+1)=h 21 ×x'+h 22 ×y'+h 23 .

[0095] Converted into matrix form, it is:

[0096]

[0097] In this way, two equations can be obtained from the center coordinates of a corresponding positioning circle and the object point coordinates. Therefore, the homography matrix H can be solved from the center coordinates of 4 positioning circles and the object point coordinates.

[0098] The above method for determining the homography matrix acquires the calibration plate image corresponding to the calibration plate through the camera, obtains the circular contours of each circular fiducial point within the selected area of the calibration plate image, determines the radius and center coordinates of the corresponding circular fiducial points according to each circular contour, arranges the radii of the circular fiducial points in descending order, determines the first m circular fiducial points corresponding to the radii as the positioning circles, obtains the physical point coordinates corresponding to the m positioning circles on the calibration plate, determines the homography matrix according to the center coordinates and physical point coordinates of the m positioning circles, takes the center of the area determined by the m positioning circles as the search center, determines the search area with the search radius Q as the radius, converts each physical point of the calibration plate to the image plane corresponding to the calibration plate image according to the homography matrix. If the number of physical points falling into the search area after conversion is less than the preset quantity, update the search radius Q to Q + ΔQ, re-determine the selected area according to the search center and the updated search radius, and return to continue executing the step of obtaining the circular contours of each circular fiducial point within the selected area of the calibration plate image, and enter the next iteration to obtain a new homography matrix. If the number of physical points falling into the search area after conversion is greater than or equal to the preset quantity, then determine the current homography matrix as the homography matrix between the calibration plate image and the image plane, so as to improve the accuracy of the finally determined homography matrix, and thus improve the accuracy of the camera parameters calibrated based on this homography matrix.

[0099] In the second aspect, the present application provides a homography matrix determination device, as Figure 4 shown. The homography matrix determination device includes:

[0100] An acquisition module 110, configured to acquire a calibration plate image corresponding to the calibration plate through a camera. The calibration plate includes a plurality of physical points, and the calibration plate image includes circular fiducial points corresponding to each physical point;

[0101] A first acquisition module 120, configured to acquire the circular contours of each circular fiducial point within the selected area of the calibration plate image;

[0102] A first determination module 130, configured to determine the radius and center coordinates of the corresponding circular fiducial points according to each of the circular contours;

[0103] An arrangement module 140, configured to arrange the radii of the circular fiducial points in descending order, and determine the first m circular fiducial points corresponding to the radii as the positioning circles;

[0104] A second acquisition module 150, configured to acquire the physical point coordinates corresponding to the m positioning circles on the calibration plate;

[0105] A second determination module 160, configured to determine the homography matrix according to the center coordinates and physical point coordinates of the m positioning circles;

[0106] An update module 170 is configured to use the center of the area determined by the m positioning circles as the search center, and determine a search area with a search radius Q. According to the homography matrix, each physical point of the calibration board is transformed to the image plane corresponding to the calibration board image. If the number of physical points falling into the search area after transformation is less than a preset number, update the search radius Q to Q + ΔQ, re-determine the selected area according to the search center and the updated search radius, and return to enter the first acquisition module to continue executing the step of acquiring the circular contours of each circular mark point in the selected area of the calibration board image. If the number of physical points falling into the search area after transformation is greater than or equal to the preset number, determine the current homography matrix as the homography matrix between the calibration board image and the image plane.

[0107] For the specific limitations of the homography matrix determination device, reference can be made to the limitations of the homography matrix determination method in the above text, which will not be elaborated here. Each unit in the above homography matrix determination device can be implemented in whole or in part by software, hardware, and their combination. The above units can be embedded in the processor in the computer device in hardware form or be independent of it, or can be stored in the memory of the computer device in software form so that the processor can call and execute the operations corresponding to each of the above units.

[0108] In a third aspect of the present application, a homography matrix determination device is provided. The homography matrix determination device includes a processor and a storage medium; a program code is stored on the storage medium; the processor is configured to call the program code stored on the storage medium to execute the homography matrix determination method according to any one of the above embodiments.

[0109] Although the present application has been shown and described with respect to one or more implementations, those skilled in the art will conceive of equivalent variations and modifications based on the reading and understanding of this specification and the drawings. The present application includes all such modifications and variations and is limited only by the scope of the appended claims. In particular, with respect to the various functions performed by the above components, the terms used to describe such components are intended to correspond to any component that performs the specified function of the component (e.g., it is functionally equivalent), unless otherwise indicated, even if it is not structurally equivalent to the disclosed structure that performs the function in the exemplary implementation of this specification shown herein.

[0110] That is, the above description is only for the embodiments of the present application and does not limit the patent scope of the present application. Any equivalent structural or equivalent process transformation made by using the content of the specification and drawings of the present application, such as the mutual combination of technical features between the embodiments, or direct or indirect application in other related technical fields, is equally included in the patent protection scope of the present application.

[0111] In addition, in the description of the present application, it should be understood that the orientation or positional relationship indicated by terms such as "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. is based on the orientation or positional relationship shown in the drawings, and is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and thus should not be construed as a limitation to the present application. In addition, for structural elements with the same or similar characteristics, the present application may use the same or different reference numerals for identification. In addition, the terms "first" and "second" are only used for descriptive purposes and should not be construed as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "a plurality of" is two or more unless otherwise specifically defined.

[0112] In the present application, the term "exemplary" is used to mean "serving as an example, illustration, or explanation". Any embodiment described as "exemplary" in the present application is not necessarily to be construed as more preferred or more advantageous than other embodiments. The above description is given in order to enable any person skilled in the art to make and use the present application. In the above description, various details are set forth for purposes of explanation. It should be understood that those of ordinary skill in the art can recognize that the present application can be practiced without these specific details. In other embodiments, well-known structures and processes are not elaborated in detail so as not to obscure the description of the present application with unnecessary details. Therefore, the present application is not intended to be limited to the embodiments shown, but is to be accorded the widest scope consistent with the principles and features disclosed in the present application.

Claims

1. A method for determining a homography matrix, characterized in that, The method for determining the homography matrix includes the following steps: S110, acquiring a calibration board image corresponding to a calibration board through a camera, where the calibration board includes a plurality of object points, and the calibration board image includes circular fiducial points corresponding to each object point; S120, obtaining the circular contours of each circular fiducial point within a selected area of the calibration board image; S130, determining the radius and center coordinates of the corresponding circular fiducial point according to each circular contour; S140, arranging the radii of the circular fiducial points in descending order, and determining the first m circular fiducial points corresponding to the first m radii as positioning circles; S150, obtaining the object point coordinates corresponding to the m positioning circles on the calibration board; S160, determining the homography matrix according to the center coordinates and object point coordinates of the m positioning circles; S170, taking the center of the area determined by the m positioning circles as the search center, determining a search area with a search radius Q, converting each object point of the calibration board to the corresponding image plane of the calibration board image according to the homography matrix. If the number of object points falling into the search area after conversion is less than a preset quantity, updating the search radius Q to Q + ΔQ, re-determining the selected area according to the search center and the updated search radius, and returning to execute step S120. If the number of object points falling into the search area after conversion is greater than or equal to the preset quantity, determining the current homography matrix as the homography matrix between the calibration board image and the image plane.

2. The method for determining the homography matrix according to claim 1, wherein The determining the radius and center coordinates of the corresponding circular fiducial point according to each circular contour includes: Determining the radius of the corresponding circular fiducial point according to each circular contour by using the least squares circle fitting method; Determining the center of the corresponding circular fiducial point according to each circular contour by using the least squares ellipse fitting method.

3. The method for determining the homography matrix according to claim 2, wherein The determining the radius of the corresponding circular fiducial point according to each circular contour by using the least squares circle fitting method includes: Construct the circular expression: (x - O x ') 2 + (y - O y ') 2 = R 2 , where R represents the radius to be solved, and (O x ', O y ') represents the center coordinates of the circular expression, and (x, y) represents the points on the image plane corresponding to the calibration board image; Setting a first parameter a, a second parameter b, and a second parameter c according to the circular expression; Determine a set of points to be fitted corresponding to each of the circular contours, and construct an objective function corresponding to each set of the points to be fitted: where F(a, b, c) represents the objective function, and (x i , y i ) represents the coordinates of the i-th point in a set of points to be fitted, and n represents the number of points in a set of points to be fitted; Calculating the first parameter a, the second parameter b, and the second parameter c that minimize the objective function, and determining the radius R corresponding to a set of the points to be fitted according to the calculated first parameter a, the second parameter b, and the second parameter c.

4. The method for determining the homography matrix according to claim 3, wherein The radius R is as follows:

5. The method for determining the homography matrix according to claim 2, wherein The determining the center of the corresponding circular fiducial point according to each circular contour by using the least squares ellipse fitting method includes: Construct the ellipse expression: Ax 2 + Bxy + Cy 2 + Dx + Ey + F = 0, where A, B, C, D, E, and F are ellipse parameters, and (x, y) represents a point on the image plane corresponding to the calibration plate image; Calculating each ellipse parameter of the corresponding ellipse according to a plurality of points on each circular contour; Determining the ellipse center of the corresponding ellipse according to each ellipse parameter, and determining the ellipse center of the ellipse as the center of the corresponding circular fiducial.

6. The method for determining a homography matrix according to claim 5, characterized in that The center of the circular mark includes: Among them, (o x , o y ) represents the center of the circular mark.

7. The method for determining the homography matrix according to claim 1, characterized in that The determining the homography matrix according to the center coordinates and object point coordinates of the m positioning circles includes: Constructing a conversion relation between the center coordinates of each positioning circle and the corresponding object point; Determining an element solving equation corresponding to the center coordinates of each positioning circle according to the conversion relation; Calculating the matrix element values of the homography matrix according to the element solving equations corresponding to the four positioning circles respectively, and thereby determining the homography matrix.

8. The method for determining the homography matrix according to claim 7, wherein The conversion relation includes: where, (uv1) T is the homogeneous representation of the coordinate system where the image plane is located, (x'y'1) T is the homogeneous representation of the coordinate system where the calibration plate plane is located, H is the homography matrix, and h 11 , h 12 , h 13 , h 21 , h 22 , h 23 , h 31 and h 32 are all matrix elements of the homography matrix H.

9. A homography matrix determination system, characterized in that The homography matrix determining system includes: The acquisition module is used to collect the calibration board images corresponding to the calibration board through a camera. The calibration board includes a plurality of object points, and the calibration board images include circular fiducial points corresponding to each object point; The first acquisition module is used to acquire the circular contours of each circular fiducial point in the selected area of the calibration board image; The first determination module is used to determine the radius and center coordinates of the corresponding circular fiducial point according to each circular contour; The arrangement module is used to sort the radii of the circular fiducial points in descending order, and determine the first m circular fiducial points corresponding to the radii as the positioning circles; The second acquisition module is used to acquire the object point coordinates corresponding to the m positioning circles on the calibration board; The second determination module is used to determine the homography matrix according to the center coordinates and object point coordinates of the m positioning circles; The update module is used to take the center of the area determined by the m positioning circles as the search center, determine the search area with the search radius Q, convert each object point of the calibration board to the image plane corresponding to the calibration board image according to the homography matrix. If the number of object points falling into the search area after conversion is less than the preset number, update the search radius Q to Q + ΔQ, re-determine the selected area according to the search center and the updated search radius, and return to enter the first acquisition module to continue to execute the step of acquiring the circular contours of each circular fiducial point in the selected area of the calibration board image. If the number of object points falling into the search area after conversion is greater than or equal to the preset number, determine the current homography matrix as the homography matrix between the calibration board image and the image plane.

10. A homography matrix determination device, characterized in that, The homography matrix determination device includes a processor and a storage medium; program codes are stored on the storage medium; the processor is used to call the program codes stored in the storage medium to execute the homography matrix determination method according to any one of claims 1 to 8.