A calibration method for line laser 3D profile measuring instrument

Through a simplified method, 3D images are reconstructed using 2D images and point cloud data, solving the problem of complex calibration process and limited accuracy of line laser 3D contour measuring instruments, and achieving high-precision and low-cost calibration effect.

CN118857153BActive Publication Date: 2024-12-17BEIJING BOVISION TECH CO LTD
View PDF 7 Cites 0 Cited by

Patent Information

Application Number
CN202411330546.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-24
Publication Date
2024-12-17
Estimated Expiration
2044-09-24

AI Technical Summary

Technical Problem

The calibration process of the linear laser 3D profile measuring instrument is complex, costly, and limited in accuracy, making it difficult to meet the requirements of high-precision measurement.

Method used

By estimating camera internal parameters based on 2D images under different postures, reconstructing 3D images with point cloud data, extracting feature points, building a world coordinate system, calculating the optimal solution from 3D pixel coordinate system to world coordinate system, simplifying the calibration process, and reducing calculation quantity and cost.

Benefits of technology

The calibration process is simplified, the accuracy is improved, the cost is reduced, the camera distortion and noise influence is eliminated, and the calibration efficiency is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118857153B_ABST
    Figure CN118857153B_ABST
Patent Text Reader

Abstract

The present invention discloses a calibration method for a line laser 3D profile measuring instrument, which relates to the technical field of 3D profile measurement, and includes: estimating the optimal solution of camera internal parameters based on the 2D image of the calibration block in different postures; placing the calibration block on a moving platform at a certain angle, turning on the laser line, moving the moving platform, using a camera to continuously collect the 2D image of the calibration block during the movement, and collecting the point cloud data of the calibration block through a laser line extraction algorithm; correcting the 2D image of the calibration block during the movement based on the optimal solution of the camera internal parameters, and reconstructing the 2D image into a 3D image of the calibration block in combination with the point cloud data of the calibration block; extracting the 3D pixel coordinate values ​​of several feature points on the 3D image of the calibration block; constructing the world coordinate system of the calibration block, and obtaining the world coordinate values ​​of each feature point on the calibration block; calculating the optimal solution from the 3D pixel coordinate system to the world coordinate system, and completing the profile calibration. The calibration process and the overall algorithm are simplified.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of 3D profile measurement, and in particular to a calibration method for a line laser 3D profile measuring instrument. Background Art

[0002] At present, there are various calibration methods for line laser 3D profile measuring instruments, which are suitable for different application scenarios and accuracy requirements. With the development of automation technology, more and more line laser 3D profile measuring instruments are equipped with automatic calibration systems. These systems can automatically complete the calibration process, reduce human errors, and improve calibration efficiency and accuracy. Although the calibration methods of line laser 3D profile measuring instruments have made significant progress, there are still some defects and challenges:

[0003] 1. The calibration process is complicated:

[0004] Traditional calibration methods often require complex operating steps and professional technical knowledge, and have high requirements on operators. This increases the complexity and cost of the calibration process;

[0005] 2. High calibration cost:

[0006] High-precision calibration equipment and calibration process usually have high costs, which may be unaffordable for some small enterprises or research institutions;

[0007] 3. Limited calibration accuracy:

[0008] Although calibration technology is constantly improving, the accuracy of calibration is still limited by many factors such as measurement principle, equipment accuracy, environmental factors, etc. In some high-precision measurement situations, it may not meet the requirements.

[0009] In order to solve the above problems, researchers in this field need to develop a calibration method for a line laser 3D profile measuring instrument that is simple to operate, low in cost and high in precision. Summary of the invention

[0010] The present invention provides a calibration method for a line laser 3D profile measuring instrument, comprising:

[0011] Step 1: Estimate the optimal solution of the camera intrinsic parameters based on the 2D image of the calibration block under different postures;

[0012] Step 2: Place the calibration block on the motion platform at a certain angle to the motion platform, turn on the laser line, move the motion platform, and use the camera to continuously collect 2D images of the calibration block during the movement process. Collect the point cloud data of the calibration block through the laser line extraction algorithm.

[0013] Step 3: Based on the optimal solution of the camera internal parameters, the 2D image of the calibration block during the movement is corrected, and the 2D image is reconstructed into a 3D image of the calibration block in combination with the point cloud data of the calibration block;

[0014] Step 4, extract the 3D pixel coordinate values ​​of several feature points on the 3D image of the calibration block;

[0015] Step 5, construct the world coordinate system of the calibration block, and obtain the world coordinate value of each feature point on the calibration block;

[0016] Step 6: Calculate the optimal solution from the 3D pixel coordinate system to the world coordinate system based on the 3D pixel coordinate value and the world coordinate value of each feature point to complete the contour calibration.

[0017] A calibration method for a line laser 3D profilometer as described above, wherein the optimal solution of the camera intrinsic parameters is estimated based on the 2D image of the calibration block in different postures, specifically comprising the following sub-steps:

[0018] Place the calibration block in different postures and use a camera to collect 2D images of the calibration block in different postures;

[0019] Use the corner response function to obtain the corner points of the calibration block in each 2D image;

[0020] Calculate the intrinsic parameters of each 2D image based on the obtained corner points and the actual size of the calibration block;

[0021] The intrinsic parameters of all 2D images are input into the optimal solution estimation function of the intrinsic parameters, and the optimal solution of the camera intrinsic parameters is output.

[0022] A calibration method for a line laser 3D profile measuring instrument as described above, wherein a 2D image is reconstructed into a 3D image of a calibration block in combination with point cloud data of the calibration block, specifically comprising the following sub-steps:

[0023] Get the pixel coordinates of each corner point of the calibration block on the 2D image;

[0024] Get the three-dimensional coordinate values ​​of each corner point of the calibration block on the point cloud data;

[0025] According to the 2D pixel coordinate value and the 3D coordinate value of each corner point, the conversion coefficient from 2D pixel coordinate to 3D coordinate is calculated;

[0026] A 3D image of the calibration block is generated based on the conversion coefficients from 2D pixel coordinates to 3D coordinates.

[0027] The calibration method of the line laser 3D profile measuring instrument as described above, wherein the world coordinate system of the calibration block is constructed, and the world coordinate value of each feature point on the calibration block is obtained, specifically comprises the following sub-steps:

[0028] Select the center point of the calibration block as the origin of the world coordinate system;

[0029] A line parallel to the plane where the calibration block is placed passing through the origin is defined as the X-axis of the world coordinate system;

[0030] The perpendicular line through the origin to the X axis is defined as the Z axis of the world coordinate system;

[0031] The perpendicular line through the origin to the plane where the X-axis and Z-axis are located is defined as the Y-axis of the world coordinate system;

[0032] Find the corresponding coordinate values ​​of each feature point in the world coordinate system.

[0033] A calibration method for a line laser 3D profile measuring instrument as described above, wherein the optimal solution from the 3D pixel coordinate system to the world coordinate system is calculated according to the 3D pixel coordinate value and the world coordinate value of each feature point to complete the profile calibration, specifically comprising the following sub-steps:

[0034] Create a solver function from 3D pixel coordinate system to world coordinate system;

[0035] Substitute the 3D pixel coordinate value and world coordinate value of each feature point into the solution function to obtain the optimal solution from the 3D pixel coordinate system to the world coordinate system;

[0036] The calibration data of the calibration block contour is obtained based on the optimal solution from the 3D pixel coordinate system to the world coordinate system.

[0037] The present invention also provides a calibration system for a line laser 3D profile measuring instrument, comprising: an internal parameter solving module, a 3D image reconstruction module, a coordinate system conversion solving module, and a profile calibration module;

[0038] The intrinsic parameter solving module is used to estimate the optimal solution of the camera intrinsic parameters based on the 2D image of the calibration block under different postures;

[0039] The 3D image reconstruction module is used to correct the 2D image of the calibration block during movement using the optimal solution of the camera intrinsic parameters, and reconstruct the 2D image into a 3D image of the calibration block in combination with the point cloud data of the calibration block;

[0040] Coordinate system conversion solution module, used to calculate the optimal solution from 3D pixel coordinate system to world coordinate system;

[0041] The contour calibration module is used to complete the contour calibration based on the optimal solution from the 3D pixel coordinate system to the world coordinate system.

[0042] A calibration system for a line laser 3D profile measuring instrument as described above, wherein the internal parameter solution module includes a 2D image acquisition submodule, a corner point detection submodule, and an internal parameter estimation submodule;

[0043] 2D image acquisition submodule, used to acquire 2D images of the calibration block in different postures;

[0044] Corner detection submodule, used to obtain the corner points of the calibration block in each 2D image using the corner response function;

[0045] The intrinsic parameter estimation submodule is used to calculate the intrinsic parameters of each 2D image based on the acquired corner points and the actual size of the calibration block, and input the intrinsic parameters of all 2D images into the intrinsic parameter optimal solution estimation function to output the optimal solution of the camera intrinsic parameters.

[0046] A calibration system for a line laser 3D profile measuring instrument as described above, wherein the 3D image reconstruction module includes a raw data acquisition submodule, a 2D image correction submodule, and a 2D to 3D image conversion submodule;

[0047] The raw data acquisition submodule is used to continuously acquire the 2D image and point cloud data of the calibration block during the motion process;

[0048] The 2D image correction submodule is used to correct the 2D image of the calibration block during movement using the optimal solution of the camera intrinsic parameters;

[0049] The 2D to 3D image submodule is used to reconstruct the 2D image into a 3D image of the calibration block by combining the point cloud data of the calibration block.

[0050] A calibration system for a line laser 3D profile measuring instrument as described above, wherein the coordinate system conversion solution module includes a feature point extraction submodule, a world coordinate system construction submodule, and an optimal solution calculation submodule;

