Laser profile extraction method and system based on FPGA bidirectional growth mode

CN119205829BActive Publication Date: 2026-10-20XI AN JIAOTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411309674.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-09-19
Publication Date
2026-10-20
Estimated Expiration
2044-09-19

AI Technical Summary

Technical Problem

[0006]为了解决现有滤波方式对高能弧光噪声和反射噪声滤波不理想的问题,本发明提供了基于FPGA双向增长模式的激光轮廓提取方法及系统

Benefits of technology

本发明提出的基于FPGA双向增长模式的激光轮廓提取方法中,该方法中先使用图像预处理获取多组垂直激光方向激光切片信息,滤除图像中的孤立噪点;然后通过激光正方向和反方向分别对多组激光切片信息进行增长方式筛选,滤除图像中的高能弧光噪声;最后通过两组增长后的激光轮廓信息中不同片段进行仲裁,获取最终激光轮廓信息,滤除图像中的反射噪声,对激光图像中的孤点噪声、飞弧噪声、反射噪声均有很好的滤波效果。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119205829B_ABST
    Figure CN119205829B_ABST
Patent Text Reader

Abstract

The application provides a laser profile extraction method based on a FPGA bidirectional growth mode, comprising the following steps: pre-processing an original laser image to obtain a pre-processed image; obtaining a laser vertical slice based on the pre-processed image, and filtering the laser vertical slice to obtain laser slice information in a vertical laser direction; performing growth filtering on the laser vertical slice based on the laser slice information to obtain a filtered laser slice; arbitrating the filtered laser slice to obtain final laser profile information. The method first uses image pre-processing to filter out isolated noise points in the image, and obtains laser slice information; then performs growth filtering on the laser slice information through a laser direction to filter out high-energy arc light noise in the image; finally, through arbitration, final laser profile information is obtained, and reflection noise in the image is filtered out, and the method has a good filtering effect on isolated point noise, flying arc noise and reflection noise in the laser image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the field of industrial measurement technology, specifically to a laser profile extraction method and system based on FPGA bidirectional growth mode. Background Technology

[0002] Laser vision is a visual sensing technology based on the principle of optical triangulation. When a laser beam is transformed by optical devices and projected onto the surface of an object in the form of a light surface, it forms stripes representing the geometric shape of the object's cross-section. After being imaged by a lens, the laser stripe image, representing the target interface, can be obtained on a photosensitive detector array. As the laser sensor scans along the object's surface, it obtains the contour information of the scanned object's shape. Based on the obtained contour information, the bevel position, cross-sectional shape, cross-sectional area, or geometric features representing the formation of the weld can be calculated.

[0003] Due to factors such as the surface material of the object or the laser irradiation angle, a large amount of spatter, smoke, arc light, and reflections are generated during the welding process. These produce significant noise in the laser image acquired by the vision sensor, mainly including isolated noise, high-energy arc light noise, and reflection noise, which severely interferes with the extraction of the laser profile. The traditional approach to address this problem is to filter the original image. Filtering methods are mainly divided into three types: spatial domain filtering, frequency domain filtering, and morphological filtering.

[0004] Spatial filtering uses filter templates to filter two-dimensional images, such as mean filtering, maximum filtering, and minimum filtering. This spatial filtering works well for relatively small discrete noise points, but its filtering effect is poor for concentrated energy arc noise and reflection noise. Furthermore, a larger filter template consumes more resources and time, failing to meet real-time processing requirements. Frequency domain filtering first converts the spatial domain image to a frequency domain image, applies a filter template to the frequency domain image, and then converts the filtered frequency domain image back to the spatial domain image. Major filtering methods include Fourier transform, low-pass filtering, high-pass filtering, and wavelet transform. Frequency domain filtering requires two transformations from the spatial domain to the frequency domain, making the filtering process complex. Additionally, the filter template is relatively large, which cannot meet real-time requirements. For example, Gabor filtering, which is effective at filtering reflection noise, requires a filter template larger than the size of the reflected light rays. Moreover, the adaptability of the filtering parameters is poor, requiring adjustment based on the laser direction. Morphological filtering is a filtering method based on mathematical morphology theory. Morphology is a theory for analyzing spatial structured light and can be used to analyze the shape and structure of targets. The filtering method uses basic mathematical morphology operations to process image information, selectively suppressing certain structures in the image. The main methods include erosion, dilation, open-loop, closed-loop, and top-hat operations. This method works well for small discrete noise points, but it cannot handle concentrated energy arc noise and reflection noise.

