Parallel multi-line laser measurement system and measurement method based on homography matrix

Through the parallel multi-line laser measurement method based on the homography matrix, the problem of laser line matching ambiguity in multi-line laser scanning is solved, high-precision three-dimensional reconstruction is achieved, system calibration is simplified and the cost is reduced.

CN109186491BActive Publication Date: 2024-10-29NANJING UNIV OF AERONAUTICS & ASTRONAUTICS
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN201811153816.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2018-09-30
Publication Date
2024-10-29
Estimated Expiration
2038-09-30

AI Technical Summary

Technical Problem

There is a laser line matching ambiguity problem in the multi-line laser scanning measurement process, making it difficult to accurately match and reconstruct three-dimensional information.

Method used

Using the parallel multi-line laser measurement method based on the homography matrix, the matching laser line to be matched is calculated through the relative position of the two industrial cameras and the laser projector, and the binocular parallax principle is used to perform three-dimensional reconstruction, simplifying system calibration process.

Benefits of technology

It improves the accuracy and efficiency of laser line matching, reduces system costs, and obtains three-dimensional point cloud data with an accuracy of 0.1mm, meeting general industrial needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN109186491B_ABST
    Figure CN109186491B_ABST
Patent Text Reader

Abstract

The present invention provides a parallel multi-line laser measurement system and measurement method based on a homography matrix. The method mainly includes: calibrating the camera system through a plane target to obtain the internal and external parameters of the camera. Calibrate the laser measurement system through a stereo target. Due to the relatively fixed position of the laser plane and the left and right camera planes, the homography relationship between the left and right image planes of the binocular camera can be induced through the laser plane to obtain the laser system calibration parameters. The laser line to be matched in the left image is mapped to the right image through the laser measurement system calibration parameters to obtain multiple mapped laser lines. By calculating the overlap of the mapped laser lines, the mapped laser line corresponding to the maximum overlap is taken as the corresponding laser line of the laser line to be matched, thereby achieving correct matching of the laser lines in the left and right images. According to the above correctly matched laser lines, the three-dimensional data of the laser lines can be reconstructed through the binocular stereo vision measurement principle to obtain the three-dimensional information of the object surface.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of laser three-dimensional measurement, in particular to a parallel multi-line laser measurement method based on a homography matrix. Background Art

[0002] Structured light 3D visual measurement technology is the most commonly used modern technology in the field of 3D digitization. With its advantages of non-contact, fast scanning speed, large amount of information, high precision, strong real-time performance, etc., it overcomes the limitations of traditional measuring instruments and becomes an important means of directly obtaining high-precision 3D data of the target. It greatly reduces the measurement cost, saves time, is easy to use, and has a wide range of applications. It has great development space in engineering measurement, deformation monitoring, cultural relics protection, forest and agriculture, medical research, battlefield simulation and other fields.

[0003] At present, the commonly used laser modes include point laser, line laser, multi-line laser and grid structured light mode. In the point laser mode, the light beam emitted by the laser projector generates a light spot on the surface of the object, and the light spot forms a two-dimensional image point on the image plane of the camera through the lens of the camera. The realization of the camera and the beam line intersect with the light spot in space, forming a simple triangular geometric relationship. This triangular geometric constraint relationship can be obtained through certain calibration, and it can determine the spatial position of the light spot in a known world coordinate system. The point laser mode meets the requirements of fast and accurate online measurement, but it can only obtain information of one point on the surface of the object at a time, and the amount of information obtained is small, which is difficult to meet the requirements of three-dimensional measurement in complex situations. The line laser mode projects a laser line, which intersects with the object to form a light strip. The light strip is modulated due to the change in the depth of the object surface and the possible gap. By calibrating the laser system, the three-dimensional information of the object surface can be obtained from the line laser. The amount of information of the line laser scanning is increased compared with the point laser, but its scanning process needs to move back and forth many times to improve the data, and its accuracy is low, the cumulative error is large, and it is difficult to meet the three-dimensional measurement of large objects. The multi-line laser mode is an extension of the line laser mode. It can project multiple laser lines at a time, which greatly speeds up the scanning speed. Moreover, since it does not need to move back and forth, it reduces the cumulative error and improves the measurement accuracy. However, for the multi-line laser mode, since there are multiple laser lines in the collected image, it is difficult to use general constraints to match the corresponding points. In the matching process, there will be an ambiguous problem of laser line matching, that is, for the laser line to be matched in one image, it is difficult to find its corresponding laser line in another image. Summary of the invention