[0051] The feature point extraction submodule is used to extract the 3D pixel coordinate values ​​of several feature points on the 3D image of the calibration block;

[0052] The world coordinate system construction submodule is used to construct the world coordinate system of the calibration block and obtain the world coordinate value of each feature point on the calibration block;

[0053] The optimal solution calculation submodule is used to calculate the optimal solution from the 3D pixel coordinate system to the world coordinate system according to the 3D pixel coordinate value and the world coordinate value of each feature point.

[0054] The beneficial effects achieved by the present invention are as follows: the calibration process is simplified and the complexity of the calibration operation is reduced; the influence of camera distortion is eliminated, the influence of image noise is reduced, and the calibration accuracy is improved; due to the simplified calibration process, the calculation amount of the overall algorithm is reduced, the calculation time is reduced, and the cost is also reduced. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.

[0056] Figure 1 This is a flow chart of a calibration method for a line laser 3D profile measuring instrument provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0057] The following is a clear and complete description of the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0058] Embodiment 1

[0059] like Figure 1 As shown, the first embodiment of the present invention provides a calibration method for a line laser 3D profile measuring instrument, comprising:

[0060] Step S10: estimating the optimal solution of the camera intrinsic parameters based on the 2D images of the calibration block under different postures;

[0061] The camera intrinsic parameters describe the internal properties of the camera. Taking the optimal solution of the camera intrinsic parameters can reduce the error of contour calibration and improve the accuracy. Specifically:

[0062] Step S11: placing the calibration block in different postures, and using a camera to collect 2D images of the calibration block in different postures;

[0063] Step S12: using the corner point response function to obtain the corner points of the calibration block in each 2D image;

[0064] Corner response function It is expressed as: , where (x, y) is the input pixel point, Represents the gray gradient vector of the pixel point (x, y), Represents the local neighborhood point set of the pixel point (x, y), Represents a point set The pixels in Represents pixel The gradient on the Y axis, Represents pixel The gradient on the X axis, Represents the gradient of the pixel point (x, y) on the Y axis, Represents the gradient of the pixel (x, y) on the X-axis.

[0065] Each pixel in a 2D image is input as an input parameter to the corner response function The returned values ​​are stored in a set, and the outliers in the set are detected using a box plot. The pixel points corresponding to these outliers are the corner points of the calibration blocks in the image. These corner points are collected to organize the corner point set of the image. The corner point sets of different 2D images are marked and distinguished by image IDs.

[0066] Step S13: Calculate the intrinsic parameters of each 2D image based on the acquired corner points and the real size of the calibration block;

[0067] Using the acquired corner points and the known size of the calibration block, the intrinsic and extrinsic parameters of each image are calculated through a camera calibration algorithm (such as Zhang Zhengyou calibration method).

[0068] Step S14: inputting the internal parameters of all 2D images into the internal parameter optimal solution estimation function, and outputting the optimal solution of the camera internal parameters;

[0069] Optimal solution estimation function It is expressed as: , where A is the input internal parameter set, Represents the value of the first internal parameter on the bth image, Indicates the value of the second internal parameter in the bth image, Indicates The value of the internal parameter on the bth image, is the total number of internal parameters, b ranges from 1 to B, and B is the total number of 2D images collected by the camera this time. are the estimated values ​​of the optimal solutions for different internal parameters, starting from the mean of each internal parameter on all the collected images until The calculation stops when the result is the minimum, and returns the value at that time. As the optimal solution for the camera's internal parameters.

[0070] Step S20: placing the calibration block on the motion platform at a certain angle to the motion platform, turning on the laser line, moving the motion platform, and using the camera to continuously collect 2D images of the calibration block during the movement process, and collecting point cloud data of the calibration block through the laser line extraction algorithm;

[0071] A laser sensor is installed on the camera body to emit laser lines to the calibration block. As the mobile platform moves, the camera continuously collects 2D images of the calibration block and collects point cloud data of the calibration block through the laser line extraction algorithm. The calibration block is placed at an angle to ensure that the extended surfaces of the laser line plane, image plane, and lens plane intersect in a straight line so that a comprehensive and clear image can be collected.

[0072] Step S30: correcting the 2D image of the calibration block during the movement based on the optimal solution of the camera intrinsic parameters, and reconstructing the 2D image into a 3D image of the calibration block in combination with the point cloud data of the calibration block;

[0073] Using existing image processing libraries (such as OpenCV) can achieve camera-based intrinsic parameters The 2D image is corrected and then combined with the point cloud data to reconstruct the 2D image into a 3D image. Specifically:

[0074] Step S31: Get the pixel coordinate values ​​of each corner point of the calibration block on the 2D image;

[0075] First, the 2D images of the calibration block continuously acquired by the camera are deduplicated and spliced ​​to form a complete 2D image of the calibration block. Then, the pixel coordinate values ​​of each corner point of the calibration block on this complete 2D image are obtained based on the corner point response function.

[0076] Step S32: obtaining the three-dimensional coordinate values ​​of each corner point of the calibration block on the point cloud data;