[0005] Therefore, although the current filtering methods can achieve good filtering results for isolated noise, they cannot process arc noise and reflection noise at the same time. This results in unsatisfactory filtering of high-energy arc noise and reflection noise, and consequently, unsatisfactory processing of reflected light that is consistent with the original laser line profile in both energy and shape. Summary of the Invention

[0006] To address the issue that existing filtering methods are not ideal for filtering high-energy arc noise and reflection noise, this invention provides a laser profile extraction method and system based on FPGA bidirectional growth mode.

[0007] To achieve the above objectives, the present invention provides the following technical solution: This invention provides a laser contour extraction method based on FPGA bidirectional growth mode, comprising the following steps: The original laser image is preprocessed to obtain a preprocessed image; Based on the preprocessed image, a vertical laser slice is obtained, and the vertical laser slice is filtered to obtain laser slice information in the vertical laser direction. Based on the laser slice information, the laser vertical slice is filtered using an incremental filtering method to obtain a filtered laser slice. Arbitration is used to filter the laser slices to obtain the final laser contour information.

[0008] Preferably, the preprocessing of the original laser image includes: The original laser image is processed to obtain an original grayscale image; The original grayscale image is subjected to median filtering and finite impulse response filtering respectively to obtain a median-filtered image and a finite impulse response-filtered grayscale image. Edge detection is performed on the median-filtered image to obtain an edge image, and then erosion and dilation are applied to the edge image. The median-filtered image is statistically analyzed to obtain the number of peaks. Based on the peak number information, the edge image after erosion and dilation is thresholded to obtain a binary image; The binary image is subjected to erosion and dilation again. The eroded and dilated binary image is then multiplied by the image after image delay processing of the finite impulse response filtered grayscale image to obtain a preprocessed image.

[0009] Preferably, the peak information statistics of the median filtered image include: Statistically determine the start and stop positions of two consecutive sets of background pixels in the original grayscale image; The peak range is determined based on the starting position and the stopping position; Obtain the grayscale value of the background pixel at the peak position.

[0010] Preferably, the peak number information is used to perform threshold segmentation on the eroded and dilated edge image, including: Edge points within two sets of peaks in the erosion dilation edge point image that meet the conditions; The average gray value is obtained by acquiring the gray value of the background pixel where the edge point is located, and the segmentation threshold is obtained. Threshold segmentation is performed on the edge image after erosion and dilation based on the peak range and the segmentation threshold to obtain a binary image.

[0011] Preferably, obtaining a laser vertical slice based on the preprocessed image includes: Points in the preprocessed image that are continuously "1" in the vertical laser direction are identified as laser vertical slices; The number of consecutive "1" points perpendicular to the laser direction in the preprocessed image is taken as the laser vertical slice width W; The effective width range [W1, W2] is obtained based on the laser vertical slice width W; The laser vertical slice is filtered based on the effective width range [W1, W2] to obtain laser vertical slice information. The laser slice information is then saved to 5 groups of RAM on the FPGA chip to obtain the laser slice information. The address range of the five RAM groups on the FPGA chip is 1 to COL_NUM.

[0012] Preferably, the laser slice information is used to perform incremental filtering of the laser vertical slice, including: The laser vertical slicing information stored in the five sets of RAM on the FPGA chip is filtered from the forward laser direction; The reverse laser direction is used to filter the laser vertical slice information based on the forward laser direction.

[0013] Preferably, the step of filtering the laser vertical slicing information stored in the five sets of RAM on the FPGA chip from the forward laser direction includes: Select the largest average gray value in RAM address 1, and use the laser vertical slice corresponding to the largest average gray value as the starting laser slice for forward growth; Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address 2 and the center point of the forward growth starting laser vertical slice. Keep the laser vertical slice closest to the center point of the forward growth starting laser vertical slice and denot it as the forward laser vertical slice of address 2. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address 3 and the center point of the laser vertical slice at address 2, and retain the laser vertical slice that is closest to the center point of the laser vertical slice at address 2, and denote it as the forward laser vertical slice at address 3. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address 4 and the center point of the laser vertical slice at address 3, and retain the laser vertical slice that is closest to the center point of the laser vertical slice at address 3, and denote it as the forward laser vertical slice at address 4. The calculation continues until the laser vertical slice selection in the 5 RAM addresses COL_NUM is completed, thus completing the positive growth.

