Distance measurement method in calibration process of laser vision system
By using a camera to capture images of the positioning board in a laser vision system, identifying the coordinates of the center pixel of the QR code, fitting a plane equation, and calculating the distance between laser points, the problem of complex and low-precision distance measurement in the calibration of laser vision systems is solved. This achieves efficient and automated laser point distance measurement, which is suitable for a variety of complex application scenarios.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- WUXI IDATA TECHNOLOGY COMPANY LTD
- Filing Date
- 2026-02-10
- Publication Date
- 2026-04-21
AI Technical Summary
Existing laser vision systems suffer from high costs, system complexity, low automation, and low accuracy during calibration. In particular, it is difficult to ensure the consistency of coordinate systems across multiple devices during distance measurement, which introduces measurement errors.
The system uses a camera to capture images of a positioning board with known world coordinates. By identifying the pixel coordinates of the center of the QR code and fitting the plane equation using the least squares method, the three-dimensional coordinates of the laser point in the camera coordinate system are calculated, thus measuring the distance from the laser point to the camera's optical center. All calculations are performed in a unified camera coordinate system, eliminating coordinate system inconsistency errors.
It achieves high-precision, low-cost, and automated distance measurement for laser vision systems, simplifies system structure, reduces hardware costs, and improves calibration accuracy and efficiency, making it suitable for complex application scenarios such as robot guidance, 3D reconstruction, and industrial inspection.
Smart Images