[0077] The three-dimensional coordinate values ​​of each corner point of the calibration block on the point cloud data can be extracted using the algorithm in the existing cloud point library.

[0078] Step S33: Calculating the conversion coefficient from 2D pixel coordinates to 3D coordinates according to the 2D pixel coordinate values ​​and 3D coordinate values ​​of each corner point;

[0079] The conversion coefficient calculation formula is expressed as: ,in is the X-axis conversion coefficient from 2D pixel coordinates to 3D coordinates, is the Y-axis conversion coefficient from 2D pixel coordinates to 3D coordinates, Represents the value of the X-axis of the i-th corner point in the three-dimensional coordinate system. Represents the value of the X-axis of the i-th corner point in 2D pixel coordinates, Represents the Y-axis value of the i-th corner point in the three-dimensional coordinate system. It represents the Y-axis value of the i-th corner point in the 2D pixel coordinates. i ranges from 1 to n, where n is the number of corner points on the calibration block.

[0080] Step S34: generating a 3D image of the calibration block based on the conversion coefficients from 2D pixel coordinates to three-dimensional coordinates;

[0081] The values ​​of the pixels in the 2D image of the calibration block on the x-axis and y-axis of the 2D pixel coordinate system are multiplied by , , we can get the value of the point on the X-axis and Y-axis of the three-dimensional coordinate system. The laser sensor is on the camera body, and the scanning direction is consistent with the camera shooting direction. We only need to determine the value of a pixel point on the X-axis and Y-axis in the three-dimensional coordinate system to find the cloud point data corresponding to the pixel point. Therefore, based on the conversion coefficient from 2D pixel coordinates to three-dimensional coordinates, we can achieve a one-to-one correspondence between the points in the 2D image and the points in the point cloud data. Based on this correspondence, we can use three-dimensional reconstruction technology (such as point cloud reconstruction and surface reconstruction) to generate a 3D image of the calibration block.

[0082] Step S40: extracting 3D pixel coordinate values ​​of a plurality of feature points on the 3D image of the calibration block;

[0083] The extracted feature points must be able to be accurately located based on the actual size of the calibration block. For example, if the calibration block is in the shape of a cuboid, the feature points can be the four vertices and a point on the edge between the vertices. This way, the point can be found on the actual calibration block based on a certain simple conversion to form a corresponding relationship.

[0084] Step S50: constructing a world coordinate system of the calibration block and obtaining the world coordinate value of each feature point on the calibration block, specifically including the following sub-steps:

[0085] Step S51: Select the center point of the calibration block as the origin of the world coordinate system;

[0086] Step S52: a line passing through the origin and parallel to the plane where the calibration block is placed is defined as the X-axis of the world coordinate system;

[0087] Step S53: a perpendicular line through the origin to the X axis is defined as the Z axis of the world coordinate system;

[0088] Step S54: a perpendicular line through the origin to the plane where the X-axis and Z-axis are located is defined as the Y-axis of the world coordinate system;

[0089] Step S55: finding the coordinate value corresponding to each feature point in the world coordinate system;

[0090] First, determine the exact position of the feature point on the calibration block, and then obtain the distance X of a feature point from the X, Y, and Z axes by measurement or simple calculation. w , Y w , Z w , this distance can be directly used as the coordinate value of the feature point in the world coordinate system, expressed as (X w , Y w , Z w ).

[0091] Step S60: Calculate the optimal solution from the 3D pixel coordinate system to the world coordinate system according to the 3D pixel coordinate value and the world coordinate value of each feature point to complete the contour calibration;

[0092] The 3D pixel coordinate values ​​and world coordinate values ​​of feature points can be easily matched due to their uniqueness, but the corresponding relationship of other points requires a series of transformations to obtain. Therefore, it is necessary to find the transformation law from the 3D pixel coordinate system to the world coordinate system from the corresponding relationship of the feature points and obtain the optimal solution to realize the coordinate transformation of other points, thereby completing the contour calibration. Specifically:

[0093] Step S61: creating a solution function from a 3D pixel coordinate system to a world coordinate system;

[0094] The solution function is expressed as: , where R represents an input rotation matrix to be solved, t is an input translation vector to be solved, , , Respectively represent the value of the j-th feature point on the X-axis, Y-axis, and Z-axis of the world coordinate system, They represent the values ​​of the jth feature point on the X-axis, Y-axis, and Z-axis of the 3D pixel coordinate system, respectively. j ranges from 1 to M, where M is the number of feature points.

[0095] It should be noted that each rotation matrix R is a 3*3 matrix, and each translation vector t is a 3*1 vector.

[0096] Step S62: Substitute the 3D pixel coordinate value and the world coordinate value of each feature point into the solution function to obtain the optimal solution from the 3D pixel coordinate system to the world coordinate system;