[0004] In order to solve the ambiguity problem of laser line matching in the multi-line laser scanning measurement process, the present invention provides a parallel multi-line laser measurement method based on a homography matrix, which can effectively calculate the matching laser lines of the laser lines to be matched, thereby performing three-dimensional reconstruction of the laser lines according to the binocular parallax principle.

[0005] The present invention provides a parallel multi-line laser measurement system based on a homography matrix, wherein the measurement system comprises at least two industrial cameras, a laser projector, an object to be measured and a camera filter corresponding to the industrial camera; wherein the industrial camera is installed around the object to be measured, the laser projector and the industrial camera are located on the same side of the object to be measured, the direction of the laser line projected by the laser projector is at an angle to the direction of the optical center line of the industrial camera, and the relative position relationship between the industrial camera and the laser projector is fixed.

[0006] Furthermore, there are two industrial cameras, which are respectively located on both sides of the laser projector.

[0007] The present invention also provides a laser measurement method of a parallel multi-line laser measurement system based on a homography matrix. The measurement method first uses a laser projector to project multiple parallel laser lines to intersect with the object to be measured, and the laser lines and the laser projector form a laser plane. The industrial camera is used to collect pictures; then the laser lines of the image are refined to obtain a single-pixel wide laser line; finally, the corresponding laser line of the laser line to be matched is calculated through the homography constraint, so as to calculate the three-dimensional data of the laser line through the binocular parallax principle and reconstruct the three-dimensional information of the object surface.

[0008] Furthermore, the method adopts two industrial cameras, which are respectively located on the left and right sides of the laser projector.

[0009] The laser line is then thinned on the image to obtain a single-pixel wide laser line. Specifically, the laser line is segmented by a binarization method. After obtaining a laser line binarization image, the image is thinned by a Hilditch algorithm to obtain a skeleton line of the laser line. The thinned skeleton line is used as the initial point of the laser line center, and the normal of the initial point is calculated by obtaining the Hessian matrix of the initial point. Finally, two points are selected on the left and right of the initial point in the normal direction, and a Gaussian curve is fitted. The horizontal coordinate corresponding to the peak of the Gaussian curve is calculated as the sub-pixel point coordinate of the laser line center; the sub-pixel center point is calculated for all the initial points, so as to obtain a thinned laser center line.

[0010] Furthermore, the homography constraint is to use the laser plane to induce the homography matrix between the left and right image planes, and the homography matrix is

[0011]

[0012] Among them, x is the coordinate of the pixel point on the left image, x' is the coordinate of the pixel point on the right image, and H is the homography matrix between the left and right images.

[0013] Furthermore, the corresponding laser line of the laser line to be matched is finally calculated by homography constraint, so as to calculate the three-dimensional data of the laser line by binocular parallax principle and reconstruct the three-dimensional information of the object surface. The process specifically includes the following steps:

[0014] Step 1: Search for a single pixel wide laser line

[0015] The local growth method is used to search the laser line of the left image from left to right and from top to bottom. If the gray value of a pixel is 0, the pixel is a background pixel and will not be processed.

[0016] If the pixel grayscale value is 255, and the number of pixels in the 8-neighborhood of the pixel is 1, the pixel is considered to be the endpoint of the laser stripe. At this time, starting from this pixel, the adjacent points are continuously searched within the 8-neighborhood range;

[0017] If there is a point with a pixel value of 255 in the neighborhood, its coordinates are recorded immediately, updated as a seed point, and removed from the image; the above search process is repeated until the other endpoint of the laser line segment is found;

[0018] Continue to use the seed growth method to search for laser lines in the image until there are no points with a pixel value of 255 in the image. Calculate the number of pixels of the laser line segment each time it is searched. If it is greater than the threshold, store it in different files. Due to surface occlusion, holes or image processing, the laser line may be broken, so the number of files obtained by the search is n. l More than 4;

