A method for clustering and matching multi-line laser stripes based on custom window iteration

By using custom window iteration stripe clustering and matching methods in the multi-line laser three-dimensional measurement system, the stripe matching error problem caused by complex textures on the object surface is solved, and three-dimensional reconstruction of the calibration light plane is realized.

CN116934826BActive Publication Date: 2025-04-18KUNMING UNIV OF SCI & TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202310706045.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-14
Publication Date
2025-04-18
Estimated Expiration
2043-06-14

AI Technical Summary

Technical Problem

In a bi-purpose multi-line laser three-dimensional measurement system, complex texture, height changes, external light source environment or image noise on the surface of the object make it difficult to distinguish light stripes, resulting in incorrect correspondence when streak matching, and the correct three-dimensional reconstruction cannot be completed.

Method used

The multi-line laser stripe clustering and matching method based on custom window iteration is adopted. The broken stripes are clustered through the custom window picking points, and the number of left and right view stripes is corresponding through the iterative window. Finally, the clustered stripes are numbered to achieve corresponding matching.

Benefits of technology

Without calibrating the light plane, it can effectively cluster and match fractured stripes, ensuring the stripe correspondence between the left and right views, thereby completing the correct three-dimensional reconstruction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116934826B_ABST
    Figure CN116934826B_ABST
Patent Text Reader

Abstract

The present invention relates to a method for clustering and matching multi-line laser stripes based on custom window iteration, and belongs to the field of computer vision measurement technology. It includes: 1. Obtaining the stripe projection image after segmentation of the region of interest of the object to be measured under two camera viewing angles; 2. Filtering and centerline extraction of the image obtained in step 1; 3. Clustering the centerline stripes obtained in step 2 by establishing a custom iterative window; 4. According to the stripe point coordinate data obtained by clustering 3, the stripe centroid coordinates are calculated and the stripes are numbered, and the stripes with the same number in the left view and the right view are the corresponding matching stripes. The present invention is a multi-line laser three-dimensional vision measurement system based on binocular vision, which can cluster the center lines of the multi-line laser stripes projected on the surface of the object to be measured in the left and right views without being affected by the stripe breaks and noise points, and obtain the correct corresponding matching stripes, avoiding the problem of mismatching of multi-line laser stripes.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to a multi-line laser stripe clustering and matching method based on custom window iteration, belonging to the technical field of computer vision measurement. Background Art

[0002] Active optical 3D measurement mainly relies on the structured light source provided by the measurement system to emit structured light with a certain shape, project it onto the surface of the object, and collect the structured light image of the surface of the measured object through the camera to calculate the 3D coordinates of the surface of the object. The 3D measurement method based on structured light has been widely used in the fields of industrial production, biomedicine, aerospace, and construction engineering due to its advantages such as non-contact, high detection accuracy, fast measurement speed, and simple structure.

[0003] According to the type of laser projection, structured light can be classified into spot type, line laser and light surface type. Line laser includes single-line laser and multi-line laser. In the binocular multi-line laser 3D measurement system, multi-line laser is projected onto the object to be measured, and the left and right cameras simultaneously capture the image of the object to be measured. Then, the image is pre-processed to extract the center line of the light stripe, and then the center points extracted from the left and right images are stereo matched using the polar line constraint. Finally, according to the binocular parallax principle, the three-dimensional coordinates on the object are calculated with the help of the laser center matching points of the left and right images. In the binocular multi-line laser 3D measurement system based on binoculars, finding the corresponding matching stripes on the object in the left and right views is a key issue in binocular multi-line structured light technology.

[0004] When collecting objects, it is difficult to obtain continuous and complete stripes when extracting the center line due to the complex texture of the object surface, the height change of the object surface, the external light source environment or the image noise points. Therefore, the light stripes are difficult to distinguish, resulting in incorrect correspondence when matching stripes. That is, the first stripe on the object in the left image should correspond to the first stripe on the object in the right image, but it incorrectly corresponds to other stripes. In the end, the correct matching point cannot be obtained, and thus the 3D reconstruction cannot be completed. Summary of the invention

