CN112132903A - Coordinate system calibration method and system for vision system and multi-axis motion system - Google Patents

Coordinate system calibration method and system for vision system and multi-axis motion system Download PDF

Info

Publication number
CN112132903A
CN112132903A CN202010507001.0A CN202010507001A CN112132903A CN 112132903 A CN112132903 A CN 112132903A CN 202010507001 A CN202010507001 A CN 202010507001A CN 112132903 A CN112132903 A CN 112132903A
Authority
CN
China
Prior art keywords
coordinate
camera
axis motion
coordinate system
standard
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
CN202010507001.0A
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.)
Harbin Institute of Technology
Original Assignee
Harbin Institute of 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 Harbin Institute of Technology filed Critical Harbin Institute of Technology
Priority to CN202010507001.0A priority Critical patent/CN112132903A/en
Publication of CN112132903A publication Critical patent/CN112132903A/en
Pending legal-status Critical Current

Links

Images

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
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker
    • G06T2207/30208Marker matrix

Landscapes

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

Abstract

In order to solve the problem that the coordinate transformation relationship from a visual system coordinate system to a multi-axis motion system coordinate system cannot be accurately solved when the original point position of the visual system coordinate system under each motion axis coordinate system of the multi-axis motion system cannot be directly detected in the prior art, the invention discloses a coordinate system calibration method of the visual system and the multi-axis motion system, which comprises the following steps: acquiring a first coordinate, wherein the first coordinate is a coordinate of a vertex of a standard ball under the multi-axis motion system coordinate system; acquiring a second coordinate, wherein the second coordinate is a pixel coordinate system coordinate of the vertex of the standard ball under the visual system; and determining the coordinate transformation relation from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate. The application also discloses a corresponding system, which can accurately solve the coordinate transformation relation from the coordinate system of the vision system to the coordinate system of the multi-axis motion system.

Description