[0019] Step 2: Laser line segment matching

[0020] Any n l A file in li , i=1,2,3..., in n li Pick any point p l =[x l ,y l ] T , according to the calibrated homography matrix, p l Multiply them with the four homography matrices respectively to calculate the mapping point coordinates p ri , i=1,2,3,4;

[0021] By adopting the method of multiple iterative accumulation, the mapped laser line with the largest overlap is taken as the correct matching laser line of the laser line segment to be matched in the left image, that is, the mapped laser line obtained by multiplying the laser line to be matched in the left image with the correct homography matrix has the largest overlap, while the mapped laser line obtained by multiplying it with the wrong homography matrix has a small overlap.

[0022] Furthermore, the mapping laser line coincidence calculation process is:

[0023] Laser line segment L l The mapped laser line segment obtained by the homography matrix is ​​L' li , i=1,2,3,4, select any mapping laser line L' in the right image l1 , any L' l1 A little bit on s , with p s Take a W×H rectangular neighborhood as the center, W is the length of the rectangle, half of the laser line width, H is the width of the rectangle, search for pixels in the rectangular neighborhood, if the gray value of the pixel is 255, calculate its sum point p s The absolute value of the difference in the x direction is denoted by d i ;

[0024] Search the entire neighborhood range and take d i The minimum value is taken as the target value, denoted as d min , and then substitute it into formula (4) to calculate the single pixel overlap degree e i ,

[0025] e i =exp(-0.1*d min ),i=1,2,3… (4)

[0026] Repeat the above process from top to bottom until the end of the laser line segment. Then calculate the total overlap E of the laser line segment.

[0027]

[0028] Calculate the total overlap of the mapped laser lines, denoted as E i , n=1,2,3,4, compare E i The size of the laser line with the maximum overlap is taken as the matching laser line of the laser line to be matched, and the three-dimensional information of the laser line can be calculated by using the binocular parallax principle;

[0029] Repeat the above process to reconstruct the three-dimensional information of all laser lines.

[0030] The beneficial effect of the present invention is that, in order to solve the problem of laser line matching ambiguity in the multi-line laser scanning process, the present invention proposes a parallel multi-line laser measurement method based on a homography matrix. According to the characteristic that the relative positions of the two cameras and the laser projector are fixed, the method induces the homography relationship between the left and right image planes through the laser plane, thereby matching the laser line pairs. Compared with the traditional laser scanning system, this method does not need to calculate the laser plane equation, which reduces the tediousness of the system calibration process; this method does not require a precise three-dimensional target to calibrate the system parameters of the laser plane, which reduces the cost of the scanning system; this method has high accuracy, high efficiency, and strong stability in the process of matching laser line pairs, and the accuracy of the three-dimensional point cloud data obtained by scanning is as high as 0.1mm, which can meet the needs of general industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] The present invention is further described below in conjunction with the accompanying drawings and embodiments.

[0032] Figure 1 It is a schematic diagram of the measurement system model of the present invention;

[0033] Figure 2 It is the principle diagram of homography transformation;

[0034] Figure 3 This is the schematic diagram of multi-line laser matching;

[0035] Figure 4 This is the principle diagram of coincidence calculation;

[0036] In the figure, 1. left camera, 2. right camera, 3. laser projector, 4. left image, 5. right image, 6. laser plane, 7. laser line, 8. object to be measured. DETAILED DESCRIPTION

[0037] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the examples of the present invention.

[0038] Example 1

[0039] First, the parallel multi-line laser three-dimensional scanning system of the present invention is described. Figure 1As shown, the measurement system consists of two industrial cameras 1, 2, a laser projector 3 and two camera filters 9. The laser projector 3 projects a plurality of parallel laser lines. In this embodiment, 4 are taken as an example. The number of the parallel laser lines is not limited to 4. They intersect with the object to be measured to form modulated light strips. The light strips are located on the light plane in space and are imaged on the camera CCD through perspective projection. Compared with the traditional structured light measurement system, this paper does not need to calibrate the light plane equation of the light plane 6. It only needs to use the laser plane 6 to induce the homography matrix between the left and right image planes. Therefore, calibrating the homography matrix between the left and right image planes is the key to establishing a three-dimensional measurement model.