[0005] Aiming at the existing binocular multi-line laser 3D measurement system, the present invention provides a multi-line laser stripe clustering and matching method based on custom window iteration, which utilizes the similarity of stripes in the left and right views, clusters the broken stripes by picking points in a custom window, and makes the number of stripes in the left and right views correspond by iterating the window. The clustered stripes are numbered, and finally the light stripes in the left view correspond one by one to the light stripes in the right view.

[0006] The technical solution adopted by the present invention is: a method for clustering and matching multi-line laser stripes based on custom window iteration, comprising the following steps:

[0007] Step 1: Construct a divergent multi-line laser measurement model based on binocular vision to obtain the fringe projection images of the area of ​​interest of the object under test after segmentation under the perspectives of two cameras;

[0008] Step 2: Filter the image obtained in step 1 and extract the center line, and draw a binary image of the center line stripes;

[0009] Step 3: Cluster the centerline stripes in the centerline stripe binary image obtained in step 2 by establishing a custom window, obtain the stripe point coordinate data in the clustering, and judge whether to iterate the window to re-cluster the stripes based on the comparison result of the number of clustered stripes in the left view and the right view;

[0010] Step 4: Based on the stripe point coordinate data obtained by clustering in step 3, calculate the stripe centroid coordinates and the Euclidean distance from the centroid coordinates to the pixel coordinate origin, and number the stripes according to the calculation results. The stripes with the same number in the left view and the right view are the corresponding matching stripes.

[0011] Specifically, when constructing a divergent multi-line laser measurement model based on binocular vision in step 1, the multi-line laser needs to be projected orthographically and the projected stripes need to be vertical or inclined in the view imaging.

[0012] Specifically, in step 1, when collecting pictures, in order to accurately segment the area, it is necessary to pad the measuring platform with a solid color background paper that is different in color from the object to be measured. The present invention provides a background material used on a measuring platform to effectively reduce the impact of background noise. The material can be clearly distinguished from the object to be measured, and can be a material of various colors and textures. The two cameras first collect a picture of the object to be measured without laser stripe projection, without moving the object to be measured, and then collect a picture of the object to be measured with structured light stripe projection. By detecting and extracting the edge features of the picture without laser stripe projection, and performing image expansion on the extracted edge contour, an accurate closed image contour is obtained, and then the closed contour is filled to obtain a mask map of the ROI area of ​​the object to be measured. It is superimposed with the image of the object to be measured by stripe projection to obtain a stripe projection image after the segmentation of the region of interest.

[0013] Specifically, after extracting the center line in step 2, the stripe coordinates of the center line are obtained, and the coordinates of each pixel point are plotted with a pixel value of 255 on an image with the same format as the original image and with all pixel values ​​of 0 to obtain a center line stripe binary image.

[0014] Specifically, step 3 includes the following steps S1 and S2:

[0015] Step S1: Establishment of custom window: define the initial window size as (m+n+1)×(p+q+1), the coordinate (0,0) in the window is the anchor point, the number of rows above and below are m and n respectively, the number of columns on the left and right are p and q respectively, m, n, p, q are all positive integers, and the coordinates of other pixel points in the window are increased or decreased in sequence with the anchor point coordinates as the reference standard. The number of rows takes the initial value m=1; the number of rows below is set to be larger, so that the stripe segment with a break in the center line can be associated, and the initial value n=7 is taken; the projected line laser stripes are vertical or inclined stripes, and the stripes do not have a large span in the horizontal direction, so the window takes the initial value p=1, q=1.

[0016] Step S2 Clustering of left view and right view stripes:

[0017] The stripes on the image obtained in step 2 are processed using a custom window clustering algorithm to obtain stripe 1, stripe 2, stripe 3... stripe j, and the stripe data are stored in containers. The right image is processed in the same way as the left image, and the same result is obtained. The steps of the clustering algorithm are as follows:

[0018] 1) Find the starting point P of the stripe start : Traverse the image from left to right and from top to bottom to find a pixel with a grayscale value of 255. If the pixel is found, it is considered the first point P start , set the pixel value of the point to the background pixel value 0, store the coordinate point in a temporary container v, and execute step 2), otherwise execute 6);

[0019] 2) Find the anchor point P of the next window end :According to the given P start The coordinates are used as the anchor point of the custom window to establish the window. If there are points with a pixel value of 255 in the window, their coordinates need to be recorded in the order from left to right and from top to bottom in the definition of the window. The coordinate calculation method is the sum of the anchor point pixel coordinates and the window coordinate value of the point. At the same time, the pixel value of the recorded coordinate pixel point is set to the background pixel value 0, and all the recorded coordinate points are stored in a temporary container v. The coordinates of the point with the last pixel value of 255 collected in the window are used as the window anchor point P for the next search. end , then execute step 3). Otherwise, if there is no point with a pixel value of 255 in the window, then execute step 4).

[0020] 3) Window movement and anchor point switching: Each time the window moves, it moves along the vector direction from the anchor point to the next anchor point, and let P start =P end , return to step 2). By looping steps 2) and 3), the coordinates of all points with a pixel value of 255 on a certain center line stripe can be continuously searched and recorded.

[0021] 4) Delete noise points: The number of all extracted points in the temporary container v is recorded as k (k = 1, 2, 3 ...). In the extraction process, there will be interference from noise points and short stripes, which are characterized by a small number of points. In order to avoid these interferences, a threshold num is set. If k ≤ num, the extracted stripes are considered to be short stripes or noise points, and these noise points are deleted, and step 5 is executed). Where num = 20.

[0022] 5) Storing stripe points: For stripes with coordinate points k>num in container v, they are stripes after clustering, so the coordinates of these points should be stored in container v j (j=1, 2, 3...), then clear the data in container v. Each time step 5) is executed, j=j+1, and return to step 1.

[0023] 6) When the stripes on the left and right images are clustered, compare the number of stripes in the two images. If the number is equal, it means that the clustering stripes are successful and the stripe clustering extraction is ended. If they are not equal, the window needs to be expanded and re-clustered. When the window is expanded, first expand the bottom of the window by 2 rows, that is, n=n+2, and then expand the left and right directions of the window by 1 column each, that is, p=p+1, q=q+1. One window expansion is regarded as one window iteration. After the iteration, the window size is (m+n+1+2i)×(p+q+1+2i), where i is the number of iterations, i=0,1,2…. When the window is expanded, return to step 1).

[0024] In step 6), the coordinates of the points in the window are stored in a container, and each iteration adds coordinate points to the container, and sorts the points in the container in the order of the window from left to right and from top to bottom.

[0025] Specifically, the centroid coordinates (ave x ,ave y ) and the calculation formula of the Euclidean distance dis from the centroid coordinate to the pixel coordinate origin is as follows:

[0026]

[0027]

[0028] Among them, ave x ,ave y are the horizontal and vertical coordinates of the stripe centroid, and g is the number of stripes in the container v after clustering. j The number of point coordinates contained in x l ,y l It represents the horizontal and vertical coordinates of a point in the stripe, and dis is the Euclidean distance from the centroid coordinate to the origin of the pixel coordinate.

[0029] Since the stripes are projected on the surface of the object in a consistent order, the stripes are numbered in order from small to large according to the horizontal coordinates of the stripe mass center. When the horizontal coordinates of the mass centers of two stripes are close, it is considered that the broken stripes of the same light plane are clustered into two or more stripes. Although the two cameras are arranged approximately in parallel, there are still differences between the left view and the right view, and the longitudinal features of the mass center coordinates are more obvious than the lateral features. Therefore, the Euclidean distance dis between the mass center coordinates and the origin of the pixel coordinate system is used for comparison, and the smaller dis is numbered first.

[0030] The beneficial effects of the present invention are as follows: the present invention provides a method for clustering and matching multi-line laser stripes based on custom window iteration, which does not require calibration of the light plane. The broken stripes are clustered by picking points with a custom window, and the number of stripes in the left and right views is made to correspond by iterating the window. When there are breaks in the extracted stripes, clustering will obtain two results. One is that the broken stripes are associated through window iteration and are regarded as the same stripe; the other is that the corresponding stripes on the left and right views have a larger broken length and are regarded as two stripes. Both clustering results can be used to calculate the stripe centroid coordinates to complete numbering for multiple stripes. The stripes extracted from the left and right views with corresponding numbers are the corresponding stripes, completing the matching of the corresponding stripes in the left and right views, and using the epipolar constraints and the corresponding stripes to find the matching points of all stripes. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] Figure 1 is a system flow chart of the present invention;

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

[0033] Figure 3 It is a schematic diagram of region segmentation of the present invention;

[0034] Figure 4 Establishing a schematic diagram for the custom initial window of the present invention;

[0035] Figure 5 It is a schematic diagram of window iteration of the present invention;

[0036] Figure 6 It is a schematic diagram of the experimental results of the present invention. DETAILED DESCRIPTION

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

[0038] Embodiment 1: The present invention provides a method for clustering and matching multi-line laser stripes based on custom window iteration. First, the object to be measured is separated from the carrier plane, and then the extracted center line stripes are clustered using a custom iteration window. Finally, based on the sequential consistency constraint, the stripes after clustering the left and right views are numbered one by one using the stripe centroid coordinates, and stereo matching is performed for the stripes with the same number. The structural block diagram is shown in FIG. Figure 1 shown.

[0039] like Figure 2 As shown, a schematic diagram of a measurement system for a method of clustering and matching multi-line laser stripes based on custom window iteration includes two industrial cameras 1, a divergent multi-line laser 2, a measured object 3, a background plate 4, a bracket 5, and a workbench 6. The two cameras have the same parameters, are approximately parallel in the horizontal direction, and are symmetrically arranged on the bracket 5 relative to the multi-line laser.

[0040] The method for clustering and matching multi-line laser stripes based on custom window iteration comprises the following steps:

[0041] Step 1: The multi-line laser is projected forward and the projected stripes need to be vertical or tilted in the view imaging. When collecting pictures, in order to accurately segment the area, it is necessary to place a solid color background paper that is different in color from the object to be measured on the measuring platform. The present invention provides a background material used on a measuring platform to effectively reduce the impact of background noise. The material can be clearly distinguished from the object to be measured, and can be materials of various colors and textures. The two cameras first capture a picture of the object to be measured without laser stripe projection, without moving the object to be measured, and then capture a picture of the object to be measured with structured light stripe projection. By detecting and extracting the edge features of the picture without laser stripe projection, and performing image expansion on the extracted edge contour, an accurate closed image contour is obtained, and then the closed contour is filled to obtain a mask image of the ROI area of ​​the object to be measured. It is superimposed with the image of the object to be measured by stripe projection to obtain a stripe projection image after the segmentation of the region of interest, such as Figure 3 shown.

[0042] Step 2: Filter and extract the center line of the segmented image obtained in step 1 to obtain the stripe coordinates of the center line, and draw the coordinates of each pixel point with a pixel value of 255 on an image with the same format as the original image and all pixel values ​​​​are 0 to obtain a binary image of the center line stripes.

[0043] Step 3: specifically includes the following steps S1 and S2:

[0044] Step S1: Customize the window: define the initial window size as (m+n+1)×(p+q+1), the coordinate (0,0) in the window is the anchor point, the number of rows above and below are m and n respectively, the number of columns on the left and right are p and q respectively (m, n, p, q are all positive integers), and the coordinates of other pixel points in the window are increased or decreased in sequence with the anchor point coordinates as the reference standard. The initial value of the number of rows is m=1; the number of rows below is set to be larger, so that the stripe segments with broken center lines can be associated, and the initial value is n=7; the projected linear laser stripes are vertical or inclined stripes, and the stripes do not have a large span in the horizontal direction, so the window takes the initial values ​​p=1, q=1, and the initial window is as follows: Figure 4 (a) shown.

[0045] Step S2 Clustering of left view and right view stripes:

[0046] The stripes on the image obtained in step 2 are processed using a custom window clustering algorithm to obtain stripe 1, stripe 2, stripe 3... stripe j, and the stripe data are stored in containers. The right image is processed in the same way as the left image, and the same result is obtained. The steps of the clustering algorithm are as follows:

[0047] 1) Find the starting point P of the stripe start : Traverse the image from left to right and from top to bottom to find a pixel with a grayscale value of 255. If the pixel is found, it is considered the first point P start , set the pixel value of the point to the background pixel value 0, store the coordinate point in a temporary container v, and execute step 2), otherwise execute 6);

[0048] 2) Find the anchor point P of the next window end :According to the given P start The coordinates are used as the anchor point of the custom window to create the window. If there are points with a pixel value of 255 in the window, their coordinates need to be recorded in the order from left to right and from top to bottom according to the definition of the window, such as Figure 4 (b) The coordinate calculation method is the sum of the anchor point pixel coordinates and the window coordinate value of the point. At the same time, the pixel value of the recorded coordinate pixel point is set to the background pixel value 0, and all the recorded coordinate points are stored in a temporary container v. The coordinates of the point with the last pixel value of 255 collected in the window are used as the window anchor point P for the next search. end , then execute step 3). Otherwise, if there is no point with a pixel value of 255 in the window, then execute step 4).

[0049] 3) Window movement and anchor point switching: Figure 4 As shown in (c), each time the window moves, it moves along the vector direction from the current anchor point to the next anchor point, and let P start =P end, return to step 2). By looping steps 2) and 3), the coordinates of all points with a pixel value of 255 on a certain center line stripe can be continuously searched and recorded.

[0050] 4) Delete noise points: The number of all extracted points in the temporary container v is recorded as k (k = 1, 2, 3 ...). In the extraction process, there will be interference from noise points and short stripes, which are characterized by a small number of points. In order to avoid these interferences, a threshold num is set. If k ≤ num, the extracted stripes are considered to be short stripes or noise points, and these noise points are deleted, and step 5 is executed). Where num = 20.

[0051] 5) Storing stripe points: For stripes with coordinate points k>num in container v, they are stripes after clustering, so the coordinates of these points should be stored in container v j (j=1, 2, 3...), then clear the data in container v. Each time step 5) is executed, j=j+1, and return to step 1.

[0052] 6) When the stripes on the left and right images are clustered, compare the number of stripes in the two images. If the number is equal, it means that the clustering stripes are successful and the stripe clustering extraction is ended. If they are not equal, the window needs to be expanded and re-clustered. When the window is expanded, first expand the bottom of the window by 2 rows, that is, n=n+2, and then expand the window by 1 column in the left and right directions, that is, p=p+1, q=q+1. One window expansion is regarded as a window iteration. After the iteration, the window size is (m+n+1+2i)×(p+q+1+2i), where i is the number of iterations, i=0,1,2…. When the window is expanded, return to step 1). The schematic diagram of the iterative process of the window is shown as follows. Figure 5 .

[0053] In step 6), the coordinates of the points in the window are stored in a container, and each iteration adds coordinate points to the container, and sorts the points in the container in the order of the window from left to right and from top to bottom.

[0054] Step 4: Calculate the centroid coordinates of each stripe according to the stripes clustered in step 3 (ave x ,ave x ) and the Euclidean distance dis from the centroid coordinate to the pixel coordinate origin, calculated as follows:

[0055]

[0056]

[0057] Among them, ave x ,ave y are the horizontal and vertical coordinates of the stripe centroid, and g is the number of stripes in the container v after clustering. j The number of point coordinates contained in xl ,y l It represents the horizontal and vertical coordinates of a point in the stripe, and dis is the Euclidean distance from the centroid coordinate to the origin of the pixel coordinate.

[0058] Since the stripes are projected on the surface of the object in a consistent order, the stripes are numbered in order from small to large according to the horizontal coordinates of the stripe mass center. When the horizontal coordinates of the mass centers of two stripes are close, it is considered that the broken stripes of the same light plane are clustered into two or more stripes. Although the two cameras are arranged approximately in parallel, there are still differences between the left view and the right view, and the longitudinal features of the mass center coordinates are more obvious than the lateral features. Therefore, the Euclidean distance dis between the mass center coordinates and the origin of the pixel coordinate system is used for comparison, and the smaller dis is numbered first.

[0059] When there are breaks in the extracted stripes, clustering will produce two results. First, the broken stripes are associated through window iteration and regarded as the same stripe, such as Figure 6 The second is that the same light plane stripes, but the corresponding stripes on the left and right views have larger break lengths and are regarded as two stripes. Figure 6 Middle stripes 8 and 9.

[0060] It is obvious to those skilled in the art that the present invention is not limited to the details of the exemplary embodiments described above, such as the model parameters of the divergent multi-line laser, and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, from any point of view, the embodiments should be regarded as exemplary and non-restrictive, and the scope of the invention is defined by the appended claims rather than the above description, and it is intended that all changes that fall within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any reference numerals in the claims should not be regarded as limiting the claims involved.

[0061] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This description of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each embodiment may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

Claims

1. A method for clustering and matching multi-line laser stripes based on custom window iteration, characterized in that: The following steps are involved: Step 1: Construct a divergent multi-line laser measurement model based on binocular vision to obtain the fringe projection images of the area of ​​interest of the object under test after segmentation under the perspectives of two cameras; Step 2: Filter the image obtained in step 1 and extract the center line, and draw a binary image of the center line stripes; Step 3: Cluster the centerline stripes in the centerline stripe binary image obtained in step 2 by establishing a custom window, obtain the stripe point coordinate data in the clustering, and judge whether to iterate the window to re-cluster the stripes based on the comparison result of the number of clustered stripes in the left view and the right view; Step 4: According to the stripe point coordinate data obtained by clustering in step 3, calculate the stripe centroid coordinates and the Euclidean distance from the centroid coordinates to the pixel coordinate origin, and number the stripes according to the calculation results. The stripes with the same number in the left view and the right view are the corresponding matching stripes; Step 3 specifically includes the following steps S1 and S2: Step S1, establishment of a custom window: define the initial window size as (m+n+1)×(p+q+1), the coordinate (0,0) in the window is the anchor point, the number of rows above and below are m and n respectively, and the number of columns on the left and right are p and q respectively, where m, n, p, q are all positive integers, and the coordinates of other pixel points in the window are increased or decreased in sequence with the anchor point coordinates as the reference standard, the number of rows takes the initial value m=1, the number of rows below takes the initial value n=7, and the number of columns on the left and right takes the initial value p=1, q=1; Step S2 Clustering of left view and right view stripes: The stripes on the image obtained in step 2 are processed using a custom window clustering algorithm to obtain stripe 1, stripe 2, stripe 3... stripe j, and the stripe data are stored in containers respectively. The right image is processed in the same way as the left image to obtain the same result. The steps of the clustering algorithm are as follows: 1) Find the starting point P of the stripe start : Traverse the image from left to right and from top to bottom to find a pixel with a grayscale value of 255. If the pixel is found, it is considered the first point P start , set the pixel value of the point to the background pixel value 0, store the coordinate point in a temporary container v, and execute step 2), otherwise execute 6); 2) Find the anchor point P of the next window end :According to the given P start The coordinates are used as the anchor point of the custom window to establish the window. If there are points with a pixel value of 255 in the window, their coordinates need to be recorded. They are recorded in the order from left to right and from top to bottom in the defined window. The coordinate calculation method is the sum of the anchor point pixel coordinates and the window coordinate value of the point. At the same time, the pixel value of the recorded coordinate pixel point is set to the background pixel value 0, and all the recorded coordinate points are stored in a temporary container v. The coordinates of the point with a pixel value of 255 collected last in the window are used as the window anchor point P for the next search. end , then execute step 3), otherwise, if there is no point with a pixel value of 255 in the window, then execute step 4); 3) Window movement and anchor point switching: Each time the window moves, it moves along the vector direction from the anchor point to the next anchor point, and let P start =P end , return to step 2), and continuously search and record the coordinates of all points with a pixel value of 255 on a certain center line stripe by looping steps 2) and 3); 4) Delete noise points: record the number of all extracted points in the temporary container v as k, k = 1, 2, 3..., set a threshold num, if k ≤ num, the extracted stripes are considered to be short stripes or noise points, and delete these noise points, and execute step 5); 5) Store stripe points: For stripes with coordinate points k>num in container v, they are stripes after clustering, so store the coordinates of these points in container v j , j = 1, 2, 3..., then clear the data in container v, and execute step 5) once, then j = j + 1, and return to step 1; 6) When the stripes on the left and right images are clustered, compare the number of stripes in the two images. If the number is equal, it means that the clustering stripes are successful and the stripe clustering extraction is ended. If the number is not equal, the window needs to be expanded and re-clustered. When the window is expanded, first expand the bottom of the window by 2 rows, that is, n=n+2, and then expand the left and right directions of the window by 1 column, that is, p=p+1, q=q+1. One window expansion is regarded as one window iteration. After the iteration, the window size is (m+n+1+2i)×(p+q+1+2i), where i is the number of iterations, i=0,1,2... When the window is expanded, return to step 1); In step 6), the coordinates of the points in the window are stored in a container, and each iteration adds coordinate points to the container, and sorts the points in the container in the order of the window from left to right and from top to bottom.

2. The method for clustering and matching multi-line laser stripes based on custom window iteration according to claim 1, characterized in that: Step 1 specifically includes the following steps: When constructing a divergent multi-line laser measurement model based on binocular vision, the multi-line laser needs to be projected orthographically and the projected stripes need to be vertical or tilted on the view imaging; When collecting pictures, a solid-color background paper that is different from the color of the object to be measured is placed on the measuring platform. The two cameras first collect a picture of the object to be measured without laser fringe projection without moving the object to be measured. Then, a picture of the object to be measured with structured light fringe projection is collected. The edge features of the picture without laser fringe projection are detected and extracted, and the extracted edge contour is expanded to obtain an accurate closed image contour. The closed contour is then filled to obtain a mask image of the ROI area of ​​the object to be measured, which is superimposed on the image of the object to be measured by fringe projection to obtain a fringe projection image after the region of interest is segmented.

3. The method for clustering and matching multi-line laser stripes based on custom window iteration according to claim 1, characterized in that: After extracting the center line in step 2, the stripe coordinates of the center line are obtained, and the coordinates of each pixel point are plotted with a pixel value of 255 on an image with the same format as the original image and all pixel values ​​are 0 to obtain a binary image of the center line stripes.

4. The method for clustering and matching multi-line laser stripes based on custom window iteration according to claim 1, characterized in that: The centroid coordinates (ave x ,ave y ) and the calculation formula of the Euclidean distance dis from the centroid coordinate to the pixel coordinate origin is as follows: Among them, ave x ,ave y are the horizontal and vertical coordinates of the stripe centroid, and g is the number of stripes in the container v after clustering. j The number of point coordinates contained in x l ,y l It represents the horizontal and vertical coordinates of a point in the stripe, and dis is the Euclidean distance from the centroid coordinate to the origin of the pixel coordinate.

5. The method for clustering and matching multi-line laser stripes based on custom window iteration according to claim 4, characterized in that: In step 4, when numbering, the Euclidean distance dis between the centroid coordinates and the origin of the pixel coordinate system is compared, and the smaller dis is numbered first.