A method for extracting laser stripe centers based on Gaussian fitting

Through the U-Net network filtering and Gaussian fitting method, the accuracy and speed problems of laser stripe center extraction were solved, and sub-pixel accuracy and efficient processing were achieved.

CN117274356BActive Publication Date: 2025-09-16HEFEI UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311130105.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-04
Publication Date
2025-09-16
Estimated Expiration
2043-09-04

AI Technical Summary

Technical Problem

Existing laser stripe center extraction methods have deficiencies in accuracy and speed, especially in terms of noise interference and computational complexity.

Method used

The U-Net network is used for image filtering processing. The center of the laser stripe is extracted by combining the adaptive detection and Gaussian fitting methods. The network is trained by expanding the sample set to improve the generalization ability, and the center point of the laser stripe is calculated using the Gaussian fitting formula.

Benefits of technology

High-precision laser stripe center extraction is achieved under different light intensities, improving the accuracy to sub-pixel level, while reducing computational redundancy and improving processing speed.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117274356B_ABST
    Figure CN117274356B_ABST
Patent Text Reader

Abstract

This invention discloses a method for extracting laser streak centers based on Gaussian fitting, which relates to the technical field of laser streak center extraction. The method uses artificially synthesized noise and laser-free scanning images to expand the sample set, optimize the network's generalization capability, and train a U-Net network. The trained U-Net network is then used to perform filtering operations on the laser streak image to be detected. The image is then scanned pixel by pixel, adaptively searching for multi-beam fitting centers and fitting data, and using Gaussian fitting to obtain the laser streak center point. The invention uses the U-Net network for filtering, significantly improving the quality of laser streak images. Simultaneously, by adaptively detecting the centers of multiple laser streaks, the method can accurately determine the centers of multiple laser streaks, effectively reducing redundant calculations and improving the accuracy of laser streak center extraction to sub-pixel level.
Need to check novelty before this filing date? Find Prior Art

Description

Technical field:

[0001] The present invention relates to the technical field of laser stripe center extraction, and in particular to a laser stripe center extraction method based on Gaussian fitting. Background technology:

[0002] Line structured light 3D measurement technology is a mature, fast, and highly real-time optical non-contact measurement method widely used in industrial inspection and other fields. The principle of line structured light 3D measurement is to calculate 3D coordinates based on the position of the center point of the laser stripe in the image, using calibrated parameters. The centerline position of the laser stripe in the image contains essential spatial information and is a key factor in determining the accuracy, speed, and stability of the entire system.

[0003] Laser stripe center extraction technology is one of the most critical factors affecting the accuracy and efficiency of structured light vision measurement systems. Laser stripe center extraction methods can be broadly divided into two categories. One category uses the geometric center of the laser stripe image as the center of the laser stripe. These methods primarily include edge methods, center methods, threshold methods, and thinning methods, with the threshold method and thinning method being the most common. These methods are characterized by simple algorithms and fast computational speed. However, because they primarily detect laser stripe edge information, the accuracy of laser stripe center extraction is affected by the accuracy of stripe edge extraction, which is susceptible to image noise. Consequently, these algorithms suffer from low detection accuracy. Another category uses the energy center (grayscale center) of the laser stripe image as the center of the laser stripe. Since the grayscale values ​​of image pixels on the normal cross-section of the laser stripe approximately follow a Gaussian distribution, these methods can be understood as studying the pixel grayscale distribution. Energy center extraction methods primarily include the extreme value method, grayscale centroid method, directional template method, curve fitting method, and Steger method. The grayscale centroid method uses the image's grayscale as a weight to determine the laser stripe center on a normal cross section. This method aims to reduce the impact of uneven grayscale distribution in the laser stripe image. However, this method is susceptible to interference from sudden changes, causing the calculated center point to shift along the cross-sectional direction. The Steger algorithm and its improved algorithm determine the normal direction of the laser stripe by calculating the Hession matrix and performing a second-order Taylor expansion in this direction to obtain the laser stripe center. This method achieves high extraction accuracy, but requires multiple two-dimensional Gaussian convolution operations for each pixel, resulting in long computation time and poor real-time performance. Summary of the invention:

[0004] In order to solve the above existing problems, the present invention proposes a laser stripe center extraction method based on Gaussian fitting for multiple laser stripes, which can improve the extraction accuracy and processing speed while processing photos under different light intensities.

[0005] The technical problem to be solved by the present invention is achieved by adopting the following technical solutions:

[0006] A laser stripe center extraction method based on Gaussian fitting includes the following steps:

[0007] Step 1: Use artificially synthesized noise and non-laser scanned images to expand the sample set, optimize the generalization ability of the network, and train the U-Net network for image filtering.

[0008] The specific method of step 1 is:

[0009] (a) Sample Library Creation: A large number of laser stripe images are decomposed into waveforms per line. High-quality bands are selected, and noise such as pulses, triangle waves, and square waves are removed. These high-quality bands are then combined to form a high-quality sample library. To improve the filtering performance of the U-Net model, the sample library is expanded using artificially synthesized noise. Based on the characteristics of the image's inherent interference noise, artificially generated random noise is added to the high-quality bands to create a noisy sample library. Both the high-quality and noisy sample libraries are fed into the network for model training.

[0010] (b) Model training: The sample library is divided into a training set and a validation set. The trained U-Net loss function is output to evaluate the training effect. The calculation formula of the U-Net loss function is as follows:

[0011] L train =L soft +L cross +L weight (1)

[0012] Among them, L soft is the softmax activation function loss; L cross is the weighted cross entropy function loss; L weight Calculate the loss for the weight. The convolution part of the U-Net network lacks a padding module, which makes the image resolution after binary classification different from the original resolution and loses edge feature information. In order to compensate for the loss of edge features, the network strengthens the weight of the image boundary, thereby introducing the cross entropy loss function L with boundary weights. cross , which is calculated as follows:

[0013]

[0014] Among them, p is the output value after processing by the softmax activation function; l(x) represents the true label of each pixel; p l(x)(x) is the activation value of the output of the category given by the corresponding label at point x; w(x) is the weight added to each pixel during the training process.

[0015] Step 2: Use the trained U-Net network to perform filtering operations on the laser stripe image to be detected.

[0016] Step 3: For the filtered laser stripe image, scan a row of the image from left to right in units of pixels, and adaptively find the multi-beam fitting center and fitting data.

[0017] The specific method of step 3 is:

[0018] (a) To detect the center of multiple beam stripes, the initial detection distance of the beams is preset to n pixels, where n is the line width of the first beam. When the center-to-center distance of the beam stripes is less than n pixels, the adaptive distance threshold d is reduced accordingly. Within this threshold range, the point with the maximum stripe grayscale value is found as the center point of the laser stripes to be fitted. When the center-to-center distance of the detected beam stripes is greater than n pixels, the detection result is directly obtained.

[0019] (b) After the laser stripe center is detected, m pixels are taken on each side of this point. The resulting 2m + 1 pixels are used as the fitting data for the laser stripe center. m must be less than the adaptive distance threshold d.

[0020] Step 4: Perform Gaussian fitting on the fitting data obtained above to obtain the center point of the laser stripe. The fitting formula is as follows:

[0021]

[0022] Where A is the maximum grayscale value of the Gaussian fitting curve, x0 is the center of the Gaussian fitting, σ0 is the standard deviation of the Gaussian fitting, and B is the DC component.

[0023] Step 5: Process the image line by line from top to bottom, repeating steps 3 and 4 for each line until the center point of the laser stripe of the entire image is obtained.

[0024] The beneficial effects of the present invention are:

[0025] 1. The present invention uses the U-Net network for filtering processing, which greatly improves the quality of laser stripe images.

[0026] 2. The present invention uses adaptive detection of the laser stripe centers of multiple beams to accurately determine the centers of multiple laser stripes, effectively reducing redundant calculations and improving the accuracy of laser stripe center extraction to sub-pixel level. Description of the drawings:

[0027] Figure 1 It is a flowchart of the extraction method of the present invention;

[0028] Figure 2 is the laser stripe image to be processed in the present invention;

[0029] Figure 3 The laser stripe image after filtering operation of the present invention;

[0030] Figure 4 This is the extraction effect diagram of the local laser stripe center of the present invention;