[0097] In the process of solving, the data items in the rotation matrix and the translation vector are constantly adjusted, and the changing curve of the solution function is observed. When the return value of the solution function is the minimum, the corresponding rotation matrix and translation vector are the optimal solution from the 3D pixel coordinate system to the world coordinate system, denoted as R top , t top .

[0098] Step S63: obtaining calibration data of the calibration block contour based on the optimal solution from the 3D pixel coordinate system to the world coordinate system;

[0099] Extract the pixel coordinate set of the calibration block in the contour part of the 3D image using the formula: The pixel coordinate values ​​of the contour of the calibration block are converted into world coordinate values ​​and organized into a world coordinate set. The world coordinate set is then used as the calibration data of the calibration block contour to complete the subsequent contour calibration operation. Represents the 3D pixel coordinate value of the t-th pixel in the pixel coordinate set of the contour part of the calibration block, represents the rotation matrix in the optimal solution, represents the translation vector in the optimal solution, Represents 3D pixel coordinate value The converted world coordinate value. It should be noted that 0 in the formula is a 1*3 zero vector.

[0100] Embodiment 2

[0101] Embodiment 2 of the present invention provides a calibration system for a line laser 3D profile measuring instrument, comprising: an internal parameter solving module, a 3D image reconstruction module, a coordinate system conversion solving module, and a profile calibration module;

[0102] (1) An intrinsic parameter solution module, which is used to estimate the optimal solution of the camera intrinsic parameters based on the 2D images of the calibration block under different postures, including: a 2D image acquisition submodule, a corner point detection submodule, and an intrinsic parameter estimation submodule;

[0103] 2D image acquisition submodule, used to acquire 2D images of the calibration block in different postures;

[0104] Place the calibration block in different postures, and use the camera to collect 2D images of the calibration block in different postures.

[0105] Corner detection submodule, used to obtain the corner points of the calibration block in each 2D image using the corner response function;

[0106] The corner point response function is expressed as: , where (x, y) is the input pixel point, Represents the gray gradient vector of the pixel point (x, y), Represents the local neighborhood point set of the pixel point (x, y), Represents a point set The pixels in Represents pixel The gradient on the Y axis, Represents pixel The gradient on the X axis, Represents the gradient of the pixel point (x, y) on the Y axis, Represents the gradient of the pixel (x, y) on the X-axis.

[0107] Each pixel in a 2D image is input as an input parameter to the corner response function The returned values ​​are stored in a set, and the outliers in the set are detected using a box plot. The pixel points corresponding to these outliers are the corner points of the calibration blocks in the image. These corner points are collected to organize the corner point set of the image. The corner point sets of different 2D images are marked and distinguished by image IDs.

[0108] The intrinsic parameter estimation submodule is used to calculate the intrinsic parameters of each 2D image based on the obtained corner points and the actual size of the calibration block, and input the intrinsic parameters of all 2D images into the intrinsic parameter optimal solution estimation function to output the optimal solution of the camera intrinsic parameters;

[0109] Using the acquired corner points and the known size of the calibration block, the intrinsic and extrinsic parameters of each image are calculated through a camera calibration algorithm (such as Zhang Zhengyou calibration method);

[0110] The optimal solution estimation function is expressed as: , where A is the input internal parameter set, Represents the value of the first internal parameter on the bth image, Indicates the value of the second internal parameter in the bth image, Indicates The value of the internal parameter on the bth image, is the total number of internal parameters, b ranges from 1 to B, and B is the total number of 2D images collected by the camera this time. are the estimated values ​​of the optimal solutions for different internal parameters, starting from the mean of each internal parameter on all the collected images until The calculation stops when the result is the minimum, and returns the value at that time. As the optimal solution for the camera's internal parameters.

[0111] (2) A 3D image reconstruction module, which is used to correct the 2D image of the calibration block during movement using the optimal solution of the camera intrinsic parameters, and reconstruct the 2D image into a 3D image of the calibration block in combination with the point cloud data of the calibration block, including: a raw data acquisition submodule, a 2D image correction submodule, and a 2D to 3D image conversion submodule;

[0112] The raw data acquisition submodule is used to continuously acquire the 2D image and point cloud data of the calibration block during the motion process;

[0113] Place the calibration block on the motion platform at a certain angle to the motion platform, move the motion platform, and use the camera to continuously collect 2D images of the calibration block during the movement. Turn on the laser line and collect the point cloud data of the calibration block through the laser line extraction algorithm.

[0114] The 2D image correction submodule is used to correct the 2D image of the calibration block during movement using the optimal solution of the camera intrinsic parameters;

[0115] Using existing image processing libraries (such as OpenCV) can achieve camera-based intrinsic parameters Correct the 2D image.

[0116] The 2D to 3D image submodule is used to reconstruct the 2D image into a 3D image of the calibration block by combining the point cloud data of the calibration block. Specifically:

[0117] I. Get the pixel coordinates of each corner point of the calibration block on the 2D image;

[0118] First, the 2D images of the calibration block continuously acquired by the camera are deduplicated and spliced ​​to form a complete 2D image of the calibration block. Then, the pixel coordinate values ​​of each corner point of the calibration block on this complete 2D image are obtained based on the corner point response function.

