A covariant-based method for line structured light and light plane calibration

Through the covariant line structured light plane calibration method, the problem of insufficient accuracy and speed of light plane calibration is solved by using planar targets and light strip data, achieving high-precision and strong noise resistance light plane calibration, ensuring the accuracy of light strip data Make full use of the stability of feature point distribution.

CN113674360BActive Publication Date: 2024-10-25NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110941407.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-17
Publication Date
2024-10-25
Estimated Expiration
2041-08-17

AI Technical Summary

Technical Problem

In the existing line structured light measurement technology, the light plane calibration accuracy and speed are insufficient, the number of feature points is small and the distribution is unstable, the fringe data is not fully utilized, and the noise immunity is poor.

Method used

The covariant-based line structured light plane calibration method is used to extract the center point of the light bar through plane target camera calibration, PnP solution pose, Canny edge detection, gray center of gravity method, least squares fitting center line, and homography transformation. Establish light plane equations with SVD decomposition to ensure calibration accuracy and speed.

Benefits of technology

It improves the accuracy and noise immunity of laser stripes, shortens the calculation time of the light stripe centerline equation, makes full use of light stripe data, avoids feature point extraction and distribution problems, and ensures that each image data has a consistent impact on the plane equation parameters. sex.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113674360B_ABST
    Figure CN113674360B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for calibrating a light plane based on line structured light based on covariance, comprising the following steps: adopting a camera calibration method based on a plane target to obtain camera parameters; collecting plane target images with laser line stripes, and eliminating images with large reprojection errors; correcting calibration images; extracting the sub-pixel center point of the light strip in the region of interest using the grayscale centroid method; calculating the homography matrix between the two planes using the known center coordinates on the plane target and the center point in the image to obtain the equation coefficient of the center line on the two-dimensional plane of the plane target; calculating the Plucker matrix equation of the center line of the light strip in the world coordinate system; establishing a line-surface constraint equation on the light plane equation using a straight line equation; shooting multiple groups of light strip images in different positions, establishing a hyperstatic line-surface constraint equation group, and using SVD to decompose the line-surface constraint equation group to obtain the light plane equation coefficient. The present invention ensures calibration accuracy and speed, and each image data has the same influence on the plane equation parameters, thereby ensuring noise resistance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of non-contact measurement, and in particular to a covariant-based line structured light optical plane calibration method. Background Art

[0002] Line structured light measurement technology is a non-contact, noise-resistant and high-precision measurement method, in which the calibration accuracy of the line structured light plane is an important guarantee for this measurement technology. Line structured light three-dimensional measurement is to project laser light onto the measured surface, collect the quenched and tempered laser stripes by the camera, obtain the sub-pixel stripe center through refinement, and restore the three-dimensional coordinates of the stripes on the surface of the object using the camera imaging model equation and the three-dimensional space equation of the light plane. Therefore, achieving high-precision calibration of the light plane is a key technology for line structured light precision measurement.

[0003] At present, line structured light measurement mostly adopts the method of light plane calibration based on the invariant cross ratio. The coordinate information of the known calibration points on the plane target is used to obtain the intersection coordinates of the laser line and the known calibration points by the cross ratio, which is used for light plane calibration. This method requires a simple plane target with high accuracy, but the number of feature points obtained is small, and the distribution of feature points is greatly affected by the spatial posture. The factors affect it, and the fringe data is not fully utilized. Summary of the invention

[0004] The technical problem to be solved by the present invention is to provide a covariant-based line structured light optical plane calibration method, which ensures calibration accuracy and speed, and each image data has the same influence on the plane equation parameters, thereby ensuring noise resistance.

[0005] In order to solve the above technical problems, the present invention provides a covariant-based line structured light light plane calibration method, comprising the following steps:

[0006] (1) Using a camera calibration method based on a planar target, the camera intrinsic parameter matrix M and distortion parameters are obtained;

[0007] (2) Collect a planar target image with laser line stripes, and use PnP to solve the pose matrix W of the camera relative to the world coordinate system for the center of the planar target on it, and eliminate images with large reprojection errors;

[0008] (3) Correct the calibration image, use Canny to obtain the edges in all images and count the grayscale, calculate the threshold using the Otsu threshold method, combine the highest grayscale value to obtain the adaptive segmentation threshold T, and perform connected domain analysis on the segmented image to obtain the minimum enclosing rectangle where the maximum connected domain is located as the light stripe area of ​​interest;

[0009] (4) The sub-pixel center points of the light stripes in the region of interest are extracted using the grayscale centroid method, the set of light strip center points is smoothed using the 5-point sliding average method, and the centerline equation I is fitted using the least squares method;

