A space circle pose detection method based on binocular vision

By constructing an elliptical parameter matrix and an intermediate camera coordinate system based on a binocular camera, and combining conic section geometric constraints, the problem of insufficient speed and accuracy of binocular vision in the pose measurement of circular parts is solved, and fast and high-precision pose detection is achieved.

CN117237446BActive Publication Date: 2025-12-30ROBOTICS RESEARCH CENTER OF YUYAO CITY +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310969235.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-03
Publication Date
2025-12-30
Estimated Expiration
2043-08-03

AI Technical Summary

Technical Problem

Existing binocular vision methods have long processing times and insufficient measurement accuracy when measuring the pose of circular parts, making it difficult to meet industrial needs.

Method used

By acquiring the ellipse parameter matrix based on a binocular camera, constructing an intermediate camera coordinate system, calculating the center and normal vector of the circle, and using conic section geometric constraints to solve the pose of the spatial circle, measurement errors are reduced.

Benefits of technology

It improves the speed and accuracy of spatial circular pose detection, reduces measurement errors, and meets the needs of rapid and high-precision measurement in industrial production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117237446B_ABST
    Figure CN117237446B_ABST
Patent Text Reader

Abstract

The application discloses a space circle pose detection method based on binocular vision, which is used for measuring the pose of a space circle. Firstly, Zhang Dingyou calibration method is used to calibrate the camera internal parameter, the camera external parameter and the camera distortion. Then, an intermediate camera coordinate system is constructed, two solutions of the center of the circle with unknown radius parameters and two solutions of the normal vector of the space circle plane in the left and right camera coordinate systems are calculated respectively, the correct center solution and the normal vector of the space circle are obtained according to the uniqueness of the center, the coordinates of the center of the space circle in the left and right camera coordinate systems are calculated based on the geometric constraint of the conic curve, and finally the radius of the space circle is calculated by bringing the center coordinates into the correct center solution with unknown radius parameters. The method can improve the processing speed and reduce the error of the pose measurement.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of object pose estimation and binocular vision technology, specifically relating to a spatial circular pose detection method based on binocular vision. Background Technology

[0002] Binocular stereo vision is an important branch of machine vision. It performs measurements by directly simulating the human eye, offering a fast and accurate non-contact measurement method. Many circular parts are used in industrial production, and the pose measurement of these circular parts is a significant research focus in machine vision. These parts often have limited surface texture, making it difficult for binocular vision to extract sufficient feature points for stereo matching. For these circular parts, the pose can be measured using binocular vision based on the circular features on the part. Pose estimation of a spatial target circle can be achieved based on the ellipse in the left and right images and the camera model. Current methods mainly include algebraic and geometric solutions. However, these methods require considerable processing time, and the measurement accuracy needs improvement. Summary of the Invention

[0003] To overcome the shortcomings of existing technologies and achieve the goals of improving the detection speed of spatial circular positions and reducing measurement errors, the present invention adopts the following technical solution:

[0004] A spatial circular pose detection method based on binocular vision includes the following steps:

[0005] Step S1: Based on the stereo camera, obtain the ellipse parameter matrix on the images from each camera;

[0006] Step S2: Construct an intermediate camera coordinate system, and calculate two solutions for the center of the circle with unknown radius parameters and two solutions for the normal vector of the spatial target circle plane in the two camera coordinate systems respectively;

[0007] Step S3: Based on the uniqueness of the circle center, obtain a correct set of circle centers and the normal vectors of the target circle in space;

[0008] Step S4: Based on the conic section geometric constraints, the normal vector, and the ellipse parameter matrix, calculate the coordinates of the center of the spatial circle in the left and right camera coordinate systems, respectively;

[0009] Step S5: Substitute the coordinates of the center of the circle into the center of the circle containing the unknown radius parameter to find the radius of the spatial circle.

[0010] Furthermore, in step S1, the binocular camera is calibrated to obtain its intrinsic and extrinsic parameters and distortion coefficients. The obtained left and right images are corrected based on the distortion coefficients. Edge detection is performed on the corrected left and right images to detect ellipses on the left and right images and to calculate the parameter matrix of the ellipses on the left and right images.

