Method and device for extracting center of multi-line laser light strip, and object three-dimensional reconstruction method

By combining the Gaussian weighted gray-scale centroid method with the multiplication operation of the mask sub-image and the sub-image to be processed, the problem of insufficient accuracy and speed in the extraction of the center of multi-line laser light stripes in the existing technology is solved, and efficient 3D reconstruction of laser scanners is realized.

CN119478204BActive Publication Date: 2025-12-09SHENZHEN ANHUA OPTOELECTRONICS TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411450367.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-17
Publication Date
2025-12-09
Estimated Expiration
2044-10-17

AI Technical Summary

Technical Problem

Existing algorithms for extracting the center of multi-line laser stripes are insufficient in terms of accuracy and speed to meet the application requirements of laser scanners, especially handheld laser scanners. The geometric center method, skeleton refinement method, and Steger algorithm each have their shortcomings, and the simple grayscale centroid method cannot handle multi-line laser stripes.

Method used

The Gaussian weighted gray-scale centroid method is adopted. By binarizing the original image of the multi-line laser light stripe and performing connected component analysis, and combining the multiplication operation of the mask sub-image and the sub-image to be processed, the center point of the laser line segment is extracted, which improves accuracy and speed.

Benefits of technology

It enables rapid and high-precision extraction of the center of multi-line laser stripes, improving the accuracy and efficiency of 3D reconstruction, ensuring the uniformity and noise-free nature of point cloud data, accurately capturing the details of object surfaces, and is suitable for laser scanners, especially handheld laser scanners.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478204B_ABST
    Figure CN119478204B_ABST
Patent Text Reader

Abstract

The application provides a multi-line laser light strip center extraction method and device, an object three-dimensional reconstruction method and system, a laser scanner and a computer readable storage medium. The extraction method comprises the following steps: performing binaryzation processing on an original image, performing connected region analysis to obtain a plurality of connected regions, determining a to-be-processed sub-image and a mask sub-image for each connected region, processing the to-be-processed sub-image through the mask sub-image, determining the center point of each laser line segment by using a Gaussian weighted gray gravity center method, and obtaining the center line of each laser line segment. The laser light strip center extraction method can improve the extraction accuracy of the center points and has high extraction efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of three-dimensional reconstruction, in particular to a multi-line laser light strip center extraction method and device, an object three-dimensional reconstruction method and system, a laser scanner and a computer readable storage medium. BACKGROUND

[0002] With the development of laser technology, optical measurement has been widely used in many fields due to its high measurement accuracy, fast measurement speed, good adaptability and other characteristics, such as architecture, industrial design, cultural heritage protection, medical treatment, artistic entertainment and the like. Among them, the scanner based on multi-line laser light strip has developed rapidly due to its strong anti-interference and texture-free characteristics, and especially the handheld laser scanner is more popular as a portable device.

[0003] In the multi-line laser light strip scanner, the extraction of the multi-line laser light strip center line is very important, and the extraction of the center point of the laser line segment is even more important. The existing center extraction algorithms of the laser line segment include geometric center method, skeleton thinning method, steger algorithm and simple gray gravity center algorithm. Among them, the geometric center method only extracts the geometric center of the light strip, and needs to obtain the geometric boundary of the light strip, which cannot meet the application of the laser scanner, especially the handheld laser scanner, in terms of center position calculation, extraction precision and extraction speed. Although the skeleton thinning method can quickly extract the center point of the structured light as the skeleton to the single-pixel skeleton line, the center line extracted by this method is not complete, the loss is serious, and the precision is also poor. The steger algorithm obtains the normal direction of the light strip center point by calculating the Hession matrix, and obtains the center point coordinates by solving the extreme value of the second-order Taylor polynomial of the gray distribution function. This algorithm has large calculation amount and low efficiency. The simple gray gravity center algorithm cannot be directly used when multiple laser light strips appear in the image, and the speed is also slow when directly processing the whole image. Therefore, a multi-line laser light strip center extraction method for laser scanners needs to be proposed. SUMMARY

[0004] Based on the above status, the main purpose of the present application is to provide a multi-line laser light strip center line extraction method and device, an object three-dimensional reconstruction method and system, a laser scanner and a computer readable storage medium, which can meet the rapid and high-precision extraction of the multi-line laser light strip center line in the laser scanner, thereby improving the efficiency of modeling and measurement.

[0005] To achieve the above purpose, the technical scheme adopted by the present application is as follows:

[0006] The first aspect of the present application provides a multi-line laser light strip center extraction method, including the steps of:

[0007] S10: performing a binarization process on the original image containing the multi-line laser light strip to obtain a binarization image; performing a connected region analysis on the binarization image to obtain a plurality of connected regions;

[0008] S20: determining a to-be-processed sub-image and a mask sub-image corresponding to each connected region respectively, multiplying pixel values of corresponding pixels in the to-be-processed sub-image and the mask sub-image to obtain a filtered sub-image; and extracting a center point of a laser line segment in each filtered sub-image by using a Gaussian weighted gray gravity center method to obtain a plurality of centers of the laser line segment in each filtered sub-image, that is, to obtain a center position of each laser line segment in the original image;

[0009] wherein,

[0010] The to-be-processed sub-image corresponding to the connected region is a part of the original image corresponding to a minimum circumscribed rectangle of the connected region.

[0011] The mask sub-image corresponding to the connected region is obtained by setting pixel values of pixels outside the connected region in a part of the binarization image corresponding to a minimum circumscribed rectangle of the connected region to 0 and keeping other pixel values unchanged.

[0012] Preferably, in the step S20, before the determination of the to-be-processed sub-image and the mask sub-image corresponding to each connected region, the connected regions with a pixel number less than a preset threshold are filtered out.

[0013] Preferably, the preset threshold is 10-20.

[0014] Preferably, in the step S20, before the determination of the to-be-processed sub-image and the mask sub-image corresponding to each connected region, the step further includes: setting a region index value of each connected region as i; wherein i is 1, 2, …, N, and N is the number of connected regions.

[0015] The determination of the mask sub-image corresponding to the connected region with the region index value i includes:

[0016] Judging whether a region index value corresponding to each pixel in a part of the binarization image corresponding to a minimum circumscribed rectangle of the connected region is i, if not, setting the pixel value of the pixel to 0, otherwise, keeping the pixel value unchanged.

[0017] Preferably, in the step S20, each connected region is processed in parallel.

[0018] Preferably, in the step S20, the Gaussian weighted gray gravity center method is used to extract the center point of the laser line segment in the filtered sub-image, and the step specifically includes:

[0019] S251: determine a Gaussian weight matrix of the filtered sub-image according to a Gaussian weight function w(I(x, y)) as follows, and multiply the Gaussian weight matrix with corresponding elements in the filtered sub-image to obtain a first matrix;

[0020]

[0021] wherein I(x, y) is a gray value of a pixel at position (x, y);

[0022] S252: construct a row window matrix and a column window matrix with the same size as the filtered sub-image, and multiply the row window matrix and the column window matrix with corresponding elements in the first matrix respectively to obtain a second matrix and a third matrix with position weight and Gaussian weight information;

[0023] wherein each column in each row in the row window matrix has the same element value, which is a row position index value of the filtered sub-image corresponding to the row; each row in each column in the column window matrix has the same element value, which is a column position index value of the filtered sub-image corresponding to the column;

[0024] S253: sum the second matrix and the first matrix by column, and divide the sum of corresponding columns to obtain an initial column coordinate set of the laser center processed by taking row index as weight; sum the third matrix and the first matrix by row, and divide the sum of corresponding rows to obtain an initial row coordinate set of the laser center processed by taking column index as weight.

[0025] S254: determine a preliminary center point set of the laser line segment in the filtered sub-image according to the initial column coordinate set and the initial row coordinate set, wherein if the number of columns of the filtered sub-image is greater than or equal to the number of rows, the preliminary center point set is determined according to step S2541; if the number of rows of the filtered sub-image is greater than the number of columns, the preliminary center point set is determined according to step S2542;

[0026] S2541: round down each element value in the initial column coordinate set to obtain a first intermediate sequence set; average the corresponding element values of the initial column coordinate set and the first intermediate sequence set respectively to obtain row coordinates of each center point in the preliminary center point set; average each element value in the first intermediate sequence set and the element value in the initial row coordinate set with the element value as position index to obtain column coordinates of each center point in the preliminary center point set;

[0027] S2542: rounding down each element value in the initial row coordinate set to obtain a second intermediate sequence set, denoted as X={x1, x2, …, xM}, and averaging the corresponding element values in the initial row coordinate set and the second intermediate sequence set to obtain the column coordinates of each center point in the preliminary center point set; and averaging each element value in the second intermediate sequence set and the element value in the initial column coordinate set with the element value as a position index to obtain the row coordinates of each center point in the preliminary center point set;

[0028] S255: judging each center point in the preliminary center point set, for each center point in the preliminary center point set, selecting the upper, lower, left and right four pixels of the center point coordinates on the filtered sub-image, calculating the average of the gray values of the four pixels, and if the average is greater than a preset gray value, taking it as a confirmed center point of the laser line segment of the filtered sub-image, otherwise discarding the center point, and each confirmed center point is a plurality of centers of the laser line segment of the to-be-processed sub-image. Preferably, in step S20, after obtaining the centers of the laser line segment in each filtered sub-image, the center points of the same filtered sub-image are sequentially connected along the size of their position index values to obtain the center line of the corresponding connected region.

[0029] Preferably, in step S10, a Gaussian filter or a median filter is first used to obtain a preprocessed image, and then the preprocessed image is binarized.

[0030] In step S20, the to-be-processed sub-image corresponding to each connected region is the part of the preprocessed image corresponding to the minimum circumscribed rectangle of the connected region.

[0031] The second aspect of the application provides a device for extracting the center of a multi-line laser light strip, comprising:

[0032] The connected region division unit is configured to perform binarization processing on the original image containing the multi-line laser light strip to obtain a binarized image, and perform connected region analysis on the binarized image to obtain a plurality of connected regions.

[0033] The center extraction unit is configured to determine a to-be-processed sub-image and a mask sub-image corresponding to each connected region, respectively, multiply the pixel values of the corresponding pixels in the to-be-processed sub-image and the mask sub-image to obtain a filtered sub-image, and extract the center points of the laser line segment in each filtered sub-image by using a Gaussian weighted gray center method to obtain a plurality of centers of the laser line segment in each filtered sub-image, i.e., the center positions of each laser line segment in the original image.

[0034] In the device, the connected region division unit is configured to perform binarization processing on the original image containing the multi-line laser light strip to obtain a binarized image, and perform connected region analysis on the binarized image to obtain a plurality of connected regions.

[0035] The sub-image corresponding to the connected region to be processed is a part of the original image corresponding to the minimum circumscribed rectangle of the connected region;

[0036] The mask sub-image corresponding to the connected region is obtained by setting the pixel value of the pixel outside the connected region in the part of the binary image corresponding to the minimum circumscribed rectangle of the connected region to 0, and keeping the rest of the pixel values unchanged.

[0037] The third aspect of the present application provides a three-dimensional reconstruction method of an object, comprising the steps of:

[0038] S100: acquiring an original image of a multi-line laser light bar projected onto a to-be-measured object;

[0039] S200: extracting the center position of each laser line segment in the original image by using the extraction method of any one of the above;

[0040] S300: performing three-dimensional reconstruction on the to-be-measured object based on the obtained center position of each laser line segment.

[0041] The fourth aspect of the present application provides a three-dimensional reconstruction system of an object, comprising:

[0042] An acquisition module is configured to acquire an original image of a multi-line laser light bar projected onto a to-be-measured object;

[0043] A center line extraction module is configured to extract the center position of each laser line segment in the original image by using the extraction method of any one of the above;

[0044] A three-dimensional reconstruction module is configured to perform three-dimensional reconstruction on the to-be-measured object based on the obtained center position of each laser line segment.

[0045] The fifth aspect of the present application provides a laser scanner, comprising:

[0046] Two multi-line lasers are configured to project multi-line laser lines onto a to-be-measured object;

[0047] An acquisition device is configured to acquire an image of the multi-line laser lines on the to-be-measured object to obtain an original image;

[0048] A processing device comprises the three-dimensional reconstruction system of an object as described above;

[0049] The acquisition device and the processing device are signal connected.

[0050] The sixth aspect of the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the extraction method of the center of a multi-line laser light bar as described in any one of the above, or to implement the three-dimensional reconstruction method of an object as described above.

[0051] The method for extracting the center line of the multi-line laser light strip of the present application can improve the accuracy of the mask making and the image processing accuracy of each local to-be-processed sub-image by converting the processing of the entire image into processing of local to-be-processed sub-images respectively, and the mask sub-image is also made for a local area. The center point of the filtered sub-image after processing is extracted by combining the improved gray gravity center method, i.e. the Gaussian weighted gray gravity center method, so that the extraction accuracy and speed of the center point are greatly improved, thereby improving the accuracy of the generated three-dimensional point cloud data and model, ensuring that the point cloud data is uniformly distributed and has no obvious noise or deviation, so as to facilitate accurate capture of the tiny details of the surface of the object to be measured, such as texture, concave-convex and curvature, thereby improving the shape and features of the three-dimensional reconstructed object, and facilitating the smooth progress of the subsequent steps of generating three-dimensional point cloud data, such as registration, splicing, surface reconstruction, etc., and further realizing rapid and accurate three-dimensional modeling, which can be widely applied to laser scanners, especially handheld laser scanners.

[0052] Other beneficial effects of the present application will be described in the specific embodiments by introducing specific technical features and technical solutions, and those skilled in the art should be able to understand the beneficial technical effects brought by the technical features and technical solutions through the introduction of the technical features and technical solutions. BRIEF DESCRIPTION OF DRAWINGS

[0053] The preferred embodiments of the present application will be described below with reference to the accompanying drawings.

[0054] Figure 1 The flowchart of a preferred embodiment of the method for extracting the center line of the multi-line laser light strip provided by the present application;

[0055] Figure 2 The binary image after binaryzation of the original image in a specific embodiment of the method for extracting the center line of the multi-line laser light strip provided by the present application;

[0056] Figure 3 The binary image after binaryzation of the original image in a specific embodiment of the method for extracting the center line of the multi-line laser light strip provided by the present application; Figure 2 The schematic diagram of index marking of the original image in a specific embodiment of the method for extracting the center line of the multi-line laser light strip provided by the present application;

[0057] Figure 4 , Figure 5 The mask area and the enlarged view of the mask area shown in the embodiment of the method for extracting the center line of the multi-line laser light strip provided by the present application; Figure 2

[0058] The mask sub-image obtained after processing the mask area of the method for extracting the center line of the multi-line laser light strip provided by the present application; Figure 6 Figure 5 The to-be-processed sub-image corresponding to the mask sub-image of the method for extracting the center line of the multi-line laser light strip provided by the present application;

[0059] Figure 7 Figure 6 The to-be-processed sub-image corresponding to the mask sub-image of the method for extracting the center line of the multi-line laser light strip provided by the present application; ​​

[0060] Figure 8 the center position of the laser line segment obtained by processing the sub-image in the rectangular frame by steps S251 to S255;

[0061] Figure 9 the center of the multi-line laser light strip obtained by extracting the sub-image by the extracting method of the present application;

[0062] Figure 10 a schematic diagram of a specific embodiment of the laser scanner provided by the present application. DETAILED DESCRIPTION

[0063] The present application is described in detail below based on the embodiments, but the present application is not limited to only these embodiments. In the following detailed description of the present application, some specific details are described in detail in order to avoid obscuring the essence of the present application, and the well-known methods, processes, procedures, elements are not described in detail.

[0064] In addition, those skilled in the art should understand that the drawings provided herein are for illustrative purposes only, and the drawings are not necessarily drawn to scale.

[0065] Unless the context clearly requires otherwise, throughout the description and the claims, the words "comprise", "comprising", and the like are to be construed in an inclusive sense as opposed to an exclusive or exhaustive sense; that is to say, in the sense of "including, but not limited to".

[0066] In the description of the present application, it should be understood that the terms "first", "second", etc. are only for the purpose of description, and cannot be understood as indicating or implying relative importance. In addition, in the description of the present application, unless otherwise stated, the meaning of "multiple" is two or more.

[0067] In many technical fields such as construction, detection, etc., a multi-line laser is used to emit a multi-line laser beam to the object to be measured, so that an original image with a multi-line laser light strip can be collected on the object. Processing the original image can be used to construct a three-dimensional model of the object to be measured. It is crucial to extract the center point of the multi-line laser light strip in the original image.

[0068] The application provides a multi-line laser light strip center extraction method, which can be applied to the fields of reverse engineering, medical assistance, defect detection, industrial measurement and positioning, cultural relic protection, entertainment and the like, and can be applied to electronic devices in these fields, and can cooperate with lasers, cameras and the like to perform three-dimensional reconstruction on objects, such as being applied to scanners in multiple fields, especially handheld laser scanners. Since the multi-line laser light strip center extraction method has the advantages of high precision, rapidity and real-time performance, the method can better meet the requirements of modeling and measurement of laser scanners.

[0069] As shown in Figure 1 , the multi-line laser light strip center extraction method comprises the steps of:

[0070] S10: performing binaryzation processing on an original image containing a multi-line laser light strip to obtain a binaryzation image, as shown in Figure 2 ; performing connected region analysis on the binaryzation image to obtain a plurality of connected regions, as shown in Figure 3 , each light strip being a connected region. In the original image, a plurality of laser line segments are included, and each connected region has only one continuous laser line segment. In this step, each laser line segment in the binaryzation image forms a connected region.

[0071] S20: determining a to-be-processed sub-image and a mask sub-image corresponding to each connected region respectively, multiplying the pixel values of corresponding pixels in the to-be-processed sub-image and the mask sub-image to obtain a filtered sub-image; and extracting the center points of the laser line segments in each filtered sub-image by a Gaussian weighted gray center method to obtain a plurality of center points of the laser line segments in each filtered sub-image, that is, the center positions of each laser line segment in the original image.

[0072] In the application, the to-be-processed sub-image corresponding to the connected region is a part of the original image corresponding to the minimum circumscribed rectangle of the connected region; and the mask sub-image corresponding to the connected region is obtained by setting the pixel values of pixels outside the connected region in the part of the binaryzation image corresponding to the minimum circumscribed rectangle of the connected region to 0 and keeping the pixel values of the other pixels unchanged.

[0073] That is, the following steps are performed on each connected region in step S20:

[0074] S21: determining the minimum circumscribed rectangle ROI of the current connected region;

[0075] S22: determining the to-be-processed sub-image of the current connected region, that is, taking the part of the original image corresponding to the minimum circumscribed rectangle ROI as the to-be-processed sub-image of the current connected region, as shown in Figure 7 ;

[0076] S23: a mask sub-image is made, that is, a part of the binary image corresponding to the lowermost outer rectangle ROI is taken as a mask region (as shown in Figure 4 The rectangular frame is Figure 5 The pixel value of the pixel located outside the current connected region in the mask region is set to 0, and the pixel value of the remaining pixels is unchanged, and the mask region at this time is the mask sub-image corresponding to the current connected region (as shown in Figure 6 );

[0077] S24: a filtered sub-image is obtained, that is, the pixel value of the corresponding pixel in the filtered sub-image is obtained by multiplying the pixel value of the corresponding pixel in the mask sub-image and the pixel value of the corresponding pixel in the to-be-processed sub-image, thereby obtaining the filtered sub-image;

[0078] S25: the center point of the laser line segment in the filtered sub-image is extracted by using the Gaussian weighted gray centroid method, and a plurality of centers of the laser line segment in the filtered sub-image are obtained, as shown in Figure 8 .

[0079] When steps S21 to S25 are performed on each connected region, the center points of each laser line segment in the entire original image are obtained, as shown in Figure 9 .

[0080] The multi-line laser light strip center extraction method of the application first obtains a plurality of to-be-processed sub-images through connected region analysis, and makes a mask sub-image for each to-be-processed sub-image, then processes the to-be-processed sub-image through the mask sub-image, and determines the center point of each laser line segment by using the Gaussian weighted gray centroid method, thereby obtaining the center of each laser line segment. This multi-line laser light strip center extraction method converts the processing of the entire image into the processing of each local to-be-processed sub-image, and the mask sub-image is also made for the local region, so that the accuracy of mask making and the image processing accuracy of each local to-be-processed sub-image can be improved, and the center point of the processed filtered sub-image is extracted by using the improved gray centroid method, that is, the Gaussian weighted gray centroid method, the extraction accuracy and speed of the center point are greatly improved, the accuracy of the generated three-dimensional point cloud data and model is improved, the point cloud data is uniformly distributed and has no obvious noise or deviation, which is beneficial to accurately capturing the micro details of the surface of the object to be measured, such as the texture, concave-convex and curvature of the surface, thereby improving the shape and features of the three-dimensional reconstructed object, and facilitating the smooth progress of other processing steps after the generation of the three-dimensional point cloud data, such as model registration, splicing and surface reconstruction. It can be seen that the extraction method of the application can realize fast and accurate three-dimensional modeling and detection, and can be widely applied to laser scanners, especially handheld laser scanners.

[0081] In step S10, the original image is firstly filtered by Gaussian filtering or median filtering, i.e. the original image is preprocessed to obtain a preprocessed image, and then the preprocessed image is binarized. In this embodiment, in step S20, the to-be-processed sub-image corresponding to each connected region is the part of the preprocessed image corresponding to the minimum circumscribed rectangle of the connected region.

[0082] In an actual measurement environment, the laser beam emitted from the multi-line laser has a certain width in space, which is represented as a laser light strip occupying a certain pixel area on the image. In three-dimensional reconstruction, a single pixel or a sub-pixel is required to achieve accurate three-dimensional reconstruction. Due to the influence of laser speckle, the distribution of the laser light strip is not an ideal light strip distribution, so the laser image is preprocessed to remove noise and smooth the protruding edges of the light strip. Specifically, Gaussian filtering or median filtering can be selected, and Gaussian filtering is preferred to perform Gaussian blurring on the original image, thereby changing the laser cross-section intensity distribution to a Gaussian distribution. The Gaussian kernel used for Gaussian filtering can be determined according to the image area occupied by the width of a single laser light strip in the original image. In this application, a Gaussian kernel with a size of 5*5 is used for Gaussian filtering, which can better remove Gaussian noise and smooth the protruding edges of the laser light strip.

[0083] In step S10, the original image is binarized, and specifically, a binarization threshold can be set, and the pixel values of the pixels in the original image (in the embodiment of the preprocessed image) whose pixel values are greater than the binarization threshold are set to 1, and the pixel values of the remaining pixels are set to 0.

[0084] In the above embodiment, the specific method of analyzing the connected regions of the binarized image can use the connected region analysis method in the prior art, such as using the four-neighborhood or eight-neighborhood method to partition each pixel in the binarized image.

[0085] Connectivity defines whether adjacent pixels are considered to be connected. Common connectivities are 4-connectivity and 8-connectivity. Four directions up, down, left and right of a pixel are connected as 4-connectivity. Eight directions up, down, left, right and diagonals of a pixel are connected as 8-connectivity. After the original image is binarized, the image is scanned: from top to bottom and from left to right, each pixel is traversed, and using recursion or queue / stack data structure, all pixels connected with the current pixel are marked as the same region, and the label is marked as index i. After there is no pixel value of 1 or 255 in the neighborhood, the next connected region is found, and the current pixel value is found to be 1 or 255 and not marked, a new connected region is marked, and the label index is i+1.

[0086] In the actual object scanning, the multi-line laser is modulated by the height of the object to be measured, so that the original image obtained will have the phenomenon of broken laser lines, that is, the same laser light strip projected by the multi-line laser may be disconnected into multiple laser line segments in the original image collected when the laser light strip is projected onto the object to be measured (that is, the multiple laser line segments in the original image correspond to the same laser light strip), or it can still be a continuous laser line. Therefore, the laser line segment in the original image can be part of the projection of the same laser light strip on the object to be measured, or it can be all.

[0087] Due to the modulation of the height of the object to be measured and the influence of environmental conditions such as stray light, after the connected region analysis in step S10, some connected regions may have very small areas (number of pixels), and some connected regions (number of pixels) have larger areas. For the connected regions with very small areas, if step S20 is performed, even if these connected regions are valid connected regions (not affected by environmental conditions such as stray light), at most a few points will be added to the final determined center point, which can be completely ignored relative to the entire image, but it will greatly increase the processing efficiency of the entire image, and these connected regions may also be interference. In a preferred embodiment of the present application, these connected regions are removed. Specifically, before determining the corresponding to-be-processed sub-image and mask sub-image of each connected region in step S20, the connected regions with a number of pixels less than a predetermined threshold are filtered out, that is, in step S20, the number of pixels occupied by each connected region obtained in step S10 is determined, and the connected regions with a number of pixels less than a predetermined threshold are removed, and steps S21 to S25 are not performed, so as to improve the efficiency of three-dimensional reconstruction and avoid interference. The predetermined threshold can be determined according to the width of a single laser light strip of the multi-line laser, or it can be determined by experience. In the present application, the predetermined threshold is preferably selected to be 10-20, such as 10, 13, 15, 17, 19 or 20.

[0088] In step S20, the minimum circumscribed rectangle of the connected region can be determined according to the coordinates of the start point and the end point of the connected region, for example, the start point and the end point are taken as the two end points of the diagonal of the rectangle, and the absolute value of the difference between the horizontal coordinates of the start point and the end point is taken as the length of the rectangle, and the difference between the vertical coordinates is taken as the width of the rectangle.

[0089] In a preferred embodiment, in order to facilitate the execution of steps S21 to S25, the region index value can be marked for each connected region first, that is, in step S20, before setting the to-be-processed sub-image and the mask sub-image corresponding to each connected region, further comprising: setting the region index value of each connected region as i; wherein i is 1, 2, …, N, and N is the number of connected regions. In the embodiment of filtering out the connected regions with the number of pixels less than the preset threshold, the region index value can be set only for the retained connected regions.

[0090] In specific implementation, in some embodiments, the position index value can be set for each connected region when the connected region analysis is performed, and in this case, in step S20, the position index value can be directly used. When the connected regions with the number of pixels less than the preset threshold are filtered out first in step S20, the original region index value of the retained connected regions can be directly used, or the region index value of the retained connected regions can be re-set.

[0091] In this embodiment, the region index values of the pixels corresponding to the same connected region are the same, and therefore, in step S20, the mask sub-image corresponding to the connected region with the region index value i can be directly determined by using the region index value, comprising: determining whether the region index value corresponding to each pixel in the part of the minimum circumscribed rectangle of the connected region on the binary image is i, and if not, setting the pixel value of the pixel as 0, otherwise, the pixel value of the pixel is unchanged. That is, in the above step S23, the pixel value of the pixel with the region index value not equal to i in the mask region is set as 0.

[0092] It can be seen that by setting the region index value for each connected region, different sub-image regions are obtained to facilitate simultaneous processing, thereby improving the extraction efficiency of the center point of the laser line segment and improving the speed of three-dimensional reconstruction. Of course, the generation of the mask sub-image can also be directly determined by judging whether the position of each pixel in the mask region is located in the current connected region, and whether the pixel value of the pixel is set as 0.

[0093] In step S20, each connected region can be processed in parallel, that is, steps S21 to S25 are executed simultaneously for each connected region, so as to further improve the extraction efficiency of the center point of each laser line segment.

[0094] In another embodiment, the connected regions are processed in series in step S20, i.e. steps S21-S25 are performed for one connected region, then steps S21-S25 are performed for another connected region, and so on until all connected regions are processed. Specifically, steps S21-S25 can be performed for the connected regions in order from top left to bottom right, or in order of increasing region index value in embodiments where region index values are assigned to the connected regions, e.g. when the region index values are assigned in order as 1, 2,..., N, step S20 comprises steps of:

[0095] S00: set i = 1;

[0096] S02: determine the to-be-processed sub-image and the mask sub-image corresponding to the connected region with region index value i, multiply the corresponding pixel values in the to-be-processed sub-image and the mask sub-image to obtain a filtered sub-image, and extract the center points of the laser line segments in the filtered sub-image by the Gaussian weighted gray barycenter method, i.e. perform steps S21-S25 for the connected region with region index value i;

[0097] S03: determine whether i is less than N, if so, set i = i + 1 and return to step S02; otherwise, end, and the obtained set of center points is the center positions of the laser line segments in the original image.

[0098] In step S20, the center points of the laser line segments in the filtered sub-image are extracted by the Gaussian weighted gray barycenter method, i.e. the above step S25 can specifically extract the X coordinate x and the Y coordinate y of the center points of the laser line segments in order one by one according to the following formulas (1) and (2). centraid centraid

[0099]

[0100] where I(x, y) is the gray value of the pixel at position (x, y); w(I(x, y)) is the Gaussian weight function; M and N are the length and width of the filtered sub-image, i.e. the number of pixels in the X direction and the number of pixels in the Y direction of the filtered sub-image.

[0101] In a preferred embodiment, the X coordinates and the Y coordinates of the center points of the laser line segments in the filtered sub-image are extracted in matrix form at one time, i.e. the initial column coordinate set and the initial row coordinate set are extracted according to the row direction and the column direction respectively, and then the multiple centers of the laser line segments in the filtered sub-image are determined according to the two coordinate sets. Specifically, the above step S25 comprises steps of

[0102] ​​S251: Determine the Gaussian weight matrix of the filtered sub-image according to the Gaussian weight function w(I(x, y)), that is, the above formula (1), and multiply the Gaussian weight matrix with the corresponding elements in the filtered sub-image to obtain a first matrix;

[0103] S252: Construct a row window matrix and a column window matrix with the same size as the filtered sub-image, and multiply the row window matrix and the column window matrix with the corresponding elements in the first matrix respectively to obtain a second matrix and a third matrix with position weight and Gaussian weight information.

[0104] Wherein, the element values of each column in each row of the row window matrix are the same, which are the row position index values of the corresponding filtered sub-image, and the element values of each row in each column of the column window matrix are the same, which are the position index values of the corresponding column of the filtered sub-image; the position index values of the column position are weights, and the values of each column in the same column are the same; that is, the values of each element in each row of the row window matrix are the row numbers, and the values of each element in each column of the column window matrix are the column numbers, such as the top-left corner coordinate (i, j) of the filtered sub-image (that is, the jth row and the ith column of the original image), and the bottom-right corner coordinate (i+m, j+n) (that is, the j+nth row and the i+mth column of the original image), the size of the row window matrix corresponding to the filtered sub-image is the same as that of the filtered sub-image, and the element values of the first row are j, the element values of the second row are j+1, and so on, and the element values of the nth row are j+n; the size of the column window matrix corresponding to the filtered sub-image is the same as that of the filtered sub-image, and the element values of the first column are i, the element values of the second column are i+1, and so on, and the element values of the mth column are j+m.

[0105] S253: Sum each column of the second matrix and the first matrix respectively, and divide the sum of the corresponding column to obtain an initial column coordinate set of the laser center processed by taking the row index as the weight, denoted as PointCol{A1, A2, …, AN}; sum each row of the third matrix and the first matrix respectively, and divide the sum of the corresponding row to obtain an initial row coordinate set of the laser center processed by taking the column index as the weight. That is, sum each column element of the second matrix and the first matrix respectively to obtain two groups of column sum data, and then divide the corresponding elements in the two groups of column sum data to obtain an initial column coordinate set denoted as PointRow{B1, B2, …, BM}; sum each row element of the third matrix and the first matrix to obtain two groups of row sum data, and then divide the corresponding elements in the two groups of row sum data to obtain an initial row coordinate set.

[0106] S254: determining a preliminary center point set of the laser line segments in the filtered sub-image according to the initial column coordinate set and the initial row coordinate set, wherein if the number of columns of the filtered sub-image is greater than or equal to the number of rows, the preliminary center point set of the laser line segments in the filtered sub-image is determined according to step S2541; if the number of rows of the filtered sub-image is greater than the number of columns, the preliminary center point set of the laser line segments in the filtered sub-image is determined according to step S2542.

[0107] S2541: rounding down each element value in the initial column coordinate set to obtain a first intermediate sequence set, denoted as Y = {y1, y2, …, yN}, and averaging the corresponding element values in the initial column coordinate set and the first intermediate sequence set to obtain the row coordinates of each center point in the preliminary center point set of the laser line segments in the filtered sub-image; and averaging each element value in the first intermediate sequence set and the element value in the initial row coordinate set serving as the position index of the element value to obtain the column coordinates of each center point in the preliminary center point set of the laser line segments in the filtered sub-image. That is, the row coordinates of each center point in the preliminary center point set of the laser line segments in the filtered sub-image are (A1+y1) / 2, (A2+y2) / 2, …, (AN+yN) / 2 respectively; and the column coordinates are the average of y1 and the (y1th) element value in the initial row coordinate set, the average of y2 and the (y2th) element value in the initial row coordinate set, …, the average of yN and the (yNth) element value in the initial row coordinate set.

[0108] S2542: rounding down each element value in the initial row coordinate set to obtain a second intermediate sequence set, denoted as X = {x1, x2, …, xM}, and averaging the corresponding element values in the initial row coordinate set and the second intermediate sequence set to obtain the column coordinates of each center point in the preliminary center point set of the laser line segments in the filtered sub-image; and averaging each element value in the second intermediate sequence set and the element value in the initial column coordinate set serving as the position index of the element value to obtain the row coordinates of each center point in the preliminary center point set of the laser line segments in the filtered sub-image. That is, the column coordinates of each center point in the preliminary center point set of the laser line segments in the filtered sub-image are (B1+x1) / 2, (B2+x2) / 2, …, (BM+xM) / 2 respectively; and the row coordinates are the average of x1 and the (x1th) element value in the initial column coordinate set, the average of x2 and the (x2th) element value in the initial column coordinate set, …, the average of xM and the (xMth) element value in the initial column coordinate set.

[0109] Each center point in the preliminary center point set obtained in step S254 can be directly used as a center of the laser line segment of the filtered sub-image. In order to further improve the extraction accuracy of each center of the laser line segment of the filtered sub-image, step S254 further includes the following steps:

[0110] S255: judging each center point in the above calculated preliminary center point set, for each center point in the preliminary center point set, selecting the upper, lower, left and right four pixels of the center point coordinate on the filtered sub-image, calculating the average value of the gray values of the four pixels, if the average value is greater than a preset gray value, taking it as a confirmed center point of the laser line segment of the filtered sub-image, otherwise, discarding the center point, and each confirmed center point is a plurality of centers of the laser line segment of the to-be-processed sub-image.

[0111] The laser center point coordinates extracted by the above method are sub-pixel coordinates, and satisfy the characteristics that the laser line in the handheld multi-line laser system is emitted along a diagonal line, thereby providing accurate laser stripe center point coordinates for subsequent three-dimensional reconstruction.

[0112] After obtaining the center points of the laser collinear segment of each filtered sub-image, in some embodiments, the center points are directly used for subsequent steps such as three-dimensional reconstruction or measurement, and in some embodiments, after obtaining the centers of the laser line segment in each filtered sub-image in step S20, the centers of the same filtered sub-image are connected, thereby obtaining the center line of each laser line segment, and the center line is used for subsequent steps such as three-dimensional reconstruction or measurement. When connecting the centers of the same filtered sub-image, the centers can be sequentially connected along the size of the position index value of each center point to obtain the center line of the corresponding connected region (i.e., the connected region corresponding to the filtered sub-image). This way, the amount of calculation is small, and the efficiency of three-dimensional reconstruction can be improved. Of course, the centers of the same filtered sub-image can also be connected in a fitting manner, such as fitting by using the least square method or B-spline curve.

[0113] The application further provides a multi-line laser stripe center line extraction device, comprising:

[0114] The connected region division unit is configured to perform the above step S10, i.e., performing binaryzation processing on the original image containing the multi-line laser stripe to obtain a binaryzation image, and performing connected region analysis on the binaryzation image to obtain a plurality of connected regions.

[0115] The center line extraction unit is configured to perform the above step S20, i.e., respectively determining the to-be-processed sub-image and the mask sub-image corresponding to each connected region, multiplying the pixel values of the corresponding pixels in the to-be-processed sub-image and the mask sub-image to obtain a filtered sub-image, and extracting the center points of the laser line segment in each filtered sub-image by using the Gaussian weighted gray center method to obtain a plurality of centers of the laser line segment in each filtered sub-image, i.e., obtaining the center positions of each laser line segment in the original image.

[0116] The connected region corresponds to a to-be-processed sub-image which is a part of the original image corresponding to a minimum circumscribed rectangle of the connected region; and the connected region corresponds to a mask sub-image obtained by setting pixel values of pixels outside the connected region in a part of the binary image corresponding to the minimum circumscribed rectangle of the connected region to 0 and keeping other pixel values unchanged.

[0117] The specific implementation in each unit can refer to the foregoing embodiments corresponding to the extraction method, and will not be described here again.

[0118] It should be noted that the original image, the to-be-processed sub-image, the mask sub-image and the filtered sub-image in the present application are usually in the form of a matrix or an array in the processing program, and each of the matrix or the array has a position and an element (i.e., a pixel value) corresponding to the position. Therefore, the multiplication of the corresponding pixels or elements is multiplication of the elements or pixel values at the corresponding positions. The to-be-processed sub-image, the mask sub-image and the filtered sub-image are equal in size, for example, if each is represented in the form of a matrix, the number of rows and columns of the respective matrices is equal, and only the elements are different.

[0119] The present application also provides a three-dimensional reconstruction method of an object, comprising the steps of:

[0120] S100: acquiring an original image of a multi-line laser light strip projected onto a to-be-measured object;

[0121] S200: extracting the center positions of each laser line segment in the original image by using the extraction method described in any of the foregoing embodiments;

[0122] S300: performing three-dimensional reconstruction on the to-be-measured object based on the obtained center positions of each laser line segment.

[0123] The present application also provides a three-dimensional reconstruction system of an object, which can be used to implement the three-dimensional reconstruction method of the object. The three-dimensional reconstruction system of the object comprises:

[0124] An acquisition module is configured to perform the step S100, i.e., acquire the original image of the multi-line laser light strip projected onto the to-be-measured object;

[0125] A center line extraction module comprises the extraction device and is configured to perform the step S200, i.e., extract the center positions of each laser line segment in the original image by using the extraction method described in any of the foregoing embodiments;

[0126] A three-dimensional reconstruction module is configured to perform the step S300, i.e., perform three-dimensional reconstruction on the to-be-measured object based on the obtained center positions of each laser line segment.

[0127] The three-dimensional reconstruction method of the present application can improve the accuracy and efficiency of extracting the center of the laser light strip, thereby obtaining a higher-precision object model when performing three-dimensional reconstruction on the object to be measured, making it closer to the actual object, and improving the real-time performance of three-dimensional reconstruction, and improving the efficiency of detection when used for detection.

[0128] The present application also provides a laser scanner, which can be a non-handheld laser scanner or a handheld laser scanner. The handheld laser scanner is a portable device. The laser scanner is used to capture the three-dimensional geometric information of the surface of an object. By projecting a plurality of laser lines or laser beams onto the surface of the object, and then capturing the reflected light using a camera or a sensor, the three-dimensional model of the object is reconstructed through image processing and calculation. Specifically, as shown in Figure 10 The laser scanner comprises:

[0129] Two multi-line lasers 1 are provided for projecting a plurality of multi-line laser lines onto the object to be measured, i.e., each multi-line laser 1 projects a plurality of multi-line laser lines, and the multi-line laser lines projected by the two multi-line lasers at different positions form a certain angle.

[0130] Two acquisition devices 2 are provided for capturing the images of the multi-line laser lines on the object to be measured to obtain original images. The acquisition device 2 can be a camera.

[0131] The processing device 3 comprises the above-mentioned object three-dimensional reconstruction system, i.e., the original images are processed to perform three-dimensional reconstruction of the object to be measured.

[0132] The acquisition device 2 and the processing device 3 are signal connected.

[0133] The multi-line laser 1 can emit a plurality of laser lines, which can be 5, 7, 11, 13, or 25, etc. The two multi-line lasers 1 can alternately project, and then the two acquisition devices 2 (such as the upper and lower acquisition devices 2 shown in Figure 10 synchronously capture the multi-line laser pattern projected by a single multi-line laser.

[0134] The processing device 3 can use the extraction method described in any of the above embodiments to process the original images captured by each acquisition device 2 to obtain the center position of each laser light strip in each original image, calculate the depth information of the surface of the object according to the optical triangulation principle, and perform three-dimensional reconstruction.

[0135] The laser scanner can further comprise a filter, which is arranged in front of the lens of the acquisition device 2 to filter out the interference of non-blue light in the background, thereby improving the accuracy of subsequent extraction of the center of each light strip.

[0136] The application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to implement the method for extracting a multi-line laser light strip center according to any one of the above embodiments or to implement the object three-dimensional reconstruction method according to the above.

[0137] It should be noted that the computer readable storage medium described in the embodiments of the present disclosure is not limited to the above-mentioned embodiments, for example, it can also be an electric, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or apparatus, or any combination of the above. More specific examples of the computer readable storage medium can include, but are not limited to, an electric connection with one or more conductive wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the embodiments of the present disclosure, the computer readable storage medium can be any tangible medium containing or storing a program, which can be used by or in combination with an instruction execution system, device or apparatus.

[0138] Those skilled in the art can understand that the above-mentioned preferred embodiments can be freely combined and superimposed without conflict. Among them, the flowcharts and block diagrams in the drawings illustrate the possible implementation architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagram can represent a module, program segment, or a part of code containing one or more executable instructions for implementing the specified logical function. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur in different order than that noted in the drawings, for example, two consecutive blocks can actually be executed in substantial parallel, and sometimes they can be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagram and / or flowchart, and the combination of blocks in the block diagram and / or flowchart, can be implemented by a dedicated hardware-based system that performs the specified function or operation, or can be implemented by a combination of dedicated hardware and computer instructions. The numbering of the steps herein is only for the convenience of explanation and reference, and does not limit the front and rear order, and the specific execution order is determined by the technology itself, and those skilled in the art can determine various allowed and reasonable orders according to the technology itself.

[0139] It should be understood that the above-described embodiments are only exemplary and not limiting, and those skilled in the art can make various obvious or equivalent modifications or replacements to the above-described details without departing from the essential principles of the present application, which will be included in the scope of the claims of the present application.

Claims

1. A method for extracting the center of a multi-line laser light stripe, characterized by, The method comprises the steps of: S10: performing a binarization process on an original image containing multi-line laser light strips to obtain a binarization image; performing a connected region analysis on the binarization image to obtain a plurality of connected regions; S20: determining a to-be-processed sub-image and a mask sub-image corresponding to each connected region respectively, multiplying the corresponding to-be-processed sub-image and the pixel value of the corresponding pixel in the mask sub-image to obtain a filtered sub-image; The center points of the laser line segments in each filtered sub-image are extracted by using a Gaussian weighted gray gravity center method to obtain a plurality of centers of the laser line segments in each filtered sub-image, i.e. the center positions of each laser line segment in the original image are obtained; Wherein, The to-be-processed sub-image corresponding to the connected region is a part of the original image corresponding to the minimum circumscribed rectangle of the connected region; The mask sub-image corresponding to the connected region is obtained by setting the pixel value of the pixel outside the connected region in the part of the binarization image corresponding to the minimum circumscribed rectangle of the connected region to 0 and keeping the pixel values of the other pixels unchanged; In step S20, the center points of the laser line segments in the filtered sub-image are extracted by using a Gaussian weighted gray gravity center method, specifically comprising the steps of: S251: determining a Gaussian weight matrix of the filtered sub-image according to the following Gaussian weight function w(I(x,y)) and multiplying the Gaussian weight matrix and the corresponding elements in the filtered sub-image to obtain a first matrix; ; Wherein, I(x,y) is the gray value of the pixel at position (x,y); S252: constructing a row window matrix and a column window matrix with the same size as the filtered sub-image, and multiplying the row window matrix and the column window matrix with the corresponding elements in the first matrix respectively to obtain a second matrix and a third matrix with position weight and Gaussian weight information; Wherein, the element values of each column in each row of the row window matrix are the same, which are the row position index values of the filtered sub-image corresponding to the row; the element values of each row in each column of the column window matrix are the same, which are the column position index values of the filtered sub-image corresponding to the column; S253: summing the second matrix and the first matrix by column, and dividing the sum of the corresponding columns to obtain an initial column coordinate set of the laser center processed by taking the row index as the weight; summing the third matrix and the first matrix by row, and dividing the sum of the corresponding rows to obtain an initial row coordinate set of the laser center processed by taking the column index as the weight; S254: determining a preliminary center point set of the laser line segment in the filtered sub-image according to the initial column coordinate set and the initial row coordinate set, wherein if the number of columns of the filtered sub-image is greater than or equal to the number of rows, the preliminary center point set is determined according to step S2541; if the number of rows of the filtered sub-image is greater than the number of columns, the preliminary center point set is determined according to step S2542; S2541: rounding down each element value in the initial column coordinate set to obtain a first intermediate sequence set; averaging the corresponding element values of the initial column coordinate set and the first intermediate sequence set respectively to obtain the row coordinates of each center point in the preliminary center point set; averaging each element value in the first intermediate sequence set and the element value in the initial row coordinate set which uses the element value as a position index to obtain the column coordinates of each center point in the preliminary center point set; S2542: rounding down each element value in the initial row coordinate set to obtain a second intermediate sequence set, denoted as X={x1, x2, …, xM}, and averaging the corresponding element values of the initial row coordinate set and the second intermediate sequence set respectively to obtain the column coordinates of each center point in the preliminary center point set; averaging each element value in the second intermediate sequence set and the element value in the initial column coordinate set which uses the element value as a position index to obtain the row coordinates of each center point in the preliminary center point set; S255: judging each center point in the preliminary center point set, for each center point in the preliminary center point set, selecting the upper, lower, left and right four pixels of the coordinates of the center point on the filtered sub-image, calculating the average of the gray values of the four pixels, if the average is greater than a preset gray value, the center point is confirmed as a center of a laser line segment of the filtered sub-image, otherwise, the center point is discarded, and each confirmed center is a plurality of centers of a laser line segment of the to-be-processed sub-image.

2. The extraction method according to claim 1, characterized in that, In the step S20, before determining the to-be-processed sub-image and the mask sub-image corresponding to each connected region, the connected region whose pixel number is less than a preset threshold is filtered out.

3. The extraction method according to claim 2, characterized in that, The preset threshold is 10-20.

4. The extraction method of claim 1, wherein, In the step S20, before determining the to-be-processed sub-image and the mask sub-image corresponding to each connected region, the region index value of each connected region is set as i; wherein i is 1, 2, …, N, and N is the number of connected regions. Determining the mask sub-image corresponding to the connected region with the region index value i includes: judging whether the region index value corresponding to each pixel in the part of the binary image corresponding to the minimum bounding rectangle of the connected region is i, if not, setting the pixel value of the pixel as 0, otherwise, the pixel value of the pixel remains unchanged.

5. The extraction method according to claim 4, characterized in that, In the step S20, each connected region is processed in parallel.

6. The extraction method of claim 1, wherein, In the step S20, after obtaining the centers of the laser line segments in each filtered sub-image, the center points of the same filtered sub-image are sequentially connected along the size of their position index values to obtain the center line of the corresponding connected region.

7. The extraction method of claim 1, wherein, In the step S10, the original image is first subjected to Gaussian filtering or median filtering to obtain a preprocessed image, and then the preprocessed image is subjected to binaryzation processing; In the step S20, the to-be-processed sub-image corresponding to each connected region is the part of the preprocessed image corresponding to the minimum bounding rectangle of the connected region.

8. A device for extracting the center of a multi-line laser light stripe, characterized by, It includes: a connected region division unit configured to perform binaryzation processing on an original image containing multi-line laser light strips to obtain a binary image; performing connected region analysis on the binary image to obtain a plurality of connected regions; a center extraction unit configured to determine a to-be-processed sub-image and a mask sub-image corresponding to each of the connected regions respectively, multiply the corresponding to-be-processed sub-image and the pixel value of the corresponding pixel in the mask sub-image to obtain a filtered sub-image; a center extraction unit configured to determine a to-be-processed sub-image and a mask sub-image corresponding to each of the connected regions respectively, multiply the corresponding to-be-processed sub-image and the pixel value of the corresponding pixel in the mask sub-image to obtain a filtered sub-image; wherein, the to-be-processed sub-image corresponding to the connected region is a part of the original image corresponding to the minimum circumscribed rectangle of the connected region; the mask sub-image corresponding to the connected region is obtained by setting the pixel value of the pixel outside the connected region in the part of the binary image corresponding to the minimum circumscribed rectangle of the connected region to 0 and keeping the rest of the pixel values unchanged; the center extraction unit adopts a Gaussian weighted gray gravity center method to extract the center points of the laser line segments in the filtered sub-image, and specifically includes: determine a Gaussian weight matrix of the filtered sub-image according to the following Gaussian weight function w(I(x, y)), and multiply the Gaussian weight matrix and the corresponding elements in the filtered sub-image to obtain a first matrix; ; wherein, I(x, y) is the gray value of the pixel at position (x, y); construct a row window matrix and a column window matrix with the same size as the filtered sub-image, and multiply the row window matrix and the column window matrix with the corresponding elements in the first matrix respectively to obtain a second matrix and a third matrix with position weight and Gaussian weight information; wherein, the element values of each column in each row of the row window matrix are the same, which are the row position index values of the filtered sub-image corresponding to the row; the element values of each row in each column of the column window matrix are the same, which are the column position index values of the filtered sub-image corresponding to the column; sum the second matrix and the first matrix by column, and divide the sum of the corresponding columns to obtain an initial column coordinate set of the laser center processed by the row index as weight; sum the third matrix and the first matrix by row, and divide the sum of the corresponding rows to obtain an initial row coordinate set of the laser center processed by the column index as weight; Determine the initial center point set of the laser line segment in the filtered sub-image according to the initial column coordinate set and the initial row coordinate set, wherein, if the number of columns of the filtered sub-image is greater than or equal to the number of rows, then the values of the elements in the initial column coordinate set are rounded down to obtain a first intermediate sequence set; the average of the corresponding element values of the initial column coordinate set and the first intermediate sequence set is taken as the row coordinate of each center point in the initial center point set; the average of the element values in the first intermediate sequence set and the element values in the initial row coordinate set which are used as the position index is taken as the column coordinate of each center point in the initial center point set; if the number of rows of the filtered sub-image is greater than the number of columns, then the values of the elements in the initial row coordinate set are rounded down to obtain a second intermediate sequence set, denoted as X={x1, x2, …, xM}, the average of the corresponding element values of the initial row coordinate set and the second intermediate sequence set is taken as the column coordinate of each center point in the initial center point set; the average of the element values in the second intermediate sequence set and the element values in the initial column coordinate set which are used as the position index is taken as the row coordinate of each center point in the initial center point set; Judge each center point in the initial center point set, for each center point in the initial center point set, select the upper, lower, left and right four pixels of the coordinate of the center point on the filtered sub-image, calculate the average of the gray values of the four pixels, if the average is greater than a preset gray value, then the center point is taken as the confirmed center point of the laser line segment of the filtered sub-image, otherwise, the center point is discarded, and each confirmed center point is a plurality of centers of the laser line segment of the to-be-processed sub-image.

9. A method of three-dimensional reconstruction of an object, characterized by The method comprises the steps of: S100: acquiring an original image of a multi-line laser light strip projected onto an object to be measured; S200: extracting the center positions of each laser line segment in the original image by using the extraction method of any one of claims 1-7; S300: performing three-dimensional reconstruction on the object to be measured based on the obtained center positions of each laser line segment.

10. A system for three-dimensional reconstruction of an object, characterized in that The method comprises: an acquisition module configured to acquire an original image of a multi-line laser light strip projected onto an object to be measured; a center line extraction module configured to extract the center positions of each laser line segment in the original image by using the extraction method of any one of claims 1-7; a three-dimensional reconstruction module configured to perform three-dimensional reconstruction on the object to be measured based on the obtained center positions of each laser line segment.

11. A laser scanner characterized by, The method comprises: two multi-line lasers configured to project a multi-line laser light onto an object to be measured; an acquisition device configured to acquire an image of the multi-line laser light on the object to be measured to obtain an original image; a processing device comprising the object three-dimensional reconstruction system of claim 10; wherein the acquisition device and the processing device are in signal connection.

12. A computer readable storage medium having stored thereon a computer program, characterized in that, The computer program, when executed by a processor, implements the extraction method of the center of the multi-line laser light strip according to any one of claims 1-7, or implements the object three-dimensional reconstruction method of claim 9. The computer program, when executed by a processor, implements the extraction method of the center of the multi-line laser light strip according to any one of claims 1-7, or implements the object three-dimensional reconstruction method of claim 9.

Citation Information

Patent Citations

  • Laser stripe axis extracting method in fitting multiple Gaussian signals

    CN106097430A

  • Light strip matching method, device and system and storage medium

    CN114792333A