[0031] Figure 5 This is the effect diagram of extracting the center of the laser stripe of the overall image of the present invention. Specific implementation method:

[0032] In order to make the technical means, creative features, objectives and effects achieved by the present invention easier to understand, the present invention is further described below with reference to specific embodiments and illustrations.

[0033] like Figure 1 As shown, the present invention provides a laser stripe center extraction method based on Gaussian fitting, comprising the following steps:

[0034] Step 1: Use artificially synthesized noise and non-laser scanned images to expand the sample set, optimize the generalization ability of the network, and train the U-Net network for image filtering.

[0035] The specific method of step 1 is:

[0036] (a) Sample Library Creation: A large number of laser stripe images are decomposed into waveforms per line. High-quality bands are selected, and noise such as pulses, triangle waves, and square waves are removed. These high-quality bands are then combined to form a high-quality sample library. To improve the filtering performance of the U-Net model, the sample library is expanded using artificially synthesized noise. Based on the characteristics of the image's inherent interference noise, artificially generated random noise is added to the high-quality bands to create a noisy sample library. Both the high-quality and noisy sample libraries are fed into the network for model training.

[0037] (b) Model training: The sample library is divided into a training set and a validation set. The trained U-Net loss function is output to evaluate the training effect. The calculation formula of the U-Net loss function is as follows:

[0038] L train =L soft +L cross +L weight (1)

[0039] Among them, L softis the softmax activation function loss; L cross is the weighted cross entropy function loss; L weight Calculate the loss for the weight. The convolution part of the U-Net network lacks a padding module, which makes the image resolution after binary classification different from the original resolution and loses edge feature information. In order to compensate for the loss of edge features, the network strengthens the weight of the image boundary, thereby introducing the cross entropy loss function L with boundary weights. cross , which is calculated as follows:

[0040]

[0041] Among them, p is the output value after processing by the softmax activation function; l(x) represents the true label of each pixel; p l(x) (x) is the activation value of the output of the category given by the corresponding label at point x; w(x) is the weight added to each pixel during the training process.

[0042] Step 2: Use the trained U-Net network to perform filtering operations on the laser stripe image to be detected. Figure 2 is the laser stripe image to be processed in the present invention, Figure 3 This is the laser stripe image after filtering operation of the present invention. Figure 3 Comparison Figure 2 In terms of quality, the coarse details are obviously improved and the image is softer overall.

[0043] Step 3: For the filtered laser stripe image, scan a row of the image from left to right in units of pixels, and adaptively find the multi-beam fitting center and fitting data.

[0044] The specific method of step 3 is:

[0045] (a) To detect the centers of multiple beam stripes, the initial detection distance of the beams is preset to 40 pixels. When the distance between the centers of the beam stripes is less than 40 pixels, the adaptive distance threshold is reduced accordingly. Within this threshold range, the point with the maximum grayscale value is found as the center point of the laser stripes to be fitted. When the distance between the detected centers of the beam stripes is greater than 40 pixels, the detection result is directly obtained.

[0046] (b) After the center of the laser stripe is detected, 5 pixels are taken on each side of this point. The resulting 11 pixels are used as the fitting data for the center of the laser stripe.

[0047] Step 4: Perform Gaussian fitting on the fitting data obtained above to obtain the center point of the laser stripe. The fitting formula is as follows:

[0048]

[0049] Where A is the maximum grayscale value of the Gaussian fitting curve, x0 is the center of the Gaussian fitting, σ0 is the standard deviation of the Gaussian fitting, and B is the DC component.

[0050] Figure 4 This is a diagram showing the extraction effect of the local laser stripe center in step 3 to step 4 of the present invention. The black dot is the fitting center point of this row of laser stripes.

[0051] Step 5: Process the image line by line from top to bottom, repeating steps 3 and 4 for each line until the center point of the laser stripe of the entire image is obtained.

[0052] Figure 5 This is the effect diagram of the laser stripe center extraction of the overall image of the present invention. The black stripes are obtained by overlaying the fitting points on the original image one by one. The distribution is uniform and the stripes are clear. The stripe center points of multiple beams can be processed simultaneously.