[0011] Further, step S1 includes the following steps:

[0012] Step S1.1: Calibrate the intrinsic and extrinsic parameters and distortion coefficients of the binocular camera, and correct the camera image based on the distortion coefficients;

[0013] Step S1.2: Perform edge detection on the corrected camera image and calculate the parameter matrix of the obtained ellipse in the image coordinate system;

[0014] Gaussian filtering and edge detection are performed on the image. Edge detection extracts elliptical arc segments based on the curvature and convexity of the ellipse. The arc segments are then traversed to search for possible candidate combinations. Finally, the possible candidate combinations are fitted and judged, and a clustering algorithm is used to obtain the final ellipse. Based on the final ellipse, the parameter matrix of the ellipse in the image coordinate system is calculated.

[0015]

[0016]

[0017] Where a represents the major semi-axis of the ellipse, b represents the minor semi-axis, and (c x ,c y ) represents the center coordinates, and θ represents the tilt angle;

[0018] Step S1.3: Based on the parameter matrix in the image coordinate system and the camera intrinsic parameters, obtain the parameter matrix of the ellipse in the camera coordinate system:

[0019] A = K T YK

[0020] Where K represents the camera intrinsic parameters and A represents the parameter matrix of the ellipse in the camera coordinate system.

[0021] Further, step S2 includes the following steps:

[0022] Step S2.1: The spatial target circular plane and the camera optical center form a cone, and the cone passes through the ellipse on the image. Find two points on the ellipse such that the angle formed by the two points and the camera optical center is maximized. Based on the plane formed by the two points and the camera optical center, determine another plane that is perpendicular to the plane and passes through the camera optical center. Find two more points on the ellipse through the other plane.

[0023] Step S2.2: Based on the two points found on the ellipse and the camera optical center, construct an intermediate camera coordinate system;

[0024] Step S2.3: Keep the camera optical center position unchanged, rotate the camera so that the camera optical axis, the camera image plane coordinate system and the intermediate camera coordinate system coincide, and obtain four points in the intermediate camera coordinate system corresponding to the spatial target circle. Based on the four points, calculate the normal vectors of the two sets of circle centers and the spatial target circle in the camera coordinate system.

[0025] Furthermore, in step S2.2, the coordinates of the intermediate camera are as follows:

[0026]

[0027]

[0028]

[0029] Where p and q represent two points found on the ellipse, G represents the optical center, ∠pGq is the maximum, and μ gp and μ gq They are the unit vectors of vectors Gp and Gq. θ and μ represent the unit vectors of the three coordinate axes of the intermediate camera coordinate system.

[0030] Further, in step S2.1, the pixels of the ellipse on the image are traversed to find two points p and q such that ∠pGq is maximized, G is the optical center of the camera, the plane through the three points p, q and G is used to determine the plane L, the plane through the plane L is used to determine the plane L⊥, L⊥ is the plane that passes through point G and is perpendicular to L, and the intersection points of L⊥ and the ellipse are points b and c.

[0031] In step S2.3, assuming the position of the camera's optical center G remains unchanged, the camera is rotated so that the optical axis is aligned with the unit vector. When the left camera's image plane physical coordinate system coincides with the unit vectors θ and μ, respectively, the x-axis and y-axis coincide with the unit vectors θ and μ. Before the camera rotates, PQBC is the point on the spatial circle corresponding to pqbc on the camera's imaging plane. After the camera rotates, the camera's imaging plane also rotates. At this time, the point corresponding to the ellipse E' obtained by the image plane intercepting the observation cone is p'q'b'c' on the new imaging plane.

[0032] In the intermediate camera coordinate system, the coordinates of points p', q', b', and c' are represented as follows:

[0033]

[0034] Where f represents the camera's focal length;

[0035] The coordinates of PQBC are obtained from p'q'b'c':

[0036]

[0037] Where α, β, and γ are proportionality constants, the center O of the space circle is the midpoint of BC, and M is the midpoint of PQ. Therefore:

[0038]

[0039]