[0010] (5) Using the known coordinates of the center of the circle on the plane target and the center point of the circle in the image, calculate the homography matrix H between the two planes, and use the covariance to obtain the equation coefficient I' = I·H of the center line on the two-dimensional plane of the plane target. -1 ;

[0011] (6) Calculate the Plucker matrix equation L for the center line of the light strip in the world coordinate system w , using the pose relationship in step (2) to obtain the Plucker matrix equation L of the center line of the light strip in the camera coordinate system c , is L c =(WA)·(WB) T -(WB)·(WA) T =WL w W T , where A and B are the three-dimensional coordinates of any two points on the straight line;

[0012] (7) Use the straight line equation to establish the line-plane constraint equation L on the light plane equation c π = 0;

[0013] (8) Take multiple sets of light stripe images at different positions, establish a hyperstatic line-surface constraint equation group, and use SVD to decompose the line-surface constraint equation group to obtain the light plane equation coefficients.

[0014] Preferably, in step (3), the calibration image is corrected, the edges in all images are obtained by using Canny and the grayscale is counted, the threshold is calculated by the Otsu threshold method, the adaptive segmentation threshold T is obtained by combining the highest grayscale value, and the segmented image is analyzed for the connected domain, and the minimum enclosing rectangle where the maximum connected domain is located is obtained as the light strip area of ​​interest. Specifically, the edge image is obtained by using Canny to obtain all edge positions in the image, and the edge image is used as a mask to obtain all grayscale values ​​at the edge, and the threshold T is calculated by using the Otsu threshold method. otsu , combined with the maximum gray value G on the light bar, we get the adaptive segmentation threshold T = (T otsu +G) / 2, the segmentation image is obtained according to the adaptive segmentation threshold result, and the area with the largest connected domain is selected as the region of interest of the light strip on the chessboard according to the connected domain analysis.

[0015] Preferably, in step (4), the grayscale centroid method is used to extract the sub-pixel center points of the light strips in the region of interest, the five-point sliding average method is used to smooth the light strip center point set, and the least squares method is used to fit the center line equation I. Specifically, the light strips with the maximum value of the connected domain label in the region of interest are counted as the behavior search object, and the grayscale centroid method is used to extract the center point of the light strip (x m ,y m ), the calculation process is

[0016]

[0017] Where I(x i ,y i ) is the image (x i ,y i ) is extracted, and after the extraction is completed, the center point set is smoothed by five-point sliding to obtain the new coordinate point (x′ m ,y′ m ).

[0018] Preferably, in step (5), the homography matrix H between the two planes is calculated using the known coordinates of the center of the circle on the plane target and the center point of the circle in the image, and the equation coefficient I'=I·H of the center line of the plane target on the two-dimensional plane is obtained by covariance. -1 Specifically, the designed plane target is used, the large circle determines the coordinate system, the small circle determines the center of the circle, and the middle area is used to project the laser line. In addition, in the two-dimensional projective transformation, there is a homography relationship between the points of the two planes, x′=H·x, and the points are on the straight line, so the homography relationship between the two planes, that is, covariance, can be derived. The linear equation is fitted using the least squares method.

[0019]

[0020] Where I and I' are the coefficients of the straight line equations on the two planes, and x and x' are the homogeneous expressions of the points on the two straight lines.

[0021] Preferably, in step (6), the Plucker matrix equation L of the center line of the light strip in the world coordinate system is calculated: w , using the pose relationship in step (2) to obtain the Plucker matrix equation L of the center line of the light strip in the camera coordinate system c , is L c =(WA)·(WB) T -(WB)·(WA) T =WL w W T , where A and B are the three-dimensional coordinates of any two points on the straight line. Specifically, take any two points on the straight line I', and since the points are on the plane target plane, satisfying z = 0, convert the two points into three-dimensional point coordinates, and obtain the matrix L according to the Plucker transformation w

[0022]

[0023] Where A and B are points on the world plane, then the spatial straight line equation of the camera coordinate system is

[0024] L c =WL w W T .

[0025] Preferably, in step (8), multiple groups of light stripe images in different positions are captured, a hyperstatic line-plane constraint equation group is established, and the line-plane constraint equation group is decomposed by SVD to obtain the light plane equation coefficients. Specifically, multiple groups of different positions are selected and the target plane is moved multiple times (n≥2) to obtain multiple groups of straight lines L on the light plane. ci , establish the line-surface equation system

[0026] L T π=0,where L=(L c1 ,L c2 ,…,L cn )

[0027] Decompose L using SVD, L = UDV T , the smallest singular value in D is in V T The eigenvectors in are the coefficients π of the plane equation.