[0053] Table 1 is Figure 4 Extract the coordinates of the center of the laser stripes in the first row. Traditional laser center extraction methods, such as the edge method and the center method, only provide pixel-level accuracy. While the Stegers algorithm offers high accuracy, it is computationally expensive and inefficient. The Gaussian fitting method used in this invention can accurately fit the laser stripe centers to sub-pixel levels, allowing for simultaneous processing of multiple beams with high efficiency.

[0054] Table 1

[0055] Beam number 1 2 3 4 5 6 7 X coordinate 39.5114 93.9117 148.5391 203.1084 255.3842 304.7689 355.6489 Beam number 8 9 10 11 12 13 14 X coordinate 408.4971 457.0775 504.3303 551.1068 600.2404 646.5288 692.3282 Beam number 15 16 17 18 19 20 21 X coordinate 738.3261 782.6844 825.8823 869.4595 911.1444 925.5743 994.8257

[0056] The basic principles, main features, and advantages of the present invention are shown and described above. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The above embodiments and descriptions are merely illustrative of the principles of the present invention. Various changes and modifications may be made to the present invention without departing from the spirit and scope of the present invention. Such changes and modifications are intended to fall within the scope of the present invention. The scope of protection claimed in the present invention is defined by the appended claims and their equivalents.

Claims

1. A laser stripe center extraction method based on Gaussian fitting, characterized in that: The following steps are involved: Step 1: Use artificial noise and non-laser scanning images to expand the sample set, optimize the generalization ability of the network, and train the U-Net network; Step 2: Use the trained U-Net network to perform filtering operations on the laser stripe image to be detected; Step 3: Scan a row of the filtered laser stripe image from left to right in units of pixels, and adaptively find the multi-beam fitting center and fitting data; Step 4: Perform Gaussian fitting on the obtained fitting data to obtain the center point of the laser stripe; Step 5: Process the image line by line from top to bottom, repeating steps 3 and 4 for each line until the center point of the laser stripe of the entire image is obtained.

2. The laser stripe center extraction method according to claim 1, characterized in that: The specific method of step 1 is: (a) Creating a sample library: Decompose a large number of laser stripe images into waveforms per line, select high-quality bands, remove noise, and combine these high-quality bands to form a high-quality sample library. Use artificial noise synthesis to expand the sample library. Based on the characteristics of the image's inherent interference noise, artificially generated random noise is added to the high-quality bands to create a noisy sample library. Both the high-quality sample library and the noisy sample library are used as the sample library for model training and input into the network for training. (b) Model training: The sample library is divided into a training set and a validation set. The trained U-Net loss function is output to evaluate the training effect. The calculation formula of the U-Net loss function is as follows: L train =L soft +L cross +L weight (1) Among them, L soft is the softmax activation function loss; L cross is the weighted cross entropy function loss; L weight Calculate the loss for the weights; Among them, p is the output value after processing by the softmax activation function; l(x) represents the true label of each pixel; p l(x) (x) is the activation value of the output of the category given by the corresponding label at point x; w(x) is the weight added to each pixel during the training process.

3. The laser stripe center extraction method according to claim 1 or 2, characterized in that: The specific method of step 3 is: (a) To detect the center of multiple beam stripes, the initial detection distance of the beams is preset to n pixels, where n is the line width of the first beam. When the distance between the beam stripe centers is less than n pixels, the adaptive distance threshold d is reduced accordingly. Within this threshold range, the point with the maximum stripe grayscale value is found as the center point of the laser stripe to be fitted. When the distance between the detected beam stripe centers is greater than n pixels, the detection result is directly obtained. (b) After the laser stripe center is detected, m pixels are taken on each side of this point. The resulting 2m + 1 pixels are used as the fitting data for the laser stripe center. m must be less than the adaptive distance threshold d.

4. The laser stripe center extraction method according to any one of claims 1 to 3, characterized in that: The Gaussian fitting formula in step 4 is as follows: Where A is the maximum grayscale value of the Gaussian fitting curve, x0 is the center of the Gaussian fitting, σ0 is the standard deviation of the Gaussian fitting, and B is the DC component.

Citation Information

Patent Citations

  • Underwater laser stripe center extraction method

    CN113223074A

  • Deep learning-based molten pool image geometric feature extraction method and system

    CN113554587A