Improved structured light center point extraction method based on unilateral tracking
By using unilateral tracking and Hessian matrix correction methods in laser stripe images, the difficulty in extracting the center point of laser stripe caused by large fluctuations on the surface of the object and the large reflective noise is solved, and the accuracy and speed are achieved, which is suitable for complex conditions. line structure light measurement.
Patent Information
- Application Number
- CN202410822404.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-24
- Publication Date
- 2024-12-03
AI Technical Summary
In the prior art, when the surface of an object is large and there are many reflective noise points, it is difficult to accurately extract the center point of the laser stripe, especially when there are overlaps on the same column, the existing algorithm is sensitive to noise and has low accuracy.
Using an improved structured light center point extraction method based on unilateral tracking, the images are processed through Gaussian filtering noise reduction, threshold segmentation and morphological closed operations, combined with unilateral bidirectional upper boundary tracking and grayscale center of gravity method, and used Hessian The matrix calculation normal is corrected.
Effectively extracting the center point of the laser stripe under strong interference improves the accuracy by at least 29.3%, and significantly improves the running speed by at least 4.7 times, avoiding the influence of reflective noise.
Smart Images

Figure CN119068009A_ABST
Abstract
Description
Technical field:
[0001] The present invention relates to the technical field of line structured light measurement, and in particular to an improved structured light center point extraction method based on unilateral tracking, which can effectively and accurately extract the center point when the surface of an object has large undulations and many reflective noise points. Background technology:
[0002] Line structured light measurement technology based on laser triangulation is a non-contact 3D measurement technology that is widely used in 3D measurement, defect identification, reverse engineering and other fields. Line structured light measurement takes pictures with laser stripes, extracts the center position of the laser stripes, and calculates the 3D spatial information of the object. Therefore, the accuracy of laser stripe center extraction directly affects the accuracy of the entire measurement system.
[0003] At present, the main methods for extracting the center point of laser include the geometric centroid method, the extreme value method, the grayscale centroid method, the Steger method, etc. In the prior art, there is an algorithm for quickly extracting the center of structured light based on the geometric centroid method, the directional template method and the grayscale centroid method. This algorithm improves the speed, but is not suitable for three-dimensional measurement systems with extremely high precision. In the prior art, an improved refinement method for extracting the center line of line laser stripes has achieved fast and high-precision extraction, but the algorithm is sensitive to noise. Through deep learning, the stripe shape information is first extracted, and then the grayscale centroid method is used to extract the center of the laser stripes in combination with the normal vector, which effectively reduces the error. However, deep learning first requires a large number of data samples and is not suitable for all measurement systems. Researchers are currently trying to combine boundary tracking and grayscale centroid method to extract the center of laser stripes, but such existing algorithms do not consider the situation where the laser stripe images overlap in the same column due to large fluctuations in the surface of the object. Summary of the invention:
[0004] In view of the shortcomings and deficiencies in the prior art, the present invention proposes an improved structured light center point extraction method based on single-side tracking, which has high algorithm accuracy and fast running speed and can effectively and accurately extract the center point when the surface of an object is undulating and there are many reflective noise points.
[0005] The present invention is achieved by the following measures:
[0006] An improved structured light center point extraction method based on unilateral tracking is characterized in that the upper boundary of the pre-processed laser stripes is firstly tracked in both directions, then the grayscale centroid method is used to extract the initial coordinates of the center point, and finally the stripe normal is calculated in combination with the Hessian matrix for correction.
[0007] The preprocessing of the present invention is specifically: filtering and denoising the image data, selecting Gaussian filtering, wherein Gaussian filtering is implemented by discretized window sliding window convolution, and the Gaussian convolution kernel is generated by a Gaussian function, and the formula can be expressed as:
[0008]
[0009] After Gaussian filtering, the laser stripes can be separated from the background by setting a suitable threshold through threshold segmentation. The mathematical expression of threshold segmentation is shown in formula (2):
[0010]
[0011] Where I(u,v) is the mask image generated after threshold segmentation, T is the segmentation threshold,
[0012] The mask image after segmentation is a 2-bit image and may have breakpoints, so a morphological closing operation can be performed on it to connect the breakpoints and eliminate edge burrs. The closing operation is expressed in a mathematical formula as follows:
[0013]
[0014] Where A is the input image, B is the structural element, represents the corrosion operation, Represents an expansion operation.
[0015] The present invention performs unilateral and bidirectional upper boundary tracking on the preprocessed laser stripes, specifically:
[0016] Step 2-1: Search the preprocessed image from top to bottom and from left to right for a pixel whose grayscale value is not 0 as the initial point, and record this point as p start As the current point;
[0017] Step 2-2: Track the boundary of the current point to the right, and use the tracked boundary point as the current point. When there is no pixel point that meets the conditions, stop tracking and repeat step 2-1 to find a new initial point;
[0018] Step 2-3: For the new initial point p start The left pixel is judged. If there is a pixel point that meets the boundary condition among the three pixel points (u, v-1), (u+1, v-1), and (u+2, v-1) on the left, it is considered that there is also a laser stripe on the left side of the new initial point, and this point is recorded as p′ start , with p′ start Trace the boundary to the left for the initial point;
[0019] Step 2-4: After tracing the upper edge of the laser stripe to the left, use p start Use this as the starting point to trace the boundary to the right;
[0020] Step 2-5: Repeat steps 2-2 to 2-4 until all columns of the image are traversed to complete the upper boundary tracking of the laser stripe.
[0021] The grayscale centroid method is used to extract the initial coordinates of the center point in the present invention as follows: the grayscale centroid method is used to calculate the initial center point position while tracking the upper boundary of the laser stripe. When the column of the tracked new stripe boundary is different from the current point, that is, the tracked boundary point encoding value is 1, 2, 3, the new boundary point is used as the starting point to retrieve the set of points whose grayscale values are not 0 as the pixel points calculated by the grayscale centroid method, wherein the grayscale centroid method formula is shown as follows:
[0022] in represents the coordinate of the v component of the midpoint of the light center, I(u, v) represents the grayscale value at (u, v), n represents the upper boundary row value of the light bar, and m represents the lower boundary row value of the light bar.
[0023] The present invention combines the Hessian matrix to calculate the stripe normal direction for correction. Specifically, the Hessian matrix is often used to solve the normal direction of the image pixel point. Its representation in a two-dimensional image is as follows:
[0024]
[0025] Among them, H(u, v) represents the Hessian matrix of the pixel point at image (u, v), I uu Represents the second-order difference in the row direction of the image, I vv represents the second-order difference in the column direction, I uv It means to first find the difference of the rows and then the columns. The specific method of finding the difference is as follows:
[0026] Taking the initial center point (u 0 , v 0 ) as the center, construct the Hessian matrix, and the eigenvector corresponding to its maximum eigenvalue is the normal direction of the current point (e u , e v ), along the normal direction I(u 0 , v 0 ) is expanded by the second-order Taylor expansion to obtain the corrected laser center point (u 0 +t*e u , v 0 +t*e v ),in When |t*e u | and |t*e u | are less than or equal to 0.5, and (u 0 , v 0 ) When the second-order derivative of a point is greater than a threshold, the point is corrected.
[0027] Compared with the prior art, the present invention effectively avoids the influence of reflection noise on stripe center extraction. The algorithm determines the initial position of the center point of the laser stripe by the grayscale centroid method, and then constructs the Hessian matrix at the initial center point position to calculate the normal direction of the initial point for adaptive adjustment of the center point. The experimental results show that the algorithm can still extract the stripe center point under strong interference, and the accuracy is at least 29.3% higher than the traditional algorithm, and the speed is at least 4.7 times higher. Description of the drawings:
[0028] Figure 1 It is a mask image extracted from the region of interest in the preprocessing process of the present invention, wherein (a) is after threshold segmentation, and (b) is after closing operation.
[0029] Figure 2 This is a schematic diagram of the pixel 8 neighborhood chain code in the traditional boundary tracking algorithm.
[0030] Figure 3 Schematic diagram of unilateral bidirectional search in the present invention, wherein (a) is a rightward search and (b) is a leftward search.
[0031] Figure 4 It is a flow chart of laser upper boundary tracking in the present invention.
[0032] Figure 5 It is a schematic diagram of laser upper boundary tracking in the present invention.
[0033] Figure 6 It is a flow chart of the grayscale centroid method in the present invention.
[0034] Figure 7 1 and 10 are the experimental results of cup cover extraction in an embodiment of the present invention, (a) is the original image of the cup cover structured light, (b) is the grayscale centroid method, (c) is the Steger algorithm, and (d) is the algorithm of the present invention.
[0035] Figure 8 It is a structured light image of a complex model in an embodiment of the present invention.
[0036] Fig. 9 1 is a comparison diagram of various algorithms in the embodiments of the present invention, (a) is the grayscale centroid method, (b) is the Steger algorithm, and (c) is the algorithm of the present invention.
[0037] Fig.10 1 is a diagram of a checkerboard calibration plate with laser stripes in an embodiment of the present invention. Specific implementation method:
[0038] The present invention will be further described below in conjunction with the accompanying drawings and embodiments.
[0039] The present invention designs a unilateral and bidirectional boundary tracking algorithm to detect the upper boundary of the laser stripe, which effectively avoids the influence of reflection noise on the extraction of the stripe center. The algorithm determines the initial position of the center point of the laser stripe by the grayscale centroid method, and then constructs the Hessian matrix at the initial center point position to calculate the normal direction of the initial point for adaptive adjustment of the center point.
[0040] Because the laser stripes only account for a small part of the image captured by the camera and are distributed regularly, the image can be segmented to extract the area of interest before subsequent operations. This can greatly reduce the amount of calculation, accelerate the execution of the algorithm, and improve efficiency and performance. Since there is noise in the image, in order to reduce the impact of noise on subsequent image processing, the image needs to be filtered and denoised. Commonly used image filtering methods include median filtering, mean filtering, Gaussian filtering and bilateral filtering. In view of the characteristics of laser stripe images, the present invention selects Gaussian filtering that can better retain image edge information while smoothing the image.
[0041] Gaussian filtering uses a filtering algorithm based on Gaussian distribution, which can effectively remove Gaussian noise while retaining image details to a certain extent. In image processing, Gaussian filtering is generally implemented through discretized window sliding window convolution. The Gaussian convolution kernel is generated by a Gaussian function, and its formula can be expressed as: where σ represents the standard deviation of the Gaussian kernel.
[0042] After Gaussian filtering, the laser stripes can be separated from the background by setting a suitable threshold through threshold segmentation. The mathematical expression of threshold segmentation is shown in formula (2): Where I(u,v) is the mask image generated after threshold segmentation, and T is the segmentation threshold.
[0043] The segmented mask image is a 2-bit image and may have breakpoints. Figure 1 (a). Therefore, a morphological closing operation can be performed on it to connect the breakpoints and eliminate the edge burrs. The closing operation can be expressed by a mathematical formula:
[0044]
[0045] Where A is the input image, B is the structural element, represents the corrosion operation, The present invention performs a closing operation on the original mask image in (a) with a kernel of (7×7), and the result is as follows: Figure 1 (b) shows that the edge burrs of the laser stripes are effectively suppressed and the breakpoints are successfully connected. The white area value of the processed mask image is 1, and the black area is 0. The product of the mask image and the original image can make the gray value of the background image area 0, and the gray value of the laser stripe area remains unchanged.
[0046] The traditional boundary tracking algorithm tracks the image contour clockwise or counterclockwise based on the grayscale values of the eight neighborhoods of the image, traverses the image to find the first point greater than the set threshold as the starting point, and then terminates after tracking to the starting point to form a closed contour. Figure 2 The chain code representation of the pixel 8 neighborhood is:
[0047] The principle of the traditional clockwise eight-neighborhood tracking algorithm is as follows:
[0048] 1) Traverse the image and find the first pixel greater than the threshold as the starting point;
[0049] 2) Take the starting point as the current point and follow Figure 2 The chain code representation of starts from the pixel with a chain code value of 0 and searches clockwise for the next boundary point greater than the threshold, and takes the next searched point as the current point;
[0050] 3) When the chain code value of the current point searched is an even number, the starting chain code value of the next boundary point search is -
[0051] 1, that is, rotate 45° counterclockwise; when it is an odd number, the chain code value is -2, that is, rotate 90° counterclockwise;
[0052] 4) Repeat steps 2) and 3) until the next boundary point is found as the starting point and the boundary tracking is ended. Due to the particularity of the laser stripe, its upper and lower boundaries are symmetrically distributed. Therefore, the present invention designs a tracking algorithm that only extracts the upper boundary of the laser stripe. The tracking algorithm is divided into left and right tracking, and selectively searches for pixels in the 8-neighborhood. The search method is as follows: Figure 3 As shown:
[0053] The gray area in the figure is the current boundary point, and the black area is the point to be searched. Taking the search to the right in Figure (a) as an example, according to the order of the current boundary point coding value 0, 1, 2, 3, 4, the image of the laser stripe area of interest extracted above is searched for boundary points with grayscale values not equal to 0, and the next boundary point searched is used as the current point. In order to prevent the search from falling into an infinite loop in the vertical direction, when the coding value of the previous search is 0, that is, the pixel point directly above is tracked, the next boundary point only searches the area with coding values of 0, 1, 2, 3; when the coding value of the previous search is 4, that is, the pixel point directly below is tracked, the next boundary point only searches the area with coding values of 1, 2, 3, 4. When there are no pixels that meet the requirements in the search area, the current search ends.
[0054] The specific process of unilateral search is as follows:
[0055] 1) Search the preprocessed image from top to bottom and from left to right for a pixel whose gray value is not 0 as the initial point, and record this point as pstart As the current point;
[0056] 2) Track the boundary of the current point to the right, and use the tracked boundary point as the current point. When there is no pixel point that meets the conditions, stop tracking and repeat step 1) to find a new initial point;
[0057] 3) For the new initial point p start The left pixel is judged. If there is a pixel point that meets the boundary condition among the three pixel points (u, v-1), (u+1, v-1), and (u+2, v-1) on the left, it is considered that there is also a laser stripe on the left side of the new initial point, and this point is recorded as p′ start , with p′ start Trace the boundary to the left for the initial point;
[0058] 4) After tracing the upper edge of the laser stripe to the left, start Use this as the starting point to trace the boundary to the right;
[0059] 5) Repeat steps 2), 3), and 4) until all columns of the image are traversed and the upper boundary tracking of the laser stripe is completed.
[0060] The flow chart and schematic diagram are as follows: Figure 4 and 5 As shown:
[0061] exist Figure 5 In the figure, the black and gray areas are areas with gray values other than 0, representing laser stripes and reflective noise, where the gray area is the tracked laser boundary, the free black area is the reflective noise point, and the red arrows represent the pixel points indexed sequentially by the tracking algorithm. It can be seen that the improved boundary tracking algorithm of the present invention effectively retrieves the upper boundary of the stripes and avoids the influence of noise points.
[0062] Initial center point determination based on grayscale centroid method
[0063] The present invention uses the grayscale centroid method to calculate the initial center point position while tracking the upper boundary of the laser stripe. The traditional grayscale centroid method formula is as follows:
[0064] in represents the coordinate of the v component of the midpoint of the light center, I(u, v) represents the grayscale value at (u, v), n represents the upper boundary row value of the light bar, and m represents the lower boundary row value of the light bar.
[0065] The traditional grayscale centroid method usually calculates the centroid value by summing up each column or row of the image. In the algorithm of the present invention, when the column of the tracked new stripe boundary is different from the current point, that is, the tracked boundary point coding value is 1, 2, 3, the set of points with grayscale values not equal to 0 is retrieved downward from the new boundary point as the starting point as the pixel point calculated by the grayscale centroid method. The specific flow chart is as follows: Figure 6 As shown;
[0066] Compared with the traditional grayscale centroid, the algorithm of the present invention does not need to traverse the entire image, which speeds up the algorithm running time. It can also well extract the center point of the image with overlapping laser stripes on the same column, avoid the interference of free noise points, and enhance the robustness of the algorithm.
[0067] Center point optimization based on Hessian matrix
[0068] Although the stripe center point extracted by the grayscale centroid method can achieve sub-pixel accuracy, it only calculates the pixel points on the column and does not consider the direction of the stripes. Therefore, the present invention optimizes the normal direction of the center point by combining the Hessian matrix after calculating the initial center point using the grayscale centroid. The Hessian matrix is often used to solve the normal direction of the image pixel point, and its representation in a two-dimensional image is as follows:
[0069]
[0070] Among them, H(u, v) represents the Hessian matrix of the pixel point at image (u, u), I uu Represents the second-order difference in the row direction of the image, I vv represents the second-order difference in the column direction, I uv It means to first find the difference of the rows and then the columns. The specific method of finding the difference is as follows:
[0071]
[0072] Taking the initial center point (u 0 , v 0 ) as the center, construct the Hessian matrix, and the eigenvector corresponding to its maximum eigenvalue is the normal direction of the current point (e u , e v ). Along the normal direction, I(u 0 , v 0 ) is expanded by the second-order Taylor expansion to obtain the corrected laser center point (u 0 +t*e u , v 0 +t*e v ),in When |t*e u | and |t*eu | are less than or equal to 0.5, and (u 0 , v 0 ) When the second-order derivative of a point is greater than a threshold, the point is corrected.
[0073] Example:
[0074] The experiments in this example are all deployed on a computer with an Intel(R) Core(TM) i5-8300H CPU @ 2.30GHz and 16G memory, the programming language is Python, and the development environment is Spyder5.4.3. The experiment uses the Daheng MER-531-20GC-P industrial camera, and the line laser light source is a 650nm red line laser.
[0075] Line structured light center point extraction experiment:
[0076] The experiment selected the traditional grayscale centroid method and the Steger method for comparison. The experiment first took an image of a cup lid with laser stripes. The vertical protrusion structure exists in many mechanical parts. Figure 7 These are the extraction results of the three algorithms:
[0077] The experimental results show that due to the vertical protrusion, the captured laser stripes have overlapping parts in the same column. Since the grayscale centroid method calculates the center point of the entire column, it is impossible to correctly extract the laser center of the overlapping part. The Steger algorithm can extract the center points of the overlapping parts separately, but because the distribution of the laser stripes does not present a perfect Gaussian distribution, there are multiple extreme points in the center. The point with a second-order derivative of 0 is not unique, resulting in the extraction of multiple laser center points. At the same time, the light bands at both ends of the laser stripes are broken, and the light is refracted and scattered, making the light intensity distribution near the edge complex, and multiple center points will be extracted incorrectly. Since this algorithm determines whether there are laser stripes on the left after finding a new tracking initial point, it can well extract the center point of the overlapping part. At the same time, the center point extraction algorithm also ensures the uniqueness of the extracted center point.
[0078] In order to test the performance of the algorithm proposed in this example, the center point extraction was performed on the model with large surface undulations and reflections, such as Figure 8 As shown:
[0079] As can be seen from the figure, the surface of the model is uneven, and there are also overlapping laser stripes in the same column. At the same time, because the material of the model has a metallic luster, there will be more reflective noise points after imaging, which will have a greater impact on the extraction of the stripe center point. The extraction results of this model are as follows Fig. 9 As shown:
[0080] As can be seen from the figure, the grayscale centroid method is severely affected by the reflection noise because it calculates the entire column. The Steger algorithm can extract the laser stripes, but because it extracts based on the derivative of the local gradient, the noise is also extracted as part of the laser stripes. However, the algorithm in this example is not affected by the noise, and the extracted center point set fits the shape of the laser stripes well. At the same time, the center line of the extracted stripes has good continuity and no pseudo center points are generated. This is because the algorithm only tracks the upper boundary of the laser stripes and only extracts the center point of the valid area of the tracking result, which can avoid the influence of environmental noise.
[0081] Algorithm accuracy and efficiency experiments:
[0082] The effect of the line structured light center point extraction algorithm is mainly measured by two aspects: accuracy index and extraction efficiency. Since the actual position of the laser center point is unknown, this example refers to the idea of the reference (Zhang Jia, Lu Yonghua, Liang Lipeng, et al. Line structured light stripe adaptive center extraction optimization algorithm [J]. Applied Laser, 2019, 39(06): 1028-1034. DOI: 10.14128 / j.cnki.al.20193906.1028.) and uses the root mean square error of the distance from the center point of the light strip extracted by the algorithm to the fitting straight line to characterize the accuracy of the algorithm in extracting the center point of the light strip. Since the grayscale centroid method and the Steger method cannot correctly extract the center point under strong interference, the algorithm accuracy is poor and cannot be used as a reference. In this example, the checkerboard calibration plate used in the calibration of the structured light 3D reconstruction system is selected as the target object for experiment, such as Fig.10 As shown. The calculation formula for the root mean square error from the center point to the fitting line is:
[0083]
[0084] Where n is the number of laser center points, d i is the distance from the current point to the fitted straight line, is the average distance from each center point to the straight line. i It is calculated according to the distance formula from a point to a straight line, namely:
[0085]
[0086] Where v i and u i is the coordinate of the center point currently extracted, and A, B, and C are the parameters of the fitting line equation Av+Bu+C=0. The experimental data of the root mean square error from the center point extracted by the three algorithms to the fitting line are shown in Table 1.
[0087] Table 1 Root mean square error from the center point extracted by each algorithm to the fitting line
[0088]
[0089] As can be seen from the table, the proposed algorithm reduces the error by 29.3% compared with the grayscale centroid method and by 44.5% compared with the Steger method. The experiment proves that the proposed algorithm has high accuracy and can better meet the corresponding measurement requirements.
[0090] In order to test the efficiency of the algorithm, this example compares the time required for each algorithm to extract laser stripes from the strong interference image above. The results are shown in Table 2:
[0091] Table 2 Extraction time of each algorithm
[0092]
[0093] As can be seen from the table, the algorithm proposed in this example has the shortest running time, which is about 4.7 times faster than the grayscale centroid method and about 25.9 times faster than the Steger method. This is because the algorithm only needs to process the grayscale values near the laser stripes and does not need to traverse the entire image, which greatly improves the real-time performance of the algorithm.
[0094] In this example, an improved single-side tracking structured light center point extraction algorithm is proposed to solve the problem that the traditional structured light algorithm cannot accurately extract the center point of the stripes of objects with large fluctuations and severe surface reflection. The algorithm effectively extracts the overlapping stripes in the same column by judging whether there are laser stripes on the left when looking for a new center point, and single-side tracking avoids the influence of reflective noise. The algorithm corrects the initial center point extracted by the grayscale centroid in the direction of the Hessian matrix calculation method to obtain higher accuracy. Experiments show that compared with the traditional structured light extraction algorithm, the algorithm proposed in this example improves accuracy by at least 29.3% and running time by at least 4.7 times. The proposed algorithm takes into account both accuracy and efficiency, provides support for extracting the center point of line structured light stripes under complex conditions, and lays a solid foundation for the subsequent calculation of the three-dimensional point cloud of the object.
Claims
1. An improved structured light center point extraction method based on single-side tracking, characterized in that: Firstly, the upper boundary of the preprocessed laser stripes is tracked unilaterally and bidirectionally, and then the grayscale centroid method is used to extract the initial coordinates of the center point. Finally, the stripe normal is calculated in combination with the Hessian matrix for correction.
2. The improved structured light center point extraction method based on single-edge tracking according to claim 1, characterized in that: The preprocessing is specifically: filtering and denoising the image data, selecting Gaussian filtering, wherein Gaussian filtering is implemented by discretized window sliding window convolution, and the Gaussian convolution kernel is generated by a Gaussian function, which can be expressed as: Where σ represents the standard deviation of the Gaussian kernel, After Gaussian filtering, the laser stripes can be separated from the background by setting a suitable threshold through threshold segmentation. The mathematical expression of threshold segmentation is shown in formula (2): Where I(u,v) is the mask image generated after threshold segmentation, T is the segmentation threshold, The mask image after segmentation is a 2-bit image and may have breakpoints, so a morphological closing operation can be performed on it to connect the breakpoints and eliminate edge burrs. The closing operation is expressed in a mathematical formula as follows: Where A is the input image, B is the structural element, represents the corrosion operation, Represents an expansion operation.
3. The improved structured light center point extraction method based on single-edge tracking according to claim 1, characterized in that: The unilateral and bidirectional upper boundary tracking of the preprocessed laser stripes is specifically as follows: Step 2-1: Search the preprocessed image from top to bottom and from left to right for a pixel whose grayscale value is not 0 as the initial point, and record this point as p start As the current point; Step 2-2: Track the boundary of the current point to the right, and use the tracked boundary point as the current point. When there is no pixel point that meets the conditions, stop tracking and repeat step 2-1 to find a new initial point; Step 2-3: For the new initial point p start The left pixel is judged. If there is a pixel point that meets the boundary condition among the three pixel points (u, v-1), (u+1, v-1), and (u+2, v-1) on the left, it is considered that there is also a laser stripe on the left side of the new initial point, and this point is recorded as p′ start , with p′ start Trace the boundary to the left for the initial point; Step 2-4: After tracing the upper edge of the laser stripe to the left, use p start Use this as the starting point to trace the boundary to the right; Step 2-5: Repeat steps 2-2 to 2-4 until all columns of the image are traversed to complete the upper boundary tracking of the laser stripe.
4. The improved structured light center point extraction method based on single-edge tracking according to claim 1, characterized in that: The method of using the grayscale centroid method to extract the initial coordinates of the center point is specifically as follows: while tracking the upper boundary of the laser stripe, the grayscale centroid method is used to calculate the initial center point position. When the column of the tracked new stripe boundary is different from the current point, that is, the tracked boundary point encoding value is 1, 2, 3, the new boundary point is used as the starting point to search downward for a set of points whose grayscale values are not 0 as the pixel points calculated by the grayscale centroid method, wherein the grayscale centroid method formula is shown as follows: in represents the coordinate of the v component of the midpoint of the light center, I(u,v) represents the grayscale value at (u,v), n represents the upper boundary row value of the light bar, and m represents the lower boundary row value of the light bar.
5. The improved structured light center point extraction method based on single-edge tracking according to claim 1, characterized in that: The correction is performed by calculating the stripe normal in combination with the Hessian matrix. Specifically, the Hessian matrix is often used to solve the normal direction of the image pixel point. Its representation in a two-dimensional image is as follows: Among them, H(u,v) represents the Hessian matrix of the pixel point at the image (u,v), I uu Represents the second-order difference in the row direction of the image, I vv represents the second-order difference in the column direction, I uv It means to first find the difference of the rows and then the columns. The specific method of finding the difference is as follows: With the initial center point (u0, v0) as the center, the Hessian matrix is constructed, and the eigenvector corresponding to its maximum eigenvalue is the normal direction of the current point (e u ,e v ), and perform a second-order Taylor expansion of I(u0,v0) along the normal direction to obtain the corrected laser center point (u0+t*e u ,v0+t*e v ),in When |t*e u | and |t*e u | are both less than or equal to 0.5, and the second-order derivative of the point (u0, v0) is greater than the threshold, the point is corrected.
Citation Information
Cited By
Laser ray center point extraction method and device, computer equipment and storage medium
CN119885909A
Laser line center point extraction method, device, computer equipment and storage medium
CN119885909B