[0014] Preferably, the reverse laser direction is used to filter the laser vertical slice information based on the forward laser direction, including: Select the largest average gray value in the RAM address COL_NUM, and use the laser vertical slice corresponding to the largest average gray value as the starting laser slice for reverse growth. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address COL_NUM-1 and the center point of the reverse growth starting laser vertical slice. Keep the laser vertical slice closest to the center point of the reverse growth starting laser vertical slice and denot it as the reverse laser vertical slice at address 2. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM address COL_NUM-2 and the center point of the laser vertical slice in reverse at address 2. Keep the laser vertical slice that is closest to the center point of the laser vertical slice in reverse at address 2 and denote it as the laser vertical slice in reverse at address 3. The calculation is repeated until the vertical slicing of 5 groups of RAM address 1 lasers is completed, and the filtered laser slices are obtained.

[0015] Preferably, the filtered laser slice in the arbitration comprises: Multiple sets of filtered laser slices are compared, and different laser segments appearing after the comparison of multiple sets of filtered laser slices are extracted; The coordinate difference between the different laser segments is obtained, and the display result at different laser segments in the filtered laser slice is determined based on the coordinate difference to obtain the final laser contour information.

[0016] A laser contour extraction system based on FPGA bidirectional growth mode includes a high-speed sensor for acquiring raw laser images; The image preprocessing module is used to preprocess the original laser image to obtain a preprocessed image; The laser slicing processing module is used to process the preprocessed image to obtain filtered laser slices; The arbitration module is used to arbitrate the laser segments that appear after comparing two sets of filtered laser slices, extract the different laser segments that appear after comparing the two sets of filtered laser slices, filter out the reflected laser segments in the different laser segments, and obtain the final laser contour information.

[0017] Compared with the prior art, the present invention has the following beneficial technical effects: The laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention first uses image preprocessing to obtain multiple sets of laser slice information perpendicular to the laser direction, filtering out isolated noise points in the image; then, it filters the growth mode of multiple sets of laser slice information by laser forward and reverse directions respectively, filtering out high-energy arc noise in the image; finally, it arbitrates different segments in the two sets of grown laser contour information to obtain the final laser contour information, filtering out reflection noise in the image, and has a good filtering effect on isolated point noise, arc noise, and reflection noise in laser images.

[0018] Furthermore, this method converts the original laser image into a grayscale image through grayscale processing, simplifying the image data. Median filtering effectively removes noise and artifacts while preserving edge information and improving image clarity. Finite impulse response filtering further smooths the image, reducing high-frequency noise interference and resulting in a smoother, more natural image. The combination of edge detection and erosion / dilation processing not only highlights edge features but also removes minor burrs and unevenness through morphological operations, making edges clearer and more continuous. Peak information statistics provide crucial information for subsequent threshold segmentation. Adaptive threshold segmentation based on peak count allows for more accurate extraction of target regions, avoiding missegmentation issues caused by fixed thresholds. The binarized image is further processed through erosion / dilation to optimize the shape and size of the target region, reducing isolated points and holes and improving image integrity. Finally, the processed binary image is multiplied by the finite impulse response filtered grayscale image, and combined with image delay processing technology, which effectively integrates the image's detailed information and global features, further enhancing the image's contrast and clarity, resulting in a high-quality preprocessed image. This effectively improves the quality of the original laser image and provides more reliable and accurate image data for subsequent applications such as image analysis, target recognition, and feature extraction.

[0019] This method employs effective width filtering for each laser slice, effectively removing isolated noise points and significant arc noise. Filtering using an elongation method provides excellent filtering for noise points far from the effective laser slice. Arbitration of the bidirectionally elongated laser segments effectively filters noise from reflected laser segments. This method is implemented using an FPGA, enabling pipelined operation and real-time extraction of the laser profile. Furthermore, leveraging the parallel processing capabilities of the FPGA, a higher frame rate can be achieved. Currently, this invention has been applied to laser welding products, demonstrating excellent filtering effects for isolated noise, arc noise, and reflection noise. The FPGA utilizes 8-pixel parallel processing, achieving an image resolution of 1280*1024, a frame rate of 200fps, and a 50MHz FPGA clock speed. Attached Figure Description

[0020] Figure 1 This is a flowchart of the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 2 The original laser image; Figure 3 The laser image after binary segmentation in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 4 This is the laser image obtained by multiplying a grayscale image with a binary image in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention. Figure 5 This is a statistical image of two sets of peak information in the laser image in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 6 This is the image after SOBEL edge detection in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 7 This is the image after edge detection, erosion, and dilation in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 8 This is a schematic diagram of the image growth result from left to right in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 9 This is a schematic diagram of the image growth result from right to left in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 10 This is a schematic diagram of the laser segment information to be arbitrated in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention; Figure 11This is a schematic diagram of the laser segment information after arbitration in the laser contour extraction method based on FPGA bidirectional growth mode proposed in this invention. Detailed Implementation

