Coordinate system calibration method and system for visual system and multi-axis motion system

Under the different coordinate systems of the vertex of the standard ball at the apex coordinates of the standard ball, it solves the problem of difficulty setting the transformation of the visual system and the coordinate system of the multi -axis motion system, realized the accurate coordinate transformation relationship, improved the accuracy of the blood collection operation operation. sex.

CN112132903BActive Publication Date: 2025-01-24HARBIN INST OF TECH
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202010507001.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-06-05
Publication Date
2025-01-24
Estimated Expiration
2040-06-05

AI Technical Summary

Technical Problem

In intelligent blood collection robots, the coordinate transformation between the coordinate system of the vision system and the coordinate system of the multi-axis motion system is difficult to accurately calibrate, especially because the visual system cannot directly detect the origin position under the coordinate system of each motion axis of the multi-axis motion system, resulting in The coordinate transformation relationship is difficult to determine.

Method used

By obtaining the coordinate system coordinate system under the coordinate system of the standard ball in the coordinate system of the multi -axis system, the coordinate transformation relationship between the visual system coordinate system to the multi -axis system coordinate system is determined. This method does not need to directly detect the original point position of each motion axis coordinate system of the multi -axis movement system under the visual system coordinate system.

Benefits of technology

The precise coordinate transformation relationship calibration from the vision system coordinate system to the multi-axis motion system coordinate system is realized, which improves the accuracy of the intelligent blood collection robot in detecting the blood collection puncture position and executing the blood collection needle puncture action.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN112132903B_ABST
    Figure CN112132903B_ABST
Patent Text Reader

Abstract

In order to solve the problem in the prior art that when the origin position in the coordinate system of each motion axis of the multi-axis motion system cannot be directly detected in the visual system coordinate system, the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system cannot be accurately solved, the present invention discloses a coordinate system calibration method for a visual system and a multi-axis motion system, including: obtaining a first coordinate, the first coordinate is the coordinate of the vertex of a standard sphere in the multi-axis motion system coordinate system; obtaining a second coordinate, the second coordinate is the pixel coordinate system coordinate of the vertex of the standard sphere in the visual system; determining the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate. The present application also discloses a corresponding system that can accurately solve the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of intelligent medical device robots and visual processing, and in particular to a coordinate system calibration method and system for a visual system and a multi-axis motion system. Background Art

[0002] The newly developed field of intelligent blood sampling robots basically uses a vascular vision system based on an infrared camera combined with a multi-axis motion system to detect the vascular blood sampling puncture position and execute the blood collection needle puncture action. In the above-mentioned intelligent blood sampling robot system, there are both an infrared camera vision system coordinate system and a multi-axis motion system spatial motion coordinate system. The intelligent blood sampling robot needs to control the multi-axis motion system to carry the blood collection needle to accurately move to the blood sampling puncture position point in the visual system coordinate system according to the blood sampling puncture position point obtained by the visual system. Among them, the intelligent blood sampling robot involves unifying the spatial coordinates of a certain point in the visual system coordinate system to the multi-axis motion system spatial coordinate system, which requires the use of complex coordinate system transformation to transform the visual system coordinate system into the multi-axis motion system spatial motion coordinate system. In addition, the visual system and the multi-axis motion system may have a large distance in the horizontal direction in terms of spatial position, and there may be a situation where the origin position in the coordinate system of each motion axis of the multi-axis motion system cannot be directly detected in the visual system coordinate system, which brings difficulties to the accurate solution of the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system. At the same time, it is difficult to accurately measure parameters such as the origin coordinate deviation and the orientation of each coordinate axis between the visual system coordinate system and the multi-axis motion system coordinate system. Therefore, it is often difficult to accurately calibrate the coordinate system transformation of the visual system and the multi-axis motion system in the intelligent blood collection robot. Summary of the invention

[0003] 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 visual system and a multi-axis motion system to accurately solve the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system.