[0028] The beneficial effects of the present invention are as follows: (1) the acquired laser stripes are of high precision and strong noise resistance, and can be used as initial data for light plane calibration, thereby ensuring calibration accuracy; (2) the light stripe centerline equation data can be obtained quickly, and only homography transformation is required to obtain the light stripe straight line equation expression parameters, thereby ensuring calibration speed; (3) the light stripe data is fully utilized, and the problem of feature point extraction and feature point distribution is avoided, so that each image data has the same influence on the plane equation parameters, thereby ensuring noise resistance. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] Figure 1 It is a schematic diagram of the calibration principle of the present invention.

[0030] Figure 2 Schematic diagram of the plane target required for camera calibration of the present invention.

[0031] Figure 3 This is a display diagram of the light stripe extraction result on a planar target of the present invention in the original image.

[0032] Figure 4 This is a schematic diagram of the process flow of the present invention. DETAILED DESCRIPTION

[0033] like Figure 1 and Figure 4 As shown, a covariant line structured light light plane calibration method includes the following steps:

[0034] Step 1: Use the camera calibration method based on a planar target to obtain the camera intrinsic parameter matrix M and distortion parameters. The calibration board is as follows: Figure 2 As shown;

[0035] Step 2: Collect the image of the calibration plate with laser stripes. Figure 3As shown, project the laser line to the blank area in the middle of the plane target, then extract the center of the circle in the figure, solve the pose matrix W of the camera relative to the world coordinate system according to PnP, and use the theoretical intersection to calculate the reprojection of the corner point according to the pose matrix. If the reprojection is less than 0.1 pixel, proceed to the following steps, otherwise continue to collect pictures;

[0036] Step 3: Correct the calibration image, use Canny to obtain all edge positions in the image to obtain the edge image, use it as a mask to obtain all grayscale values ​​at the edge, and use the Otsu threshold method to calculate the threshold T of the edge image in the mask. otsu , combined with the maximum grayscale value G on the light bar, the grayscale is generally 255, and the adaptive segmentation threshold T = (T otsu +G) / 2, obtain the segmented image according to the adaptive segmentation threshold result, determine all connected domains according to the connected domain analysis, and select the area with the largest connected domain as the region of interest where the light strip on the chessboard is located.

[0037] Step 4: Count the light strips with the maximum value of the connected domain label in the region of interest as the behavior search object, and extract the center point of the light strip (x m ,y m ), the calculation process is

[0038]

[0039] Where I(x i ,y i ) is the image (x i ,y i ) is extracted, and after the extraction is completed, the center point set is smoothed by five-point sliding to obtain the new coordinate point (x′ m ,y′ m ). Use the 5-point sliding average method to smooth the center point set of the light strip, and the least square method to fit the center line equation I;

[0040] Step 5: Calculate the homography matrix H between the two planes using the known center coordinates on the plane target and the center coordinates in the image, and use the covariance to obtain the equation coefficient I'=I·H of the center line on the two-dimensional plane of the plane target. -1 The fitting results are as follows Figure 2 As shown, the big circle is used to establish the world coordinate system, the center of the small circle is used as the calibration point, and the middle is used to project the laser line.

[0041] Step 6, select two points on the straight line I' at random. Since the points are on the plane target and satisfy z = 0, convert the two-dimensional coordinates of the two points into three-dimensional point coordinates. According to the Plucker transformation, the matrix L is obtained as follows: w

[0042]

[0043] Where A and B are points on the world plane, then the spatial straight line equation L of the camera coordinate system is c for

[0044] L c =WL w W T

[0045] Step 7: Use the straight line equation to establish the line-surface constraint equation L on the light plane equation c π=0

[0046] Step 8, take 12 sets of light stripe images in different positions, establish a hyperstatic line-surface constraint equation group, and use SVD to decompose the line-surface constraint equation group to obtain the light plane equation coefficients.

Claims