Coordinate system calibration method and system for vision system and multi-axis motion system
Technical Field
The disclosure relates to the field of intelligent medical instrument robots and vision processing, in particular to a coordinate system calibration method and system of a vision system and a multi-axis motion system.
Background
The newly developed intelligent blood collection robot field basically adopts a blood vessel vision system based on an infrared camera to realize the detection of a blood vessel blood collection puncture position and the execution of a blood collection puncture action by combining a multi-axis motion system. In the intelligent blood sampling robot system, an infrared camera vision system coordinate system and a multi-axis motion system space motion coordinate system exist at the same time. The intelligent blood collection robot controls a multi-axis motion system to carry a blood collection needle to accurately move to a blood collection puncture position point under a coordinate system of the vision system according to a blood collection puncture position point obtained by the vision system, wherein the intelligent blood collection robot unifies a space coordinate of a certain point in the coordinate system of the vision system into a space coordinate system of the multi-axis motion system, and the coordinate system of the vision system is transformed into the space motion coordinate system of the multi-axis motion system by using complex coordinate system transformation. In addition, the vision system and the multi-axis motion system may have a large distance in the horizontal direction at the spatial position, and there may be a problem that the origin position of each motion axis coordinate system of the multi-axis motion system cannot be directly detected under the coordinate system of the vision system, which brings difficulty to accurately solve the coordinate transformation relationship between the coordinate system of the vision system and the coordinate system of the multi-axis motion system. Meanwhile, parameters such as the coordinate deviation of the origin of the coordinate system of the vision system and the coordinate system of the multi-axis motion system, the orientation of each coordinate axis and the like are difficult to accurately measure, so that the accurate calibration is difficult to achieve aiming at the coordinate system transformation of the vision system and the multi-axis motion system in the intelligent blood collection robot.
Disclosure of Invention
In order to solve at least one of the above technical problems, the present disclosure provides a coordinate system calibration method and system for a vision system and a multi-axis motion system, so as to accurately solve a coordinate transformation relationship from a vision system coordinate system to a multi-axis motion system coordinate system.
In a first aspect of the present disclosure, a coordinate system calibration method for a vision system and a multi-axis motion system includes: acquiring a first coordinate, wherein the first coordinate is a coordinate of a vertex of a standard ball under the multi-axis motion system coordinate system;
acquiring a second coordinate, wherein the second coordinate is a pixel coordinate system coordinate of the vertex of the standard ball under the visual system;
and determining the coordinate transformation relation from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate.
Optionally, the number of the standard balls is four, and the four standard balls are arranged according to a set condition;
the set condition is that the four standard balls are symmetrically arranged below the multi-axis motion system according to four corners, and the four standard balls are located at the same height.
The optional method comprises the following steps:
four standard balls are symmetrically and fixedly placed below the multi-axis motion system at four corners;
the method comprises the steps of acquiring images of four standard balls through a camera of a vision system, and adjusting the distance and the position between the four standard balls according to the images of the four standard balls so that the four standard balls are located at four corner positions of the images.
Optionally, the acquiring the first coordinate includes:
controlling the distance measuring module to move above the four standard balls, and scanning the spherical surface profiles of the standard balls respectively to obtain the module coordinates of the distance measuring module under the multi-axis motion system and the vertical distance measured by the distance measuring module;
and determining a spherical contour coordinate according to the module coordinate and the vertical distance, wherein the spherical contour coordinate is a coordinate of a standard spherical contour scatter set under a multi-axis motion system.
Fitting a spherical equation according to the spherical contour coordinates;
and obtaining the coordinates of the vertex of the standard sphere under the multi-axis motion system coordinate system according to the fitted spherical equation.
Optionally, the acquiring the second coordinate includes:
adjusting a camera position of a vision system so that the camera is directly above a center of symmetry of the four standard spheres, and the standard spheres are on a camera object focal plane;
controlling the camera to shoot to generate a standard ball image;
and determining the coordinates of a pixel coordinate system of the center of a target circle, wherein the target circle is the circle of the standard ball in the standard ball image.
Optionally, the determining a coordinate transformation relationship from the vision system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate includes:
converting the second coordinate into a third coordinate according to the pixel physical size parameter of the camera, wherein the third coordinate is an image coordinate system coordinate of the vertex of the standard sphere under the visual system;
converting the third coordinate into a fourth coordinate according to a Z-direction coordinate in the first coordinate and a focal length parameter of a lens of the camera, wherein the fourth coordinate is a coordinate of a camera coordinate system of the vertex of the standard sphere under the visual system;
determining a coordinate transformation relation from a camera coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the fourth coordinate;
and determining the coordinate transformation relation from the coordinate system of the vision system to the coordinate system of the multi-axis motion system according to the coordinate transformation relation from the coordinate system of the camera to the coordinate system of the multi-axis motion system.
Optionally, the converting the third coordinate into a fourth coordinate includes:
converting the third coordinate into a fourth coordinate according to the following formula;
Figure BDA0002526908720000031
wherein (x, y) is the image coordinate of the point in the image coordinate system, fxIs the x-direction focal length, f of the camerayIs the y-direction focal length of the camera (X)c,Yc,Zc) Is the coordinate of the corresponding point in the camera coordinate system.
Optionally, determining a coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the fourth coordinate, including:
determining a coordinate transformation relation from a camera coordinate system to the multi-axis motion system coordinate system according to the following formula;
Figure BDA0002526908720000032
wherein (X)c,Yc,Zc) Coordinates of a point in the camera coordinate system; (X)w,Yw,Zw) Coordinates of corresponding points in the coordinate system of the multi-axis motion system are obtained; r is a rotation matrix from a camera coordinate system to a multi-axis motion system coordinate system; and T is a translation matrix from a camera coordinate system to a multi-axis motion system coordinate system.
Determining the coordinate transformation relation from the visual system coordinate system to the multi-axis motion system coordinate system according to the coordinate transformation relation from the camera coordinate system to the multi-axis motion system coordinate system, which comprises the following steps:
determining a coordinate transformation relation from a visual system coordinate system to a multi-axis motion system coordinate system according to the following formula;
Figure BDA0002526908720000041
wherein (X)w,Yw,Zw) Coordinates of corresponding points in the coordinate system of the multi-axis motion system are obtained; r is a rotation matrix from a camera coordinate system to a multi-axis motion system coordinate system; t is a translation matrix from a camera coordinate system to a multi-axis motion system coordinate system; f. ofxIs the x-direction focal length, f of the camerayThe y-direction focal length of the camera is defined, Zc is the Z-direction coordinate of the vertex of the standard sphere under the multi-axis motion system coordinate system, and dx and dy are parameters of the physical size of the camera pixel; u. of0、v0And u and v are pixel coordinates of points on the acquired picture of the vision system.
Optionally, before acquiring the second coordinate, the method further includes:
and calibrating the camera of the visual system by using a checkerboard calibration board to acquire a camera distortion parameter, a camera internal parameter matrix and a camera external parameter matrix.
In another aspect of the disclosure, a coordinate system calibration system for a vision system and a multi-axis motion system includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor implementing any of the methods of the present disclosure when executing the computer program.
An aspect of the present disclosure is advantageous in that, according to the calibration method and system of the present disclosure, when the origin position of each motion axis coordinate system of the multi-axis motion system is not directly detected in the coordinate system of the vision system, the coordinate transformation relationship from the coordinate system of the vision system to the coordinate system of the multi-axis motion system can be accurately solved.
Drawings
The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the disclosure and together with the description serve to explain the principles of the disclosure.
FIG. 1 is a schematic diagram of a vision system and a multi-axis motion system in an embodiment of the present disclosure;
FIG. 2 is a flow chart of a coordinate system calibration method for a vision system and a multi-axis motion system in an embodiment of the present disclosure;
FIG. 3 is a flow chart of obtaining a first coordinate in an embodiment of the present disclosure;
FIG. 4 is a flow chart of obtaining a second coordinate in an embodiment of the present disclosure;
FIG. 5 is a standard ball image in an embodiment of the present disclosure;
FIG. 6 is a schematic diagram of a circle contour and a circle center obtained by four standard spheres solved by an OpenCV Hough circle detection algorithm in an embodiment of the present disclosure;
fig. 7 is another flowchart of a coordinate system calibration method of a vision system and a multi-axis motion system in an embodiment of the present disclosure.
Detailed Description
The present disclosure will be described in further detail with reference to the drawings and embodiments. It is to be understood that the specific embodiments described herein are for purposes of illustration only and are not to be construed as limitations of the present disclosure. It should be further noted that, for the convenience of description, only the portions relevant to the present disclosure are shown in the drawings.
It should be noted that the embodiments and features of the embodiments in the present disclosure may be combined with each other without conflict. The present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with embodiments.
Referring to fig. 1, fig. 1 is a schematic diagram of a structure of a vision system and a multi-axis motion system; the device comprises a multi-axis motion system 1, a distance measuring module 2, a direction 3 of a vertical distance measured by the distance measuring module and a vision system 4; the camera on the vision system 4 and the distance measuring module 2 are fixed on a multi-axis motion system, and the multi-axis motion system comprises an X axis, a Y axis and a Z axis. It should be noted that the schematic structure in fig. 1 is for facilitating understanding of the technical solution of the present disclosure, but the technical solution of the present disclosure is not limited to be applied only to the structure in fig. 1.
Referring to fig. 2, a coordinate system calibration method of a vision system and a multi-axis motion system includes:
step S1, acquiring a first coordinate, wherein the first coordinate is a coordinate of the vertex of the standard ball under a multi-axis motion system coordinate system;
step S2, acquiring a second coordinate, wherein the second coordinate is a pixel coordinate system coordinate of the vertex of the standard sphere under the visual system;
and step S3, determining the coordinate transformation relation from the vision system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate.
In the calibration method, the coordinate transformation relation from the coordinate system of the visual system to the coordinate system of the multi-axis motion system is determined based on the coordinates of the vertex of the standard ball in the coordinate system of the multi-axis motion system and the coordinates of the vertex of the standard ball in the coordinate system of the pixel in the visual system.
An aspect of the present disclosure is advantageous in that, when the position of the origin in each motion axis coordinate system of the multi-axis motion system is not directly detected in the coordinate system of the vision system, the coordinate transformation relationship from the coordinate system of the vision system to the coordinate system of the multi-axis motion system can be accurately solved.
Another aspect of the present disclosure is advantageous in that the present disclosure uses vertex coordinates of a standard sphere to determine a coordinate transformation relationship of a vision system to a coordinate system of a multi-axis motion system; based on the sphere characteristics of the standard sphere, the camera can rapidly determine the circle center position of the standard sphere according to the circle center outline of the standard sphere when shooting the standard sphere, the distance measuring module can scan the standard sphere according to an array above the standard sphere, the coordinates of the discrete points of the outline of the standard sphere under the multi-axis motion system can be obtained according to the distance detected by the distance measuring module and the current coordinates of the multi-axis motion system, the spherical equation can be fitted according to the coordinates, and then the coordinates of the vertex of the standard sphere under the multi-axis motion system can be rapidly and accurately obtained according to the spherical equation.
In one embodiment, before step S2, the method further includes:
and calibrating the camera of the visual system by using the checkerboard calibration board to acquire a camera distortion parameter, a camera intrinsic parameter matrix and a camera extrinsic parameter matrix, wherein when the camera shoots an image, the image is corrected according to the camera intrinsic parameter matrix.
Specifically, the chessboard calibration board is placed on a horizontal plane below a camera of the vision system, the multi-axis motion system module is matched with the distance measuring module to measure the vertical distance between the camera and the chessboard calibration board to adjust the working distance of the camera, so that the chessboard calibration board is positioned on an imaging focal plane of an object space of the camera, then the camera keeps the current pose, the chessboard calibration board is translated and rotated on the imaging focal plane on the premise of ensuring that the camera collects all characteristics of the chessboard calibration board to be completely imaged, images of each position of the chessboard calibration board in the visual field range of the camera are obtained, and not less than 10 images are collected according to the requirements to be used for correcting the distortion of the camera and obtaining distortion parameters and internal and external parameter matrixes of the camera. .
Then, extracting corner points in each checkerboard calibration board image, extracting the corner point positions with sub-pixel level precision by using a corner SubPix () function in OpenCV, and then calibrating the camera by using a calibretCAMERA function in OpenCV; obtaining an internal parameter matrix and an external parameter matrix of the camera, wherein the internal parameter matrix of the camera is
Figure BDA0002526908720000071
fx、fyDenotes the focal length, u0V and v0The intersection of the camera optical axis with the image plane is shown. And carrying out distortion correction on the image acquired by the camera according to the obtained intrinsic parameter matrix and the camera distortion parameter, and correcting the subsequently acquired and shot original image according to the intrinsic parameter matrix and the camera distortion parameter.
The OpenCV described above is a BSD license issuance (open source) based cross-platform computer vision library.
In one embodiment, there are four standard balls, and the four standard balls are arranged according to a set condition;
the setting condition is that four standard balls are symmetrically arranged below the multi-axis motion system according to four corners, and the four standard balls are positioned at the same height. It can be known that the standard balls are used for calibrating the coordinate system, and the specifications of the four standard balls are the same.
It should be noted that, when there are four standard spheres, the Z-coordinate of the vertex of the standard sphere in the coordinate system of the multi-axis motion system refers to the average value of the Z-coordinates of the vertices of the four standard spheres in the coordinate system of the multi-axis motion system.
Specifically, four standard balls for calibration can be symmetrically and fixedly placed below the multi-axis motion system at four corners, and the four standard balls are located at the same height.
In one embodiment, referring to fig. 3, acquiring the first coordinates comprises:
step S11, controlling the distance measuring module to move above the four standard balls, and scanning the spherical surface profiles of the standard balls respectively to obtain the module coordinates of the distance measuring module under the multi-axis motion system and the vertical distance measured by the distance measuring module;
and step S12, determining spherical contour coordinates according to the module coordinates and the vertical distance, wherein the spherical contour coordinates are coordinates of a standard spherical contour scatter set in a multi-axis motion system. In the present disclosure, the coordinates of the ith scatter point in the spherical contour coordinates are represented by (X)i,Yi,Zi) Represents;
step S13, fitting a spherical equation according to the spherical contour coordinates;
wherein the spherical equation can be fitted according to a least squares method;
and step S14, obtaining the coordinates of the top point of the standard sphere in the coordinate system of the multi-axis motion system according to the fitted spherical equation. Coordinates of the vertexes of the standard balls in the coordinate system of the multi-axis motion system, wherein the vertex coordinates of the standard balls p1, p2, p3 and p4 are used in the present disclosure (X)p1,2,3,4,Yp1,2,3,4,Zp1,2,3,4) Represents;
in one embodiment, a method comprises:
the four standard balls are symmetrically arranged at four corners and are fixedly placed below the multi-axis motion system;
images of the four standard balls are acquired by the camera of the vision system to adjust the distances and positions between the four standard balls according to the images of the four standard balls so that the four standard balls are located at the four corner positions of the images in the standard ball image captured by the camera of the vision system at the following step S2.
In one embodiment, the spherical equation model on the standard sphere under the coordinate system of the multi-axis motion system is obtained by least square fitting, and the expression is as follows:
f(X,Y,Z)=(X-X0)2+(Y-Y0)2+(Z-Z0)2=R2 (1)
wherein (X)0,Y0,Z0) Is the sphere center coordinate of the fitting spherical equation; r is the spherical radius of the fitting spherical equation;
according to the least square method, the fitted spherical equation and the actual point residual error sum of squares are required to be minimum, and the expression is as follows:
Figure BDA0002526908720000081
wherein E is the sum of the squares of the residuals, requiring E to be minimal; f (X)i,Yi,Zi) For the purpose of collecting objectsThe value of the ith discrete point of the sphere on the quasi-sphere on the fitted sphere equation f (X, Y, Z); r is the spherical radius of the fitting spherical equation; n is the total number of discrete points on the spherical surface of the collected standard sphere;
in one embodiment, the vertex on the reference sphere has coordinate values (X) in the coordinate system of the multi-axis motion systempi,Ypi,Zpi) Spherical equation center coordinates (X) obtained by least square fitting under multi-axis motion system coordinate system0i,Y0i,Z0i) The Z direction is added with the spherical radius offset of the fitting spherical equation, and the expression is as follows:
Figure BDA0002526908720000091
wherein (X)0i,Y0i,Z0i) Fitting spherical equation center coordinates under a multi-axis motion system coordinate system; (X)pi,Ypi,Zpi) The coordinate value of the vertex on the standard ball under the coordinate system of the multi-axis motion system; r is the spherical radius of the fitting spherical equation;
in one embodiment, referring to fig. 4, acquiring the second coordinates includes:
step S21, adjusting the position of the camera of the vision system to make the camera be right above the symmetrical center of the four standard balls, and the standard balls are on the object focal plane of the camera;
in this step, the positions of the four standard balls in step S1 are kept still, and according to the Z-direction coordinates of the top points of the standard balls measured in step S1, the camera of the vision system is adjusted by the distance measurement module to be approximately right above the symmetrical centers of the arrangement of the four standard balls, so that the standard balls used for calibration are located on the object space imaging focal plane of the camera; specifically, the Z-direction height of the multi-axis operation system is adjusted through the top height value of the standard ball obtained by measuring through the distance measuring module, so that the standard ball is positioned on the object focal plane of the camera.
Step S22, controlling the camera to shoot to generate a standard ball image;
and step S23, determining the coordinates of the pixel coordinate system of the center of the target circle outline, wherein the target circle outline is the circle outline of the standard ball in the standard ball image. The center pixel coordinate is the pixel coordinate of the top point of the standard sphere under the visual system.
In this step, referring to fig. 5 and 6, fig. 5 is a standard sphere image, a in fig. 5 is a standard sphere image outline, B in fig. 6 is a standard sphere circle outline, O is a circle center position obtained by fitting according to the circle outline, a circle outline and a circle center schematic diagram obtained by resolving four standard spheres through an OpenCV hough circle detection algorithm, and a pixel coordinate system coordinate of the circle center position O of the standard sphere circle outline B in the image of 4 standard spheres can be obtained by detection through the hough circle detection algorithm in OpenCV.
In one embodiment, referring to fig. 7, determining a coordinate transformation relationship of a vision system coordinate system to a multi-axis motion system coordinate system from a first coordinate and a second coordinate comprises:
step S31, converting the second coordinate into a third coordinate according to the pixel physical size parameter of the camera, wherein the third coordinate is the coordinate of an image coordinate system of the vertex of the standard sphere under the visual system;
in this step, according to the physical size parameter of the pixel of the camera photosensor, i.e. the actual physical size of a pixel, 1pixel is dx mm in the x-axis direction, and 1pixel is dy mm in the y-axis direction, the coordinates of the pixel coordinate system can be transformed to the coordinates of the image coordinate system, where pixel represents the pixel unit of the pixel coordinate system, and mm represents the physical unit "mm" in the image coordinate system.
The coordinate transformation relationship from the pixel coordinate system to the image coordinate system is as follows:
Figure BDA0002526908720000101
wherein u and v are pixel coordinates of points in a pixel coordinate system; x and y are image coordinates of corresponding points in an image coordinate system; u. of0、v0The pixel coordinates of the image center point under the image coordinate system are obtained;
step S32, converting the third coordinate into a fourth coordinate according to the Z-direction coordinate in the first coordinate and the focal length parameter of the lens of the camera, wherein the fourth coordinate is the coordinate of the camera coordinate system of the top point of the standard sphere in the visual system;
according to the fact that the four standard balls are located at the same height, Z-direction coordinates of vertexes on the four standard balls under a multi-axis motion system coordinate system are obtained in step S1, the Z-direction coordinates of the vertexes on the four standard balls are substituted, and coordinates (two-dimensional coordinates) of an image coordinate system under the image coordinate system can be obtained and expanded into coordinates (three-dimensional coordinates) of a camera coordinate system;
according to the focal length parameter f of the camera lensx、fySubstituting the Z-direction coordinate Z of the vertex of the standard ball under the multi-axis motion system coordinate systemcAnd obtaining a coordinate transformation relation of transforming the image coordinate system to the three-dimensional camera coordinate system, wherein the transformation relation is as follows:
Figure BDA0002526908720000102
wherein x and y are image coordinates of points in an image coordinate system; (X)c,Yc,Zc) Coordinates of corresponding points in a camera coordinate system; f. ofx、fyThe focal length in the x direction and the y direction of the camera;
in the method, it can be known that, in the implementation process of the method, the relative spatial positions of the camera and the distance measurement module on the multi-axis motion system are fixed.
Step S33, determining a coordinate transformation relation from a camera coordinate system to a multi-axis motion system coordinate system according to the first coordinate and the fourth coordinate;
specifically, a coordinate transformation relationship from the camera coordinate system to the coordinate system of the multi-axis motion system is derived according to coordinate values (first coordinates) of the vertices on the four standard spheres in the coordinate system of the multi-axis motion system and coordinate values (fourth coordinates) of the vertices on the standard spheres in the camera coordinate system, and the transformation relationship is as follows:
Figure BDA0002526908720000111
wherein (X)c,Yc,Zc) Is a phase ofCoordinates of points under a machine coordinate system; (X)w,Yw,Zw) Coordinates of corresponding points in a coordinate system of the multi-axis motion system; r is a rotation matrix from a camera coordinate system to a multi-axis motion system coordinate system; t is a translation matrix from a camera coordinate system to a multi-axis motion system coordinate system;
and step S34, determining the coordinate transformation relation from the vision system coordinate system to the multi-axis motion system coordinate system according to the coordinate transformation relation from the camera coordinate system to the multi-axis motion system coordinate system.
In summary, the coordinate transformation relationship from the coordinate system of the vision system to the coordinate system of the multi-axis motion system is derived as follows:
Figure BDA0002526908720000112
wherein (X)w,Yw,Zw) Coordinates of corresponding points in the coordinate system of the multi-axis motion system are obtained; r is a rotation matrix from a camera coordinate system to a multi-axis motion system coordinate system; t is a translation matrix from a camera coordinate system to a multi-axis motion system coordinate system; f. ofxIs the x-direction focal length, f of the camerayThe focal length of the camera in the y direction is shown, Zc is the coordinate of the vertex of the standard sphere in the Z direction under the coordinate system of the multi-axis motion system, and dx and dy are parameters of the physical size of the camera pixel; u. of0、v0And u and v are pixel coordinates of points on the acquired picture of the vision system.
The coordinate (X) of the corresponding point of the points (u, v) on the picture collected by the vision system under the coordinate system of the multi-axis motion system can be calculated by the formula (7)w,Yw,Zw)。
Preferably, in addition to the circle outlines of the four standard spheres detected by the OpenCV hough circle detection algorithm, the circle outline coordinates of the four standard spheres can be detected by the outline detection algorithm, and the circle center coordinates of the circle outlines of the four standard spheres are solved by the least square fitting method.
Specifically, a circle equation expression for solving the center coordinates and the radii of the four standard spherical contours by using a least square fitting method is as follows:
f(x,y)=(x-x0)2+(y-y0)2=r2 (8)
wherein (x)0,y0) Is the coordinate of the center of a fitted circle equation; r is the radius of the fitted circle equation;
according to the least square method, the residual square sum of the fitting circle equation and the point on the actual image circle outline is required to be minimum, and the expression is as follows:
Figure BDA0002526908720000121
wherein E is the sum of the squares of the residuals, requiring E to be minimal; f (x)i,yi) Values of points on the image circle contour on a fitting circle equation f (x, y); r is the radius of the fitted circle equation; n is the total number of image points on a standard spherical image circle contour line;
the embodiment also discloses a system for calibrating a coordinate system of a vision system and a multi-axis motion system, which comprises a memory, a processor and a computer program stored in the memory and capable of running on the processor, wherein the processor executes the computer program to realize the method in any one of the above embodiments.
In the description herein, reference to the description of the terms "one embodiment/mode," "some embodiments/modes," "example," "specific example," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment/mode or example is included in at least one embodiment/mode or example of the application. In this specification, the schematic representations of the terms used above are not necessarily intended to be the same embodiment/mode or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments/modes or examples. Furthermore, the various embodiments/aspects or examples and features of the various embodiments/aspects or examples described in this specification can be combined and combined by one skilled in the art without conflicting therewith.
Furthermore, the terms "first", "second" and "first" are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include at least one such feature. In the description of the present application, "plurality" means at least two, e.g., two, three, etc., unless specifically limited otherwise.
It will be understood by those skilled in the art that the foregoing embodiments are merely for clarity of illustration of the disclosure and are not intended to limit the scope of the disclosure. Other variations or modifications may occur to those skilled in the art, based on the foregoing disclosure, and are still within the scope of the present disclosure.