[0021] In the following description, only certain exemplary embodiments are briefly described. As those skilled in the art will recognize, the described embodiments can be modified in various ways without departing from the spirit or scope of the invention. Therefore, the drawings and description are considered to be exemplary in nature and not restrictive.

[0022] In the description of this invention, it should be understood that the terms "center," "longitudinal," "lateral," "length," "width," "thickness," "upper," "lower," "front," "rear," "left," "right," "vertical," "horizontal," "top," "bottom," "inner," "outer," "clockwise," "counterclockwise," "axial," "radial," and "circumferential" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings. They are used only for the convenience of describing this invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, they should not be construed as limitations on this invention.

[0023] Furthermore, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of this invention, "a plurality of" means two or more, unless otherwise explicitly specified.

[0024] In this invention, unless otherwise explicitly specified and limited, the terms "installation," "connection," "linking," and "fixing," etc., should be interpreted broadly. For example, they can refer to a fixed connection, a detachable connection, or an integral part; they can refer to a mechanical connection, an electrical connection, or a communication connection; they can refer to a direct connection or an indirect connection through an intermediate medium; they can refer to the internal communication of two components or the interaction between two components. Those skilled in the art can understand the specific meaning of the above terms in this invention according to the specific circumstances.

[0025] In this invention, unless otherwise explicitly specified and limited, "above" or "below" the second feature can include direct contact between the first and second features, or contact between the first and second features through another feature between them. Furthermore, "above," "over," and "on top" of the second feature includes the first feature being directly above or diagonally above the second feature, or simply indicates that the first feature is at a higher horizontal level than the second feature. "Below," "below," and "under" the second feature includes the first feature being directly above or diagonally above the second feature, or simply indicates that the first feature is at a lower horizontal level than the second feature.

[0026] The embodiments of the present invention will now be described in detail with reference to the accompanying drawings.

[0027] See Figure 1 This invention proposes a laser contour extraction method based on FPGA bidirectional growth mode, which includes the following steps: The original laser image is preprocessed to filter out isolated noise points and obtain multiple sets of laser slice information perpendicular to the laser direction. Specifically, the preprocessing of the original laser image includes: For the original laser image (see) Figure 2 First, perform grayscale processing to obtain the original grayscale image; The original grayscale image was subjected to median filtering and finite impulse response filtering respectively to obtain the median-filtered image and the finite impulse response-filtered grayscale image respectively; The SOBEL edge detection algorithm is used to detect edge points in a median-filtered image (see [link]). Figure 6 The edge image is obtained, and then erosion and dilation are performed on the obtained edge image to filter out redundant information (see...). Figure 7 ); Peak information is statistically analyzed on the median-filtered image to obtain peak information. The peak information includes the start position, end position, maximum gray value, and average gray value. Specifically, the two widest peak information sets in a series of original grayscale images are statistically analyzed, that is, the start and stop positions of two consecutive sets of background pixels in the original grayscale image are statistically analyzed. The peak range is determined by the start and stop positions. At the same time, the gray value of the background pixel at the peak position is calculated by the average of the gray values ​​of all pixels in the previous frame image that are less than a certain gray value. Thresholding segmentation is performed on the edge image after erosion and dilation based on the peak number information to obtain a binary image (see...). Figure 3 ); Specifically, find the edge points that meet the conditions within the range of two sets of peaks in the erosion and dilation edge point image, and obtain the gray value of the background pixel where these edge points are located; The average gray value is calculated from these gray values, and the calculated average gray value is used as the segmentation threshold. Two sets of segmentation thresholds are generated for each column of images. Among them, the gray value of the background pixel is the average gray value of all pixels in the previous frame that are less than the set gray value.

[0028] Threshold segmentation is performed on the edge image after erosion and dilation based on two sets of peak ranges and two sets of segmentation thresholds (see...). Figure 3 ), to obtain a binary image; The binary image is subjected to erosion and dilation to filter out redundant boundary noise. The filtered binary image is then multiplied by the image after image delay processing of the finite impulse response filtered grayscale image to obtain a preprocessed image. In this preprocessed image, the grayscale values ​​of valid pixels remain unchanged, while the grayscale values ​​of invalid pixels are set to 0 (see [link]). Figure 4 ); Laser vertical slices are obtained from preprocessed images, and then filtered to obtain multiple sets of laser slice information in the vertical laser direction.

