CN112815832B - Measuring camera coordinate system calculation method based on 3D target - Google Patents
Measuring camera coordinate system calculation method based on 3D target Download PDFInfo
- Publication number
- CN112815832B CN112815832B CN201911122392.8A CN201911122392A CN112815832B CN 112815832 B CN112815832 B CN 112815832B CN 201911122392 A CN201911122392 A CN 201911122392A CN 112815832 B CN112815832 B CN 112815832B
- Authority
- CN
- China
- Prior art keywords
- coordinate system
- target
- camera
- points
- image
- 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.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G01—MEASURING; TESTING
- G01B—MEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
- G01B11/00—Measuring arrangements characterised by the use of optical techniques
- G01B11/002—Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Length Measuring Devices By Optical Means (AREA)
Abstract
The invention discloses a measuring camera coordinate system calculation method based on a 3D target, which utilizes a 3D cooperative target, adopts a P3P principle to establish a conversion relation between a camera and a target to be measured, and solves the relation between the camera coordinate system and an installation reference coordinate system through the conversion of the target and a camera installation reference coordinate system.
Description
Technical Field
The invention belongs to the technical field of external reference calibration of a measuring camera, and particularly relates to a measuring camera coordinate system calculation method based on a 3D target.
Background
The hand-eye camera of the mechanical arm of the space station provides information such as target images, positions and postures for the mechanical arm, the information is used for guiding the mechanical arm to conduct work such as extravehicular crawling, cargo capturing and carrying, and performance of the information directly determines whether a task of the mechanical arm can be smoothly conducted. The hand-eye camera adopts a hand-in-eye mode, the camera is installed at the tail end of the mechanical arm, and the position of a coordinate system of the camera needs to be known firstly when the representation of the target position and the target posture under the coordinate system of the mechanical arm is required to be known along with the movement of the mechanical arm.
The measurement and calculation of the hand-eye relationship is called hand-eye calibration, which is a core problem of the robot hand-eye vision, and the hand-eye calibration precision is also a key factor for determining the precision of a hand-eye vision system. For a pinhole imaging model camera, the origin of the camera coordinate system is the projection center of the optical system and is a virtual position, and the origin cannot be led out to the installation coordinate system by a common measurement method. If a common hand-eye calibration method such as shiu, tsai and the like is adopted, the movement of the mechanical arm needs to be used as a true value of a hand-eye calibration calculation process, and the motion precision of the mechanical arm cannot be guaranteed in an actual operation process.
Disclosure of Invention
In view of the above, an object of the present invention is to provide a method for calculating a coordinate system of a measuring camera based on a 3D target, which can improve the detection accuracy of the measuring camera.
A measuring camera coordinate system calculation method based on a 3D target comprises the following steps:
step 1, establishing a three-dimensional target:
the center of the target is set as OwPassing through the target center OwOn the plane of (B) is provided withw、CwTwo points, and three points being located on the same line, Bw、CwTwo points and OwAre equal; cylindrical vertical Ow、Bw、CwOn the plane, the center of the circle of the bottom surface and OwCoincident with the center of the top surface as AwThen A isw、Bw、CwThree points form an isosceles triangle, the waist A of which iswBwAnd AwCwIs B, the base BwCwThe length of (a) is set as a;
step 2, establishing a target coordinate system, a camera coordinate system, an image physical coordinate system of the camera and an image pixel coordinate system:
with OwIs a center, OwXwYwZwSet as a target coordinate system, where BwCwIs XwAxis, XwYwPlane parallel to the target plane, ZwO on the shaft and targetwAwOverlapping;
with optical center O of camera optical systemcCoordinate system O as origincXcYcZcIs the camera coordinate system;
taking OXY with the image center O as an origin as an image physical coordinate system;
in the upper left corner O of the image1O as origin1UV is the image pixel coordinate system, and the coordinates of the image center O in the coordinate system are (u)0,v0);
XcYcThe plane being parallel to the XY plane, ZcThe axis passes through the image center O; according to the pinhole model, A in the target coordinate systemw、Bw、CwThe three points are projected A, B, C under the image coordinate system, finally at the optical center OcOverlapping; o iscAw、OcBw、OcCwThe lengths of the two parts are x, y and z, and the included angles among the two parts are respectively set as alpha, beta and gamma;
step 3, after the camera shoots the target picture, coordinates of the A, B, C three points under an image pixel coordinate system are calculated through the shot image;
step 4, calculating A from the values of x, y and z according to the similar triangle principlew、Bw、CwThree pointsIn the camera coordinate system OcXcYcZcLower corresponding coordinate Ac、Bc、CcThe calculation formula is as follows:
wherein f represents a camera focal length;
And 5, solving a conversion matrix C from the target coordinate system to the camera coordinate system by adopting a P3P algorithm:
firstly, under a target coordinate system, three linearly independent unit vectors n are calculatedw1、nw2、nw3:
② in the same way, because Aw、Bw、CwThree points on the camera coordinate system OcXcYcZcLower corresponding coordinate Ac、Bc、Cc(ii) a Calculating nw1、nw2、nw3Three corresponding vectors n in the camera coordinate systemc1、nc2、nc3Form a matrix Nc=(nc1,nc2,nc3);
Step 6, measuring a target coordinate system and a camera mounting base coordinate system to obtain a conversion relation T1 between the target coordinate system and the camera mounting base coordinate system;
step 7, determining the relation T2 between the camera coordinate system and the camera mounting reference coordinate system as T1 × T3';
where T3' represents the inverse of the target coordinate system to camera coordinate system transformation matrix C.
Preferably, the target coordinate system and the camera mounting reference coordinate system are measured by a six-degree-of-freedom joint measuring arm of Hakstan.
The invention has the following beneficial effects:
the invention discloses a camera coordinate system calculation method based on a 3D target, which utilizes a 3D cooperative target, adopts a P3P principle to establish a conversion relation between a camera and a target to be measured, and solves the relation between a camera coordinate system and an installation reference coordinate system through the conversion of the target and a camera installation reference coordinate system.
Drawings
FIG. 1(a) is a top view of a cooperative target employed in the present invention;
FIG. 1(b) is a side view of a cooperative target employed in the present invention;
FIG. 2 is a projection diagram of P3P;
FIG. 3 is a schematic diagram of coordinate systems among a target coordinate system, a camera coordinate system, and a mounting reference coordinate system;
fig. 4 is a graph of the absolute accuracy measurement error of the camera.
Detailed Description
The invention is described in detail below by way of example with reference to the accompanying drawings.
The camera maps the real three-dimensional world to a two-dimensional image plane through a perspective projection model. If one wants to establish such homography, one needs to solve the relationship between the position of the cooperative target and the corresponding image. For a plane calibration template, although the use is flexible, the calibration template coordinate system is difficult to establish connection with a real three-dimensional world coordinate system, so that a 3D feature cooperation target is designed to be used as a conversion tool from a camera coordinate system to a mounting reference coordinate system.
The hand-eye calibration is used for calibrating a template as a support, and the spatial position of a characteristic point on the template must be known. The calibration characteristics adopt circle characteristics, the circle characteristic positioning is less influenced by factors such as defocusing blurring and illumination, the robustness is higher, the characteristic point distance of the target and the height of the upright post are known. The cooperative target used in the present invention is shown in FIGS. 1(a) and 1(b), and the center of the target is OwPassing through the center of the target OwOn the plane of (B) is provided withw、CwTwo points, and three points being located on the same line, Bw、CwTwo points and OwAre equal; cylindrical vertical Ow、Bw、CwOn the plane, the center of the circle of the bottom surface and OwThe center of the top surface is set as AwThen A isw、Bw、CwThree points form an isosceles triangle, AwBw、AwCwWaist, BwCwIs the bottom.
As shown in FIG. 2, Aw、Bw、CwThree characteristic points on the cooperative target, and the waist A can be known through actual measurementwBwAnd AwCwHas a length of B and a base BwCwHas a length of a. By the bottom edge midpoint OwIs a center, OwXwYwZwIs a target coordinate system, where BwCwIs XwAxis, XwYwPlane parallel to the target plane, ZwUpright post O on shaft and targetwAwOverlapping; with principal point O of the camera optical systemcThree-dimensional rectangular coordinate system O as origincXcYcZcIs the camera coordinate system; a two-dimensional rectangular coordinate system OXY with the image center O as the origin is an image physical coordinate system; in the upper left corner O of the image1Two-dimensional rectangular coordinate system O as origin1UV is an image pixelCoordinate system, the coordinate of the image center O in the coordinate system is (u)0,v0)。XcYcThe plane being parallel to the XY plane, ZcThe axis passes through the image center O. According to the pinhole model, A in the target coordinate systemw、Bw、CwThe three points are projected A, B, C under the image coordinate system, finally at the optical center OcAre overlapped. O iscAw、OcBw、OcCwThe lengths of the X, the Y and the Z are respectively long, and the included angles among the X, the Y and the Z are respectively alpha, beta and gamma.
Due to the triangle AwBwCwThe length of each side is determined, so Aw、Bw、CwThe coordinates in the target coordinate system are known; A. b, C coordinates of the three points in the image pixel coordinate system can be calculated from the captured image, and the image physical coordinates of the three points A, B, C can be obtained by combining the camera internal parameters. Taking point a as an example, the image physical coordinates can be expressed as:
wherein (x)A,yA) And (u)A,vA) Respectively being the physical coordinates of the A-point image and the coordinates of the image pixels, sxAnd syThe pixel sizes in the X and Y directions, respectively.
Based on the triangle-like principle, A can be calculated from the values of x, y and zw、Bw、CwThree points on the camera coordinate system OcXcYcZcLower corresponding coordinate Ac、Bc、CcThe calculation formula is as follows:
wherein f represents a camera focal length;
due to Aw、Bw、CwThree points in the target coordinate system OwXwYwZwThe lower is fixed, its coordinates are known, respectivelyWherein a is BwAnd CwThe spacing, b, is the cylinder height of the target. From these three point coordinates, and Ac、Bc、CcThe coordinates of the three points are transformed into a transformation matrix C from the target coordinate system to the camera coordinate system by using the algorithm P3P.
Firstly, under a target coordinate system, three linearly independent unit vectors n are calculatedw1、nw2、nw3。 The three form a matrix Nw=(nw1,nw2,nw3)。
② in the same way, because Aw、Bw、CwThree points on the camera coordinate system OcXcYcZcLower corresponding coordinate Ac、Bc、CcN can be calculatedw1、nw2、nw3Three corresponding vectors n in the camera coordinate systemc1、nc2、nc3Form a matrix Nc=(nc1,nc2,nc3)。
The coordinate system relation in the measurement is shown in fig. 3, a target coordinate system and a cubic mirror (camera mounting base) coordinate system are established through a Hakson 6-degree-of-freedom joint measuring arm, and the repeated positioning error of the joint measuring arm is less than 23 μm.
The camera coordinate system and the camera mounting reference coordinate system have a relation T2 ═ T1 ═ T3'. T3' represents the inverse of T3.
T1 is the conversion relation between the target coordinate system and the camera mounting reference, which is measured by the joint measuring arm, and the target and camera coordinate system relation T3 is calculated by the P3P algorithm.
In order to verify the effectiveness of the method, the method is adopted for carrying out actual calibration work by adopting a table-board array hand-eye camera. The measured camera parameters were as follows: the nominal focal length F is 11.2mm, the field angle is 35.4 °, and the resolution is 1920 × 1080.
In the actual measurement working range of the camera, multiple target poses are adopted for calibration, T2 under each pose is calculated, and the fitting result is as follows:
to verify the validity of the extrinsic parameter T2 and to check the absolute measurement accuracy of the measuring camera, 6 points were chosen for verification in the actual operating range of the camera. The test method is to compare T1 and T2 × T3 measured by the joint measuring arm using the measured T2 and T3 measured by the camera P3P algorithm as true values. The error curve is shown in fig. 4, and as can be seen from fig. 4, the translation errors are within the working range of 200-700 mm from the target to the camera, the translation errors of the camera measurement results are all less than 0.3mm, and the angle errors are all less than 0.2 degrees, which shows that the method for deriving the camera coordinate system is stable and reliable, and the validity of the measurement accuracy can be ensured in a larger working range.
In summary, the above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention. Any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims (2)
1. A measuring camera coordinate system calculation method based on a 3D target is characterized by comprising the following steps:
step 1, establishing a three-dimensional target:
the center of the target is set as OwPassing through the center of the target OwOn the plane of (B) is provided withw、CwTwo points, and three points being located on the same line, Bw、CwTwo points and OwAre equal; cylindrical vertical Ow、Bw、CwOn the plane, the center of the circle of the bottom surface and OwCoincident with the center of the top surface as AwThen A isw、Bw、CwThree points form an isosceles triangle, the waist A of which iswBwAnd AwCwIs set as B, the base BwCwThe length of (b) is set as a;
step 2, establishing a target coordinate system, a camera coordinate system, an image physical coordinate system of the camera and an image pixel coordinate system:
with OwIs a center, OwXwYwZwSet as a target coordinate system, wherein BwCwIs XwAxis, XwYwPlane parallel to the target plane, ZwO on the shaft and targetwAwOverlapping;
with optical center O of camera optical systemcCoordinate system O as origincXcYcZcIs the camera coordinate system;
taking OXY with the image center O as an origin as an image physical coordinate system;
in the upper left corner O of the image1O as origin1UV is the image pixel coordinate system, and the coordinates of the image center O in the coordinate system are (u)0,v0);
XcYcThe plane being parallel to the XY plane, ZcThe axis passes through the image center O; according to the pinhole model, A in the target coordinate systemw、Bw、CwThe three points are projected A, B, C under the image coordinate system, finally at the optical center OcOverlapping; o iscAw、OcBw、OcCwThe lengths of the two parts are x, y and z, and the included angles among the two parts are respectively set as alpha, beta and gamma;
step 3, after the camera shoots the target picture, coordinates of the A, B, C three points under an image pixel coordinate system are calculated through the shot image;
step 4, calculating A by the values of x, y and z according to the similar triangle principlew、Bw、CwThree points on the camera coordinate system OcXcYcZcLower corresponding coordinate Ac、Bc、CcThe calculation formula is as follows:
wherein f represents a camera focal length; xA、XB、XCA, B, C are the lengths of the X axes of the three points in the image physical coordinate system respectively;
Aw、Bw、Cwthree points in the target coordinate system OwXwYwZwThe lower corresponding coordinates are respectively
And 5, solving a conversion matrix C from the target coordinate system to the camera coordinate system by adopting a P3P algorithm:
firstly, under a target coordinate system, three linearly independent unit vectors n are calculatedw1、nw2、nw3: The three form a matrix Nw=(nw1,nw2,nw3);
② in the same way, because Aw、Bw、CwThree points on camera seatSystem of symbols OcXcYcZcLower corresponding coordinate Ac、Bc、Cc(ii) a Calculating nw1、nw2、nw3Three corresponding vectors n in the camera coordinate systemc1、nc2、nc3Form a matrix Nc=(nc1,nc2,nc3);
Step 6, measuring a target coordinate system and a camera mounting base coordinate system to obtain a conversion relation T1 between the target coordinate system and the camera mounting base coordinate system;
step 7, determining the relation T2 between the camera coordinate system and the camera mounting reference coordinate system as T1 × T3';
where T3' represents the inverse of the target coordinate system to camera coordinate system transformation matrix C.
2. The method of claim 1, wherein the target coordinate system and the camera mounting reference coordinate system are measured by a six degree-of-freedom articulated measuring arm of Hakscon.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911122392.8A CN112815832B (en) | 2019-11-15 | 2019-11-15 | Measuring camera coordinate system calculation method based on 3D target |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911122392.8A CN112815832B (en) | 2019-11-15 | 2019-11-15 | Measuring camera coordinate system calculation method based on 3D target |
Publications (2)
Publication Number | Publication Date |
---|---|
CN112815832A CN112815832A (en) | 2021-05-18 |
CN112815832B true CN112815832B (en) | 2022-06-07 |
Family
ID=75851993
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911122392.8A Active CN112815832B (en) | 2019-11-15 | 2019-11-15 | Measuring camera coordinate system calculation method based on 3D target |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN112815832B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114055473B (en) * | 2021-12-06 | 2022-06-17 | 合肥新思路智能科技有限公司 | Visual detection identification system based on transfer robot |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003050107A (en) * | 2001-08-07 | 2003-02-21 | Matsushita Electric Ind Co Ltd | Camera calibration device |
KR20100007506A (en) * | 2008-07-14 | 2010-01-22 | 성균관대학교산학협력단 | New calibration method of multi-view camera for a optical motion capture system |
CN103162622A (en) * | 2013-02-28 | 2013-06-19 | 西安交通大学 | Monocular vision system, portable ball target used by monocular vision system and measuring method of monocular vision system |
AU2011265572A1 (en) * | 2011-12-23 | 2013-07-11 | Canon Kabushiki Kaisha | Structured light system for robust geometry acquisition |
CN106289106A (en) * | 2016-08-04 | 2017-01-04 | 北京航空航天大学 | Stereo vision sensor that a kind of line-scan digital camera and area array cameras combine and scaling method |
CN106989669A (en) * | 2017-02-16 | 2017-07-28 | 上海大学 | Big visual field high-precision vision system calibrating method based on virtual three-dimensional target |
CN107121110A (en) * | 2017-06-12 | 2017-09-01 | 中国科学院长春光学精密机械与物理研究所 | The device and uncalibrated image acquisition method gathered applied to uncalibrated image |
CN107339935A (en) * | 2017-06-27 | 2017-11-10 | 中国航空工业集团公司北京长城航空测控技术研究所 | Target space intersection measuring method for full visual angle scanning measurement system |
CN107590835A (en) * | 2017-08-24 | 2018-01-16 | 中国东方电气集团有限公司 | Mechanical arm tool quick change vision positioning system and localization method under a kind of nuclear environment |
Family Cites Families (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN109934878B (en) * | 2019-03-25 | 2020-11-27 | 合肥工业大学 | Linear calibration system and method based on camera coordinate system |
-
2019
- 2019-11-15 CN CN201911122392.8A patent/CN112815832B/en active Active
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2003050107A (en) * | 2001-08-07 | 2003-02-21 | Matsushita Electric Ind Co Ltd | Camera calibration device |
KR20100007506A (en) * | 2008-07-14 | 2010-01-22 | 성균관대학교산학협력단 | New calibration method of multi-view camera for a optical motion capture system |
AU2011265572A1 (en) * | 2011-12-23 | 2013-07-11 | Canon Kabushiki Kaisha | Structured light system for robust geometry acquisition |
CN103162622A (en) * | 2013-02-28 | 2013-06-19 | 西安交通大学 | Monocular vision system, portable ball target used by monocular vision system and measuring method of monocular vision system |
CN106289106A (en) * | 2016-08-04 | 2017-01-04 | 北京航空航天大学 | Stereo vision sensor that a kind of line-scan digital camera and area array cameras combine and scaling method |
CN106989669A (en) * | 2017-02-16 | 2017-07-28 | 上海大学 | Big visual field high-precision vision system calibrating method based on virtual three-dimensional target |
CN107121110A (en) * | 2017-06-12 | 2017-09-01 | 中国科学院长春光学精密机械与物理研究所 | The device and uncalibrated image acquisition method gathered applied to uncalibrated image |
CN107339935A (en) * | 2017-06-27 | 2017-11-10 | 中国航空工业集团公司北京长城航空测控技术研究所 | Target space intersection measuring method for full visual angle scanning measurement system |
CN107590835A (en) * | 2017-08-24 | 2018-01-16 | 中国东方电气集团有限公司 | Mechanical arm tool quick change vision positioning system and localization method under a kind of nuclear environment |
Non-Patent Citations (1)
Title |
---|
基于合作靶球的视觉传感器外参标定方法;宋佳慧等;《光学学报》;20170930;第37卷(第9期);第207-215页 * |
Also Published As
Publication number | Publication date |
---|---|
CN112815832A (en) | 2021-05-18 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN109454634B (en) | Robot hand-eye calibration method based on plane image recognition | |
CN110666798B (en) | Robot vision calibration method based on perspective transformation model | |
Strobl et al. | More accurate pinhole camera calibration with imperfect planar target | |
CN107160380B (en) | Camera calibration and coordinate transformation method based on SCARA manipulator | |
CN110146038B (en) | Distributed monocular camera laser measuring device and method for assembly corner of cylindrical part | |
JP4914039B2 (en) | Information processing method and apparatus | |
US8600192B2 (en) | System and method for finding correspondence between cameras in a three-dimensional vision system | |
JP6271953B2 (en) | Image processing apparatus and image processing method | |
WO2020024178A1 (en) | Hand-eye calibration method and system, and computer storage medium | |
JP6067175B2 (en) | Position measuring apparatus and position measuring method | |
CN101377405B (en) | Vision measuring method of space round gesture parameter and geometric parameter | |
CN109827521B (en) | Calibration method for rapid multi-line structured optical vision measurement system | |
JP2005515910A (en) | Method and apparatus for single camera 3D vision guide robotics | |
CN103106661B (en) | Two, space intersecting straight lines linear solution parabolic catadioptric camera intrinsic parameter | |
CN110490943B (en) | Rapid and accurate calibration method and system of 4D holographic capture system and storage medium | |
CN112476489B (en) | Flexible mechanical arm synchronous measurement method and system based on natural characteristics | |
CN114714356A (en) | Method for accurately detecting calibration error of hand eye of industrial robot based on binocular vision | |
JPWO2018043524A1 (en) | Robot system, robot system control apparatus, and robot system control method | |
CN112815832B (en) | Measuring camera coordinate system calculation method based on 3D target | |
KR101597163B1 (en) | Method and camera apparatus for calibration of stereo camera | |
CN109087360A (en) | A kind of scaling method that robot camera is joined outside | |
CN109406525B (en) | Bridge apparent disease detection system and detection method thereof | |
CN113593050A (en) | Binocular vision guided robot intelligent assembly method, system and device | |
Yamauchi et al. | Calibration of a structured light system by observing planar object from unknown viewpoints | |
Ying et al. | Geometric properties of multiple reflections in catadioptric camera with two planar mirrors |
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 | ||
GR01 | Patent grant | ||
GR01 | Patent grant |