[0004] In a first aspect of the present disclosure, a method for calibrating a coordinate system of a visual system and a multi-axis motion system includes: acquiring a first coordinate, the first coordinate being a coordinate of a vertex of a standard sphere in the coordinate system of the multi-axis motion system;

[0005] Acquire a second coordinate, where the second coordinate is a pixel coordinate system coordinate of the vertex of the standard sphere in the visual system;

[0006] A coordinate transformation relationship from a visual system coordinate system to a multi-axis motion system coordinate system is determined according to the first coordinate and the second coordinate.

[0007] Optionally, there are four standard balls, and the four standard balls are arranged according to set conditions;

[0008] The setting condition is that the four standard balls are arranged symmetrically at four corners below the multi-axis motion system, and the four standard balls are at the same height.

[0009] The optional method includes:

[0010] The four standard balls are fixed and placed symmetrically at the four corners under the multi-axis motion system;

[0011] Images of four standard balls are acquired by a camera of a visual system, and the distances and positions between the four standard balls are adjusted according to the images of the four standard balls, so that the four standard balls are located at four corners of the image.

[0012] Optionally, obtaining the first coordinate includes:

[0013] Control the distance measurement module to move above the four standard balls, and scan the spherical profiles of the standard balls respectively, to obtain the module coordinates of the distance measurement module under the multi-axis motion system and the vertical distance measured by the distance measurement module;

[0014] According to the module coordinates and the vertical distance, the spherical contour coordinates are determined, and the spherical contour coordinates are the coordinates of the spherical contour scatter point set of the standard ball under the multi-axis motion system.

[0015] Fitting a spherical equation according to the spherical contour coordinates;

[0016] The coordinates of the vertices of the standard sphere in the coordinate system of the multi-axis motion system are obtained according to the fitted spherical equation.

[0017] Optionally, obtaining the second coordinate includes:

[0018] Adjusting the position of a camera of the visual system so that the camera is located directly above the symmetry centers of the four standard spheres, and the standard spheres are located on the object focal plane of the camera;

[0019] Controlling the camera to shoot so as to generate a standard ball image;

[0020] The pixel coordinate system coordinates of the center of the target circle contour are determined, and the target circle contour is the circle contour of the standard sphere in the standard sphere image.

[0021] Optionally, determining a coordinate transformation relationship from a visual system coordinate system to a multi-axis motion system coordinate system according to the first coordinate and the second coordinate includes:

[0022] According to the pixel physical size parameter of the camera, the second coordinate is converted into a third coordinate, wherein the third coordinate is the image coordinate system coordinate of the vertex of the standard sphere in the visual system;

[0023] According to the Z-axis coordinate in the first coordinate and the focal length parameter of the camera lens, the third coordinate is converted into a fourth coordinate, where the fourth coordinate is the camera coordinate system coordinate of the vertex of the standard sphere in the visual system;

[0024] Determine a coordinate transformation relationship from a camera coordinate system to a coordinate system of the multi-axis motion system according to the first coordinate and the fourth coordinate;

[0025] According to the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system, the coordinate transformation relationship from the vision system coordinate system to the multi-axis motion system coordinate system is determined.

[0026] Optionally, converting the third coordinate into a fourth coordinate includes:

[0027] According to the following formula, the third coordinate is converted into a fourth coordinate;

[0028]

[0029] Where (x, y) is the image coordinate of the point in the image coordinate system, f x is the focal length of the camera in the x direction, f y is the camera's y-axis focal length, (X c ,Y c ,Z c ) are the coordinates of the corresponding point in the camera coordinate system.

[0030] Optionally, determining a coordinate transformation relationship from a camera coordinate system to a multi-axis motion system coordinate system according to the first coordinate and the fourth coordinate includes:

[0031] According to the following formula, the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system is determined;

[0032]

[0033] Where (X c ,Y c ,Z c ) is the coordinate of the point in the camera coordinate system; (X w ,Y w ,Z w ) are the coordinates of the corresponding points in the multi-axis motion system coordinate system; R is the rotation matrix from the camera coordinate system to the multi-axis motion system coordinate system; T is the translation matrix from the camera coordinate system to the multi-axis motion system coordinate system.

[0034] According to the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system, the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system is determined, including:

[0035] According to the following formula, determine the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system;

[0036]

[0037] Among them, (X w ,Y w ,Z w ) is the coordinate of the corresponding point in the multi-axis motion system coordinate system; R is the rotation matrix from the camera coordinate system to the multi-axis motion system coordinate system; T is the translation matrix from the camera coordinate system to the multi-axis motion system coordinate system; f x is the focal length of the camera in the x direction, f y is the Y focal length of the camera, Zc is the Z coordinate of the vertex of the standard sphere in the coordinate system of the multi-axis motion system, dx and dy are the physical size parameters of the camera pixel; u0 and v0 are the second coordinates, and u and v are the pixel coordinates of the points on the picture collected by the visual system.

[0038] Optionally, before obtaining the second coordinate, the following is also included:

[0039] The camera of the vision system is calibrated with a checkerboard calibration plate to obtain the camera distortion parameters, camera intrinsic parameter matrix and camera extrinsic parameter matrix.

[0040] In another aspect of the present disclosure, a coordinate system calibration system for a visual 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, wherein the processor implements any method described in the present disclosure when executing the computer program.

[0041] One advantage of the present disclosure is that the calibration method and system of the present disclosure can accurately solve the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system without directly detecting the origin position in the coordinate system of each motion axis of the multi-axis motion system in the visual system coordinate system. BRIEF DESCRIPTION OF THE DRAWINGS

[0042] The accompanying drawings illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure. These drawings are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification.

[0043] Figure 1 A schematic diagram of the structure of the visual system and the multi-axis motion system in the embodiment of the present disclosure;

[0044] Figure 2 is a flow chart of a coordinate system calibration method of a visual system and a multi-axis motion system in an embodiment of the present disclosure;

[0045] Figure 3is a flow chart of obtaining the first coordinate in an embodiment of the present disclosure;

[0046] Figure 4 is a flow chart of obtaining the second coordinate in an embodiment of the present disclosure;

[0047] Figure 5 is a standard ball image in an embodiment of the present disclosure;

[0048] Figure 6 Schematic diagram of the circle contours and center points of four standard balls in the embodiment of the present disclosure obtained by solving the circle detection algorithm of OpenCV;

[0049] Figure 7 It is another flow chart of the coordinate system calibration method of the visual system and the multi-axis motion system in the embodiment of the present disclosure. DETAILED DESCRIPTION

[0050] The present disclosure is further described in detail below in conjunction with the accompanying drawings and implementations. It is understood that the specific implementations described herein are only used to explain the relevant content, rather than to limit the present disclosure. It should also be noted that, for ease of description, only the parts related to the present disclosure are shown in the accompanying drawings.

[0051] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in the present disclosure may be combined with each other. The present disclosure will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.

[0052] See also Figure 1 , Figure 1 It is a structural diagram of a visual system and a multi-axis motion system; it includes a multi-axis motion system 1, a distance measurement module 2, a vertical distance direction 3 measured by the distance measurement module, and a visual system 4; the camera on the visual system 4 and the distance measurement module 2 are fixed to the multi-axis motion system, and the multi-axis motion system includes an X-axis, a Y-axis, and a Z-axis. It should be noted that Figure 1 The structural diagram in the figure is for the purpose of facilitating the understanding of the technical solution of the present disclosure, but does not limit the technical solution of the present application to be applicable only to Figure 1 The structure in .

[0053] See also Figure 2 A method for calibrating a coordinate system of a visual system and a multi-axis motion system, comprising:

[0054] Step S1, obtaining a first coordinate, where the first coordinate is the coordinate of the vertex of the standard sphere in the multi-axis motion system coordinate system;

[0055] Step S2, obtaining a second coordinate, where the second coordinate is the pixel coordinate system coordinate of the vertex of the standard sphere in the visual system;

[0056] Step S3, determining a coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate.

[0057] In the calibration method disclosed in the present invention, the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system is determined based on the coordinates of the vertices of the standard sphere in the multi-axis motion system coordinate system and the pixel coordinate system coordinates of the vertices of the standard sphere in the visual system.

[0058] One advantage of the present disclosure is that the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system can be accurately solved without directly detecting the origin position of each motion axis coordinate system of the multi-axis motion system in the visual system coordinate system.

[0059] Another advantage of the present disclosure is that the present disclosure uses the vertex coordinates of the standard sphere to determine the coordinate transformation relationship between the coordinate systems of the visual system and the multi-axis motion system; based on the spherical characteristics of the standard sphere, the camera can quickly determine the center position of the standard sphere according to the center contour of the standard sphere, and the distance measurement module can scan the standard sphere in an array above the standard sphere, and the coordinates of the discrete points of the standard sphere contour in the multi-axis motion system are obtained according to the distance detected by the distance measurement 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 vertices of the standard sphere in the multi-axis motion system coordinate system can be quickly and accurately obtained according to the spherical equation.

[0060] In one embodiment, before step S2, the method further includes:

[0061] The camera of the visual system is calibrated with a checkerboard calibration plate to obtain camera distortion parameters, camera intrinsic parameter matrix and camera extrinsic parameter matrix, wherein when the camera takes an image, the image is corrected according to the camera intrinsic parameter matrix.

[0062] Specifically, the checkerboard calibration plate is placed on a horizontal plane below the camera of the visual system. The multi-axis motion system module cooperates with the distance measurement module to measure the vertical distance between the camera and the checkerboard calibration plate to adjust the camera working distance so that the checkerboard calibration plate is on the imaging focal plane of the camera object. Then the camera maintains the current posture. Under the premise of ensuring that the camera captures all features of the checkerboard calibration plate for complete imaging, the checkerboard calibration plate is translated and rotated on the imaging focal plane to obtain images of the checkerboard calibration plate at various positions within the camera field of view. According to the above requirements, no less than 10 images are collected to correct camera distortion and obtain camera distortion parameters and intrinsic and extrinsic parameter matrices. .

[0063] After that, the corner points in each checkerboard calibration plate image are extracted and the corner point positions are extracted with sub-pixel accuracy using the cornerSubPix() function in OpenCV. Then, the camera is calibrated using the calibrateCamera function in OpenCV. The intrinsic and extrinsic parameter matrices of the camera are obtained. The intrinsic parameter matrix of the camera is f x 、f y represents the focal length, u0 and ν0 represent the intersection of the camera optical axis and the image plane. According to the obtained camera intrinsic parameter matrix and camera distortion parameters, the image captured by the camera is distorted and corrected. The original images captured subsequently are corrected according to the above intrinsic parameter matrix and camera distortion parameters.

[0064] The above-mentioned OpenCV is a cross-platform computer vision library released under the BSD license (open source).

[0065] In one embodiment, there are four standard balls, and the four standard balls are arranged according to set conditions;

[0066] The setting condition is that the four standard balls are arranged symmetrically at the four corners below the multi-axis motion system, and the four standard balls are at the same height. It can be known that the standard balls are used to calibrate the coordinate system, and the specifications of the four standard balls are the same.

[0067] It should be known that when there are four standard balls, the Z-axis coordinate of the vertex of the standard ball in the multi-axis motion system coordinate system refers to the average value of the Z-axis coordinates of the vertices of the four standard balls in the multi-axis motion system coordinate system.

[0068] Specifically, four standard balls used for calibration can be fixedly placed under the multi-axis motion system in a symmetrical manner at four corners, and the four standard balls are at the same height.

[0069] In one embodiment, see Figure 3 , obtaining the first coordinate includes:

[0070] Step S11, controlling the distance measurement module to move above four standard balls, and scanning the spherical profiles of the standard balls respectively, to obtain the module coordinates of the distance measurement module under the multi-axis motion system and the vertical distance measured by the distance measurement module;

[0071] Step S12, according to the module coordinates and the vertical distance, determine the spherical contour coordinates, the spherical contour coordinates are the coordinates of the spherical contour scatter point set of the standard ball under the multi-axis motion system. In this disclosure, the coordinates of the i-th scattered point in the spherical contour coordinates are expressed as (X i ,Y i ,Z i )express;

[0072] Step S13, fitting the spherical equation according to the spherical contour coordinates;

[0073] Among them, the spherical equation can be fitted according to the least squares method;

[0074] Step S14, obtaining the coordinates of the vertices of the standard sphere in the multi-axis motion system coordinate system according to the fitted spherical equation. The coordinates of the vertices of the standard sphere in the multi-axis motion system coordinate system, wherein in the present disclosure, the vertex coordinates of the standard sphere p1, the standard sphere p2, the standard sphere p3 and the standard sphere p4 are expressed as (X p1,2,3,4 ,Y p1,2,3,4 ,Z p1,2,3,4 )express;

[0075] In one embodiment, the method comprises:

[0076] The four standard balls are fixedly arranged in a four-corner symmetrical manner and placed below the multi-axis motion system;

[0077] Images of the four standard balls are acquired by the camera of the visual system to adjust the distance and position between the four standard balls according to the images of the four standard balls, so that in the standard ball images captured by the camera of the visual system in the subsequent step S2, the four standard balls are located at the four corners of the image.

[0078] In one embodiment, the spherical equation model on the standard sphere in the multi-axis motion system coordinate system is obtained by fitting according to the least square method, and its expression is as follows:

[0079] f(X,Y,Z)=(X-X0) 2 +(Y-Y0) 2 +(Z-Z0) 2 =R 2 (1)

[0080] Where (X0, Y0, Z0) is the coordinate of the center of the sphere fitting the spherical equation; R is the radius of the sphere fitting the spherical equation;

[0081] According to the least squares method, the sum of squares of the residuals between the fitted spherical equation and the actual points is required to be minimal, and its expression is as follows:

[0082]

[0083] Where E is the residual sum of squares, which is required to be the minimum; f(X i ,Y i ,Z i ) is the value of the i-th discrete point on the spherical surface of the standard sphere collected on the fitted spherical equation f(X,Y,Z); R is the radius of the sphere of the fitted spherical equation; N is the total number of discrete points on the spherical surface of the standard sphere collected;

[0084] In one embodiment, the coordinate values ​​(X pi ,Y pi ,Z pi ) According to the spherical equation obtained by least square method in the multi-axis motion system coordinate system, the spherical center coordinate (X 0i ,Y 0i ,Z 0i ) is obtained by adding the spherical radius deviation of the fitting spherical equation in the Z direction, and its expression is as follows:

[0085]

[0086] Where (X 0i ,Y 0i ,Z 0i ) is the coordinate of the center of the sphere in the multi-axis motion system coordinate system; (X pi ,Y pi ,Z pi ) is the coordinate value of the vertex on the standard sphere in the coordinate system of the multi-axis motion system; R is the radius of the sphere fitting the spherical equation;

[0087] In one embodiment, see Figure 4 , obtaining the second coordinate includes:

[0088] Step S21, adjusting the camera position of the visual system so that the camera is directly above the symmetry center of the four standard spheres, and the standard spheres are on the object focal plane of the camera;

[0089] In this step, the positions of the four standard balls in step S1 are kept unchanged, and according to the Z-axis coordinates of the vertices on the standard balls measured in step S1, the distance measurement module is used to adjust the camera of the visual system so that it is roughly above the symmetry center of the four standard balls, so that the standard balls used for calibration are on the object imaging focal plane of the camera; specifically, the Z-axis height of the multi-axis motion system is adjusted according to the vertex height value of the standard balls measured by the distance measurement module, so that the standard balls are on the object focal plane of the camera.

[0090] Step S22, controlling the camera to shoot to generate a standard ball image;

[0091] Step S23, determining the pixel coordinate system coordinates of the center of the target circle contour, the target circle contour is the circle contour of the standard sphere in the standard sphere image, and the pixel coordinates of the center are the pixel coordinates of the vertex of the standard sphere in the visual system.

[0092] In this step, see Figure 5 and Figure 6 , Figure 5 is the standard sphere image, Figure 5 A in the figure is the outline of the standard ball image. Figure 6In the figure, B is the standard sphere contour line, O is the center position obtained by fitting the circle contour line, and the circle contour and center diagram of the four standard spheres are obtained by solving the circle contour line by the OpenCV Hough circle detection algorithm. The Hough circle detection algorithm in OpenCV can be used to detect the pixel coordinate system coordinates of the center position O of the standard sphere circle contour line B in the image.

[0093] In one embodiment, see Figure 7 , determining the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate, including:

[0094] Step S31, converting the second coordinate into a third coordinate according to the pixel physical size parameter of the camera, where the third coordinate is the image coordinate system coordinate of the vertex of the standard sphere in the visual system;

[0095] In this step, according to the pixel physical size parameters of the camera's photosensor, that is, the actual physical size of a pixel, 1 pixel = dx mm in the x-axis direction and 1 pixel = dy mm in the y-axis direction, the pixel coordinate system coordinates can be transformed into the image coordinate system coordinates, where pixel represents the pixel unit of the pixel coordinate system and mm represents the physical unit "millimeter" in the image coordinate system.

[0096] The coordinate transformation relationship from pixel coordinate system to image coordinate system is:

[0097]

[0098] Where u and v are the pixel coordinates of the point in the pixel coordinate system; x and y are the image coordinates of the corresponding point in the image coordinate system; u0 and v0 are the pixel coordinates of the center point of the image in the image coordinate system;

[0099] Step S32, converting the third coordinate into a fourth coordinate according to the Z-axis coordinate in the first coordinate and the focal length parameter of the camera lens, where the fourth coordinate is the camera coordinate system coordinate of the vertex of the standard sphere in the visual system;

[0100] According to the four standard balls being at the same height, and the Z-direction coordinates of the vertices on the four standard balls in the multi-axis motion system coordinate system are obtained in step S1, the Z-direction coordinates of the vertices on the four standard balls are substituted into the image coordinate system coordinates (two-dimensional coordinates) in the image coordinate system, which are expanded into the camera coordinate system coordinates (three-dimensional coordinates);

[0101] According to the focal length parameter f of the camera lens x 、f y , substitute the Z coordinate Z of the vertex of the standard sphere in the coordinate system of the multi-axis motion system c , we get the coordinate transformation relationship from the image coordinate system to the three-dimensional camera coordinate system, and the transformation relationship is:

[0102]

[0103] Where x and y are the image coordinates of the point in the image coordinate system; (X c ,Y c ,Z c ) is the coordinate of the corresponding point in the camera coordinate system; f x 、f y is the x and y focal length of the camera;

[0104] It can be known that during the execution of the method of the present application, the relative spatial positions of the camera and the distance measurement module on the multi-axis motion system remain fixed.

[0105] Step S33, 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;

[0106] Specifically, according to the coordinate values ​​of the vertices on the four standard spheres in the multi-axis motion system coordinate system (first coordinates) and the coordinate values ​​of the vertices on the standard sphere in the camera coordinate system (fourth coordinates), the coordinate transformation relationship from the camera coordinate system to the coordinate system of the multi-axis motion system is derived, and the transformation relationship is:

[0107]

[0108] Where (X c ,Y c ,Z c ) is the coordinate of the point in the camera coordinate system; (X w ,Y w ,Z w ) is the coordinate of the corresponding point in the multi-axis motion system coordinate system; R is the rotation matrix from the camera coordinate system to the multi-axis motion system coordinate system; T is the translation matrix from the camera coordinate system to the multi-axis motion system coordinate system;