[0029] Specifically, points in the preprocessed image that are consecutively "1" in the vertical laser direction (from top to bottom) are defined as laser vertical slices, and the number of consecutive "1" points is defined as the width W of the laser vertical slice. The laser vertical slices are filtered according to the effective width range [W1, W2], and the five sets of laser vertical slice information with slice widths within the effective width range are saved to five sets of RAM on the FPGA. After a frame of image is completed, the laser vertical slice completes multiple sets of laser slice information in the vertical laser direction. The RAM address range is 1~COL_NUM, and the laser slice information includes the average gray value, the maximum gray value, the slice width, and the coordinates of the slice center point (calculated using the centroid calculation (COG) algorithm). Based on multiple sets of laser slice information, the growth mode of the laser vertical slice is screened to remove high-energy arc noise in the laser vertical slice and obtain a filtered laser slice. Specifically, a bidirectional growth method is used to filter the laser vertical slice information sequentially from the forward laser direction (from left to right) and the reverse laser direction (from right to left). This filtering method removes high-energy arc noise and obtains filtered laser slices.

[0030] Filtering laser vertical slice information in the forward laser direction includes: Select the largest average gray value among the 5 groups of RAM address 1, and use the laser vertical slice corresponding to the largest average gray value as the starting laser slice for forward growth. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM address 2 and the center point of the forward growth starting laser vertical slice. Keep the laser vertical slice that is closest to the center point of the forward growth starting laser vertical slice and denote it as the forward laser vertical slice of address 2. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM address 3 and the center point of the laser vertical slice in address 2. Keep the laser vertical slice that is closest to the center point of the laser vertical slice in address 2 and denote it as the forward laser vertical slice in address 3. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM address 4 and the center point of the laser vertical slice in address 3, and retain the laser vertical slice that is closest to the center point of the laser vertical slice in address 3, and denote it as the forward laser vertical slice in address 4. The calculation continues until the vertical laser slices in the five RAM addresses COL_NUM are completely screened, completing the forward growth process. See the results for details. Figure 8 The filtered laser vertical slice information is marked in red; The reverse laser direction is based on the forward laser direction. After filtering the laser vertical slice information, the laser vertical slice information in 5 groups of RAM address ranges 1 to COL_NUM is filtered, including: Select the largest average gray value among the 5 groups of RAM addresses COL_NUM, and use the laser vertical slice corresponding to the largest average gray value as the starting laser slice for reverse growth. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM addresses COL_NUM-1 and the center point of the reverse growth starting laser vertical slice. Keep the laser vertical slice that is closest to the center point of the reverse growth starting laser vertical slice and denote it as the reverse laser vertical slice at address 2. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM address COL_NUM-2 and the center point of the laser vertical slice in reverse at address 2. Keep the laser vertical slice that is closest to the center point of the laser vertical slice in reverse at address 2 and denote it as the laser vertical slice in reverse at address 3. The calculations were repeated until all 5 groups of RAM address 1 laser vertical slices were selected. The results after selection can be found in [link to relevant documentation]. Figure 9 The filtered laser vertical slice information is marked in red to obtain the filtered laser slice.

[0031] Arbitration is based on the comparison of two sets of filtered laser slices, extracting the different laser segments that appear after the comparison of the two sets of filtered laser slices, filtering out the reflected laser segments in the different laser segments, and obtaining the final laser contour information.

[0032] Specifically, the two sets of filtered laser slices were compared to determine the presence of different laser segments and identical laser segments in the two sets of filtered laser slices. (See [link to relevant documentation]). Figure 10 Identical laser segments are represented in red, and different laser segments are represented in green. Different laser segments were extracted after comparing two sets of filtered laser slices, and these two sets of filtered laser slices are designated as laser segment 1 and laser segment 2, respectively. Arbitration was performed on the different laser segments, and the arbitration results are shown below. Figure 11 By filtering out reflected laser segments from different laser segments, the final laser profile information is obtained.

[0033] Arbitration of different laser segments includes: Obtain the coordinates of the left end of different laser segments in laser segment 1 Corresponding laser slice center point coordinates and coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice Calculate the coordinates of the center point With coordinates The absolute value of the difference is used to obtain the coordinate difference of laser segment 1. ; Coordinate difference of laser segment 1 The calculation expression is: (1) in, The coordinates of the left end of different laser segments in laser segment 1 The corresponding coordinates of the center point of the laser slice, For coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice.

[0034] Obtain the coordinates of the left end of different laser segments in laser segment 2 Corresponding laser slice center point coordinates and coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice Calculate the coordinates of the center point With coordinates The absolute value of the difference is used to obtain the coordinate difference of laser segment 2. ; Laser segment 2 coordinate difference The expression is: (2) in, The coordinates of the left end of different laser segments in laser segment 2 The corresponding coordinates of the center point of the laser slice, For coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice.