Claims (10)

1. A coordinate system calibration method for a vision system and a multi-axis motion system is characterized by comprising the following steps:
acquiring a first coordinate, wherein the first coordinate is a coordinate of a vertex of a standard ball under the multi-axis motion system coordinate system;
acquiring a second coordinate, wherein the second coordinate is a pixel coordinate system coordinate of the vertex of the standard ball under the visual system;
and determining the coordinate transformation relation from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate.
2. The method according to claim 1, wherein there are four standard balls, and four standard balls are arranged according to a set condition;
the set condition is that four standard balls are symmetrically arranged at four corners below the multi-axis motion system, and the four standard balls are at the same height.
3. The method of claim 2, wherein the method comprises:
four standard balls are fixedly placed below the multi-axis motion system in a four-corner symmetrical mode;
the method comprises the steps of acquiring images of four standard balls through a camera of the vision system, and adjusting the distance and the position between the four standard balls according to the images of the four standard balls so that the four standard balls are located at four corner positions of the images.
4. The method of claim 2, wherein said obtaining first coordinates comprises:
controlling the distance measuring module to move above the four standard balls, and scanning the spherical surface profiles of the standard balls respectively to obtain the module coordinates of the distance measuring module under the multi-axis motion system and the vertical distance measured by the distance measuring module;
determining a spherical contour coordinate according to the module coordinate and the vertical distance, wherein the spherical contour coordinate is a coordinate of a standard spherical contour scatter set under a multi-axis motion system;
fitting a spherical equation according to the spherical contour coordinates;
and obtaining the coordinates of the vertex of the standard sphere under the multi-axis motion system coordinate system according to the fitted spherical equation.
5. The method of claim 2, wherein the obtaining second coordinates comprises:
adjusting a camera position of a vision system so that the camera is directly above a center of symmetry of the four standard spheres, and the standard spheres are on a camera object focal plane;
controlling the camera to shoot to generate a standard ball image;
and determining the coordinates of a pixel coordinate system of the center of a target circle, wherein the target circle is the circle of the standard ball in the standard ball image.
6. The method of claim 1, wherein determining a coordinate transformation relationship of a vision system coordinate system to a multi-axis motion system coordinate system from the first and second coordinates comprises:
converting the second coordinate into a third coordinate according to the pixel physical size parameter of the camera of the visual system, wherein the third coordinate is an image coordinate system coordinate of the vertex of the standard sphere under the visual system;
converting the third coordinate into a fourth coordinate according to a Z-direction coordinate in the first coordinate and a focal length parameter of a lens of the camera, wherein the fourth coordinate is a coordinate of a camera coordinate system of the vertex of the standard sphere under the visual system;
determining a coordinate transformation relation from a camera coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the fourth coordinate;
and determining the coordinate transformation relation from the coordinate system of the vision system to the coordinate system of the multi-axis motion system according to the coordinate transformation relation from the coordinate system of the camera to the coordinate system of the multi-axis motion system.
7. The method of claim 6, wherein said converting the third coordinate to a fourth coordinate comprises:
converting the third coordinate into a fourth coordinate according to the following formula;
Figure FDA0002526908710000021
wherein (x, y) is the image coordinate of the point in the image coordinate system, fxIs the x-direction focal length, f of the camerayIs the y-direction focal length of the camera (X)c,Yc,Zc) Is the coordinate of the corresponding point in the camera coordinate system.
8. The method of claim 6, wherein determining a coordinate transformation relationship of a camera coordinate system to the multi-axis motion system coordinate system from the first coordinate and the fourth coordinate comprises:
determining a coordinate transformation relation from a camera coordinate system to the multi-axis motion system coordinate system according to the following formula;
Figure FDA0002526908710000031
wherein (X)c,Yc,Zc) Coordinates of a point in the camera coordinate system; (X)w,Yw,Zw) Coordinates of corresponding points in the coordinate system of the multi-axis motion system are obtained; r is a rotation matrix from a camera coordinate system to a multi-axis motion system coordinate system; t is a translation matrix from a camera coordinate system to a multi-axis motion system coordinate system;
determining the coordinate transformation relation from the visual system coordinate system to the multi-axis motion system coordinate system according to the coordinate transformation relation from the camera coordinate system to the multi-axis motion system coordinate system, which comprises the following steps:
determining a coordinate transformation relation from a visual system coordinate system to a multi-axis motion system coordinate system according to the following formula;
Figure FDA0002526908710000032
wherein (X)w,Yw,Zw) Coordinates of corresponding points in the coordinate system of the multi-axis motion system are obtained; r is a rotation matrix from a camera coordinate system to a multi-axis motion system coordinate system; t is a translation matrix from a camera coordinate system to a multi-axis motion system coordinate system; f. ofxIs the x-direction focal length, f of the camerayThe y-direction focal length of the camera is defined, Zc is the Z-direction coordinate of the vertex of the standard sphere under the multi-axis motion system coordinate system, and dx and dy are parameters of the physical size of the camera pixel; u. of0、v0And u and v are pixel coordinates of points on the acquired picture of the vision system.
9. The method of claim 1, wherein prior to obtaining the second coordinates, further comprising: and calibrating the camera of the visual system by using a checkerboard calibration board to acquire a camera distortion parameter, a camera internal parameter matrix and a camera external parameter matrix.
10. A coordinate system calibration system of a vision system and a multi-axis motion system, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor implements the method according to any of claims 1 to 9 when executing the computer program.
CN202010507001.0A 2020-06-05 2020-06-05 Coordinate system calibration method and system for vision system and multi-axis motion system Pending CN112132903A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010507001.0A CN112132903A (en) 2020-06-05 2020-06-05 Coordinate system calibration method and system for vision system and multi-axis motion system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010507001.0A CN112132903A (en) 2020-06-05 2020-06-05 Coordinate system calibration method and system for vision system and multi-axis motion system

Publications (1)

Publication Number Publication Date
CN112132903A true CN112132903A (en) 2020-12-25

Family

ID=73851260

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010507001.0A Pending CN112132903A (en) 2020-06-05 2020-06-05 Coordinate system calibration method and system for vision system and multi-axis motion system

Country Status (1)

Country Link
CN (1) CN112132903A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115752293A (en) * 2022-11-22 2023-03-07 哈尔滨工业大学 Calibration method for aeroengine sealing labyrinth disc measuring system

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115752293A (en) * 2022-11-22 2023-03-07 哈尔滨工业大学 Calibration method for aeroengine sealing labyrinth disc measuring system
CN115752293B (en) * 2022-11-22 2023-11-14 哈尔滨工业大学 Calibration method of aero-engine sealing comb plate measuring system

Similar Documents

Publication Publication Date Title
CN107492127B (en) Light field camera parameter calibration method and device, storage medium and computer equipment
CN109454634B (en) Robot hand-eye calibration method based on plane image recognition
US8223208B2 (en) Device and method for calibrating an imaging device for generating three dimensional surface models of moving objects
CN110728715A (en) Camera angle self-adaptive adjusting method of intelligent inspection robot
Zhang et al. A robust and rapid camera calibration method by one captured image
CN112132908B (en) Camera external parameter calibration method and device based on intelligent detection technology
CN111862238B (en) Full-space monocular light pen type vision measurement method
CN109272555B (en) External parameter obtaining and calibrating method for RGB-D camera
CN110136204B (en) Sound film dome assembly system based on calibration of machine tool position of bilateral telecentric lens camera
CN112229323B (en) Six-degree-of-freedom measurement method of checkerboard cooperative target based on monocular vision of mobile phone and application of six-degree-of-freedom measurement method
Dekiff et al. Three-dimensional data acquisition by digital correlation of projected speckle patterns
CN115830103A (en) Monocular color-based transparent object positioning method and device and storage medium
CN110910506B (en) Three-dimensional reconstruction method and device based on normal detection, detection device and system
CN116740187A (en) Multi-camera combined calibration method without overlapping view fields
CN112132903A (en) Coordinate system calibration method and system for vision system and multi-axis motion system
CN116485915A (en) Laser auxiliary calibration device and application method thereof
CN111754584A (en) Remote large-field-of-view camera parameter calibration system and method
CN112562010B (en) Simplified imaging model with double telecentric lenses and calibration method thereof
CN114549659A (en) Camera calibration method based on quasi-three-dimensional target
CN115018923A (en) Method and system for detecting panoramic annular lens parameters
CN113483669A (en) Multi-sensor pose calibration method and device based on three-dimensional target
CN114589682A (en) Iteration method for automatic calibration of robot hand and eye
Tian et al. Improvement of camera calibration accuracy based on periodic arrangement characteristics of calibration target pattern
CN111833396B (en) Method and system for converting camera coordinate system of blood sampling device into world coordinate system
TWI837822B (en) Visual calibrating method for virtual tcp of robotic arm

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