[0040] The principle of the homography matrix induced by the laser plane 6 between the left and right image planes 4 and 5 is that when the relative positions of the left and right cameras and the laser projector are fixed, for a pixel point in the left image 4, the corresponding pixel point on the right image 5 can be obtained through the homography matrix induced by the plane 6, as shown in FIG. Figure 2 shown.

[0041] In the figure, π is a plane in the world coordinate system. Extend the ray from point x and make it intersect with plane π at point x. π , the point projected onto the other image is x', and there is a perspective change H between the world coordinate plane π and the left image 4 1π :

[0042] x=H 1π x π (1)

[0043] Similarly, there is a perspective transformation H between the world coordinate plane and the right image 5 2π :

[0044] x'=H 2π x π (2)

[0045] The composition of these two perspective transformations is a homography H between the two image planes 4 and 5:

[0046]

[0047] The present invention adopts Zhang Zhengyou's camera calibration method based on two-dimensional plane target to calibrate the parameters of the binocular camera, obtain the internal and external parameters of the binocular camera, and then calibrate the homography matrix induced by the four laser planes 6. Turn on the laser projector to project multiple parallel laser lines onto the calibration target (four lines are taken as an example here). The calibration target can be a plaster model without strong reflection. The left and right cameras collect images at the same time, and the calibration target is moved multiple times to collect five groups of calibration images respectively. Image processing and laser line refinement are performed on each group of calibration images respectively, and laser lines with a single pixel width are extracted. Since the laser lines are arranged in order from left to right in the left and right images, they are marked as 1, 2, 3, and 4 respectively. The laser lines with the same numbers in the left and right images are matched respectively, and the four homography matrices H induced by the four laser planes 6 are calculated respectively by formula 3. i (i=1,2,3,4).

[0048] The laser line 7 is thinned to thin the laser line 7 with a certain width into a laser line with a single pixel width, so as to facilitate the matching of the laser line later. Since the brightness of the laser line is higher than the surrounding environment, the laser line is segmented by a binarization method. After obtaining the binary image of the laser line, the image is thinned by the Hilditch algorithm to obtain the skeleton line of the laser line. The thinned skeleton line is used as the initial point of the center of the laser line, and the normal of the initial point is calculated by obtaining the Hessian matrix of the initial point. Finally, two points are selected on the left and right of the initial point in the normal direction, and a Gaussian curve is fitted. The horizontal coordinate corresponding to the peak of the Gaussian curve is calculated as the sub-pixel point coordinate of the center of the laser line. The sub-pixel center point is calculated for all the initial points to obtain the thinned laser center line.

[0049] The specific process of multi-line laser matching and reconstruction is:

[0050] Step 1: Search for a single pixel wide laser line

[0051] The local growth method is used to search for the laser line in the left image. From left to right and from top to bottom, if the pixel gray value is 0, the pixel is a background pixel and will not be processed; if the pixel gray value is 255 and the number of pixels in the 8-neighborhood of the pixel is 1, the pixel is considered to be the endpoint of the laser stripe. At this time, starting from this pixel, the adjacent points are continuously searched within the 8-neighborhood range. If there is a point with a pixel value of 255 in the neighborhood, its coordinates are immediately recorded, updated as a seed point, and removed from the image. Repeat the above search process until the other endpoint of the laser line segment is found (there are no other adjacent points in the 8-neighborhood). Continue to use the seed growth method to search for the laser line in the image until there are no points with a pixel value of 255 in the image. Calculate the number of pixels of the laser line segment searched each time. If it is greater than the threshold, store them in different files respectively. This is to filter out shorter laser line segments. Due to surface occlusion, holes or image processing, the laser line may be broken, so the number of files obtained by the search may be greater than 4, recorded as n l .

[0052] Step 2: Laser line segment matching

