CN116468805A - Homography matrix determination method, system and equipment - Google Patents

Homography matrix determination method, system and equipment Download PDF

Info

Publication number
CN116468805A
CN116468805A CN202310471875.9A CN202310471875A CN116468805A CN 116468805 A CN116468805 A CN 116468805A CN 202310471875 A CN202310471875 A CN 202310471875A CN 116468805 A CN116468805 A CN 116468805A
Authority
CN
China
Prior art keywords
homography matrix
circular
determining
calibration plate
points
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202310471875.9A
Other languages
Chinese (zh)
Inventor
于彭
丁浩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Opnous Smart Sensing & Ai Technology
Original Assignee
Opnous Smart Sensing & Ai Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Opnous Smart Sensing & Ai Technology filed Critical Opnous Smart Sensing & Ai Technology
Priority to CN202310471875.9A priority Critical patent/CN116468805A/en
Publication of CN116468805A publication Critical patent/CN116468805A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/10Segmentation; Edge detection
    • G06T7/13Edge detection
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/60Analysis of geometric attributes
    • G06T7/62Analysis of geometric attributes of area, perimeter, diameter or volume
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/70Determining position or orientation of objects or cameras
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

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

Abstract

The application discloses a homography matrix determination method, a homography matrix determination system and homography matrix determination equipment. The method comprises the steps of obtaining circular outlines of all circular marking points in a selected area of a calibration plate image, determining the radius and circle center coordinates of corresponding circular marking points according to all circular outlines, determining a locating circle, determining a homography matrix according to the circle center coordinates and object point coordinates of the locating circle, converting all object points of the calibration plate to an image plane corresponding to the calibration plate image according to the homography matrix, updating the searching radius to be Q+delta Q if the number of object points falling into a searching area after conversion is smaller than a preset number, re-determining the selected area according to the searching center and the updated searching radius, entering the next iteration to obtain a new homography matrix, and determining the homography matrix between the calibration plate image and the image plane if the number of object points falling into the searching area after conversion is larger than or equal to the preset number, so as to improve the accuracy of the finally determined homography matrix.

Description