[0119] II. Get the three-dimensional coordinate values ​​of each corner point of the calibration block on the point cloud data;

[0120] The three-dimensional coordinate values ​​of each corner point of the calibration block on the point cloud data can be extracted using the algorithm in the existing cloud point library.

[0121] III. Calculate the conversion coefficient from 2D pixel coordinates to 3D coordinates according to the 2D pixel coordinate values ​​and 3D coordinate values ​​of each corner point;

[0122] The conversion coefficient calculation formula is expressed as: ,in is the X-axis conversion coefficient from 2D pixel coordinates to 3D coordinates, is the Y-axis conversion coefficient from 2D pixel coordinates to 3D coordinates, Represents the value of the X-axis of the i-th corner point in the three-dimensional coordinate system. Represents the value of the X-axis of the i-th corner point in 2D pixel coordinates, Represents the Y-axis value of the i-th corner point in the three-dimensional coordinate system. It represents the Y-axis value of the i-th corner point in the 2D pixel coordinates. i ranges from 1 to n, where n is the number of corner points on the calibration block.

[0123] IV. Generate a 3D image of the calibration block based on the conversion coefficients from 2D pixel coordinates to three-dimensional coordinates;

[0124] The values ​​of the pixels in the 2D image of the calibration block on the x-axis and y-axis of the 2D pixel coordinate system are multiplied by , , we can get the value of the point on the X-axis and Y-axis of the three-dimensional coordinate system. The laser sensor is on the camera body, and the scanning direction is consistent with the camera shooting direction. We only need to determine the value of a pixel point on the X-axis and Y-axis in the three-dimensional coordinate system to find the cloud point data corresponding to the pixel point. Therefore, based on the conversion coefficient from 2D pixel coordinates to three-dimensional coordinates, we can achieve a one-to-one correspondence between the points in the 2D image and the points in the point cloud data. Based on this correspondence, we can use three-dimensional reconstruction technology (such as point cloud reconstruction and surface reconstruction) to generate a 3D image of the calibration block.

[0125] (3) Coordinate system conversion solution module, used to calculate the optimal solution from the 3D pixel coordinate system to the world coordinate system, including: feature point extraction submodule, world coordinate system construction submodule, and optimal solution calculation submodule;

[0126] The feature point extraction submodule is used to extract the 3D pixel coordinate values ​​of several feature points on the 3D image of the calibration block;

[0127] The extracted feature points must be able to be accurately located based on the actual size of the calibration block. For example, if the calibration block is in the shape of a cuboid, the feature points can be the four vertices and a point on the edge between the vertices. This way, the point can be found on the actual calibration block based on a certain simple conversion to form a corresponding relationship.

[0128] The world coordinate system construction submodule is used to construct the world coordinate system of the calibration block and obtain the world coordinate values ​​of each feature point on the calibration block, including:

[0129] I. Select the center point of the calibration block as the origin of the world coordinate system;

[0130] II. A line parallel to the plane where the calibration block is placed through the origin is defined as the X-axis of the world coordinate system;

[0131] III. The perpendicular line through the origin to the X axis is defined as the Z axis of the world coordinate system;

[0132] IV. The perpendicular line through the origin to the plane where the X-axis and Z-axis are located is defined as the Y-axis of the world coordinate system;

[0133] V. Find the corresponding coordinate values ​​of each feature point in the world coordinate system;

[0134] First, determine the exact position of the feature point on the calibration block, and then obtain the distance X of a feature point from the X, Y, and Z axes by measurement or simple calculation. w , Y w , Z w , this distance can be directly used as the coordinate value of the feature point in the world coordinate system, expressed as (X w , Y w , Z w ).

[0135] The optimal solution calculation submodule is used to calculate the optimal solution from the 3D pixel coordinate system to the world coordinate system according to the 3D pixel coordinate value and the world coordinate value of each feature point;

[0136] The 3D pixel coordinate values ​​and world coordinate values ​​of feature points can be easily matched due to their uniqueness, but the corresponding relationship of other points requires a series of transformations to obtain. Therefore, it is necessary to find the transformation law from the 3D pixel coordinate system to the world coordinate system from the corresponding relationship of the feature points and obtain the optimal solution to realize the coordinate transformation of other points. Specifically:

[0137] I. Create a solution function from 3D pixel coordinate system to world coordinate system;

[0138] The solution function is expressed as: , where R represents an input rotation matrix to be solved, t is an input translation vector to be solved, Respectively represent the value of the j-th feature point on the X-axis, Y-axis, and Z-axis of the world coordinate system, They represent the values ​​of the jth feature point on the X-axis, Y-axis, and Z-axis of the 3D pixel coordinate system, respectively. j ranges from 1 to M, where M is the number of feature points.

[0139] It should be noted that each rotation matrix R is a 3*3 matrix, and each translation vector t is a 3*1 vector.