[0053] Any n l A file in li (i=1,2,3...), in n li Pick any point p l =[x l ,y l ] T , according to the 4 calibrated homography matrices, p l Multiply them with the four homography matrices respectively to calculate the coordinates p of the four mapping points ri (i=1,2,3,4). According to the binocular vision uniqueness constraint, there is only one corresponding matching point in the two images 4 and 5, so only one of the four calculated mapping points is point p l The correct matching point. Figure 3 As shown, the correct matching point falls on a laser line in the right image 5, while the wrong matching point generally does not fall on any laser line, so the wrong matching can be removed by judging whether there are laser line pixels around the mapping point (called laser line constraint). Since there are multiple laser lines 7 on the image, the wrong mapping point may also fall on a laser line in the right image, so it is impossible to remove all the wrong matching points by laser line constraint. The present invention adopts the idea of ​​multiple iterative accumulation, and takes the mapped laser line with the largest overlap as the correct matching laser line of the laser line segment to be matched in the left image, that is, the laser line to be matched in the left image is multiplied by the correct homography matrix, and the mapping laser line obtained has the largest overlap, while the mapping laser line obtained by multiplying it with the wrong homography matrix has a small overlap.

[0054] The calculation principle of the mapping laser line coincidence is:

[0055] like Figure 4 As shown, the laser line segment L l The mapped laser line segment obtained by the homography matrix is ​​L' li (i=1,2,3,4), select any mapping laser line L' in the right image 5 l1 . Take any L' l1 A little bit s , with p s Take a W×H rectangular neighborhood as the center, W is the length of the rectangle, half of the width of the laser line, H is the width of the rectangle, 1. Search for pixels in the rectangular neighborhood, if the gray value of the pixel is 255, calculate its sum point p s The absolute value of the difference in the x direction is denoted by d i . Search the entire neighborhood and take d i The minimum value is taken as the target value, denoted as d min Then substitute it into formula (4) to calculate the overlap degree e of a single pixel: i .

[0056] e i =exp(-0.1*d min ),i=1,2,3… (4)

[0057] Repeat the above process from top to bottom until the end of the laser line segment. Then calculate the total overlap E of the laser line segment.

[0058]

[0059] Calculate the total overlap of the four mapped laser lines respectively, denoted as E i (n=1,2,3,4), compare E i The size of the laser line with the maximum overlap is taken as the matching laser line of the laser line to be matched, and the three-dimensional information of the laser line 7 can be calculated by using the binocular parallax principle.

[0060] Repeat the above process to reconstruct the three-dimensional information of all laser lines.

[0061] The above description is only a preferred embodiment of the present invention. It should be pointed out that a person skilled in the art can make several improvements without departing from the principle of the present invention, and these improvements should also be regarded as within the protection scope of the present invention.

Claims

1. A laser measurement method based on a parallel multi-line laser measurement system of a homography matrix, characterized in that: The measuring method is based on the following measuring system, which includes at least two industrial cameras, a laser projector, an object to be measured and a camera filter corresponding to the industrial camera; wherein, The industrial camera is installed around the object to be measured, the laser projector and the industrial camera are located on the same side of the object to be measured, the direction of the laser line projected by the laser projector is at an angle to the direction of the optical center line of the industrial camera, and the relative position relationship between the industrial camera and the laser projector is fixed; The measuring method first uses a laser projector to project multiple parallel laser lines to intersect with the object to be measured. The laser lines and the laser projector form a laser plane, and the industrial camera is used to collect images; then the image is laser line thinned to obtain a single-pixel wide laser line; finally, the corresponding laser line of the laser line to be matched is calculated through the homography constraint, so as to calculate the three-dimensional data of the laser line through the binocular parallax principle and reconstruct the three-dimensional information of the object surface; the homography constraint is to use the laser plane to induce the homography matrix between the left and right image planes, and the homography matrix is Where x is the coordinate of the pixel point on the left image, x' is the coordinate of the pixel point on the right image, H is the homography matrix between the left and right images, and H 1π is the perspective change between the world coordinate plane and the left image; H 2π is the perspective change between the world coordinate plane and the right image; Finally, the corresponding laser line of the laser line to be matched is calculated through the homography constraint, so as to calculate the three-dimensional data of the laser line through the binocular parallax principle and reconstruct the three-dimensional information of the object surface. The process specifically includes the following steps: Step 1: Search for a single pixel wide laser line The local growth method is used to search the laser line of the left image from left to right and from top to bottom. If the gray value of a pixel is 0, the pixel is a background pixel and will not be processed. If the pixel grayscale value is 255, and the number of pixels in the 8-neighborhood of the pixel is 1, the pixel is considered to be the endpoint of the laser stripe. At this time, starting from this pixel, the adjacent points are continuously searched within the 8-neighborhood range; If there is a point with a pixel value of 255 in the neighborhood, its coordinates are recorded immediately, updated as a seed point, and removed from the image; the above search process is repeated until the other endpoint of the laser line segment is found; Continue to use the seed growth method to search for laser lines in the image until there are no points with a pixel value of 255 in the image. Calculate the number of pixels of the laser line segment each time it is searched. If it is greater than the threshold, store it in different files. Due to surface occlusion, holes or image processing, the laser line may be broken, so the number of files obtained by the search is n. l More than 4; Step 2: Laser line segment matching Any n l A file in li , i=1,2,3..., in n li Pick any point p l =[x l ,y l ] T , according to the calibrated homography matrix, p l Multiply them with the four homography matrices respectively to calculate the mapping point coordinates p ri , i = 1, 2, 3, 4; using the method of multiple iterative accumulation, the mapped laser line with the largest overlap is taken as the correct matching laser line of the laser line segment to be matched in the left image, that is, the laser line to be matched in the left image is multiplied by the correct homography matrix, and the mapped laser line has the largest overlap, while the mapped laser line multiplied by the wrong homography matrix has a small overlap.