1. A covariant-based line structured light plane calibration method, characterized in that: The steps include: (1) Using a planar target-based camera calibration method to obtain the camera intrinsic parameter matrix M and distortion parameters; (2) Collect a planar target image with laser line stripes, and use PnP to solve the camera's pose matrix W relative to the world coordinate system for the center of the planar target on it, and eliminate images with large reprojection errors; (3) Correct the calibration image, use Canny to obtain the edges in all images and count the grayscale, calculate the threshold by Otsu threshold method, combine the highest grayscale value to obtain the adaptive segmentation threshold T, and perform connected domain analysis on the segmented image to obtain the minimum enclosing rectangle of the largest connected domain as the light stripe area of ​​interest; (4) The sub-pixel center points of the light stripes in the region of interest were extracted using the grayscale centroid method, the set of light strip center points was smoothed using the 5-point sliding average method, and the centerline equation I was fitted using the least squares method; (5) Using the known coordinates of the center of the circle on the plane target and the center point in the image, calculate the homography matrix H between the two planes, and use the covariance to obtain the equation coefficient I'=I·H of the center line on the two-dimensional plane of the plane target. -1 ; (6) Calculate the Plucker matrix equation L for the center line of the light strip in the world coordinate system w , using the pose relationship in step (2) to obtain the Plucker matrix equation L of the center line of the light strip in the camera coordinate system c , is L c =(WA)·(WB) T -(WB)·(WA) T =WL w W T , where A and B are the three-dimensional coordinates of any two points on the straight line; (7) Use the straight line equation to establish the line-plane constraint equation L on the light plane equation c π = 0; (8) Take multiple sets of light stripe images in different positions, establish a hyperstatic line-surface constraint equation group, and use SVD to decompose the line-surface constraint equation group to obtain the light plane equation coefficients.

2. The covariant-based line structured light plane calibration method according to claim 1, wherein: In step (3), the calibration image is corrected, and the edges in all images are obtained by using Canny and grayscale statistics. The threshold is calculated by the Otsu threshold method, and the adaptive segmentation threshold T is obtained by combining the highest grayscale value. The segmented image is analyzed for connected domains, and the minimum enclosing rectangle where the largest connected domain is located is obtained as the light bar interest area. Specifically, the edge image is obtained by using Canny to obtain all edge positions in the image, and it is used as a mask to obtain all grayscale values ​​at the edge. The threshold T is calculated by the Otsu threshold method. otsu , combined with the maximum gray value G on the light bar, the adaptive segmentation threshold T = (T otsu +G) / 2, the segmentation image is obtained according to the adaptive segmentation threshold result, and the area with the largest connected domain is selected as the region of interest of the light strip on the chessboard according to the connected domain analysis.

3. The covariant-based line structured light plane calibration method according to claim 1, wherein: In step (4), the grayscale centroid method is used to extract the sub-pixel center points of the light strips in the area of ​​interest, the five-point sliding average method is used to smooth the light strip center point set, and the least squares method is used to fit the center line equation I. Specifically, the light strips with the maximum value of the connected domain label in the area of ​​interest are counted as the behavior search object, and the grayscale centroid method is used to extract the light strip center point (x m ,y m ), the calculation process is Where I(x i ,y i ) is the image (x i ,y i ) is extracted, and after the extraction is completed, the center point set is smoothed by five-point sliding to obtain the new coordinate point (x′ m ,y′ m ).

4. The covariant-based line structured light plane calibration method according to claim 1, wherein: In step (5), the homography matrix H between the two planes is calculated using the known coordinates of the center of the circle on the plane target and the center point in the image, and the equation coefficient of the center line of the plane target on the two-dimensional plane is obtained by covariance: I'=I·H -1 Specifically, the designed plane target is used, the large circle determines the coordinate system, the small circle determines the center of the circle, and the middle area is used to project the laser line. In addition, in the two-dimensional projective transformation, there is a homography relationship between the points of the two planes, x′=H·x. Since the points are on the straight line, the homography relationship between the two planes, that is, covariance, can be derived. The linear equation is fitted using the least squares method. Where I and I' are the coefficients of the equations of the lines on the two planes, and x and x' are the homogeneous expressions of the points on the two lines.

5. The covariant-based line structured light plane calibration method according to claim 1, wherein: In step (6), calculate the Plucker matrix equation L of the light strip center line in the world coordinate system w , using the pose relationship in step (2) to obtain the Plucker matrix equation L of the center line of the light strip in the camera coordinate system c , is L c =(WA)·(WB) T -(WB)·(WA) T =WL w W T , where A and B are the three-dimensional coordinates of any two points on the straight line. Specifically: take any two points on the straight line I', and since the points are on the plane target plane and satisfy z = 0, convert the two points into three-dimensional point coordinates, and obtain the matrix L according to the Plucker transformation w Where A and B are points on the world plane, then the spatial line equation of the camera coordinate system is L c =WL w W T 。 6. The covariant-based line structured light plane calibration method according to claim 1, wherein: In step (8), multiple groups of light strip images in different postures are captured, and a hyperstatic line-surface constraint equation group is established. The line-surface constraint equation group is decomposed by SVD to obtain the light plane equation coefficients. Specifically, multiple groups of different postures are selected and the target plane is moved multiple times to obtain multiple groups of straight lines L on the light plane. ci , establish the line-surface equation system L T ·π=0, where L=(L c1 ,L c2 ,…,L cn ), n≥2; decompose L using SVD, L=UDV T , the smallest singular value in D is in V T The eigenvectors in are the coefficients π of the plane equation.