Homography matrix determination method, system and equipment
Technical Field
The present application relates to the field of signal processing technologies, and in particular, to a method, a system, and an apparatus for determining a homography matrix.
Background
Digitization is a trend in the future, where sensors play a critical role. About 70% of the information of humans is obtained visually, so visual sensors play the most critical role among all sensors. Vision sensors typically require calibration due to errors in their manufacture and processing. At present, calibration of cameras is mostly performed by using calibration plates with checkerboard patterns and circular patterns.
Most of the software and open source libraries currently use checkerboard pattern calibration plates, which have the following problems:
1. corner extraction with overlarge deflection angle is easy to fail;
2. the extraction of corner points with too low image resolution is easy to fail;
3. the corner extraction is not performed by adopting a strict mathematical model, a quadrilateral connection is adopted in opencv to find a final corner, and matlab adopts region growth to find the final corner;
the calibration plate with the circular pattern is used for determining the homography matrix by extracting the circle centers, sequencing the circle centers correspondingly and carrying out one-to-one correspondence with the coordinates of the object points, so that the camera calibration is completed. The circular pattern calibration plate is more robust in the calibration process, and has certain advantages compared with the checkerboard calibration plate, wherein the corresponding relation of the center coordinates on the image plane and the plane of the calibration plate is a key step.
At present, the circular mark points are ordered by adopting a straight line method, and under the conditions of more mark points and larger angle deflection, complex matching logic is needed, and mismatching is easy to occur, so that the accuracy of a determined homography matrix is low.
Disclosure of Invention
In view of this, the application provides a homography matrix determination method, a homography matrix determination system and homography matrix determination equipment, so as to solve the problem that the homography matrix is low in accuracy in the conventional method.
The application discloses a homography matrix determining method, which comprises the following steps:
s110, acquiring a calibration plate image corresponding to a calibration plate through a camera, wherein the calibration plate comprises a plurality of object points, and the calibration plate image comprises round mark points corresponding to all the object points;
s120, acquiring the circular outline of each circular mark point in the selected area of the calibration plate image;
s130, determining the radius and the center coordinates of the corresponding circular mark points according to the circular outlines;
s140, the radiuses of the circular marking points are arranged in a descending order, and the circular marking points corresponding to the first m radiuses are determined to be positioning circles;
s150, acquiring coordinates of the m positioning circles at object points corresponding to the calibration plate;
s160, determining a homography matrix according to the center coordinates and the object point coordinates of the m positioning circles;
s170, taking the area center determined by m positioning circles as a search center, taking a search radius Q as a radius to determine a search area, converting each object point of the calibration plate to an image plane corresponding to the image of the calibration plate according to the homography matrix, updating the search radius Q to Q+DeltaQ if the number of object points falling into the search area after conversion is smaller than a preset number, re-determining a selected area according to the search center and the updated search radius, and returning to execute the step S120, and determining the current homography matrix as the homography matrix between the image of the calibration plate and the image plane if the number of object points falling into the search area after conversion is larger than or equal to the preset number.
Optionally, the determining the radius and the center coordinates of the corresponding circular mark point according to each circular contour includes: determining the radius of the corresponding circular mark point by adopting a least square circle fitting method according to each circular outline; and determining the circle center of the corresponding circular mark point by adopting a least square ellipse fitting method according to each circular outline.
Optionally, the determining the radius of the corresponding circular mark point according to the method of using least square circle fitting according to each circular outline includes: constructing a circular expression: (x-O) x ') 2 +(y-O y ') 2 =R 2 Wherein R represents the radius to be solved, (O) x ',O y ' indicates the center coordinates corresponding to the circular expression, and (x, y) indicates the point on the image plane corresponding to the calibration plate image; setting a first parameter a, a second parameter b and a second parameter c according to the circular expression; determining a group of points to be fitted corresponding to each circular outline, and constructing an objective function corresponding to each group of points to be fitted:wherein F (a, b, c) represents an objective function, (x) i ,y i ) Representing the coordinates of the ith point in a group of points to be fitted, and n represents the number of points in the group of points to be fitted; and calculating a first parameter a, a second parameter b and a second parameter c which enable the objective function to obtain the minimum value, and determining a radius R corresponding to a group of points to be fitted according to the calculated first parameter a, second parameter b and second parameter c.
Optionally, the radius R is:
optionally, the determining the center of the circle of the corresponding circular marker point according to each circular contour by using a least square ellipse fitting method includes: constructing an elliptic expression: ax 2 +Bxy+Cy 2 +dx+ey+f=0, where A, B, C, D, E and F are ellipse parameters, (x, y) represent points on the image plane to which the calibration plate image corresponds; calculating each ellipse parameter of the corresponding ellipse according to a plurality of points on each circular contour; and determining the ellipse center of the corresponding ellipse according to each ellipse parameter, and determining the ellipse center of the ellipse as the circle center of the corresponding circular mark.
Optionally, the circle center of the circular mark comprises: wherein, (o) x ,o y ) Representing the center of the circle of the circular mark.
Optionally, the determining the homography matrix according to the center coordinates and the 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 elements corresponding to center coordinates of each positioning circle respectively according to the conversion relation to solve an equation; and calculating matrix element values of the homography matrix according to element solving equations respectively corresponding to the four positioning circles, so as to determine the homography matrix.
Optionally, the conversion relation includes:
therein, (u v) T For homogeneous representation of the coordinate system in which the image plane is located, (x 'y' 1) T For homogeneous representation of the coordinate system where the plane of the calibration plate is located, H is a homography matrix, H 11 、h 12 、h 13 、h 21 、h 22 、h 23 、h 31 And h 32 Are matrix elements of the homography matrix H.
The application also provides a homography matrix determination system, which comprises:
the acquisition module is used for acquiring a calibration plate image corresponding to the calibration plate through the camera, wherein the calibration plate comprises a plurality of object points, and the calibration plate image comprises round mark points corresponding to the object points;
the first acquisition module is used for acquiring the circular outline of each circular mark point in the selected area of the calibration plate image;
the first determining module is used for determining the radius and the center coordinates of the corresponding circular mark points according to the circular outlines;
the arrangement module is used for arranging the radiuses of the circular marking points in a descending order and determining the circular marking points corresponding to the first m radiuses as positioning circles;
the second acquisition module is used for acquiring the coordinates of the m object points corresponding to the positioning circles on the calibration plate;
the second determining module is used for determining a homography matrix according to the circle center coordinates and the object point coordinates of the m positioning circles;
the updating module is used for taking the area center determined by m positioning circles as a searching center, searching radius Q as a radius to determine a searching area, converting each object point of the calibration plate to an image plane corresponding to the calibration plate image according to the homography matrix, updating the searching radius Q to Q+delta Q if the number of object points falling into the searching area after conversion is smaller than a preset number, re-determining a selected area according to the searching center and the updated searching radius, returning to the step of entering the first acquisition module to continuously acquire the circular outline of each circular mark point in the selected area of the calibration plate image, and determining the current homography matrix as the homography matrix between the calibration plate image and the image plane if the number of object points falling into the searching area after conversion is larger than or equal to the preset number.
The application also provides a homography matrix determination device, which comprises a processor and a storage medium; the storage medium has program code stored thereon; the processor is configured to invoke the program code stored in the storage medium to perform any of the homography matrix determination methods described above.
According to the homography matrix determining method, system and equipment, the camera is used for collecting the calibration plate image corresponding to the calibration plate, the circular outline of each circular mark point in the selected area of the calibration plate image is obtained, the radius and circle center coordinates of the corresponding circular mark point are determined according to each circular outline, the radiuses of the circular mark points are arranged in a descending order, the circular mark points corresponding to the first m radiuses are determined to be positioning circles, the object point coordinates of the m positioning circles corresponding to the calibration plate are obtained, the homography matrix is determined according to the circle center coordinates and the object point coordinates of the m positioning circles, the area center determined by m positioning circles is used as a search center, the search radius Q is used as a radius to determine a search area, each object point of the calibration plate is converted to an image plane corresponding to the calibration plate image according to the homography matrix, if the number of the object points which fall into the search area after conversion is smaller than the preset number, the search radius Q+DeltaQ is updated, the selected area is redetermined according to the search center and the updated search radius, the step of obtaining the circular mark points on the selected area is continuously executed, the single-phase matrix corresponding to the target area is determined, the homography matrix is obtained after the single-phase conversion, the homography matrix is determined to be the preset, the homography matrix is calculated, the homography matrix is determined to be the image plane corresponding to the image plane, and the homography matrix is determined, and the homography matrix is more accurate, and the image is improved.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flowchart of a method for determining a homography matrix according to an embodiment of the present application;
FIG. 2 is a schematic illustration of a calibration plate according to an embodiment of the present application;
FIG. 3 is a schematic view of a positioning circle according to an embodiment of the present application;
fig. 4 is a schematic diagram of a homography matrix determination system according to an embodiment of the present application.
Detailed Description
The following description of the embodiments of the present application will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by those skilled in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application. The various embodiments described below and their technical features can be combined with each other without conflict.
The first aspect of the application provides a homography matrix determining method, which is used for determining a homography matrix between an acquisition calibration plate and an image plane corresponding to an image acquired by a camera; wherein the homography matrix can be used for calibration of parameters of the corresponding camera (e.g., camera internal and/or external parameters). Referring to fig. 1, the homography matrix determination method includes steps S110 to S170.
S110, acquiring a calibration plate image corresponding to the calibration plate through a camera. The calibration plate includes a plurality of object points, which may be dots, for example, as shown with reference to fig. 2. The calibration plate image comprises round mark points corresponding to all object points. Wherein the camera may comprise a ToF camera.
S120, acquiring the circular outline of each circular mark point in the selected area of the calibration plate image. The method can extract the circular outline of the circular calibration point by adopting a morphological method, and identify the coordinates of each point on the circular outline to obtain the outline coordinates. Specifically, the calibration plate image may be an IR image, the step may binarize the IR image, then extract the outline of the binary image, and delete all the outlines greater than the preset pixel threshold and less than the pixel threshold, and the rest is a circular outline.
S130, determining the radius and the center coordinates of the corresponding circular mark points according to the circular outlines.
The step can carry out circle fitting or ellipse fitting on the points on each circular outline so as to determine the radius and circle center coordinates corresponding to each circular outline.
Optionally, the step 130 may further utilize a circular contour obtained by least square ellipse fitting to calculate sub-pixel coordinates of the circular contour, and then utilize the obtained sub-pixel coordinates to perform least square ellipse fitting to obtain the center coordinates with high precision.
And S140, the radiuses of the circular marking points are arranged in a descending order, and the circular marking points corresponding to the first m radiuses are determined to be positioning circles. Wherein m can be 5, at this time, the extracted radii can be arranged in descending order, and the circular marking points corresponding to the first 5 radii are taken, and the 5 circular marking points are 5 positioning circles.
S150, acquiring coordinates of the m object points corresponding to the positioning circles on the calibration plate.
Specifically, if m=5, 5 large circles (i.e., positioning circles) are set as A, B, C, D, E, respectively, and a coordinate system is constructed according to the 5 positioning circles A, B, C, D, E. For example, the coordinate system is established with a straight line DE as the x-axis, a straight line AB as the y-axis, where E is the positive x-axis direction, and B is the positive y-axis direction, as shown in fig. 3. The minimum distance and the maximum distance between the 5 positioning circles are found, so that the positioning circle a can be determined and the minimum distance is set to d. And positioning circles B and C can be positioned according to the two circle centers corresponding to the minimum distance between the positioning circle A and the minimum distance. According to the two circle centers corresponding to the maximum distance of the positioning circle C, the positioning circle D and the positioning circle E can be positioned, and the coordinates of the object points corresponding to the positioning circle are known.
And S160, determining a homography matrix according to the center coordinates and the object point coordinates of the m positioning circles.
According to the method, each matrix element included in the homography matrix can be set for each positioning circle, a corresponding relation between the circle center coordinates of the positioning circle and the object points is built according to the homography matrix, and the corresponding relation corresponding to each positioning circle is combined for solving, so that each matrix element included in the homography matrix is calculated, and the homography matrix is determined.
A homography matrix H can be calculated through the detected m positioning circles and the corresponding object point coordinates 0 Homography matrix H obtained by using only 5 points 0 The robustness is poor, and the correspondence between all image points and object points cannot be realized at one time, so iteration is needed to improve the reliability of the homography matrix finally obtained.
S170, taking the area center determined by m positioning circles as a search center, taking a search radius Q as a radius to determine a search area, converting each object point of the calibration plate to an image plane corresponding to the image of the calibration plate according to a current homography matrix, updating the search radius Q to Q+delta Q if the number of object points falling into the search area after conversion is smaller than a preset number, re-determining a selected area according to the search center and the updated search radius, and returning to execute the step S120 to enter the next iteration to obtain a new homography matrix; if the number of the object points falling into the search area after conversion is greater than or equal to the preset number, judging that iteration is finished, and determining the current homography matrix as the homography matrix between the calibration plate image and the image plane.
The values of Q and Δq may be set according to the size setting of the calibration plate and/or the related accuracy requirements. The preset number may be set according to the related accuracy requirement, for example, may be set to 99 equivalent.
According to the homography matrix determining method, the camera is used for collecting the calibration plate image corresponding to the calibration plate, obtaining the circular outline of each circular mark point in the selected area of the calibration plate image, determining the radius and the circle center coordinates of the corresponding circular mark point according to each circular outline, carrying out descending order arrangement on the radius of the circular mark point, determining the circular mark points corresponding to the first m radiuses as positioning circles, obtaining the object point coordinates corresponding to the calibration plate of the m positioning circles, determining the homography matrix according to the circle center coordinates and the object point coordinates of the m positioning circles, taking the area center determined by the m positioning circles as a search center, determining the search area according to the search radius Q as the radius, converting each object point of the calibration plate into an image plane corresponding to the calibration plate image according to the homography matrix, if the number of the object points falling into the search area after conversion is smaller than the preset number, updating the search radius Q to be Q+DeltaQ, determining the selected area again according to the search center and the updated search radius, continuously executing the step of obtaining the circular outline of each circular mark point in the selected area of the calibration plate image, entering the next iteration to obtain the homography matrix, determining the homography matrix according to the new iteration, determining the homography matrix after the homography matrix is determined according to the preset number, and the homography matrix is determined, and the homography matrix is finally improved, and the homography matrix is determined.
In one embodiment, the determining the radius and the center coordinates of the corresponding circular mark point according to each circular outline includes: determining the radius of the corresponding circular mark point by adopting a least square circle fitting method according to each circular outline; and determining the circle center of the corresponding circular mark point by adopting a least square ellipse fitting method according to each circular outline. The embodiment can improve the accuracy of the determined radius and the circle center.
In one example, the method of using least square circle fitting to determine the radius of the corresponding circular marker point according to each circular outline includes steps S131 to S134.
S131, constructing a circular expression: (x-O) x ') 2 +(y-O y ') 2 =R 2 Wherein R represents the radius to be solved, (O) x ',O y ' indicates the center coordinates corresponding to the circular expression, and (x, y) indicates the point on the image plane corresponding to the calibration plate image.
S132, setting a first parameter a, a second parameter b and a second parameter c according to the circular expression.
Specifically, step S132 may include expanding the circular expression to: x is x 2 -2O x 'x+O x ' 2 +y 2 -2O y 'y+O y ' 2 =R 2 Setting a= -2O x ',b=-2O y ',c=O x ' 2 +O y ' 2 -R 2 The expanded expression of the circular expression can be written as: x is 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) corresponding to the circular expression can be calculated x ',O y ') and radius R.
S133, determining a group of points to be fitted corresponding to each circular outline, and constructing objective functions corresponding to each group of points to be fitted:wherein F (a, b, c) represents an objective function, (x) i ,y i ) Representing the corresponding group of points to be fittedThe coordinates of the ith point, n, represent the number of points in a set of points to be fitted, i=1, l, n.
Specifically, with d i (i=1, l, n) represents that the i-th point in the group of points to be fitted to be mapped to the corresponding center coordinates (O) x ',O y ') distance, then
By delta i (i=1, l, n) represents the point i in the corresponding group of points to be fitted to the corresponding center coordinates (O) x ',O y ') square difference of distance squared and radius squared, delta i =d i 2 -R 2 =(x i -O x ') 2 +(y i -O y ') 2 -R 2 =x i 2 +y i 2 +ax i +by i +c。
So the least square circle fitting is converted intoMinimum problem.
Is provided with
S134, calculating a first parameter a, a second parameter b and a second parameter c which enable the objective function to obtain the minimum value, and determining a radius R corresponding to a group of points to be fitted according to the calculated first parameter a, second parameter b and second parameter c.
Specifically, in the step S134, the function F (a, b, c) may be biased to a, b, c, and the function value of the extreme point may be analyzed and compared to obtain the corresponding minimum value. For example:
solving the above 3 equations, the first parameter a, the second parameter b and the second parameter c can be calculated, and the center coordinates (O) corresponding to the circular expression can be obtained x ',O y ') and radius R.
Specifically, the radius R is:specifically, the center coordinates (O x ',O y ' s) are: />
In one example, the determining the center of the circle of the corresponding circular mark point according to each circular outline by using a least square ellipse fitting method includes:
constructing an elliptic expression: ax 2 +Bxy+Cy 2 +dx+ey+f=0, where A, B, C, D, E and F are ellipse parameters, (x, y) represent points on the image plane to which the calibration plate image corresponds;
calculating each ellipse parameter of the corresponding ellipse according to a plurality of points on each circular contour; for example, a least square method may be performed on each point on each circular contour, and 6 ellipse parameters A, B, C, D, E and F of an ellipse equation may be solved;
and determining the ellipse center of the corresponding ellipse according to each ellipse parameter, and determining the ellipse center of the ellipse as the circle center of the corresponding circular mark.
Specifically, all ellipse parameters may be divided by F, and normalized, thereby obtaining the final ellipse center coordinates. In one example, the center of the circle of the circular mark comprises:wherein, (o) x ,o y ) Representation ofCircle center of the circular mark.
In one embodiment, the determining the homography matrix according to the center coordinates and the object point coordinates of the m positioning circles includes steps S161 to S163.
And S161, constructing a conversion relation between the center coordinates of each positioning circle and the corresponding object point.
S162, determining elements corresponding to the center coordinates of each positioning circle respectively according to the conversion relation to solve the equation.
S163, calculating matrix element values of the homography matrix according to element solving equations respectively corresponding to the four positioning circles, so as to determine the homography matrix.
From knowledge in the projection geometry, the relationship between corresponding points in two planes can be characterized by a conversion relationship. In one example, the conversion relation includes:
therein, (u v) T For homogeneous representation of the coordinate system in which the image plane is located, (x 'y' 1) T For homogeneous representation of the coordinate system where the plane of the calibration plate is located, H is a homography matrix, H 11 、h 12 、h 13 、h 21 、h 22 、h 23 、h 31 And h 32 Are matrix elements of the homography matrix H.
The homography matrix H can be obtained according to the known multiple groups of corresponding point information, so that the corresponding relation between two planes is obtained. The solving the homography matrix H process may include:
the simplification can be obtained:
u(h 31 ×x'+h 32 ×y'+1)=h 11 ×x'+h 12 ×y'+h 13
v(h 31 ×x'+h 32 ×y'+1)=h 21 ×x'+h 22 ×y'+h 23
the conversion into a matrix form is as follows:
the center coordinates and the object point coordinates corresponding to the positioning circles can obtain two equations, so that the homography matrix H can be solved by the center coordinates and the object point coordinates corresponding to the 4 positioning circles.
The homography matrix determining method comprises acquiring the corresponding calibration plate image of the calibration plate by a camera, obtaining the circular outline of each circular mark point in the selected area of the calibration plate image, determining the radius and the center coordinates of the corresponding circular mark point according to each circular outline, arranging the radii of the circular mark points in a descending order, determining the circular mark points corresponding to the first m radii as positioning circles, obtaining the coordinates of m positioning circles at the corresponding object points of the calibration plate, determining homography matrix according to the center coordinates and the coordinates of the object points of the m positioning circles, determining search area by taking the center of the area determined by m positioning circles as search center, determining search area by searching radius Q, converting each object point of the calibration plate to the image plane corresponding to the calibration plate image according to the homography matrix, if the number of the object points falling into the searching area after conversion is smaller than the preset number, updating the searching radius Q to be Q+delta Q, re-determining the selected area according to the searching center and the updated searching radius, returning to the step of continuously executing the round outline of each round mark point in the selected area of the calibration plate image, entering the next iteration to obtain a new homography matrix, and if the number of the object points falling into the searching area after conversion is larger than or equal to the preset number, determining 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, thereby improving the accuracy of camera parameters calibrated according to the homography matrix.
The present application provides, in a second aspect, a homography matrix determination apparatus, as shown in fig. 4, including:
the acquisition module 110 is configured to acquire, by using a camera, a calibration plate image corresponding to a calibration plate, where the calibration plate includes a plurality of object points, and the calibration plate image includes circular mark points corresponding to the object points;
a first obtaining module 120, configured to obtain a circular outline of each circular marker point in a selected area of the calibration plate image;
a first determining module 130, configured to determine radius and center coordinates of the corresponding circular marker point according to each circular contour;
the arrangement module 140 is configured to perform descending order arrangement on the radii of the circular marker points, and determine the circular marker points corresponding to the first m radii as positioning circles;
the second obtaining module 150 is configured to obtain coordinates of object points corresponding to the m positioning circles on the calibration plate;
a second determining module 160, configured to determine a homography matrix according to the center coordinates and the object point coordinates of the m positioning circles;
the updating module 170 is configured to convert each object point of the calibration plate to an image plane corresponding to the calibration plate image according to the homography matrix by using the area center determined by m positioning circles as a search center and the search radius Q as a radius, update the search radius Q to q+Δq if the number of object points falling into the search area after conversion is smaller than a preset number, redetermine a selected area according to the search center and the updated search radius, and return to the first obtaining module to continue to perform the step of obtaining the circular outline of each circular mark point in the selected area of the calibration plate image, and determine the current homography matrix as the homography matrix between the calibration plate image and the image plane if the number of object points falling into the search area after conversion is greater than or equal to the preset number.
For a specific definition of the homography matrix determination means, reference is made to the definition of the homography matrix determination method hereinabove, and no further description is given here. The units in the homography matrix determination apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The units can be embedded in hardware or independent of a processor in the computer equipment, and can also be stored in a memory in the computer equipment in a software mode, so that the processor can call and execute the operations corresponding to the units.
The present application provides in a third aspect a homography matrix determination apparatus including a processor and a storage medium; the storage medium has program code stored thereon; the processor is configured to invoke the program code stored in the storage medium to execute the homography matrix determination method described in any of the foregoing embodiments.
Although the application has been shown and described with respect to one or more implementations, equivalent alterations and modifications will occur to others skilled in the art based upon a reading and understanding of this specification and the annexed drawings. This application is intended to cover all such modifications and variations, and is limited only by the scope of the appended claims. In particular regard to the various functions performed by the above described components, the terms used to describe such components are intended to correspond, unless otherwise indicated, to any component which performs the specified function of the described component (e.g., that is functionally equivalent), even though not structurally equivalent to the disclosed structure which performs the function in the herein illustrated exemplary implementations of the specification.
That is, the foregoing embodiments are merely examples of the present application, and are not intended to limit the scope of the patent application, and all equivalent structures or equivalent processes using the descriptions and the contents of the present application, such as the combination of technical features of the embodiments, or direct or indirect application to other related technical fields, are included in the scope of the patent protection of the present application.
In addition, in the description of the present application, it should be understood that the terms "center", "longitudinal", "lateral", "length", "width", "thickness", "upper", "lower", "front", "rear", "left", "right", "vertical", "horizontal", "top", "bottom", "inner", "outer", etc. indicate orientations or positional relationships based on the orientations or positional relationships shown in the drawings are merely for convenience in describing the present application and simplifying the description, and do not indicate or imply that the devices or elements referred to must have a specific orientation, be configured and operated in a specific orientation, and thus should not be construed as limiting the present application. In addition, the present application may use the same or different reference numerals for structural elements having the same or similar characteristics. Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more features. In the description of the present application, the meaning of "a plurality" is two or more, unless explicitly defined otherwise.
In this application, the term "exemplary" is used to mean "serving as an example, instance, or illustration. Any embodiment described herein as "exemplary" is not necessarily to be construed as preferred or advantageous over other embodiments. The previous description is provided to enable any person skilled in the art to make or use the present application. In the above description, various details are set forth for purposes of explanation. It will be apparent to one of ordinary skill in the art that the present application may be practiced without these specific details. In other instances, well-known structures and processes have not been shown in detail to avoid unnecessarily obscuring the description of the present application. Thus, 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 herein.

