Straightness measuring method and device of line laser
The method uses a camera to calibrate and project laser light strip features onto a virtual surface for precise straightness evaluation, addressing inaccuracies and complexity in existing methods, enabling versatile and economical line laser assessments.
Patent Information
- Application Number
- CN202411150528.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-21
- Publication Date
- 2024-12-03
AI Technical Summary
Existing methods for measuring line laser straightness are inaccurate due to human error and require complex, costly systems that limit versatility and are not economical for low-cost applications.
A method using a camera to capture multiple plane target and laser light strip images, calibrate the camera, extract laser light strip features, perform distortion correction, and project three-dimensional coordinates onto a virtual surface for straightness evaluation using the least squares method.
Provides accurate, efficient, and cost-effective straightness measurement with simple hardware, suitable for various applications, ensuring high-precision positioning and measurement.
Smart Images

Figure CN119063658A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of straightness detection of line lasers, and in particular to a method and a device for measuring the straightness of a line laser. Background Art
[0002] At present, the straightness measurement method of line laser mainly uses the area array CCD to capture images, places it at the position to be measured, and displays multiple images captured at the measurement point to the inspector through the display device at the same time, and the inspector observes with the naked eye. This method is intuitive but has low accuracy and is greatly affected by human factors.
[0003] In order to effectively avoid human errors, CN202211352853.2 discloses a method, device and system for measuring the straightness of the positioning line of a laser positioning light source, including: a shading device: two black light blocking plates F and R arranged oppositely and in parallel; a distance adjusting device: used to adjust the gap spacing between the black light blocking plates F and the black light blocking plates R, and the gap can be passed through by the laser positioning line of the measured line light source; also includes a linear moving mechanism: used to drive the black light blocking plates F and R to lock the spacing and then perform overall linear movement; through two black light blocking plates F and R arranged oppositely and in parallel, and the gap spacing formed between the black light blocking plates F and the black light blocking plates R is adjustable, through a laser power meter at a preset position, the straightness measurement of the laser line is converted into measurement of the overall moving distance of the black light blocking plates F and R by the linear moving mechanism. CN202111629440.X discloses a line laser non-standard performance detection platform and a line laser characteristic parameter detection method. The detection platform includes: a slide rail, a servo motor, a host computer, a laser fixing tool and a linear array camera; after power-on, the host computer controls the laser fixing tool to move on the slide rail through the servo motor, thereby driving the line laser to be detected to move on the slide rail. The linear array camera collects the line laser during the movement of the line laser to be detected to obtain multiple images, and sends the multiple images to the host computer, so that the host computer analyzes and calculates non-standard characteristic parameters based on the multiple images, so as to realize the use of non-standard characteristic parameters to evaluate the signal reference source quality of the laser scanning intersection measurement system represented by a large-scale three-dimensional space locator.
[0004] Both of the above solutions involve the integration and coordination of multiple complex devices and components, which increases the complexity and maintenance difficulty of the system. In addition, the line laser non-standard performance detection platform and the line laser characteristic parameter detection method are mainly aimed at the straightness measurement in a specific type of laser scanning intersection measurement system, which limits its versatility in practical applications.
[0005] In summary, the cost of the existing technical methods is also relatively high, which is not economical for low-cost applications and limits their application scenarios. Summary of the invention
[0006] In order to solve the above technical problems, the present invention provides a method and device for measuring the straightness of a line laser.
[0007] To achieve the above object, the present invention is implemented according to the following technical solutions:
[0008] One of the purposes of the present invention is to provide a method for measuring the straightness of a line laser, comprising the following steps:
[0009] S1. Fix a camera and a line laser on a base, place a two-dimensional plane target within the camera field of view, and determine the positional relationship between the camera coordinate system and the line laser coordinate system; then place the two-dimensional plane target at multiple different positions within the camera field of view, and use the camera to capture a two-dimensional plane target image and a laser light strip image at each position; wherein, when capturing the laser light strip image, the line laser is turned on to form a laser light strip on the two-dimensional plane target, and when capturing the two-dimensional plane target image, the line laser is turned off;
[0010] S2. Use Zhang's calibration method to calibrate the camera for multiple two-dimensional plane target images taken by the camera, and then use Steger algorithm to extract laser light strip features;
[0011] S3, performing distortion correction on the laser light strip image, solving the three-dimensional coordinate point of the center point of the laser light strip in each laser light strip image in the camera coordinate system by combining the homography matrix, and then converting the three-dimensional coordinate point of each laser light strip center point in the camera coordinate system to the line laser coordinate system to obtain the three-dimensional coordinate point of each laser light strip center point in the line laser coordinate system;
[0012] S4, establishing a virtual surface perpendicular to the line laser in front of the line laser, and then projecting the three-dimensional coordinate point of the center point of each laser light strip in the line laser coordinate system onto the virtual surface to obtain multiple two-dimensional projection points;
[0013] S5. Use the least squares method to fit multiple two-dimensional projection points into a straight line, and use the fitting error to evaluate the straightness of the laser light strip.
[0014] Furthermore, in step S1, the positional relationship between the camera coordinate system and the line laser coordinate system is:
[0015] The origin is the optical center of the camera. C , with the right side of the camera as X C Axis, with the bottom of the camera as Y C , with the camera optical axis as Z C Axis establishes the camera coordinate system O C -X C Y C Z C , line laser coordinate system O L -XL Y L Z L Origin O L Located at the light outlet, Z L The axis is directly in front of the line laser, O L Located in X C axis, set at the camera optical center O C Along X C The position a on the negative half axis is the origin O of the line laser coordinate system. L ; The rotation matrix R between the camera coordinate system and the line laser coordinate system CL Then it is the unit matrix I, the translation vector t CL is [a 0 0] T .
[0016] Furthermore, in step S2, using the Steger algorithm to extract the laser light stripe features specifically includes:
[0017] 1) Suppose the laser light strip image is Gaussian filtered and the first-order partial derivative at any pixel point (x, y) is calculated as h x 、h y , the second-order partial derivative is h xx 、h xy 、h yy , then the Hessian matrix of this point is expressed as:
[0018]
[0019] 2) Calculate the maximum eigenvalue λ of the Hessian matrix H(x,y) and its corresponding eigenvector (n x ,n y ), the feature vector is the normal direction of the center of the laser light strip, and λ corresponds to the second-order derivative intensity at the pixel point (x, y); the λ corresponding to each pixel point is screened by the set threshold to obtain the pixel-level coordinates (x0, y0) of the center of the light strip;
[0020] 3) Perform a second-order Taylor expansion along the normal direction at (x0, y0), and calculate (x0+tn x ,y0+tn y ) in the normal direction (n x ,n y ) to find the center position of the laser light strip, that is, the sub-pixel at the center of the laser light strip; wherein the calculation formula of the parameter t is as follows:
[0021]
[0022] Furthermore, the step S3 specifically includes:
[0023] S31, let the three-dimensional coordinates of any point on the two-dimensional plane target in the target coordinate system be P T =[X T Y T 0] T , P T =[X T Y T 0] T The undistorted two-dimensional coordinates of the corresponding projection point on the laser light strip image are p T =[uv] T , then using the camera perspective projection model:
[0024]
[0025] Among them, r1 and r2 are the rotation matrices R TC The first and second columns of G = A[r1 r2 t TC ] describes the homography transformation between the target plane and the image plane, and uses the homography matrix G to realize the correspondence of the three-dimensional coordinates P of the center point of each laser light strip in the laser light strip image T The solution of
[0026] S32, combined with the camera external parameters of the current calibration image acquisition position P T Converted to its three-dimensional coordinates in the camera coordinate system, the conversion formula is:
[0027]
[0028] in, The rotation matrix from the target coordinate system to the camera coordinate system at each shooting position when using Zhang's calibration method for camera calibration. The translation vector from the target coordinate system to the camera coordinate system at each shooting position when using Zhang's calibration method for camera calibration;
[0029] The above conversion formula is used to transform the center point of the laser light strip in each laser light strip image into a three-dimensional coordinate point set in the camera coordinate system. Assume there are M three-dimensional coordinate points in total;
[0030] S33, the obtained three-dimensional coordinate point set in the camera coordinate system Convert to the three-dimensional coordinates in the line laser coordinate system, the conversion formula is:
[0031]
[0032] Where I is the 3×3 identity matrix; t CL =[a 0 0] Trepresents the translation vector between the camera coordinate system and the line laser coordinate system, and a represents the distance from the camera optical center to the line laser projection center;
[0033] The above conversion formula is used to transform the three-dimensional coordinate point set in the camera coordinate system The three-dimensional coordinate point set converted to the line laser coordinate system Assume that there are M three-dimensional coordinate points in total.
[0034] Furthermore, the step S4 specifically includes:
[0035] In the line laser coordinate system, along Z L Axis positive direction, select a distance from the origin O L is the position of d, and is perpendicular to Z here L A virtual surface is established with the origin O of the line laser coordinate system L As the projection center, the obtained three-dimensional coordinate point set Perform a central projection onto the virtual surface to obtain a series of two-dimensional projection points The calculation formula for the two-dimensional projection point is as follows:
[0036]
[0037] in, d is the distance from the virtual surface to the origin of the line laser coordinate system.
[0038] Furthermore, the step S5 specifically includes:
[0039] The obtained projection points are then fitted using the linear least squares method. Perform straight line fitting, and assume that the equation of the fitted line is Ax+By+C=0; finally, the straightness of the line laser is evaluated by the straight line fitting error, that is, the Euclidean distance from each projection point to the fitted line is calculated, and then the root mean square value RMS is calculated:
[0040]
[0041] The smaller the calculated RMS value, the more closely the projection points are distributed around the fitted straight line, and therefore the straightness of the line laser is better; conversely, if the RMS value is larger, it means that the projection points are more dispersed and the straightness of the laser is worse.
[0042] A second object of the present invention is to provide a linear laser straightness measuring device, comprising:
[0043] Base for fixed mounting of camera and line laser;
[0044] A two-dimensional plane target can be movably set in front of the base to adjust multiple different positions within the camera's field of view;
[0045] The camera is fixed on the upper end surface of the base, and the two-dimensional plane target is always located within the field of view of the camera;
[0046] Line lasers are fixed side by side on the upper end surface of the base, and when the line lasers are turned on, they form laser light strips on the two-dimensional plane target;
[0047] The processing system is connected to the camera and is used to perform the straightness measurement method of the line laser.
[0048] Preferably, the two-dimensional planar target is a two-dimensional checkerboard.
[0049] Compared with the prior art, the present invention first uses a camera to collect multiple plane target images and laser light strip images at different angles, and uses them to calibrate the internal and external parameters of the camera and extract the light strip features, and calculates the three-dimensional coordinates of the light strip points. Then, these three-dimensional coordinate points are projected onto a preset virtual surface through the central projection formula, and then the projection points on the virtual surface are fit into a straight line using the least squares method, and the fitting error is used to evaluate the straightness of the line laser.
[0050] In summary, the straightness measurement device and method of the line laser described in the present invention have the advantages of simple hardware structure, low cost, convenient operation, good versatility, etc., which can assist users in selecting the line laser with the best performance from the market and provide strong guarantee for experiments and measurements; at the same time, in linear positioning and three-dimensional measurement applications, the device and method provide an accurate and efficient performance evaluation solution for the line laser, effectively avoiding the curvature influence that may be caused by low-cost line lasers, and ensuring high-precision positioning and measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 This is a layout diagram of the straightness measurement device of the line laser of the present invention.
[0052] Figure 2 It is a schematic structural diagram of the two-dimensional planar target of the present invention.
[0053] Figure 3 The figure is a flow chart of the straightness measurement method of a line laser of the present invention.
[0054] Figure 4 This is the effect diagram of laser light strip feature extraction.
[0055] Figure 5 It is the position of laser light strip point, virtual surface, line laser and camera in three-dimensional space, as well as the central projection relationship of light strip point in three-dimensional space.
[0056] Figure 6 The straight line fitting and RMS calculation results of the virtual surface projection points of the line laser with good straightness.
[0057] Figure 7 The straight line fitting and RMS calculation results of the virtual surface projection points of a line laser with poor straightness. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with embodiments. The specific embodiments described herein are only used to explain the present invention and are not used to limit the invention.
[0059] Example 1
[0060] like Figure 3 As shown, this embodiment exemplarily shows a method for measuring the straightness of a line laser, and the specific steps are as follows:
[0061] S1. Reference Figure 1 , fix the camera 3 and the line laser 2 on the base 1, and place a two-dimensional plane target 4 within the field of view of the camera 3 (this embodiment uses Figure 2 The chessboard of the two-dimensional plane shown in FIG. 1 has a size of 12 (length) × 9 (width) and a side length of 20 mm. The distance from the optical center of the camera 3 to the projection center of the line laser 2 is set to 130 mm. The optical center of the camera 3 is taken as the origin O C , with the right side of camera 3 as X C Axis, with the bottom of camera 3 as Y C , with the optical axis of camera 3 as Z C Axis establishes the camera coordinate system O C -X C Y C Z C , line laser coordinate system O L -X L Y L Z L Origin O L Located at the light outlet, Z L The axis is directly in front of the line laser 2, O L Located in X C axis, set at the optical center O of camera 3 C Along X C The position a on the negative half axis is the origin O of the line laser coordinate system. L ; The rotation matrix R between the camera coordinate system and the line laser coordinate system CL Then it is the unit matrix I, the translation vector t CL is [a 0 0] T; Then the two-dimensional plane target 4 is placed at a plurality of different positions within the field of view of the camera 3, and a two-dimensional plane target image and a laser light strip image are captured by the camera 3 at each position; wherein, when capturing the laser light strip image, the line laser 2 is turned on to form a laser light strip on the two-dimensional plane target, and when capturing the two-dimensional plane target image, the line laser 2 is turned off;
[0062] S2. Use the "Camera Calibration Toolbox for Matlab" toolbox developed by Jean-Yves Bouguet based on Zhang's calibration method to calibrate the camera for multiple two-dimensional plane target images taken by the camera, and obtain the camera internal parameter matrix A, distortion coefficients (k1, k2), and the rotation matrix from the target coordinate system to the camera coordinate system at each shooting position. and translation vector Then, the Steger algorithm is used to extract the laser light stripe features. The Steger algorithm extracts the laser light stripe features specifically including:
[0063] 1) Suppose the laser light strip image is Gaussian filtered and the first-order partial derivative at any pixel point (x, y) is calculated as h x 、h y , the second-order partial derivative is h xx 、h xy 、h yy , then the Hessian matrix of this point is expressed as:
[0064]
[0065] 2) Calculate the maximum eigenvalue λ of the Hessian matrix H(x,y) and its corresponding eigenvector (n x ,n y ), the feature vector is the normal direction of the center of the laser light strip, and λ corresponds to the second-order derivative intensity at the pixel point (x, y); the λ corresponding to each pixel point is screened by the set threshold to obtain the pixel-level coordinates (x0, y0) of the center of the light strip;
[0066] 3) To find the sub-pixel position, perform a second-order Taylor expansion along the normal direction at (x0, y0). By setting the first-order derivative of this Taylor expansion to zero, calculate (x0+tn x ,y0+tn y ) in the normal direction (n x ,n y ) to find the center position of the laser light strip, that is, the sub-pixel at the center of the laser light strip. The effect diagram of laser light strip feature extraction is as follows: Figure 4 As shown; the calculation formula of parameter t is as follows:
[0067]
[0068] S3, performing distortion correction on the laser light strip image, solving the three-dimensional coordinate point of the center point of the laser light strip in each laser light strip image in the camera coordinate system by combining the homography matrix, and then converting the three-dimensional coordinate point of each laser light strip center point in the camera coordinate system to the line laser coordinate system to obtain the three-dimensional coordinate point of each laser light strip center point in the line laser coordinate system;
[0069] S31. Substituting the distortion coefficient into the Brown distortion model can realize the distortion correction of any point on the image. Suppose the three-dimensional coordinates of any point on the two-dimensional plane target in the target coordinate system are P T =[X T Y T 0] T , P T =[X T Y T 0] T The undistorted two-dimensional coordinates of the corresponding projection point on the laser light strip image are p T =[uv] T , then using the camera perspective projection model:
[0070]
[0071] Among them, r1 and r2 are the rotation matrices R TC The first and second columns of G = A[r1 r2 t TC ] describes the homography transformation between the target plane and the image plane, and uses the homography matrix G to realize the correspondence of the three-dimensional coordinates P of the center point of each laser light strip in the laser light strip image T The solution of
[0072] S32, combined with the camera external parameters of the current calibration image acquisition position P T Converted to its three-dimensional coordinates in the camera coordinate system, the conversion formula is:
[0073]
[0074] in, The rotation matrix from the target coordinate system to the camera coordinate system at each shooting position when using Zhang's calibration method for camera calibration. The translation vector from the target coordinate system to the camera coordinate system at each shooting position when using Zhang's calibration method for camera calibration;
[0075] The above conversion formula is used to transform the center point of the laser light strip in each laser light strip image into a three-dimensional coordinate point set in the camera coordinate system. Assume there are M three-dimensional coordinate points in total;
[0076] S33, the obtained three-dimensional coordinate point set in the camera coordinate system Convert to the three-dimensional coordinates in the line laser coordinate system, the conversion formula is:
[0077]
[0078] Where I is the 3×3 identity matrix; t CL =[130 0 0] T represents the translation vector between the camera coordinate system and the line laser coordinate system, 130 means the distance from the camera optical center to the line laser projection center is 130mm;
[0079] The above conversion formula is used to transform the three-dimensional coordinate point set in the camera coordinate system The three-dimensional coordinate point set converted to the line laser coordinate system Assume that there are M three-dimensional coordinate points in total.
[0080] S4. Determine to establish a virtual surface perpendicular to the line laser in front of the line laser, and then project the three-dimensional coordinate point of the center point of each laser light strip in the line laser coordinate system onto the virtual surface to obtain multiple two-dimensional projection points; specifically:
[0081] In the line laser coordinate system, along Z L Axis positive direction, select a distance from the origin O L The position is 100 mm and is perpendicular to Z L A virtual surface is established with the origin O of the line laser coordinate system L As the projection center, the obtained three-dimensional coordinate point set Perform a central projection onto the virtual surface to obtain a series of two-dimensional projection points The calculation formula for the two-dimensional projection point is as follows:
[0082]
[0083] in, d = 100 mm is the distance from the virtual surface to the origin of the line laser coordinate system.
[0084] The positions of laser light strip points, virtual surfaces, line lasers and cameras in three-dimensional space, as well as the central projection of the light strip points in three-dimensional space are shown in Figure 2. Figure 5 shown.
[0085] S5. Fit multiple two-dimensional projection points into a straight line using the least square method, and use the fitting error to evaluate the straightness of the laser light strip; specifically:
[0086] The obtained projection points are then fitted using the linear least squares method. Perform straight line fitting, and assume that the equation of the fitted line is Ax+By+C=0; finally, the straightness of the line laser is evaluated by the straight line fitting error, that is, the Euclidean distance from each projection point to the fitted line is calculated, and then the root mean square value RMS is calculated:
[0087]
[0088] The smaller the RMS value calculated, the more closely the projection points are distributed around the fitted straight line, so the straightness of the line laser is better. Figure 6 The figure shows the straight line fitting and RMS calculation results of the projection points of the virtual surface of the line laser with good straightness; on the contrary, if the RMS value is larger, it means that the distribution of the projection points is more dispersed and the straightness of the laser is worse, such as Figure 7 The straight line fitting and RMS calculation results of the virtual surface projection points of a line laser with poor straightness.
[0089] By implementing the above method, the straightness of the line laser can be accurately determined, thereby screening out the line laser with the best performance.
[0090] Example 2
[0091] like Figure 1 , Figure 2 As shown, this embodiment exemplarily shows a straightness measurement device of a line laser, comprising:
[0092] A base 1, used for fixing and installing a camera 3 and a line laser 2;
[0093] A two-dimensional chessboard can be movably arranged in front of the base to adjust multiple different positions within the camera's field of view;
[0094] The camera 3 is fixed on the upper end surface of the base 1, and the chessboard of the two-dimensional plane is always located within the field of view of the camera 3;
[0095] Line lasers 2 are fixed side by side on the upper end surface of the base 1, and after the line lasers 2 are turned on, laser light strips are formed on a chessboard grid in a two-dimensional plane;
[0096] The processing system is connected to the camera 3 and is used to execute the straightness measurement method of the line laser in Example 1. The specific measurement process will not be repeated in this embodiment.
[0097] The technical solution of the present invention is not limited to the above-mentioned specific embodiments. All technical variations made according to the technical solution of the present invention fall within the protection scope of the present invention.
Claims
1. A method for measuring the straightness of a line laser, characterized in that: The following steps are involved: S1. Fix a camera and a line laser on a base, place a two-dimensional plane target within the camera field of view, and determine the positional relationship between the camera coordinate system and the line laser coordinate system; then place the two-dimensional plane target at multiple different positions within the camera field of view, and use the camera to capture a two-dimensional plane target image and a laser light strip image at each position; wherein, when capturing the laser light strip image, the line laser is turned on to form a laser light strip on the two-dimensional plane target, and when capturing the two-dimensional plane target image, the line laser is turned off; S2. Use Zhang's calibration method to calibrate the camera for multiple two-dimensional plane target images taken by the camera, and then use Steger algorithm to extract laser light strip features; S3, performing distortion correction on the laser light strip image, solving the three-dimensional coordinate point of the center point of the laser light strip in each laser light strip image in the camera coordinate system by combining the homography matrix, and then converting the three-dimensional coordinate point of each laser light strip center point in the camera coordinate system to the line laser coordinate system to obtain the three-dimensional coordinate point of each laser light strip center point in the line laser coordinate system; S4, establishing a virtual surface perpendicular to the line laser in front of the line laser, and then projecting the three-dimensional coordinate point of the center point of each laser light strip in the line laser coordinate system onto the virtual surface to obtain multiple two-dimensional projection points; S5. Use the least squares method to fit multiple two-dimensional projection points into a straight line, and use the fitting error to evaluate the straightness of the laser light strip.
2. The method for measuring the straightness of a line laser according to claim 1, characterized in that: In step S1, the positional relationship between the camera coordinate system and the line laser coordinate system is: The origin is the optical center of the camera. C , with the right side of the camera as X C Axis, with the bottom of the camera as Y C , with the camera optical axis as Z C Axis establishes the camera coordinate system O C -X C Y C Z C , line laser coordinate system O L -X L Y L Z L Origin O L Located at the light outlet, Z L The axis is directly in front of the line laser, O L Located in X C axis, set at the camera optical center O C Along X C The position a on the negative half axis is the origin O of the line laser coordinate system. L ; The rotation matrix R between the camera coordinate system and the line laser coordinate system CL Then it is the unit matrix I, the translation vector t CL is [a 00] T .
3. The linear laser straightness measurement method according to claim 1, characterized in that: The step S2 of using the Steger algorithm to extract the laser light stripe features specifically includes: 1) Suppose the laser light strip image is Gaussian filtered and the first-order partial derivative at any pixel point (x, y) is calculated as h x 、h y , the second-order partial derivative is h xx 、h xy 、h yy , then the Hessian matrix of this point is expressed as: 2) Calculate the maximum eigenvalue λ of the Hessian matrix H(x,y) and its corresponding eigenvector (n x ,n y ), the feature vector is the normal direction of the center of the laser light strip, and λ corresponds to the second-order derivative intensity at the pixel point (x, y); the λ corresponding to each pixel point is screened by the set threshold to obtain the pixel-level coordinates (x0, y0) of the center of the light strip; 3) Perform a second-order Taylor expansion along the normal direction at (x0, y0), and calculate (x0+tn x ,y0+tn y ) in the normal direction (n x ,n y ) to find the center position of the laser light strip, that is, the sub-pixel at the center of the laser light strip; wherein the calculation formula of the parameter t is as follows:
4. The method for measuring the straightness of a line laser according to claim 1, characterized in that: The step S3 specifically includes: S31, let the three-dimensional coordinates of any point on the two-dimensional plane target in the target coordinate system be P T =[X T Y T 0] T , P T =[X T Y T 0] T The undistorted two-dimensional coordinates of the corresponding projection point on the laser light strip image are p T =[uv] T , then using the camera perspective projection model: Among them, r1 and r2 are the rotation matrices R TC The first and second columns of G = A[r1 r2 t TC ] describes the homography transformation between the target plane and the image plane, and uses the homography matrix G to realize the correspondence of the three-dimensional coordinates P of the center point of each laser light strip in the laser light strip image T The solution of S32, combined with the camera external parameters of the current calibration image acquisition position P T Converted to its three-dimensional coordinates in the camera coordinate system, the conversion formula is: in, The rotation matrix from the target coordinate system to the camera coordinate system at each shooting position when using Zhang's calibration method for camera calibration. The translation vector from the target coordinate system to the camera coordinate system at each shooting position when using Zhang's calibration method for camera calibration; The above conversion formula is used to transform the center point of the laser light strip in each laser light strip image into a three-dimensional coordinate point set in the camera coordinate system. Assume there are M three-dimensional coordinate points in total; S33, the obtained three-dimensional coordinate point set in the camera coordinate system Convert to the three-dimensional coordinates in the line laser coordinate system, the conversion formula is: Where I is the 3×3 identity matrix; t CL =[a 0 0] T represents the translation vector between the camera coordinate system and the line laser coordinate system, and a represents the distance from the camera optical center to the line laser projection center; The above conversion formula is used to transform the three-dimensional coordinate point set in the camera coordinate system The three-dimensional coordinate point set converted to the line laser coordinate system Assume that there are M three-dimensional coordinate points in total.
5. The method for measuring the straightness of a line laser according to claim 4, characterized in that: The step S4 specifically includes: In the line laser coordinate system, along Z L Axis positive direction, select a distance from the origin O L is the position of d, and is perpendicular to Z here L A virtual surface is established with the origin O of the line laser coordinate system L As the projection center, the three-dimensional coordinate point set is obtained Perform a central projection onto the virtual surface to obtain a series of two-dimensional projection points The calculation formula for the two-dimensional projection point is as follows: in, d is the distance from the virtual surface to the origin of the line laser coordinate system.
6. The method for measuring the straightness of a line laser according to claim 5, characterized in that: The step S5 specifically includes: The obtained projection points are then fitted using the linear least squares method. Perform straight line fitting, and assume that the equation of the fitted line is Ax+By+C=0; finally, the straightness of the line laser is evaluated by the straight line fitting error, that is, the Euclidean distance from each projection point to the fitted line is calculated, and then the root mean square value RMS is calculated: The smaller the calculated RMS value, the more closely the projection points are distributed around the fitted straight line, and therefore the straightness of the line laser is better; conversely, if the RMS value is larger, it means that the projection points are more dispersed and the straightness of the laser is worse.
7. A linear laser straightness measuring device, characterized in that: include: Base for fixed mounting of camera and line laser; A two-dimensional plane target can be movably set in front of the base to adjust multiple different positions within the camera's field of view; The camera is fixed on the upper end surface of the base, and the two-dimensional plane target is always located within the field of view of the camera; Line lasers are fixed side by side on the upper end surface of the base, and when the line lasers are turned on, they form laser light strips on the two-dimensional plane target; A processing system is connected to the camera and is used to execute the straightness measurement method of a line laser as described in any one of claims 1 to 6.
8. The linear laser straightness measuring device according to claim 7, characterized in that: The two-dimensional plane target is a two-dimensional plane checkerboard.
Citation Information
Patent Citations
Line laser non-standard performance detection platform and line laser characteristic parameter detection method
CN114354137A
Method, device and system for measuring straightness of positioning line of laser positioning light source
CN115406544A