Figure CN121899795A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of ranging technology, and in particular to a distance measurement method in the calibration process of a laser vision system. Background Technology
[0002] In the calibration process of a laser vision system, a crucial step is to accurately measure the three-dimensional position or distance of the laser point in space. Traditional measurement methods typically rely on high-precision physical measurement equipment such as independent laser rangefinders, micrometers, and coordinate measuring machines. However, this traditional approach has the following significant drawbacks: High cost: The need to purchase and maintain high-precision measurement equipment increases the overall cost of the system; The system is complex: it requires physical coordination and operation between external measuring equipment and the laser vision system to be calibrated, which is cumbersome and has low integration. Inconsistency errors are introduced: the laser vision system and the external measurement equipment have their own independent coordinate systems and measurement references. When performing data correlation, it is difficult to guarantee the alignment accuracy of the two coordinate systems. This inconsistency between the systems directly introduces measurement errors and reduces calibration accuracy.
[0003] Low level of automation: It relies on manual operation and reading, making it difficult to integrate into a fully automated calibration process, resulting in low efficiency.
[0004] Therefore, there is an urgent need for a low-cost, simple, high-precision, and automated measurement solution to overcome the limitations of existing technologies in laser vision system calibration. Summary of the Invention
[0005] This invention provides a distance measurement method in the calibration process of a laser vision system, which solves the defects of complex and low-precision ranging systems in the calibration process of existing laser vision systems.
[0006] This invention provides a distance measurement method during the calibration process of a laser vision system, comprising: The image of the positioning plate with laser dots is captured by a camera. The positioning plate is equipped with multiple positioning markers with known world coordinates. Identify location markers in the image and obtain their pixel coordinates; Based on the pixel coordinates of the location marker, the world coordinates of the location marker, and the camera intrinsic parameters, calculate the three-dimensional coordinates of the location marker in the camera coordinate system; Based on the three-dimensional coordinates of the positioning marker in the camera coordinate system, the plane equation of the positioning plate in the camera coordinate system is fitted. Detect and extract the pixel coordinates of laser points in the image; The pixel coordinates of the laser point are converted into a spatial ray equation in the camera coordinate system, and the intersection of the spatial ray and the plane equation is calculated to obtain the three-dimensional coordinates of the laser point in the camera coordinate system. Based on the three-dimensional coordinates of the laser point in the camera coordinate system, the distance from the laser point to the camera optical center is calculated.
[0007] According to the present invention, a distance measurement method in the calibration process of a laser vision system is provided, wherein the positioning markers are arranged in a regular array on the positioning plate, the positioning markers include QR codes, each QR code has a unique pattern content code, and a positioning point is set at the center of each QR code. A world coordinate system is established with the plane of the positioning plate as the OXY plane, and all positioning points are assigned world coordinate system coordinates. The world coordinates of the positioning points are the world coordinates of the corresponding positioning markers.
[0008] According to the present invention, a distance measurement method in the calibration process of a laser vision system includes, wherein identifying a positioning marker in an image and obtaining the pixel coordinates of the positioning marker includes: Identify the content and location regions of at least three QR codes in an image; Detect the center of the corresponding positioning point within the area where each QR code is located, and obtain the pixel coordinates with sub-pixel precision; The pixel coordinates of each positioning point are the pixel coordinates of the corresponding positioning identifier.
[0009] According to the distance measurement method in the calibration process of a laser vision system provided by the present invention, the least squares method is used to fit the plane equation. Based on the three-dimensional coordinates of all positioning markers in the camera coordinate system, the plane equation is fitted as follows: F: aX + bY + cZ + 1 = 0; Where, [a, b, c] T These are the optimal plane parameters obtained by solving using the least squares method.
[0010] According to the present invention, a distance measurement method in the calibration process of a laser vision system includes extracting the pixel coordinates of laser points in an image, comprising: preprocessing the image to segment the laser spot region, and extracting the laser point coordinates with sub-pixel accuracy using the centroid method, gray-scale centroid method, or Gaussian fitting method.
[0011] According to the present invention, a distance measurement method in the calibration process of a laser vision system converts the pixel coordinates of a laser point into a spatial ray equation in the camera coordinate system, comprising: According to the camera model The parametric equations of the space ray are derived as follows: ; Among them, U lLet be the homogeneous coordinates of the laser point pixel coordinates, and K be the camera intrinsic parameter matrix, [x0, y0, 1]. T For U l The corresponding normalized camera plane coordinates, d l The depth value to be determined is denoted as .
[0012] According to the present invention, a distance measurement method in the calibration process of a laser vision system calculates the three-dimensional coordinates of a laser point in the camera coordinate system, including: Substituting the spatial ray equation into the plane equation, the depth value is obtained by solving: ; The depth value d l Substituting back into the spatial ray equation, we obtain the three-dimensional coordinates of the laser point in the camera coordinate system. .
[0013] According to the present invention, a distance measurement method in the calibration process of a laser vision system calculates the distance from a laser point to the optical center of a camera, including: Calculate the Euclidean modulus of the laser point's three-dimensional coordinates in the camera coordinate system: ; The Euclidean modulus L is the distance from the laser point to the optical center of the camera.
[0014] According to the present invention, a distance measurement method in the calibration process of a laser vision system is provided, wherein the positioning plate is a planar rigid structure.
[0015] The distance measurement method in the calibration process of a laser vision system provided by this invention combines a positioning marker with known world coordinates with laser vision positioning technology. It indirectly and accurately calculates the distance by solving for the intersection of the laser point ray and the known visual plane, completely internalizing the distance measurement function into the laser vision system itself. Only a single frame image is needed to complete camera extrinsic parameter calculation and laser point distance measurement, eliminating the need to move the positioning plate or laser. This achieves real-time, efficient single-measurement and significantly shortens the calibration cycle. Furthermore, this invention requires no additional, independent ranging equipment, significantly reducing the hardware cost of system calibration, simplifying the system structure, and facilitating deployment and maintenance. Simultaneously, all calculations in this invention are performed in a unified camera coordinate system, completely eliminating alignment errors introduced by inconsistent coordinate systems of multiple devices, improving the consistency of distance measurement and overall calibration accuracy. Attached Figure Description
[0016] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0017] Figure 1 This is one of the flowcharts illustrating the distance measurement method in the calibration process of the laser vision system provided by the present invention; Figure 2 This is the second flowchart illustrating the distance measurement method in the calibration process of the laser vision system provided by the present invention; Figure 3 This is a schematic diagram of the positioning plate provided by the present invention; Figure 4 This is a schematic diagram of a camera capturing an image of the positioning plate. Detailed Implementation
[0018] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0019] The following is combined Figures 1-4 A distance measurement method in the calibration process of a laser vision system according to the present invention includes: The image of the positioning plate with laser dots is captured by a camera. The positioning plate has multiple positioning markers with known world coordinates. Identify location markers in the image and obtain their pixel coordinates; Based on the pixel coordinates of the location marker, the world coordinates of the location marker, and the camera intrinsic parameters, calculate the three-dimensional coordinates of the location marker in the camera coordinate system; Based on the three-dimensional coordinates of the positioning marker in the camera coordinate system, the plane equation of the positioning plate in the camera coordinate system is fitted. Detect and extract the pixel coordinates of laser points in the image; The pixel coordinates of the laser point are converted into a spatial ray equation in the camera coordinate system, and the intersection of the spatial ray and the plane equation is calculated to obtain the three-dimensional coordinates of the laser point in the camera coordinate system. Based on the three-dimensional coordinates of the laser point in the camera coordinate system, the distance from the laser point to the camera optical center is calculated.
[0020] In this embodiment, the positioning markers are arranged in a regular array on the positioning plate. The positioning markers include QR codes. The pattern content of each QR code is uniquely encoded. A positioning point is set at the center of each QR code. A world coordinate system is established with the plane of the positioning plate as the OXY plane. World coordinate system coordinates are assigned to all positioning points. The world coordinates of the positioning points are the world coordinates of the corresponding positioning markers.
[0021] Further, identify location markers in the image and obtain the pixel coordinates of the location markers, including: Identify the content and location regions of at least three QR codes in an image; Detect the center of the corresponding positioning point within the area where each QR code is located, and obtain the pixel coordinates with sub-pixel precision; The pixel coordinates of each positioning point are the pixel coordinates of the corresponding positioning identifier.
[0022] More specifically, to simplify the calculation process, in this embodiment, as follows: Figure 3-4 As shown, a world coordinate system is established with any positioning point as the origin. At least three positioning points are located at the vertices of the same square, that is, the world coordinate system is established with any vertex of the square as the origin. The side length of the square is set to a known L. In this way, the world coordinates of the three positioning points can be obtained.
[0023] Furthermore, based on the pixel coordinates of the positioning marker, the world coordinates of the positioning marker, and the pre-calibrated camera intrinsic parameters, the rotation matrix and translation vector (i.e., camera extrinsic parameters) of the camera coordinate system relative to the world coordinate system of the positioning plate are calculated using the PnP algorithm, and then the three-dimensional coordinates of the positioning marker in the camera coordinate system are calculated. Specifically, it involves using the pixel coordinate set {U} of the positioning identifier. i} and world coordinate set {P wi The camera intrinsic parameter matrix K is used to calculate the rotation matrix R and translation vector t using the solvePnP function, and then the coordinate transformation formula P is applied. ci = R*P wi + t obtains the three-dimensional coordinates P of each positioning marker in the camera coordinate system. ci Where R is the rotation matrix, t is the translation vector, and P wi P is the known world coordinate of the location identifier. ci This is used to locate the three-dimensional coordinates of the identifier in the camera coordinate system.
[0024] Furthermore, the least squares method was used to fit the plane equation. Based on the three-dimensional coordinates of all positioning markers in the camera coordinate system, the plane equation was fitted as follows: F: aX + bY + cZ + 1 = 0; Where, [a, b, c] TThese are the optimal plane parameters obtained by solving using the least squares method.
[0025] Further, the pixel coordinates of the laser points in the image are extracted, including: preprocessing the image to segment the laser spot region, and extracting the laser point coordinates with sub-pixel precision using the centroid method, gray-level centroid method, or Gaussian fitting method. The preprocessing includes at least one of color channel extraction, threshold segmentation, and morphological operations.
[0026] Furthermore, the pixel coordinates of the laser point are transformed into the spatial ray equation in the camera coordinate system, including: According to the camera model The parametric equations for space rays are derived as follows: ; Where s is the scaling factor, U l Let be the homogeneous coordinates of the laser point pixel coordinates, and K be the camera intrinsic parameter matrix, [x0, y0, 1]. T For U l The corresponding normalized camera plane coordinates, x0 and y0 are known, d l The depth value to be determined is denoted as .
[0027] Further, the three-dimensional coordinates of the laser point in the camera coordinate system are calculated, including: Substituting the spatial ray equation into the plane equation, we obtain the depth value: ; Depth value d l Substituting back into the space ray equation, we obtain the three-dimensional coordinates of the laser point in the camera coordinate system. .
[0028] Further, the distance from the laser point to the camera's optical center is calculated, including: Calculate the Euclidean modulus of the laser point's three-dimensional coordinates in the camera coordinate system: ; The Euclidean modulus L is the distance from the laser point to the optical center of the camera.
[0029] Furthermore, the positioning plate is a planar rigid structure.
[0030] Compared to existing technologies, the distance measurement method in the laser vision system calibration process provided by this invention has the following advantages: This invention abandons the method of directly measuring distance using external physical measuring equipment. It creatively utilizes visual positioning technology to indirectly and accurately calculate distance by solving for the intersection of the laser point ray and the known visual plane. The distance measurement function is completely internalized into the laser vision system itself, requiring only a target integrated with a specific positioning pattern, eliminating the need for any additional, independent ranging equipment. This significantly reduces the hardware cost of system calibration, simplifies the system structure, and facilitates deployment and maintenance. All calculations in this invention are performed in a unified camera coordinate system, completely eliminating alignment errors introduced by the inconsistency of coordinate systems across multiple devices, thus improving the consistency of distance measurement and overall calibration accuracy. From image acquisition, marker recognition, coordinate calculation to plane fitting and distance calculation, the entire process can be automatically completed by algorithms without manual intervention in measurement readings, greatly improving calibration efficiency, reducing human error, and facilitating integration into various systems. In automated production lines or calibration lines, the entire process is automated. This invention utilizes positioning markers with known world coordinates to complete camera extrinsic parameter calculation and laser point distance measurement with only a single frame image, eliminating the need to move the positioning plate or laser. This achieves real-time, efficient single-measurement and significantly shortens the calibration cycle. The solution relies on mature computer vision algorithms, such as QR code recognition, PnP pose calculation, and least squares plane fitting, ensuring stability and reliability. Accuracy and robustness can be further improved by increasing the number of positioning markers and optimizing the layout of positioning points. This invention employs sub-pixel precision positioning point detection and laser point extraction algorithms, combined with the geometric advantages of planar constraints, to achieve high-precision distance measurement, meeting the needs of industrial applications. The positioning targets of this invention can be flexibly designed according to application scenarios. By encoding different identifier IDs, multi-target collaborative or regional calibration can be achieved, making it suitable for various complex application scenarios such as robot guidance, 3D reconstruction, and industrial inspection, exhibiting good scalability and adaptability.
[0031] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A distance measurement method in the calibration process of a laser vision system, characterized in that, include: The image of the positioning plate with laser dots is captured by a camera. The positioning plate is equipped with multiple positioning markers with known world coordinates. Identify location markers in the image and obtain their pixel coordinates; Based on the pixel coordinates of the location marker, the world coordinates of the location marker, and the camera intrinsic parameters, calculate the three-dimensional coordinates of the location marker in the camera coordinate system; Based on the three-dimensional coordinates of the positioning marker in the camera coordinate system, the plane equation of the positioning plate in the camera coordinate system is fitted. Detect and extract the pixel coordinates of laser points in the image; The pixel coordinates of the laser point are converted into a spatial ray equation in the camera coordinate system, and the intersection of the spatial ray with the plane equation is calculated to obtain the three-dimensional coordinates of the laser point in the camera coordinate system. Based on the three-dimensional coordinates of the laser point in the camera coordinate system, the distance from the laser point to the camera optical center is calculated.
2. The distance measurement method in the laser vision system calibration process according to claim 1, characterized in that, The positioning markers are arranged in a regular array on the positioning plate. Each positioning marker includes a QR code. The pattern content of each QR code is uniquely encoded. A positioning point is set at the center of each QR code. A world coordinate system is established with the plane of the positioning plate as the OXY plane. World coordinate system coordinates are assigned to all positioning points. The world coordinates of the positioning points are the world coordinates of the corresponding positioning markers.
3. The distance measurement method in the laser vision system calibration process according to claim 2, characterized in that, The process of identifying the location marker in the image and obtaining the pixel coordinates of the location marker includes: Identify the content and location regions of at least three QR codes in an image; Detect the center of the corresponding positioning point within the area where each QR code is located, and obtain the pixel coordinates with sub-pixel precision; The pixel coordinates of each positioning point are the pixel coordinates of the corresponding positioning identifier.
4. The distance measurement method in the laser vision system calibration process according to claim 3, characterized in that, The least squares method was used to fit the plane equation. Based on the three-dimensional coordinates of all positioning markers in the camera coordinate system, the plane equation was fitted as follows: F: aX + bY + cZ + 1 = 0; Where, [a, b, c] T These are the optimal plane parameters obtained by solving using the least squares method.
5. The distance measurement method in the calibration process of a laser vision system according to claim 1, characterized in that, The extraction of the pixel coordinates of the laser points in the image includes: preprocessing the image to segment the laser spot area, and using the centroid method, gray-level centroid method or Gaussian fitting method to extract the laser point coordinates with sub-pixel accuracy.
6. The distance measurement method in the calibration process of a laser vision system according to claim 1, characterized in that, The equation for converting the pixel coordinates of the laser point into the spatial ray equation in the camera coordinate system includes: According to the camera model The parametric equations of the space ray are derived as follows: P l = d l × x 0 , y 0 , 1 T = d l x 0 d l y 0 d l T ; Where s is the scaling factor, U l Let be the homogeneous coordinates of the laser point pixel coordinates, and K be the camera intrinsic parameter matrix, [x0, y0, 1]. T For U l The corresponding normalized camera plane coordinates, d l The depth value to be determined is denoted as .
7. The distance measurement method in the calibration process of a laser vision system according to claim 1, characterized in that, Calculate the three-dimensional coordinates of the laser point in the camera coordinate system, including: Substituting the spatial ray equation into the plane equation, the depth value is obtained by solving: ; The depth value d l Substituting back into the spatial ray equation, we obtain the three-dimensional coordinates of the laser point in the camera coordinate system. .
8. The distance measurement method in the laser vision system calibration process according to claim 7, characterized in that, Calculating the distance from the laser point to the camera's optical center includes: Calculate the Euclidean modulus of the laser point's three-dimensional coordinates in the camera coordinate system: ; The Euclidean modulus L is the distance from the laser point to the optical center of the camera.
9. The distance measurement method in the calibration process of a laser vision system according to claim 1, characterized in that, The positioning plate is a planar rigid structure.