[0040] The formula for calculating the normal vector of a circle in space is:

[0041]

[0042] Combining the properties of circles and the similarity relationship of triangles, the following equations can be derived:

[0043]

[0044] By solving the above equations simultaneously, we can obtain the center O of the circle in the left camera coordinate system. l 'and normal vector n l Two sets of solutions:

[0045]

[0046]

[0047] Among them, u p’ V represents the x-coordinate of point p' along the x-axis. b’ R represents the y-axis coordinate of b', R represents the extrinsic rotation matrix, and O represents the y-axis rotation matrix. l1 '、n l1 '、O l2 '、n l2 ' represents the two sets of center points and normal vectors of the left camera ellipse in the coordinate system of the middle camera. Transforming them to the left camera coordinate system, the calculation formula is as follows:

[0048]

[0049] Similarly, we obtain the two sets of circle centers and normal vectors under the right camera: O r1 n r1 O r2 n r2 .

[0050] Furthermore, in step S5, after obtaining the coordinates t1(x1,y1,z1) of the center of the spatial circle, the radius R of the spatial circle measured by the left camera is calculated. l The specific calculation formula is as follows:

[0051]

[0052] After determining the coordinates of the center of the spatial circle t2(x2,y2,z2), similarly, the radius R2 of the spatial circle measured by the right camera is calculated. The specific calculation formula is as follows:

[0053]

[0054] Take R l and R r The average value is the radius R of the measured spatial circle.

[0055] Furthermore, in step S3, the distance between the two centers of the right camera and the two centers of the left camera is calculated. Based on the minimum distance obtained, a correct left camera center is determined from the two centers of the left camera, and the correct left camera normal vector is obtained according to the correct left camera center. Similarly, the correct right camera center and normal vector are obtained.

[0056] Furthermore, in step S3, the two center Os in the right camera coordinate system r1 and O r2 Represented as O in the left camera coordinate system r1 'and O r2 The calculation formula is:

[0057]

[0058] Where R and T are the external parameter rotation and translation matrices obtained from the binocular camera calibration;

[0059] Since the center coordinates of a spatial circle have only one value, the correct center coordinates can be obtained through this constraint; calculate the coordinates of the two sets of circles below the left camera from point O. r1 and O r2 The distance, take d 11 d 12 d 21 d 22 The minimum value is the correct left and right center pair, calculated using the following formula:

[0060]

[0061] Because the coordinates of the center of the circle in space are fixed, we obtain O l The correct solution, calculated as follows:

[0062]

[0063] Find O l Then, the normal vector n of the spatial circle in the left camera coordinate system is obtained. l The calculation process is as follows:

[0064]

[0065] Similarly, find the corresponding O in the right camera coordinate system. r The correct center of the circle and the corresponding normal vector n r .

[0066] Further, step S4 includes the following steps:

[0067] Step S4.1: Based on the geometric constraints of the conic sections of the binocular vision spatial circular projection, if the normal vector of the spatial circular plane is known, the spatial circular plane is overdetermined. Establish the point x on the spatial circular plane. w and its corresponding point x on the left / right image. i The equation:

[0068] x i =R i x w +t i

[0069] Where i = 1, 2, corresponding to the left and right cameras, x i R i t i These represent the coordinates of the corresponding points on the left / right camera images in the camera coordinate system, and the external parameter rotation and translation matrices of the left / right cameras relative to the world coordinate system, respectively.

[0070] Transform the formula into x i =G i u w (1), where G i =(r i1 ,r i2 ,t i ), r i1 and r i2 It is R i The first two column vectors, u w It is x w Given homogeneous coordinates on a spatial target circle, the equation of the circle is expressed as: Q represents the parameter matrix of the spatial target circle. Since the circle is a special type of ellipse, Q is solved in the same way as Y, where Y represents the parameter matrix of the ellipse in the image coordinate system. Similarly, the projection equations of the ellipse onto the left / right images are expressed as follows: A represents the parameter matrix of the ellipse in the camera coordinate system, u i These are the homogeneous coordinates obtained by transforming the coordinates of the corresponding points in the left / right image in the pixel coordinate system, and u i =x i / f(4), combining (1)(2)(3)(4), we obtain the geometric constraint equations for the conic section:

[0071]

[0072] Where G1 is represented as (r 11 ,r 12 ,t1), K i These are unknown scale parameters, which are eliminated in subsequent solution processes;

[0073] Step S4.2: Calculate the unit vector r of the normal vector of the spatial circle in the left camera coordinate system obtained in step S3. 13 The matrix H is calculated using the following formula:

[0074]

[0075] Because r 11 r 12 Let r be the eigenvector corresponding to the two non-zero eigenvalues ​​of H. Therefore, r can be solved by finding the eigenvectors of H. 11 r 12 ;

[0076] Based on r 11 r 12 Solve the system of geometric constraint equations for conic sections:

[0077]

[0078] Based on the system of equations, t1(x1,y1,z1) and t2(x2,y2,z2) are calculated, where t1 and t2 represent the coordinates of the center of the spatial circular plane in the left and right camera coordinate systems, respectively.

[0079] The advantages and beneficial effects of this invention are as follows:

[0080] This invention discloses a spatial circle pose detection method based on binocular vision. It acquires the ellipse of a spatial circle on the camera using a binocular camera, then constructs a coordinate system for the intermediate camera. Two solutions for the circle's center (containing an unknown radius parameter) and two solutions for the spatial circle's plane normal vector are calculated in the left and right camera coordinate systems, respectively. Based on the uniqueness of the circle's center, the correct center solution and the spatial circle's normal vector are obtained. Then, based on conic section geometric constraints, the coordinates of the spatial circle's center in the left and right camera coordinate systems are calculated. Finally, the center coordinates are substituted into the correct center solution containing the unknown radius parameter to calculate the radius of the spatial circle. This method improves the processing speed of spatial circle pose detection by being fast and reduces measurement errors. Attached Figure Description

[0081] Figure 1 This is a flowchart of the method in an embodiment of the present invention.

[0082] Figure 2 This is a schematic diagram of the intermediate camera coordinate system in an embodiment of the present invention. Detailed Implementation

[0083] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0084] like Figure 1 As shown, a spatial circular pose detection method based on binocular vision includes the following steps:

[0085] Step S1: Obtain the intrinsic and extrinsic parameters and distortion coefficients from the stereo camera calibration. Correct the left and right images based on the distortion coefficients. Perform edge detection on the left and right images. Detect ellipses on the left and right images. Calculate the parameter matrix of the ellipses on the left and right images.

[0086] In this embodiment of the invention, Zhang Dingyou's calibration method is used to calibrate the camera's intrinsic parameters, extrinsic parameters, and camera distortion. A stereo camera is used to photograph the object, and Gaussian filtering is applied to the left and right images. The Canny edge detection algorithm is used for edge detection. An ellipse detection algorithm based on edge connectivity is used for ellipse detection.

[0087] Step S1.1: The intrinsic and extrinsic parameters and distortion coefficients of the stereo camera are calibrated using Zhang Zhengyou's calibration method. The extrinsic rotation matrix R and translation matrix T of the stereo camera, and the intrinsic parameters K of the left and right cameras are obtained. l and K r The same object was photographed using a binocular camera. The left and right images were then corrected based on calibrated distortion coefficients.

[0088] Step S1.2: Gaussian filtering is applied to the left and right images, and edge detection is performed using the Canny edge detection algorithm. Elliptical arc segments are extracted based on the curvature and convexity of the ellipse. The arc segments are traversed to search for possible candidate combinations. Finally, the possible candidate combinations are fitted and judged, and a clustering algorithm is used to obtain the final ellipse. The center coordinates (ca, cb, cc) of the ellipse are obtained. x ,c y Given the tilt angle θ, calculate the parameter matrix Y of the left and right ellipses in the image coordinate system. l and Y r .

[0089] The specific calculation formula is as follows:

[0090]

[0091] in

[0092]

[0093] Step S1.3: Calculate the parameter matrix A of the left and right ellipses in the camera coordinate system based on the camera intrinsic parameter K. The calculation formula is:

[0094] A = KT YK

[0095] Step S2: Construct the intermediate camera coordinate system, and calculate two solutions for the center of the circle with unknown radius parameters and two solutions for the normal vector of the spatial circle plane in the left and right camera coordinate systems respectively.

[0096] Step S2.1: As Figure 2 As shown, the optical center of the left camera is G. L The spatial circular plane and the optical center of the left camera form a cone that passes through an ellipse on the left image. The optical center of the right camera is G. R The spatial circular plane and the optical center of the right camera form a cone that passes through an ellipse on the right image. Traverse the pixels of the ellipse on both the left and right images, finding two points p and q such that ∠pGq is maximized. L is a plane passing through points p, q, and G, and L⊥ is a plane passing through point G and perpendicular to L. Points b and c are the intersections of L⊥ and the ellipse. p, q, b, and c are all special points on the ellipse, obtained through calculation. Figure 2 The landing points shown are for illustrative purposes only.

[0097] Step S2.2: When observing the spatial target circular surface using a camera, the optical centers G of the left and right cameras and the ellipse on the image plane form an observation cone. An intermediate camera coordinate system can then be calculated. The specific calculation formula is as follows:

[0098]

[0099]

[0100]

[0101] Where μ gp and μ gq It is the unit vector of vectors Gp and Gq. θ and μ are the unit vectors of the three coordinate axes of the intermediate camera coordinate system.

[0102] Step S2.3: Assuming the position of the camera's optical center G remains unchanged, rotate the camera so that the optical axis is aligned with the unit vector. Coincidence. The x-axis and y-axis of the corresponding left camera image plane physical coordinate system coincide with the unit vectors θ and μ, respectively. Before the camera rotation, PQBC is the point on the spatial circle corresponding to pqbc on the camera imaging plane. After the camera rotation, the camera imaging plane also rotates. At this time, the point corresponding to the ellipse E' obtained by intercepting the observation cone on the image plane is p'q'b'c' on the new imaging plane.

[0103] In the intermediate camera coordinate system, the coordinates of points p', q', b', and c' can be represented as:

[0104]

[0105] Where f is the focal length of the camera.

[0106] The coordinates of PQBC can be obtained from p'q'b'c'.

[0107]

[0108] Where α, β, and γ are proportionality constants, the center O of the space circle is the midpoint of BC, and M is the midpoint of PQ, therefore:

[0109]

[0110]

[0111] The formula for calculating the normal vector of a circle in space is:

[0112]

[0113] Combining the properties of circles and the similarity relationship of triangles, the following equation can be written:

[0114]

[0115] By solving the above equations simultaneously, we can obtain the center O in the left camera coordinate system. l 'and normal vector n l Two sets of solutions:

[0116]

[0117]

[0118] Among them, u p’ V represents the x-coordinate of point p' along the x-axis. b’ O represents the y-axis coordinate of b'. l1 '、n l1 '、O l2 '、n l2 These are all representations in the intermediate camera coordinate system. They need to be converted to the camera coordinate system. The calculation formula is as follows:

[0119]

[0120] Similarly, we can obtain two sets of solutions O under the right camera. r1 n r1 O r2 n r2 .

[0121] Step S3: Obtain the correct center solution and the normal vector of the spatial circle based on the uniqueness of the center.

[0122] O r1 and Or2 In the left camera coordinate system, it is represented as O. r1 'and O r2 The calculation formula is:

[0123]

[0124] Where R and T are the rotation and translation matrices obtained from the binocular camera calibration.

[0125] Since a circle in space has only one center coordinate, the correct center coordinates can be obtained through this constraint. Calculate the coordinates up to O... r1 and O r2 The distance. Take d. 11 d 12 d 21 d 22 The minimum value is the correct pair of center points. The calculation formula is:

[0126]

[0127] d 11 d 12 d 21 d 22 Let O represent these values ​​respectively. Since the coordinates of the center of the circle in space are fixed, we can obtain O... l The correct solution, calculated as follows:

[0128]

[0129] Find O l Then the normal vector n of the spatial circle in the left camera coordinate system can be obtained. l The calculation process is as follows:

[0130]

[0131] Similarly, the corresponding O in the right camera coordinate system can be obtained. r The correct solution and the corresponding normal vector n r .

[0132] Step S4: Calculate the coordinates of the center of the spatial circle in the left and right camera coordinate systems based on the geometric constraints of the conic section.

[0133] Step S4.1: Based on the geometric constraints of the conic sections of the binocular vision spatial circular projection, if the normal vector of the spatial circular plane is known, the spatial circular plane is overdetermined. Assume x... w x i These are points on the circular plane in space and their corresponding points on the left / right images, respectively. We can establish the equation:

[0134] x i =R i xw +t i

[0135] Where i = 1, 2, corresponding to the left and right cameras. x i R i t i represents the coordinates of the corresponding points on the left / right camera images in the camera coordinate system, and the extrinsic rotation and translation matrices of the left / right cameras relative to the world coordinate system, respectively. i =R i x w +t i Can be transformed x i =G i u w (1), where G i =(r i1 ,r i2 ,t i ), r i1 and r i2 It is R i The first two column vectors. u w It is x w The homogeneous coordinates of K. i This is an unknown scale parameter, which is eliminated in subsequent solution steps. On a circle in space, the equation of the circle can be expressed as... Q represents the parameter matrix of the circle in space. Since the circle is a special type of ellipse, Q is solved in the same way as Y. Similarly, the projection equations of the ellipse onto the left and right images can be expressed as follows: A represents the parameter matrix of the ellipse in the camera coordinate system. i These are the homogeneous coordinates obtained by transforming the coordinates of corresponding points in the left and right images in the pixel coordinate system, and u i =x i / f(4). Combining (1)(2)(3)(4), we can obtain the geometric constraint equations for the conic sections:

[0136]

[0137] Where G1 is represented as (r 11 ,r 12 ,t1).

[0138] Step S4.2: Calculate the unit vector r of the normal vector of the spatial circle in the left camera coordinate system obtained in step S3. 13 Can be counted

[0139] The matrix H is calculated using the following formula:

[0140]

[0141] Because r 11 r 12Let r be the eigenvector corresponding to the two non-zero eigenvalues ​​of H. Therefore, r can be solved by finding the eigenvectors of H. 11 r 12 .

[0142] Solving the geometric constraint equations of the conic sections yields the following system of equations:

[0143]

[0144] Based on the system of equations, t1(x1,y1,z1) and t2(x2,y2,z2) can be calculated, where t1 and t2 represent the coordinates of the center of the spatial circular plane in the left and right camera coordinate systems, respectively.

[0145] Step S5: Substitute the center coordinates into the solution containing the unknown radius parameter to find the radius of the spatial circle.

[0146] After determining the coordinates t1(x1,y1,z1) of the center of the spatial circle, the radius R of the spatial circle measured by the left camera can be calculated. l The specific calculation formula is as follows:

[0147]

[0148] After determining the coordinates of the center of the spatial circle, t2(x2, y2, z2), the radius R2 of the spatial circle measured by the right camera can be calculated similarly. The specific calculation formula is as follows:

[0149]

[0150] Take R l and R r The average value is the radius R of the measured spatial circle.