Claims (10)

1. The homography matrix determining method is characterized by comprising the following steps of:
s110, acquiring a calibration plate image corresponding to a calibration plate through a camera, wherein the calibration plate comprises a plurality of object points, and the calibration plate image comprises round mark points corresponding to all the object points;
s120, acquiring the circular outline of each circular mark point in the selected area of the calibration plate image;
s130, determining the radius and the center coordinates of the corresponding circular mark points according to the circular outlines;
s140, the radiuses of the circular marking points are arranged in a descending order, and the circular marking points corresponding to the first m radiuses are determined to be positioning circles;
s150, acquiring coordinates of the m positioning circles at object points corresponding to the calibration plate;
s160, determining a homography matrix according to the center coordinates and the object point coordinates of the m positioning circles;
s170, taking the area center determined by m positioning circles as a search center, taking a search radius Q as a radius to determine a search area, converting each object point of the calibration plate to an image plane corresponding to the image of the calibration plate according to the homography matrix, updating the search radius Q to Q+DeltaQ if the number of object points falling into the search area after conversion is smaller than a preset number, re-determining a selected area according to the search center and the updated search radius, and returning to execute the step S120, and determining the current homography matrix as the homography matrix between the image of the calibration plate and the image plane if the number of object points falling into the search area after conversion is larger than or equal to the preset number.
2. The homography matrix determination method according to claim 1, wherein the determining the radius and the center coordinates of the corresponding circular marker point according to each circular contour comprises:
determining the radius of the corresponding circular mark point by adopting a least square circle fitting method according to each circular outline;
and determining the circle center of the corresponding circular mark point by adopting a least square ellipse fitting method according to each circular outline.
3. The method of determining a homography matrix according to claim 2, wherein said determining a radius of a corresponding circular marker point by using a least squares circle fitting method according to each of the circular outlines comprises:
constructing a circular expression: (x-O) x ') 2 +(y-O y ') 2 =R 2 Wherein R represents the radius to be solved, (O) x ',O y ' indicates the center coordinates corresponding to the circular expression, and (x, y) indicates the point on the image plane corresponding to the calibration plate image;
setting a first parameter a, a second parameter b and a second parameter c according to the circular expression;
determining a group of points to be fitted corresponding to each circular outline, and constructing an objective function corresponding to each group of points to be fitted:wherein F (a, b, c) represents an objective function, (x) i ,y i ) Representing the coordinates of the ith point in a group of points to be fitted, and n represents the number of points in the group of points to be fitted;
and calculating a first parameter a, a second parameter b and a second parameter c which enable the objective function to obtain the minimum value, and determining a radius R corresponding to a group of points to be fitted according to the calculated first parameter a, second parameter b and second parameter c.
4. The homography matrix determination method of claim 3 wherein the radius R is:
5. the method of determining a homography matrix according to claim 2, wherein determining the center of a circle of the corresponding circular marker point according to each circular contour by using a least square ellipse fitting method comprises:
constructing an elliptic expression: ax 2 +Bxy+Cy 2 +dx+ey+f=0, where A, B, C, D, E and F are ellipse parameters, (x, y) represent points on the image plane to which the calibration plate image corresponds;
calculating each ellipse parameter of the corresponding ellipse according to a plurality of points on each circular contour;
and determining the ellipse center of the corresponding ellipse according to each ellipse parameter, and determining the ellipse center of the ellipse as the circle center of the corresponding circular mark.
6. The homography matrix determination method of claim 5, wherein the center of the circle of the circular mark comprises:wherein, (o) x ,o y ) Representing the center of the circle of the circular mark.
7. The homography matrix determination method according to claim 1, wherein determining the homography matrix according to the center coordinates and the object point coordinates of the m positioning circles comprises:
constructing a conversion relation between the center coordinates of each positioning circle and the corresponding object point;
determining elements corresponding to center coordinates of each positioning circle respectively according to the conversion relation to solve an equation;
and calculating matrix element values of the homography matrix according to element solving equations respectively corresponding to the four positioning circles, so as to determine the homography matrix.
8. The homography matrix determination method of claim 7, wherein the conversion relation comprises:
wherein, (uv 1) T For homogeneous representation of the coordinate system in which the image plane is located, (x 'y' 1) T For homogeneous representation of the coordinate system where the plane of the calibration plate is located, H is a homography matrix, H 11 、h 12 、h 13 、h 21 、h 22 、h 23 、h 31 And h 32 Are matrix elements of the homography matrix H.
9. A homography matrix determination system, the homography matrix determination system comprising:
the acquisition module is used for acquiring a calibration plate image corresponding to the calibration plate through the camera, wherein the calibration plate comprises a plurality of object points, and the calibration plate image comprises round mark points corresponding to the object points;
the first acquisition module is used for acquiring the circular outline of each circular mark point in the selected area of the calibration plate image;
the first determining module is used for determining the radius and the center coordinates of the corresponding circular mark points according to the circular outlines;
the arrangement module is used for arranging the radiuses of the circular marking points in a descending order and determining the circular marking points corresponding to the first m radiuses as positioning circles;
the second acquisition module is used for acquiring the coordinates of the m object points corresponding to the positioning circles on the calibration plate;
the second determining module is used for determining a homography matrix according to the circle center coordinates and the object point coordinates of the m positioning circles;
the updating module is used for taking the area center determined by m positioning circles as a searching center, searching radius Q as a radius to determine a searching area, converting each object point of the calibration plate to an image plane corresponding to the calibration plate image according to the homography matrix, updating the searching radius Q to Q+delta Q if the number of object points falling into the searching area after conversion is smaller than a preset number, re-determining a selected area according to the searching center and the updated searching radius, returning to the step of entering the first acquisition module to continuously acquire the circular outline of each circular mark point in the selected area of the calibration plate image, and determining the current homography matrix as the homography matrix between the calibration plate image and the image plane if the number of object points falling into the searching area after conversion is larger than or equal to the preset number.
10. A homography matrix determination apparatus, wherein the homography matrix determination apparatus comprises a processor and a storage medium; the storage medium has program code stored thereon; the processor is configured to invoke the program code stored in the storage medium to perform the homography matrix determination method of any of claims 1 to 8.
CN202310471875.9A 2023-04-26 2023-04-26 Homography matrix determination method, system and equipment Pending CN116468805A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202310471875.9A CN116468805A (en) 2023-04-26 2023-04-26 Homography matrix determination method, system and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202310471875.9A CN116468805A (en) 2023-04-26 2023-04-26 Homography matrix determination method, system and equipment