[0140] II. Substitute the 3D pixel coordinate value and world coordinate value of each feature point into the solution function to obtain the optimal solution from the 3D pixel coordinate system to the world coordinate system;

[0141] In the process of solving, the data items in the rotation matrix and the translation vector are constantly adjusted, and the changing curve of the solution function is observed. When the return value of the solution function is the minimum, the corresponding rotation matrix and translation vector are the optimal solution from the 3D pixel coordinate system to the world coordinate system, denoted as R top , t top .

[0142] (4) Contour calibration module, used to complete contour calibration based on the optimal solution from 3D pixel coordinate system to world coordinate system;

[0143] Extract the pixel coordinate set of the calibration block in the contour part of the 3D image using the formula: The pixel coordinate values ​​of the contour of the calibration block are converted into world coordinate values ​​and organized into a world coordinate set. The world coordinate set is then used as the calibration data of the calibration block contour to complete the subsequent contour calibration operation. Represents the 3D pixel coordinate value of the t-th pixel in the pixel coordinate set of the contour part of the calibration block, represents the rotation matrix in the optimal solution, represents the translation vector in the optimal solution, Represents 3D pixel coordinate value The converted world coordinate value. It should be noted that the 0 in the formula is a 1*3 zero vector.

[0144] The specific implementation methods described above further illustrate the objectives, technical solutions and beneficial effects of the present invention in detail. It should be understood that the above description is only a specific implementation method of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc. made on the basis of the technical solution of the present invention should be included in the scope of protection of the present invention.

Claims

1. A calibration method for a line laser 3D profile measuring instrument, characterized in that: The method comprises: Step 1: Estimate the optimal solution of the camera intrinsic parameters based on the 2D image of the calibration block under different postures. It is divided into the following sub-steps: Place the calibration block in different postures and use a camera to collect 2D images of the calibration block in different postures; Use the corner response function to obtain the corner points of the calibration block in each 2D image; Corner response function It is expressed as: , where (x, y) is the input pixel point, Represents the gray gradient vector of the pixel point (x, y), Represents the local neighborhood point set of the pixel point (x, y), Represents a point set The pixels in Represents pixel The gradient on the Y axis, Represents pixel The gradient on the X axis, Represents the gradient of the pixel point (x, y) on the Y axis, Represents the gradient of the pixel point (x, y) on the X-axis; Calculate the intrinsic parameters of each 2D image based on the obtained corner points and the actual size of the calibration block; Input the intrinsic parameters of all 2D images into the intrinsic parameter optimal solution estimation function, and output the optimal solution of the camera intrinsic parameters; Optimal solution estimation function It is expressed as: , where A is the input internal parameter set, Represents the value of the first internal parameter on the bth image, Indicates the value of the second internal parameter in the bth image, Indicates The value of the internal parameter on the b-th image, is the total number of internal parameters, b ranges from 1 to B, and B is the total number of 2D images collected by the camera this time. are the estimated values ​​of the optimal solutions for different internal parameters, starting from the mean of each internal parameter on all the collected images until The calculation stops when the result is the minimum, and returns the value at that time. As the optimal solution for the camera’s internal parameters; Step 2: Place the calibration block on the motion platform at a certain angle to the motion platform, turn on the laser line, move the motion platform, and use the camera to continuously collect 2D images of the calibration block during the movement process. Collect the point cloud data of the calibration block through the laser line extraction algorithm. Step 3: Based on the optimal solution of the camera internal parameters, the 2D image of the calibration block during the movement is corrected, and the 2D image is reconstructed into a 3D image of the calibration block in combination with the point cloud data of the calibration block; Step 4, extract the 3D pixel coordinate values ​​of several feature points on the 3D image of the calibration block; Step 5, construct the world coordinate system of the calibration block, and obtain the world coordinate value of each feature point on the calibration block; Step 6: According to the 3D pixel coordinate value and the world coordinate value of each feature point, the optimal solution from the 3D pixel coordinate system to the world coordinate system is calculated to complete the contour calibration.

2. The calibration method of a line laser 3D profile measuring instrument according to claim 1, characterized in that: Reconstructing the 2D image into a 3D image of the calibration block by combining the point cloud data of the calibration block includes the following sub-steps: Get the pixel coordinates of each corner point of the calibration block on the 2D image; Get the three-dimensional coordinate values ​​of each corner point of the calibration block on the point cloud data; According to the 2D pixel coordinate value and the 3D coordinate value of each corner point, the conversion coefficient from 2D pixel coordinate to 3D coordinate is calculated; A 3D image of the calibration block is generated based on the conversion coefficients from 2D pixel coordinates to 3D coordinates.