[0035] Based on the coordinate difference of laser fragment 2 Coordinate difference between laser segment 1 and laser segment 1 The first coordinate difference was calculated. ; First coordinate difference The calculation expression is: (3) in, The coordinate difference of laser segment 1. This represents the coordinate difference between laser segment 2 and segment 2.

[0036] Obtain the coordinates of the right end of different laser segments in laser segment 1 Corresponding laser slice center point coordinates and coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice Calculate the coordinates of the center point With coordinates The absolute value of the difference is used to obtain the coordinate difference of laser segment 1. ; Coordinate difference of laser segment 1 The calculation expression is: (4) in, The coordinates of the right end of different laser segments in laser segment 1 The corresponding coordinates of the center point of the laser slice, For coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice.

[0037] Obtain the coordinates of the right end of different laser segments in laser segment 2 Corresponding laser slice center point coordinates and coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice Calculate the coordinates of the center point With coordinates The absolute value of the difference is used to obtain the coordinate difference of laser segment 2. ; Laser segment 2 coordinate difference The expression is: (5) in, The coordinates of the left end of different laser segments in laser segment 2 The corresponding coordinates of the center point of the laser slice, For coordinates Adjacent coordinates The corresponding coordinates of the center point of the laser slice.

[0038] Based on the coordinate difference of laser fragment 2 Coordinate difference between laser segment 1 and laser segment 1 The first coordinate difference was calculated. ; Second coordinate difference The calculation expression is: (6) in, The coordinate difference of laser segment 1. This represents the coordinate difference between laser segment 2 and segment 2.

[0039] Compare the difference between the second coordinates Difference from the first coordinate If the second coordinate difference Less than or equal to the first coordinate difference If the difference in the second coordinate is less than 1, then different laser segments in laser segment 1 are selected as the final result; if the difference in the second coordinate is less than 1, then the difference in the second coordinate is less than 1. Greater than the first coordinate difference Otherwise, select different laser segments from laser segment 1 as the final result to obtain the final laser contour information.

[0040] This invention also proposes a laser contour extraction system based on FPGA bidirectional growth mode, comprising: High-speed sensor used to acquire raw laser images; The image preprocessing module is used to preprocess the original laser image to obtain a preprocessed image. The image preprocessing module includes a grayscale processing unit, a peak information statistics unit, an edge detection unit, an edge image erosion and dilation unit, a threshold segmentation unit, a binary image erosion and dilation unit, a finite impulse response (FIR) filtering unit, and an image dot product unit. Specifically, the grayscale processing unit is connected to the FIR and median filtering units to process the original laser image to obtain the original grayscale image; the FIR filtering unit is connected to the image dot product unit to filter the original grayscale image to obtain a FIR filtered image; the median filtering unit is connected to the peak information statistics unit and the edge detection unit to filter the original grayscale image to obtain a median filtered image; and the edge detection unit is connected to the edge detection unit to perform an edge detection algorithm (SOBEL edge detection) on the median filtered image to detect edge points (see [link to edge detection module]). Figure 6 The process involves several steps: First, an edge image is obtained. The edge image erosion and dilation unit is connected to a threshold segmentation unit to perform erosion and dilation on the edge image, filtering out redundant information. Second, a peak information statistics unit is connected to the threshold segmentation unit to perform peak information statistics on the median-filtered image, obtaining peak information. Third, a threshold segmentation unit is connected to a binary image erosion and dilation unit to perform threshold segmentation on the eroded and dilated edge image based on the peak number information, obtaining a binary image. Fourth, a binary image erosion and dilation unit is connected to an image multiplication unit to perform erosion and dilation on the binary image, filtering out redundant boundary noise. Finally, an image multiplication unit is connected to a laser slicing processing module to perform a multiplication between the binary image and the image after image delay processing of the finite impulse response filtered grayscale image, obtaining a preprocessed image. A laser slicing processing module is used to acquire vertical laser slices based on a preprocessed image, filter the vertical laser slices to obtain multiple sets of laser slice information in the vertical laser direction, and perform incremental filtering on the laser slice information to obtain filtered laser slices. The laser slicing processing module includes a laser slice information statistics unit, a forward incremental filtering unit, and a reverse incremental filtering unit. The laser slice information statistics unit connects the image dot product unit and the forward incremental filtering unit, defining points in the preprocessed image that are consecutively "1" in the vertical laser direction (from top to bottom) as laser vertical slices, defining the number of consecutive "1" points as the width W of the laser vertical slice, and determining the effective width range of the laser vertical slice. The laser vertical slices are filtered within the range [W1, W2], and the five sets of laser vertical slice information with slice widths within the effective width range are saved to five sets of RAM on the FPGA chip. Laser vertical slicing completes multiple sets of laser slice information in the vertical laser direction after one frame of image ends. The forward growth filtering unit is connected to the reverse growth filtering unit to filter the laser vertical slice information stored in the five sets of RAM on the FPGA chip with address range 1~COL_NUM from the forward laser direction. The reverse growth filtering unit is connected to the arbitration unit to filter the laser vertical slice information in the five sets of RAM with address range 1~COL_NUM after filtering the laser vertical slice information based on the forward laser direction. The arbitration module is used to arbitrate the laser segments that appear after comparing two sets of filtered laser slices, extract the different laser segments that appear after comparing the two sets of filtered laser slices, filter out the reflected laser segments in the different laser segments, and obtain the final laser contour information.

[0041] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above, and that the invention can be implemented in other specific forms without departing from its spirit or essential characteristics. Therefore, the embodiments should be considered illustrative and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description. Thus, all variations falling within the meaning and scope of equivalents of the claims are intended to be included within the scope of the invention. No reference numerals in the claims should be construed as limiting the scope of the claims.

[0042] Furthermore, it should be understood that although this specification describes embodiments, not every embodiment contains only one independent technical solution. This narrative style is merely for clarity. Those skilled in the art should consider the specification as a whole, and the technical solutions in each embodiment can be appropriately combined to form other embodiments that can be understood by those skilled in the art. The above content is only for illustrating the technical concept of the present invention and should not be construed as limiting the scope of protection of the present invention. Any modifications made based on the technical concept proposed in this invention shall fall within the scope of protection of the claims of this invention.

Claims

1. A laser contour extraction method based on FPGA bidirectional growth mode, characterized in that, Includes the following steps: The original laser image is preprocessed to obtain a preprocessed image; Based on the preprocessed image, a vertical laser slice is obtained, and the vertical laser slice is filtered to obtain laser slice information perpendicular to the laser direction; wherein, obtaining the vertical laser slice based on the preprocessed image includes: Points in the preprocessed image that are continuously marked with "1" in the vertical laser direction are identified as laser vertical slices. The number of consecutive "1" points perpendicular to the laser direction in the preprocessed image is taken as the laser vertical slice width W; The effective width range [W1, W2] is obtained based on the laser vertical slice width W; The laser vertical slice is filtered based on the effective width range [W1, W2] to obtain laser vertical slice information. The laser slice information is then saved to 5 groups of RAM on the FPGA chip to obtain the laser slice information. The FPGA has 5 on-chip RAM address ranges from 1 to COL_NUM. Based on the laser slice information, the laser vertical slices are filtered incrementally. Specifically, the laser vertical slice information stored in the five sets of RAM within the FPGA is filtered from the forward laser direction; then, the laser vertical slice information filtered from the forward laser direction is filtered from the reverse laser direction to obtain filtered laser slices. Specifically, filtering the laser vertical slice information from the forward laser direction is done sequentially from left to right; filtering the laser vertical slice information from the reverse laser direction is done sequentially from right to left. Arbitration of the filtered laser slices involves comparing multiple sets of filtered laser slices, extracting different laser segments that appear after the comparison of multiple sets of filtered laser slices, obtaining the coordinate difference of the different laser segments, determining the display result of different laser segments in the filtered laser slices based on the coordinate difference, and obtaining the final laser contour information.

2. The laser contour extraction method based on FPGA bidirectional growth mode according to claim 1, characterized in that, The preprocessing of the original laser image includes: The original laser image is processed to obtain an original grayscale image; The original grayscale image is subjected to median filtering and finite impulse response filtering respectively to obtain a median-filtered image and a finite impulse response-filtered grayscale image. Edge detection is performed on the median-filtered image to obtain an edge image, and then erosion and dilation are applied to the edge image. The median-filtered image is statistically analyzed to obtain the number of peaks. Based on the peak number information, the edge image after erosion and dilation is segmented by thresholding to obtain a binary image; The binary image is subjected to erosion and dilation again. The eroded and dilated binary image is then multiplied by the image after image delay processing of the finite impulse response filtered grayscale image to obtain a preprocessed image.

3. The laser contour extraction method based on FPGA bidirectional growth mode according to claim 2, characterized in that, The peak information statistics of the median filtered image include: Statistically determine the start and stop positions of two consecutive sets of background pixels in the original grayscale image; The peak range is determined based on the starting position and the stopping position; Obtain the grayscale value of the background pixel at the peak position.

4. The laser contour extraction method based on FPGA bidirectional growth mode according to claim 3, characterized in that, The peak number information is used to perform threshold segmentation on the eroded and dilated edge image, including: Edge points within two sets of peaks in the erosion dilation edge point image that meet the conditions; The average gray value is obtained by acquiring the gray value of the background pixel where the edge point is located, and the segmentation threshold is obtained. Threshold segmentation is performed on the edge image after erosion and dilation based on the peak range and the segmentation threshold to obtain a binary image.

5. The laser contour extraction method based on FPGA bidirectional growth mode according to claim 1, characterized in that, The process of filtering the laser vertical slicing information stored in the five sets of RAM on the FPGA chip from the forward laser direction includes: Select the largest average gray value in RAM address 1, and use the laser vertical slice corresponding to the largest average gray value as the starting laser slice for forward growth; Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address 2 and the center point of the forward growth starting laser vertical slice. Keep the laser vertical slice closest to the center point of the forward growth starting laser vertical slice and denot it as the forward laser vertical slice of address 2. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address 3 and the center point of the laser vertical slice at address 2, and retain the laser vertical slice that is closest to the center point of the laser vertical slice at address 2, and denote it as the forward laser vertical slice at address 3. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address 4 and the center point of the laser vertical slice at address 3, and retain the laser vertical slice that is closest to the center point of the laser vertical slice at address 3, and denote it as the forward laser vertical slice at address 4. The calculation continues until the laser vertical slice selection in the 5 RAM addresses COL_NUM is completed, thus completing the positive growth.

6. The laser contour extraction method based on FPGA bidirectional growth mode according to claim 1, characterized in that, The reverse laser direction is used to filter the laser vertical slice information based on the forward laser direction, including: Select the largest average gray value in the RAM address COL_NUM, and use the laser vertical slice corresponding to the largest average gray value as the starting laser slice for reverse growth. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in RAM address COL_NUM-1 and the center point of the reverse growth starting laser vertical slice. Keep the laser vertical slice closest to the center point of the reverse growth starting laser vertical slice and denot it as the reverse laser vertical slice at address 2. Calculate the distance between the center point of the laser vertical slice corresponding to the laser vertical slice information stored in the 5 sets of RAM address COL_NUM-2 and the center point of the laser vertical slice in reverse at address 2. Keep the laser vertical slice that is closest to the center point of the laser vertical slice in reverse at address 2 and denote it as the laser vertical slice in reverse at address 3. This process continues until all 5 groups of RAM address 1 laser vertical slices are filtered, resulting in the filtered laser slices.

7. A laser contour extraction system based on FPGA bidirectional growth mode, characterized in that, Includes a high-speed sensor for acquiring raw laser images; The image preprocessing module is used to preprocess the original laser image to obtain a preprocessed image; A laser slicing processing module is used to obtain laser vertical slices based on the preprocessed image, and filter the laser vertical slices to obtain laser slice information perpendicular to the laser direction; wherein, obtaining laser vertical slices based on the preprocessed image includes: The laser vertical slice is obtained by identifying points in the preprocessed image that are consecutively set to "1" in the vertical laser direction; the number of consecutive "1" points in the preprocessed image is identified as the laser vertical slice width W; an effective width range [W1, W2] is obtained based on the laser vertical slice width W; the laser vertical slice is filtered based on the effective width range [W1, W2] to obtain laser vertical slice information; and the laser slice information is saved to five sets of RAM on the FPGA chip to obtain the laser slice information; wherein, the address range of the five sets of RAM on the FPGA chip is 1~COL_NUM; Based on the laser slice information, the laser vertical slices are filtered incrementally. Specifically, the laser vertical slice information stored in the five sets of RAM within the FPGA is filtered from the forward laser direction; then, the laser vertical slice information filtered from the forward laser direction is filtered from the reverse laser direction to obtain filtered laser slices. Specifically, filtering the laser vertical slice information from the forward laser direction is done sequentially from left to right; filtering the laser vertical slice information from the reverse laser direction is done sequentially from right to left. The arbitration module is used to arbitrate the filtered laser slice, that is, to compare multiple sets of filtered laser slices, extract the different laser segments that appear after the comparison of multiple sets of filtered laser slices; obtain the coordinate difference of the different laser segments, determine the display result of different laser segments in the filtered laser slice based on the coordinate difference, and obtain the final laser contour information.

Citation Information

Patent Citations

  • Positioning method for sub-pixel at center of line laser in three-dimensional laser scanning system

    CN107203973A

  • High-precision laser spot center detection method based on FPGA

    CN118261980A