Publications (1)

Publication Number Publication Date
CN116468805A true CN116468805A (en) 2023-07-21

Family

ID=87175217

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202310471875.9A Pending CN116468805A (en) 2023-04-26 2023-04-26 Homography matrix determination method, system and equipment

Country Status (1)

Country Link
CN (1) CN116468805A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523008A (en) * 2024-01-04 2024-02-06 北京友友天宇系统技术有限公司 Camera principal point calibration method, system, device and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117523008A (en) * 2024-01-04 2024-02-06 北京友友天宇系统技术有限公司 Camera principal point calibration method, system, device and storage medium
CN117523008B (en) * 2024-01-04 2024-03-29 北京友友天宇系统技术有限公司 Camera principal point calibration method, system, device and storage medium

Similar Documents

Publication Publication Date Title
CN106651752B (en) Three-dimensional point cloud data registration method and splicing method
CN106340044B (en) Join automatic calibration method and caliberating device outside video camera
JP6348093B2 (en) Image processing apparatus and method for detecting image of detection object from input data
CN109523595B (en) Visual measurement method for linear angular spacing of building engineering
JP2004516533A (en) Synthetic aperture radar and forward-looking infrared image superposition method
CN110763204B (en) Planar coding target and pose measurement method thereof
CN111223133A (en) Registration method of heterogeneous images
CN112132907B (en) Camera calibration method and device, electronic equipment and storage medium
JP2000227309A (en) Three-dimensional position posture sensing device
CN112614188B (en) Dot-matrix calibration board based on cross ratio invariance and identification method thereof
CN111123242B (en) Combined calibration method based on laser radar and camera and computer readable storage medium
CN116468805A (en) Homography matrix determination method, system and equipment
CN111879244B (en) Method for measuring support height and top beam inclination angle of hydraulic support of fully mechanized mining face
CN114972531B (en) Corner detection method, equipment and readable storage medium
CN113129397B (en) Decoding method of parallelogram coding mark based on graphic geometric relation
CN107765257A (en) A kind of laser acquisition and measuring method based on the calibration of reflected intensity accessory external
CN117315046A (en) Method and device for calibrating looking-around camera, electronic equipment and storage medium
CN109829502B (en) Image pair efficient dense matching method facing repeated textures and non-rigid deformation
CN116021519A (en) TOF camera-based picking robot hand-eye calibration method and device
US7027637B2 (en) Adaptive threshold determination for ball grid array component modeling
CN113298880B (en) Camera calibration board, camera calibration method and device
CN113379846B (en) Method for calibrating rotating shaft of rotary table based on direction indication mark point calibration template
JP2000207557A (en) Method for measuring quantity of positional deviation
CN109493356B (en) Intelligent calibration method of automatic target scoring system based on machine vision
CN109919852B (en) Roof visual angle correction method for optical remote sensing image

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination