An external-axis-based mapping calibration method and system
By installing external axes on the camera and using external axes coordinates and mechanical coordinates to generate a mapping matrix, the problems of low calibration efficiency and insufficient accuracy in the prior art are solved, and efficient and accurate calibration is achieved when the camera moves, and is suitable for robotics, medical imaging and augmented reality technologies.
Patent Information
- Application Number
- CN202311229396.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-22
- Publication Date
- 2025-07-22
- Estimated Expiration
- 2043-09-22
AI Technical Summary
Existing inter-device mapping calibration methods are inefficient and prone to operational errors, and cannot guarantee the accuracy of calibration, especially in robotics, medical imaging and augmented reality technologies.
By installing the camera on an independent external axis, using external axis coordinates and fixed mechanical coordinates to generate a mapping matrix, the camera does not need to be recalibrated when moving, and the external axis mapping matrix is used to obtain the mechanical coordinates of the image at any position in the external axis.
It improves calibration efficiency and ensures calibration accuracy. It is suitable for inter-device mapping calibration in robotics, medical imaging and augmented reality technology.
Smart Images

Figure CN117291993B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of computer vision, and particularly relates to a mapping calibration method and system based on an external axis. Background Art
[0002] With the development of machine vision, augmented reality, and robotics, high-precision mapping calibration between devices has become crucial. In today's industrial, medical, and entertainment fields, accurate mapping calibration between devices has become a core requirement for many key applications. For example, the application of robotics in precision manufacturing requires ensuring an accurate spatial relationship between the end of the robotic arm and the vision system; surgical robots in the field of medical imaging need to achieve seamless mapping between images and actual surgical scenes to ensure that doctors can perform surgeries accurately; augmented reality technology provides users with an interactive experience between the real and virtual worlds, but this requires precise calibration between cameras, trackers, and computer-generated images. Currently, existing calibration methods rely on complex device configurations, and each time the camera moves, recalibration is required, which is not only inefficient but also prone to operation errors, affecting the accuracy of calibration. Summary of the Invention
[0003] To solve the above problems existing in the prior art, the present invention provides a mapping calibration method and system based on an external axis. By mounting the camera on an independent axis and having the camera move with the axis, after calibration is completed, when the camera moves, recalibration is not required, and the calibration efficiency is effectively improved.
[0004] The object of the present invention can be achieved by the following technical solutions:
[0005] A mapping calibration method based on an external axis, comprising the following steps:
[0006] S1: Preset external axis coordinates, and obtain a fixed mapping matrix through fixed camera calibration. The external axis coordinates include a first external axis coordinate, a second external axis coordinate, and a third external axis coordinate;
[0007] S2: Obtain fixed mechanical coordinates of the camera center coordinates through the fixed mapping matrix. The fixed mechanical coordinates include a first fixed mechanical coordinate, a second fixed mechanical coordinate, and a third fixed mechanical coordinate;
[0008] S3: Obtain an external axis mapping matrix according to the external axis coordinates and the fixed mechanical coordinates;
[0009] S4: Obtain the initial fixed mechanical coordinates by applying any image coordinate to the fixed mapping matrix, obtain the initial external axis mechanical coordinates by applying any external axis coordinate to the external axis mapping matrix, and obtain the external axis mechanical coordinates of any image at any external axis coordinate based on the fixed mechanical coordinates, the initial fixed mechanical coordinates, and the initial external axis mechanical coordinates.
[0010] Preferably, step S1 specifically includes the following steps:
[0011] S101: Preset the external axis coordinates, and obtain the manipulator coordinates and the image coordinates corresponding to the manipulator coordinates according to the external axis coordinates;
[0012] S102: Substitute the manipulator coordinates and the image coordinates into the matrix mapping formula to obtain the corresponding matrix of the manipulator coordinates and the image coordinates;
[0013] S103: Obtain the fixed mapping matrix by applying Cramer's rule to the corresponding matrix;
[0014] S104: Repeat steps S101 to S103 to obtain the first fixed mapping matrix corresponding to the first external axis coordinates, the second fixed mapping matrix corresponding to the second external axis coordinates, and the third fixed mapping matrix corresponding to the third external axis coordinates, respectively.
[0015] Preferably, step S2 specifically includes the following steps:
[0016] Obtain the first fixed mechanical coordinates by applying the camera center coordinates to the first fixed mapping matrix;
[0017] Obtain the second fixed mechanical coordinates by applying the camera center coordinates to the second fixed mapping matrix;
[0018] Obtain the third fixed mechanical coordinates by applying the camera center coordinates to the third fixed mapping matrix.
[0019] Preferably, step S3 specifically includes the following steps:
[0020] Set the external axis coordinates and the fixed mechanical coordinates as (E xi , E yi ) and (X Di , Y Di ), respectively;
[0021] Represent the external axis coordinates in matrix form as Represent the fixed mechanical coordinates in matrix form as
[0022] Substitute the external axis coordinates and the fixed mechanical coordinates into the matrix mapping formula to obtain the external axis mapping matrix. The formula is as follows:
[0023]
[0024] where, is the external axis mapping matrix, and Z is the unit row vector.
[0025] Preferably, step S4 specifically includes the following steps:
[0026] Preset any image coordinate, and obtain the initial fixed mechanical coordinates (X D4 , Y D4 ) according to the any image coordinate through the fixed mapping matrix.
[0027] Preset any external axis coordinate, and obtain the initial external axis mechanical coordinates (X D5 , Y D5 ) according to the any external axis coordinate through the external axis mapping matrix;
[0028] Calculate the actual coordinates of the external axis mechanical coordinates according to the initial external axis mechanical coordinates. The calculation formula is:
[0029]
[0030] where, D is the vector form of the actual coordinates of the external axis mechanical coordinates, (X Di , Y Di ) are the fixed mechanical coordinates. When the any image coordinate obtains the initial fixed mechanical coordinates through the first fixed mapping matrix, i = 1; when the any image coordinate obtains the initial fixed mechanical coordinates through the second fixed mapping matrix, i = 2; when the any image coordinate obtains the initial fixed mechanical coordinates through the third fixed mapping matrix, i = 3;
[0031] Calculate the external axis mechanical coordinates of any image on any external axis coordinate according to the actual distance of the external axis mechanical coordinates. The calculation formula is:
[0032]
[0033] where, L is the vector form of the external axis mechanical coordinates.
[0034] An external axis mapping calibration system includes an external single axis, a camera, a device, a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-mentioned external axis mapping calibration method is implemented.
[0035] The beneficial effects of the present invention are as follows:
[0036] (1) An external axis mapping matrix is obtained based on the external axis coordinates and the fixed mechanical coordinates, realizing the acquisition of mechanical coordinates for image coordinates under any external axis coordinates. When the camera moves on the external axis, recalibration is not required, improving the calibration efficiency.
[0037] (2) The external axis mechanical coordinates of any image at any position on the external axis are obtained through the external axis mapping matrix, ensuring the accuracy of calibration. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] For the convenience of those skilled in the art to understand, the present invention will be further described below with reference to the accompanying drawings.
[0039] Figure 1 It is a schematic flow chart of the method of the present invention;
[0040] Figure 2 It is a front view showing the orientation of the space coordinate system related to the present invention;
[0041] Figure 3 It is a top view showing the orientation of the space coordinate system related to the present invention.
[0042] MAIN ELEMENT SYMBOL DESCRIPTION:
[0043] In the figure: 1, camera; 2, external axis; 3, equipment base; 4, Z-axis direction of the space coordinate system; 5, Y-axis direction of the space coordinate system; 6, calibration plate; 7, X-axis direction of the space coordinate system. DETAILED DESCRIPTION OF THE INVENTION
[0044] To further elaborate on the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the following, in conjunction with the accompanying drawings and preferred embodiments, details the specific implementation manners, structures, features, and effects according to the present invention.
[0045] It should be noted that, as Figure 2 and Figure 3 shown, in order to describe the positions and directions of the external axis 2, camera 1, and equipment 3 in space, the origin of the coordinate system involved in the present invention is located at the center of the equipment base 3, and all spatial position descriptions are based on the relative positions with respect to this origin. The X-axis of the coordinate system involved in the present invention starts from the origin of the coordinate system and points to the front of the equipment, parallel to the base; the Y-axis of the coordinate system involved in the present invention starts from the origin of the coordinate system and points to the right side of the equipment, parallel to the base; the Z-axis of the coordinate system involved in the present invention starts from the origin of the coordinate system and is perpendicular downward, perpendicular to the ground; the present invention uses a right-handed Cartesian coordinate system, that is, when the thumb, index finger, and middle finger of the right hand point to the X, Y, and Z axes respectively, the directions of the three fingers coincide with the directions of the three axes of this coordinate system, and the unit length of each axis in the coordinate system is 1 millimeter.
[0046] Please refer to Figure 1 , a mapping calibration method based on an external axis, comprising the following steps:
[0047] S1: Preset external axis coordinates, and obtain a fixed mapping matrix through fixed camera calibration. The external axis coordinates include a first external axis coordinate, a second external axis coordinate, and a third external axis coordinate;
[0048] S2: Obtain fixed mechanical coordinates by passing the camera center coordinates through the fixed mapping matrix. The fixed mechanical coordinates include a first fixed mechanical coordinate, a second fixed mechanical coordinate, and a third fixed mechanical coordinate;
[0049] S3: Obtain an external axis mapping matrix based on the external axis coordinates and the fixed mechanical coordinates;
[0050] S4: Obtain initial fixed mechanical coordinates by passing any image coordinates through the fixed mapping matrix, obtain initial external axis mechanical coordinates by passing any external axis coordinates through the external axis mapping matrix, and obtain the external axis mechanical coordinates of any image on any external axis coordinate through the fixed mechanical coordinates, the initial fixed mechanical coordinates, and the initial external axis mechanical coordinates.
[0051] Step S1 specifically includes the following steps:
[0052] S101: Preset external axis coordinates, and obtain manipulator coordinates and the image coordinates corresponding to the manipulator coordinates according to the external axis coordinates;
[0053] S102: Substitute the manipulator coordinates and the image coordinates into a matrix mapping formula to obtain a corresponding matrix of the manipulator coordinates and the image coordinates;
[0054] S103: Obtain a fixed mapping matrix by passing the corresponding matrix through Cramer's rule;
[0055] S104: Repeat steps S101 to S103 to obtain a first fixed mapping matrix corresponding to the first external axis coordinate, a second fixed mapping matrix corresponding to the second external axis coordinate, and a third fixed mapping matrix corresponding to the third external axis coordinate respectively.
[0056] Step S2 specifically includes the following steps:
[0057] Obtain the first fixed mechanical coordinate by passing the camera center coordinates through the first fixed mapping matrix;
[0058] Obtain the second fixed mechanical coordinate by passing the camera center coordinates through the second fixed mapping matrix;
[0059] Obtain the third fixed mechanical coordinates from the camera center coordinates through the third fixed mapping matrix.
[0060] Step S3 specifically includes the following steps:
[0061] Set the external axis coordinates and the fixed mechanical coordinates as (E xi , E yi ) and (X Di , Y Di );
[0062] Represent the external axis coordinates in matrix form as Represent the fixed mechanical coordinates in matrix form as
[0063] Substitute the external axis coordinates and the fixed mechanical coordinates into the matrix mapping formula to obtain the external axis mapping matrix. The formula is as follows:
[0064]
[0065] Where is the external axis mapping matrix, and Z is the unit row vector.
[0066] Step S4 specifically includes the following steps:
[0067] Preset any image coordinates, and obtain the initial fixed mechanical coordinates (X D4 , Y D4 ) from the any image coordinates through the fixed mapping matrix;
[0068] Preset any external axis coordinates, and obtain the initial external axis mechanical coordinates (X D5 , Y D5 ) from the any external axis coordinates through the external axis mapping matrix;
[0069] Calculate the actual coordinates of the external axis mechanical coordinates based on the initial external axis mechanical coordinates. The calculation formula is:
[0070]
[0071] Where D is the vector form of the actual coordinates of the external axis mechanical coordinates, (X Di , Y Di ) is the fixed mechanical coordinates. When the any image coordinates obtain the initial fixed mechanical coordinates through the first fixed mapping matrix, i = 1; when the any image coordinates obtain the initial fixed mechanical coordinates through the second fixed mapping matrix, i = 2; when the any image coordinates obtain the initial fixed mechanical coordinates through the third fixed mapping matrix, i = 3;
[0072] Calculate the external axis mechanical coordinates of any image on any external axis coordinate according to the actual distance of the external axis mechanical coordinates. The calculation formula is:
[0073]
[0074] Wherein, L is the vector form of the external axis mechanical coordinates.
[0075] An external axis mapping calibration system includes an external single axis, a camera, a device, a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the program, the above-mentioned external axis mapping calibration method is implemented.
[0076] The above is only a preferred embodiment of the present invention, and does not impose any form of limitation on the present invention. Although the present invention has been disclosed above with a preferred embodiment, it is not intended to limit the present invention. Any person skilled in the art can make some changes or modifications to equivalent embodiments by using the disclosed technical content within the scope of the technical solution of the present invention. However, as long as it does not depart from the content of the technical solution of the present invention, any brief modifications, equivalent changes and modifications made to the above embodiments based on the technical essence of the present invention still fall within the scope of the technical solution of the present invention.
Claims
1. A mapping calibration method based on an external axis, characterized in that, Including the following steps: S1: Preset the external axis coordinates, and obtain the fixed mapping matrix through fixed camera calibration. The external axis coordinates include the first external axis coordinate, the second external axis coordinate, and the third external axis coordinate; S2: Obtain the fixed mechanical coordinates by passing the camera center coordinates through the fixed mapping matrix. The fixed mechanical coordinates include the first fixed mechanical coordinate, the second fixed mechanical coordinate, and the third fixed mechanical coordinate; S3: Obtain the external axis mapping matrix according to the external axis coordinates and the fixed mechanical coordinates; S4: Obtain the initial fixed mechanical coordinates by passing any image coordinate through the fixed mapping matrix, obtain the initial external axis mechanical coordinates by passing any external axis coordinate through the external axis mapping matrix, and obtain the external axis mechanical coordinates of any image on any external axis coordinate through the fixed mechanical coordinates, the initial fixed mechanical coordinates, and the initial external axis mechanical coordinates; Specifically, it includes: presetting any of the image coordinates, and obtaining an initial fixed mechanical coordinate (X D4 , Y D4 ) according to any of the image coordinates through the fixed mapping matrix; Preset any external axis coordinate, and obtain the initial external axis mechanical coordinate (X D5 , Y D5 ) according to the any external axis coordinate through the external axis mapping matrix; Calculate the actual coordinates of the external axis mechanical coordinates according to the initial external axis mechanical coordinates. The calculation formula is: , Among them, is the vector form of the actual coordinates of the external axis mechanical coordinates, (X Di , Y Di ) is the fixed mechanical coordinates. When any one of the image coordinates obtains the initial fixed mechanical coordinates through the first fixed mapping matrix, i = 1; when any one of the image coordinates obtains the initial fixed mechanical coordinates through the second fixed mapping matrix, i = 2; when any one of the image coordinates obtains the initial fixed mechanical coordinates through the third fixed mapping matrix, i = 3; Calculate the external axis mechanical coordinates of any image on any external axis coordinate according to the actual distance of the external axis mechanical coordinates. The calculation formula is: , where L is the vector form of the external axis mechanical coordinates.
2. The mapping calibration method according to claim 1, characterized in that The specific steps of step S1 include the following steps: S101: Preset the external axis coordinates, and obtain the manipulator coordinates and the image coordinates corresponding to the manipulator coordinates according to the external axis coordinates; S102: Substitute the manipulator coordinates and the image coordinates into the matrix mapping formula to obtain the corresponding matrix of the manipulator coordinates and the image coordinates; S103: Obtain the fixed mapping matrix by passing the corresponding matrix through Cramer's rule; S104: Repeat steps S101 to S103 to obtain the first fixed mapping matrix corresponding to the first external axis coordinate, the second fixed mapping matrix corresponding to the second external axis coordinate, and the third fixed mapping matrix corresponding to the third external axis coordinate respectively.
3. The mapping calibration method according to claim 1 or 2, characterized in that The specific steps of step S2 include the following steps: Obtain the first fixed mechanical coordinate by passing the camera center coordinates through the first fixed mapping matrix; Obtain the second fixed mechanical coordinate by passing the camera center coordinates through the second fixed mapping matrix; Obtain the third fixed mechanical coordinate by passing the camera center coordinates through the third fixed mapping matrix.
4. The mapping calibration method according to claim 1, wherein The specific steps of step S3 include the following steps: Set the external axis coordinates and the fixed machine coordinates to (E xi , E yi ) and (X Di , Y Di ); Represent the external axis coordinates in matrix form as , and represent the fixed mechanical coordinates in matrix form as ; Substitute the external axis coordinates and the fixed mechanical coordinates into the matrix mapping formula to obtain the external axis mapping matrix. The formula is as follows: , Among them, is the external axis mapping matrix, and Z is a unit row vector.
5. An external axis mapping calibration system, comprising an external single axis, a camera, a device, a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that When the processor executes the program, it implements a mapping calibration method based on the external axis as described in any one of claims 1-4.
Citation Information
Patent Citations
High-precision method for hand-eye calibration of fixed camera vision system of SCARA mechanical arm
CN109159114A
Vision-based robot automatic calibration method, equipment and storage medium
CN110640745A