[0151] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for detecting a pose of a spatial circle based on binocular vision, characterized in that The method comprises the following steps: Step S1: based on the binocular camera, obtaining the ellipse parameter matrix on each camera image; Step S2: constructing an intermediate camera coordinate system, and respectively calculating two solutions of the center of the circle containing unknown radius parameters and two solutions of the normal vector of the space target circle plane in the two camera coordinate systems; specifically comprising the following steps: Step S2.1: the space target circle plane and the camera optical center form a cone, and the cone passes through the ellipse on the image, two points are found on the ellipse such that the angle formed by the two points and the camera optical center is maximum; based on the plane formed by the two points and the camera optical center, another plane perpendicular to the plane and passing through the camera optical center is determined, and another two points on the ellipse are found through the other plane; In the step S2.1, the pixels on the ellipse of the image are traversed to find two points p and q such that the angle ∠pGq is maximum, G is the camera optical center, the plane L is determined through the plane of the three points p, q and G, the plane L⊥ is determined through the plane L, L⊥ is a plane passing through the point G and perpendicular to L, and the intersection of L⊥ and the ellipse is the two points b and c; Step S2.2: based on the two points found on the ellipse and the camera optical center, an intermediate camera coordinate system is constructed; the intermediate camera coordinate is as follows: where p, q represent two points found on the ellipse, G represents the optical center, ∠pGq is the maximum, μ gp and μ gq is the unit vector of the vector Gp and Gq, θ, μ represent the unit vectors of the three coordinate axes of the intermediate camera coordinate system; Step S2.3: keeping the position of the camera optical center unchanged, rotating the camera to make the camera optical axis and the camera image plane coordinate system coincide with the intermediate camera coordinate system, obtaining four points corresponding to the space target circle in the intermediate camera coordinate system, and calculating two groups of circle centers and the normal vector of the space target circle in the camera coordinate system based on the corresponding four points; In step S2.3, assuming that the position of the camera optical center G remains unchanged, the camera is rotated so that the optical axis is aligned with the unit vector By coincidence, the x-axis and y-axis of the corresponding left camera image plane physical coordinate system coincide with the unit vectors θ and μ, respectively. At this time, the corresponding points of the ellipse E' obtained by intercepting the observation conic with the new imaging plane are p'q'b'c'. In the intermediate camera coordinate system, the coordinates of the four points p', q', b' and c' are represented as: Wherein f represents the focal length of the camera; The coordinates of PQBC are obtained according to p'q'b'c': Wherein α, β, γ are proportional coefficients, the center O of the space circle is the midpoint of BC, and M is the midpoint of PQ, so we get: The normal vector calculation formula of the space circle is: Combined with the properties of the circle and the similarity of the triangle, the following equations are listed: By solving the above equations simultaneously, we get two sets of solutions for the center O l and normal vector n l of the circle in the left camera coordinate system: wherein u p’ represents the x-axis direction coordinate of point p', v b’ represents the y-axis direction coordinate of b', R represents an extrinsic rotation matrix, O l1 ', n l1 ', O l2 ', n l2 represents two sets of circle centers and normal vectors of the left camera ellipse under the middle camera coordinate system, which are converted to the left camera coordinate system, and the calculation formula is represented as follows: Similarly, get two sets of circle centers and normal vectors under the right camera: O r1 , n r1 , O r2 , n r2 ; Step S3: according to the uniqueness of the circle center, a correct group of circle center and the normal vector of the space target circle is obtained; Step S4: based on the conic curve geometric constraint, the normal vector and the ellipse parameter matrix, the coordinates of the space circle center in the left and right camera coordinate systems are calculated respectively; Step S5: the circle center coordinates are brought into the circle center containing unknown radius parameters, and the radius of the space circle is solved. 2.The method of claim 1, wherein: In the step S1, the internal and external parameters and distortion coefficients of the binocular camera are calibrated, the left and right images are corrected according to the distortion coefficients, the edges of the corrected left and right images are detected, the ellipse on the left and right images is detected, and the parameter matrix of the ellipse on the left and right images is calculated.

3. The method of claim 1 or 2, wherein: The step S1 comprises the following steps: Step S1.1: calibrating the internal and external parameters and distortion coefficients of the binocular camera, and correcting the camera image according to the distortion coefficients; Step S1.2: performing edge detection on the corrected camera image, and calculating the parameter matrix of the obtained ellipse in the image coordinate system; The image is Gaussian filtered and edge detected, the edge detection extracts elliptical arc segments according to the curvature and convexity of the ellipse, the arc segments are searched to obtain possible candidate combinations, and finally the possible candidate combinations are fitted and judged to obtain the final ellipse using a clustering algorithm; Based on the final ellipse, the parameter matrix of the ellipse in the image coordinate system is calculated: where a denotes an ellipse long semi-axis, b denotes a short semi-axis, (c x ,c y ) denotes a center coordinate, and θ denotes an inclination angle. Step S1.3: Obtain the parameter matrix of the ellipse in the camera coordinate system according to the parameter matrix in the image coordinate system and the camera intrinsic parameter: A = K T YK Wherein, K represents the camera intrinsic parameter, and A represents the parameter matrix of the ellipse in the camera coordinate system.

4. The method of claim 1, wherein: In step S5, after the center coordinate t1(x1, y1, z1) of the spatial circle is obtained, the radius R of the spatial circle measured by the left camera is calculated l The specific calculation formula is as follows: After obtaining the spatial circle center coordinate t2(x2, y2, z2), the radius R2 of the spatial circle measured by the right camera is obtained in the same way, and the specific calculation formula is as follows: Take R l and R r The average value is the radius R of the measured spatial circle.

5. The method of claim 1, wherein: In the step S3, the representation of the two circle centers of the right camera in the left camera coordinate system is calculated, and the distance between the two circle centers of the left camera is calculated, based on the obtained minimum distance, one correct left camera circle center is determined from the two circle centers of the left camera, and the corresponding correct left camera normal vector is obtained according to the correct left camera circle center; Similarly, the correct right camera circle center and normal vector are obtained.

6. The method of claim 5, wherein: In the step S3, the two circle centers O r1 and O r2 in the right camera coordinate system are expressed as O r1 ' and O r2 ' in the left camera coordinate system, and the calculation formula is as follows: Wherein, R and T are the rotation matrix and translation matrix of the external parameter obtained by binocular camera calibration; Calculate the distance between the two sets of circle centers under the left camera to O r1 and O r2 , take the minimum value of d 11 , d 12 , d 21 , d 22 as the correct left and right circle centers, and the calculation formula is: Since the spatial circle center coordinates are fixed, the correct solution of O l is obtained, and the calculation process is as follows: Find O l After that, get the normal vector n of the spatial circle in the left camera coordinate system l The calculation process is as follows: Similarly, the correct center of the circle O r and the corresponding normal vector n r in the right camera coordinate system are found.

7. The method of claim 1, wherein: The step S4 includes the following steps: Step S4.1: Establishing the point x on the spatial circle plane w and its corresponding point x on the left / right image i Equation: x i = R i x w + t i where i = 1, 2, corresponding to left and right cameras, x i , R i , t i respectively represent the coordinates of the corresponding points on the left / right camera images in the camera coordinate system, the rotation matrix and translation matrix of the left / right camera relative to the world coordinate system. Transform the formula to x i = G i u w (1), where G i = (r i1 , r i2 , t i ), r i1 and r i2 are the first two columns of R i , u w is the homogeneous coordinate of x w , and the circle is on the space target circle, whose equation is expressed as Q represents the parameter matrix of the space target circle, and the circle is a special ellipse, so Q is solved in the same way as Y, which represents the parameter matrix of the ellipse in the image coordinate system. By analogy, the projection equation of the ellipse on the left / right image is expressed as (3), A represents the parameter matrix of the ellipse in the camera coordinate system, u i is the homogeneous coordinate of the corresponding point on the left / right image in the pixel coordinate system, and u i = x i / f (4). By combining (1), (2), (3), and (4), the conic geometric constraint equation is obtained: where G1is given by (r 11 ,r 12 ,t1), K i is an unknown scale parameter that is eliminated in the subsequent solution process; Step S4.2: Calculate the unit vector r of the normal vector of the space circle in the left camera coordinate system according to the result of step S3 13 The matrix H is calculated, and the calculation formula is as follows: Since r 11 , r 12 are the eigenvectors corresponding to the two nonzero eigenvalues of H, r 11 , r 12 can be solved by solving the eigenvectors of H. Based on r 11 , r 12 Solving the conic curve geometry constraint equation set: Based on the equation set, t1(x1, y1, z1) and t2(x2, y2, z2) are calculated, and t1 and t2 represent the coordinates of the spatial circle plane circle center in the left and right camera coordinate systems respectively.

Citation Information

Patent Citations

  • Circular target pose measurement method and device based on binocular inverse projection transformation

    CN113052905A

  • Edge preparation device and its method

    JP1999057999A