3. The calibration method of a line laser 3D profile measuring instrument according to claim 1, characterized in that: Construct the world coordinate system of the calibration block and obtain the world coordinate values ​​of each feature point on the calibration block, which specifically includes the following sub-steps: Select the center point of the calibration block as the origin of the world coordinate system; A line parallel to the plane where the calibration block is placed passing through the origin is defined as the X-axis of the world coordinate system; The perpendicular line through the origin to the X axis is defined as the Z axis of the world coordinate system; The perpendicular line through the origin to the plane where the X-axis and Z-axis are located is defined as the Y-axis of the world coordinate system; Find the corresponding coordinate values ​​of each feature point in the world coordinate system.

4. The calibration method of a line laser 3D profile measuring instrument according to claim 1, characterized in that: According to the 3D pixel coordinate value and the world coordinate value of each feature point, the optimal solution from the 3D pixel coordinate system to the world coordinate system is calculated to complete the contour calibration, which specifically includes the following sub-steps: Create a solver function from 3D pixel coordinate system to world coordinate system; Substitute the 3D pixel coordinate value and world coordinate value of each feature point into the solution function to obtain the optimal solution from the 3D pixel coordinate system to the world coordinate system; The calibration data of the calibration block contour is obtained based on the optimal solution from the 3D pixel coordinate system to the world coordinate system.

5. A calibration system for a line laser 3D profile measuring instrument, characterized in that: The system includes: an internal parameter solving module, a 3D image reconstruction module, a coordinate system conversion solving module, and a contour calibration module; The intrinsic parameter solving module is used to estimate the optimal solution of the camera intrinsic parameters based on the 2D image of the calibration block under different postures, including: 2D image acquisition submodule, used to acquire 2D images of the calibration block in different postures; Corner detection submodule, used to obtain the corner points of the calibration block in each 2D image using the corner response function; Corner response function It is expressed as: , where (x, y) is the input pixel point, Represents the gray gradient vector of the pixel point (x, y), Represents the local neighborhood point set of the pixel point (x, y), Represents a point set The pixels in Represents pixel The gradient on the Y axis, Represents pixel The gradient on the X axis, Represents the gradient of the pixel point (x, y) on the Y axis, Represents the gradient of the pixel point (x, y) on the X-axis; The intrinsic parameter estimation submodule is used to calculate the intrinsic parameters of each 2D image based on the acquired corner points and the actual size of the calibration block, and input the intrinsic parameters of all 2D images into the intrinsic parameter optimal solution estimation function to output the optimal solution of the camera intrinsic parameters; Optimal solution estimation function It is expressed as: , where A is the input internal parameter set, Represents the value of the first internal parameter on the bth image, Indicates the value of the second internal parameter in the bth image, Indicates The value of the internal parameter on the b-th image, is the total number of internal parameters, b ranges from 1 to B, and B is the total number of 2D images collected by the camera this time. are the estimated values ​​of the optimal solutions for different internal parameters, starting from the mean of each internal parameter on all the collected images until The calculation stops when the result is the minimum, and returns the value at that time. As the optimal solution for the camera’s internal parameters; The 3D image reconstruction module is used to correct the 2D image of the calibration block during movement using the optimal solution of the camera intrinsic parameters, and reconstruct the 2D image into a 3D image of the calibration block in combination with the point cloud data of the calibration block; Coordinate system conversion solution module, used to calculate the optimal solution from 3D pixel coordinate system to world coordinate system; The contour calibration module is used to complete the contour calibration based on the optimal solution from the 3D pixel coordinate system to the world coordinate system.

6. The calibration system of a line laser 3D profile measuring instrument according to claim 5, characterized in that: The 3D image reconstruction module includes a raw data acquisition submodule, a 2D image correction submodule, and a 2D to 3D image conversion submodule; The raw data acquisition submodule is used to continuously acquire the 2D image and point cloud data of the calibration block during the motion process; The 2D image correction submodule is used to correct the 2D image of the calibration block during movement using the optimal solution of the camera intrinsic parameters; The 2D to 3D image submodule is used to reconstruct the 2D image into a 3D image of the calibration block by combining the point cloud data of the calibration block.

7. The calibration system of a line laser 3D profile measuring instrument according to claim 5, characterized in that: The coordinate system conversion solution module includes a feature point extraction submodule, a world coordinate system construction submodule, and an optimal solution calculation submodule; The feature point extraction submodule is used to extract the 3D pixel coordinate values ​​of several feature points on the 3D image of the calibration block; The world coordinate system construction submodule is used to construct the world coordinate system of the calibration block and obtain the world coordinate value of each feature point on the calibration block; The optimal solution calculation submodule is used to calculate the optimal solution from the 3D pixel coordinate system to the world coordinate system according to the 3D pixel coordinate value and the world coordinate value of each feature point.

Citation Information

Patent Citations

  • Control method of manipulator grabbing control system based on binocular stereoscopic vision

    CN106041937A

  • High-precision camera calibration method based on mixed distortion model

    CN106780628A

  • Monocular planar size measuring method eliminating influence of refraction of protective glass

    CN108364318A

  • Monocular vision measurement and ground test method based on three-dimensional point cloud database model

    CN110849331A

  • High-precision line laser three-dimensional reconstruction calibration method

    CN115187676A