2. The laser measurement method according to claim 1, characterized in that: There are two industrial cameras, which are respectively located on both sides of the laser projector.

3. The laser measurement method according to claim 1 or 2, characterized in that: The laser projector projects 4 parallel laser lines.

4. The laser measurement method according to claim 1, characterized in that: The laser line thinning of the image to obtain a single-pixel wide laser line is specifically performed by segmenting the laser line using a binarization method, and after obtaining a laser line binarization image, the image is thinned using a Hilditch algorithm to obtain a skeleton line of the laser line, and then the thinned skeleton line is used as the initial point of the laser line center, and the normal of the initial point is calculated by obtaining the Hessian matrix of the initial point, and finally two points are selected on the left and right of the initial point as the center in the normal direction, and a Gaussian curve is fitted, and the horizontal coordinate corresponding to the peak of the Gaussian curve is calculated as the sub-pixel point coordinate of the laser line center; Sub-pixel center points are calculated for all initial points to obtain a refined laser center line.

5. The laser measurement method according to claim 1, characterized in that: The mapping laser line coincidence calculation process is: laser line segment L l The mapped laser line segment obtained by the homography matrix is ​​L' li , i=1,2,3,4, select any mapping laser line L' in the right image l1 , any L' l1 A little bit on s , with p s Take a W×H rectangular neighborhood as the center, W is the length of the rectangle, half of the laser line width, H is the width of the rectangle, search for pixels in the rectangular neighborhood, if the gray value of the pixel is 255, calculate its sum point p s The absolute value of the difference in the x direction is denoted by d i ; Search the entire neighborhood range and take d i The minimum value is taken as the target value, denoted as d min , and then substitute it into formula (4) to calculate the single pixel overlap degree e i , e i =exp(-0.1*d min ),i=1,2,3… (4) Repeat the above process from top to bottom until the end of the laser line segment; then calculate the total overlap E of the laser line segment. Calculate the total overlap of the mapped laser lines, denoted as E i , n=1,2,3,4, compare E i The size of the maximum overlap is taken The mapped laser line is used as the matching laser line of the laser line to be matched, and the three-dimensional information of the laser line can be calculated by using the binocular parallax principle; Repeat the above process to reconstruct the three-dimensional information of all laser lines.

Citation Information

Patent Citations

  • Binocular visual indoor positioning method based on logo

    CN106228538A

  • Real-time shielding residue soil volume measurement method based on optical grating projection binocular-imaging technology

    CN106839977A

  • Three-dimensional detection and welding seam inflection point identifying method for multilayer multiple welding seams of robot

    CN107876970A

  • Mechanical arm welding system and mechanical arm welding method based on image processing

    CN108568624A

  • Track bed shape measurement method

    JP2016114568A