[0109] Step S34, determining the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system according to the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system.

[0110] In summary, the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system is derived as follows:

[0111]

[0112] Among them, (X w ,Y w ,Z w) is the coordinate of the corresponding point in the multi-axis motion system coordinate system; R is the rotation matrix from the camera coordinate system to the multi-axis motion system coordinate system; T is the translation matrix from the camera coordinate system to the multi-axis motion system coordinate system; f x is the focal length of the camera in the x direction, f y is the Y focal length of the camera, Zc is the Z coordinate of the vertex of the standard sphere in the multi-axis motion system coordinate system, dx and dy are the physical size parameters of the camera pixel; u0 and v0 are the second coordinates, and u and v are the pixel coordinates of the points on the picture collected by the visual system.

[0113] The coordinates (X) of the corresponding points (u, v) on the image captured by the visual system in the multi-axis motion system coordinate system can be calculated by formula (7). w ,Y w ,Z w ).

[0114] Preferably, in addition to using the OpenCV Hough circle detection algorithm to detect the circular contours of the four standard spheres, a contour detection algorithm can also be used to detect the circular contour coordinates of the four standard spheres, and the least squares fitting method can be used to solve the center coordinates of the circular contours of the four standard spheres.

[0115] Specifically, the circle equation expressions of the center coordinates and radius of the four standard spherical circle contours are solved using the least squares fitting method as follows:

[0116] f(x,y)=(x-x0) 2 +(y-y0) 2 =r 2 (8)

[0117] Where (x0, y0) is the coordinate of the center of the fitted circle equation; r is the radius of the fitted circle equation;

[0118] According to the least squares method, the residual sum of squares between the fitted circle equation and the points on the actual image circle contour is required to be minimal, and its expression is as follows:

[0119]

[0120] Where E is the residual sum of squares, which is required to be the minimum; f(x i ,y i ) is the value of a point on the image circle contour on the fitted circle equation f(x,y); r is the radius of the fitted circle equation; n is the total number of image points on the circle contour line of a standard sphere image;

[0121] This embodiment also discloses a calibration system for the coordinate systems of a visual system and a multi-axis motion system, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements a method as described in any one of the above embodiments when executing the computer program.

[0122] In the description of this specification, the description with reference to the terms "one embodiment / method", "some embodiments / methods", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment / method or example are included in at least one embodiment / method or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment / method or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments / methods or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments / methods or examples described in this specification and the features of the different embodiments / methods or examples, unless they are contradictory.

[0123] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In the description of this application, the meaning of "plurality" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.

[0124] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. For those skilled in the art, other changes or modifications may be made based on the above disclosure, and these changes or modifications are still within the scope of the present disclosure.

Claims

1. A coordinate system calibration method for a visual system and a multi-axis motion system, characterized in that: include: Acquire a first coordinate, where the first coordinate is a coordinate of a vertex of a standard sphere in the coordinate system of the multi-axis motion system; Acquire a second coordinate, where the second coordinate is a pixel coordinate system coordinate of the vertex of the standard sphere in the visual system; Determine a coordinate transformation relationship from a visual system coordinate system to a multi-axis motion system coordinate system according to the first coordinate and the second coordinate; Wherein, obtaining the first coordinate comprises: Control the distance measurement module to move above the four standard balls, and scan the spherical profiles of the standard balls respectively, to obtain the module coordinates of the distance measurement module under the multi-axis motion system and the vertical distance measured by the distance measurement module; Determine spherical contour coordinates according to the module coordinates and the vertical distance, wherein the spherical contour coordinates are coordinates of a spherical contour scatter point set of a standard ball under a multi-axis motion system; Fitting a spherical equation according to the spherical contour coordinates; Obtaining coordinates of the vertices of the standard sphere in the coordinate system of the multi-axis motion system according to the fitted spherical equation; The obtaining of the second coordinate comprises: Adjusting the position of a camera of the visual system so that the camera is located directly above the symmetry centers of the four standard spheres, and the standard spheres are located on the object focal plane of the camera; Controlling the camera to shoot so as to generate a standard ball image; Determine the pixel coordinate system coordinates of the center of the target circle contour, wherein the target circle contour is the circle contour of the standard sphere in the standard sphere image; The step of determining the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system according to the first coordinate and the second coordinate includes: According to the pixel physical size parameter of the camera of the visual system, the second coordinate is converted into a third coordinate, wherein the third coordinate is the image coordinate system coordinate of the vertex of the standard sphere under the visual system; According to the Z-axis coordinate in the first coordinate and the focal length parameter of the camera lens, the third coordinate is converted into a fourth coordinate, where the fourth coordinate is the camera coordinate system coordinate of the vertex of the standard sphere in the visual system; Determine a coordinate transformation relationship from a camera coordinate system to a coordinate system of the multi-axis motion system according to the first coordinate and the fourth coordinate; According to the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system, the coordinate transformation relationship from the vision system coordinate system to the multi-axis motion system coordinate system is determined.

2. The method according to claim 1, characterized in that There are four standard balls, and the four standard balls are arranged according to set conditions; The setting condition is that the 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 according to claim 2, characterized in that The method comprises: The four standard balls are fixedly placed symmetrically at the four corners below the multi-axis motion system; Images of four standard balls are acquired by the camera of the visual system, and the distance and position between the four standard balls are adjusted according to the images of the four standard balls, so that the four standard balls are located at four corners of the image.

4. The method according to claim 1, characterized in that The converting the third coordinate into a fourth coordinate comprises: According to the following formula, the third coordinate is converted into a fourth coordinate; Where (x, y) is the image coordinate of the point in the image coordinate system, f x is the focal length of the camera in the x direction, f y is the camera's y-axis focal length, (X c ,Y c ,Z c ) are the coordinates of the corresponding point in the camera coordinate system.

5. The method according to claim 1, characterized in that Determining a coordinate transformation relationship from a camera coordinate system to a multi-axis motion system coordinate system according to the first coordinate and the fourth coordinate includes: According to the following formula, the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system is determined; Among them, (X c ,Y c ,Z c ) is the coordinate of the point in the camera coordinate system; (X w ,Y w ,Z w ) is the coordinate of the corresponding point in the multi-axis motion system coordinate system; R is the rotation matrix from the camera coordinate system to the multi-axis motion system coordinate system; T is the translation matrix from the camera coordinate system to the multi-axis motion system coordinate system; According to the coordinate transformation relationship from the camera coordinate system to the multi-axis motion system coordinate system, the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system is determined, including: According to the following formula, determine the coordinate transformation relationship from the visual system coordinate system to the multi-axis motion system coordinate system; Among them, (X w ,Y w ,Z w ) is the coordinate of the corresponding point in the multi-axis motion system coordinate system; R is the rotation matrix from the camera coordinate system to the multi-axis motion system coordinate system; T is the translation matrix from the camera coordinate system to the multi-axis motion system coordinate system; f x is the focal length of the camera in the x direction, f y is the camera's y-axis focal length, Z c is the Z coordinate of the vertex of the standard sphere in the coordinate system of the multi-axis motion system, dx and dy are the physical size parameters of the camera pixel; u0 and v0 are the second coordinates, and u and v are the pixel coordinates of the point on the picture collected by the visual system.

6. The method according to claim 1, characterized in that Before obtaining the second coordinate, the method further includes: calibrating the camera of the visual system with a chessboard calibration plate to obtain camera distortion parameters, a camera intrinsic parameter matrix, and a camera extrinsic parameter matrix.

7. A coordinate system calibration system for a visual 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: When the processor executes the computer program, the method according to any one of claims 1 to 6 is implemented.

Citation Information

Patent Citations

  • Robot hand eye calibration method and device based on standard ball

    CN108582076A