A multi-scale gradient barycenter laser center line extraction method and system

By using a multi-scale gradient centroid laser centerline extraction method, the accuracy and stability problems of laser stripe centerline extraction in complex industrial environments by traditional methods are solved, and high-precision laser stripe centerline extraction is achieved under high noise and complex backgrounds.

CN121564080BActive Publication Date: 2026-04-28SHANDONG UNIV OF SCI & TECH
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV OF SCI & TECH
Filing Date
2026-01-23
Publication Date
2026-04-28

AI Technical Summary

Technical Problem

Traditional laser stripe center extraction methods are easily affected by noise and background light spots in complex industrial environments, making it difficult to stably extract accurate center positions in scenarios with high precision and real-time requirements. Furthermore, they lack effective adaptive mechanisms to handle stripe breakage and continuity issues caused by complex geometric features.

Method used

A multi-scale gradient centroid laser centerline extraction method is adopted. A spatial channel weight map is generated through preliminary feature extraction. Combined with depthwise separable convolution and Gaussian pyramid background removal, local neighbor association and adaptive window search for the maximum gray point are used to perform coarse and fine localization of the centerline continuity repair, and finally obtain the laser stripe centerline.

Benefits of technology

It significantly suppresses background spot and scattering noise, improves the detection accuracy and real-time processing capability of the laser stripe area, and can stably extract high-precision laser stripe center lines against complex backgrounds, making it suitable for complex industrial environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121564080B_ABST
    Figure CN121564080B_ABST
Patent Text Reader

Abstract

The present application belongs to laser stripe image data processing, and particularly relates to a multi-scale gradient barycenter laser center line extraction method and system, which comprises the following steps: S1, feature extraction and enhancement are performed on the laser stripe image, details branches are strengthened through a spatial channel weight map, and a boundary box positioning result is obtained based on a depth separable convolution and a residual connection; S2, a prediction method is used to obtain a predicted center for each column, a gray peak value is searched in a normal self-adaptive window to realize coarse positioning; the robustness under the condition of fracture and noise interference is improved through confidence evaluation, and a coarse center line is formed after smoothing; S3, a local coordinate system and an elliptical window are established along the coarse center line, a multi-scale Gaussian pyramid is constructed for background suppression and image enhancement; S4, a weighted graph is generated through cross-scale fusion, and a weighted gray barycenter is calculated in each window, and a high-precision laser stripe center line is output after smoothing. The accuracy and robustness of the extracted laser center line are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention pertains to laser stripe image data processing, specifically relating to a method and system for extracting the center line of a multi-scale gradient centroid laser. Background Technology

[0002] Despite the extensive research and application of current laser stripe center extraction methods, a series of challenges remain unresolved in real-world industrial environments. These challenges significantly limit the system's performance in scenarios requiring high precision, robustness, and real-time performance.

[0003] Traditional laser extraction methods are easily affected by noise and background spots when processing images with complex and diverse background interference and strong noise conditions, resulting in a significant decrease in the accuracy of centerline extraction. Due to the diverse reflective properties of object surfaces and dynamic changes in lighting conditions in industrial scenes, uneven exposure occurs in the laser stripe area. Traditional fixed-window or single-scale extraction algorithms cannot make effective adaptive adjustments and are difficult to stably obtain accurate center positions. The presence of complex geometric features on the surface of the workpiece being measured, such as acute angles, steps, and concave and convex areas, can easily lead to problems such as local breaks and abrupt curvature changes in the laser stripes. Existing traditional methods lack effective local adaptive mechanisms and cannot reliably restore the continuity and accuracy of the stripes in these complex areas. Summary of the Invention

[0004] The purpose of this invention is to provide a method and system for extracting the center line of a multi-scale gradient centroid laser.

[0005] A method for extracting the laser centerline of a multi-scale gradient centroid includes:

[0006] S1. Obtain the laser stripe image, perform preliminary feature extraction on the laser stripe image, generate a spatial channel weight map based on the query vector and key vector of the preliminary features, enhance the detail feature map of the preliminary features through the spatial channel weight map, perform depthwise separable convolution processing, and connect it with the preliminary feature residual to obtain a stripe feature map with multiple bounding boxes, and use each bounding box as a column to be processed.

[0007] S2. For the current column to be processed, position prediction is performed based on the center position of the previous column to be processed to obtain the prediction center. An adaptive window is opened in the normal direction of the prediction center, and the maximum gray level point is searched within the window as the coarse positioning center of the current column to be processed. The comprehensive confidence score is calculated based on the quality of the gray level profile of the current column to be processed. If the comprehensive confidence score is lower than the adaptive threshold, the calculation is performed based on the adjacent columns with a comprehensive confidence score higher than the adaptive threshold, and the coarse positioning center of the current column to be processed is replaced. The coarse positioning centers of all obtained columns to be processed are connected and smoothed to obtain the coarse centerline.

[0008] S3. Establish a local coordinate system and an elliptical window based on the stripe direction of each coarse positioning center on the coarse center line. Construct a Gaussian pyramid within the elliptical window. Perform background removal processing on each layer of the Gaussian pyramid image to obtain the background removal intensity map of each layer. For each layer's background removal intensity map, upsample back to the original scale and perform weighted fusion to obtain the final fusion weight map.

[0009] S4. Based on the fusion weight map, calculate the weighted gray-level centroid within the elliptical window, use the weighted gray-level centroid as the fine positioning center of the coarse positioning center, connect all the fine positioning centers and perform smoothing to obtain the laser stripe center line.

[0010] In S1, preliminary feature extraction is performed on the laser stripe image. Based on the query vector and key vector of the preliminary features, a spatial channel weight map is generated. The spatial channel weight map is used to enhance the detail feature map of the preliminary features to be enhanced. Then, depthwise separable convolution processing is performed, and it is connected with the preliminary feature residual. Specifically:

[0011] S1.1 Perform preliminary feature extraction on the laser stripe image to obtain the query vector and key vector of the preliminary features. Through global statistics and similarity calculation, obtain the spatial channel weight map. At the same time, obtain the detail feature map of the preliminary features to be enhanced.

[0012] S1.2. Scale the detail branches pixel-by-pixel and channel-by-channel using the spatial channel weight map to obtain the fused feature map;

[0013] S1.3. Perform depthwise separable convolution on the fused feature map to obtain a depth feature map;

[0014] S1.4. The feature map and the depth feature map are spliced ​​and fused to obtain the spliced ​​feature map;

[0015] S1.5. The residuals of the spliced ​​feature map and the preliminary feature map are added together to obtain a striped feature map with multiple bounding boxes.

[0016] In S2, position prediction is performed based on the preceding center position, and the predicted center is obtained as follows:

[0017] Let the first The center position of the column is Then construct a first-order or second-order position prediction:

[0018] The first-order position prediction is: ;

[0019] The second-order position prediction is: ;

[0020] Among them, the The center position of column -1 is , No. The center position of column -2 is The prediction center is .

[0021] First-order position prediction is used at the beginning of the sequence, and second-order position prediction is used at other positions.

[0022] In S3, a Gaussian pyramid is constructed. Background removal is performed on each layer of the Gaussian pyramid image to obtain a background-removed intensity map for each layer. For each background-removed intensity map, it is upsampled back to its original scale and then weighted and fused to obtain the final fused weight map. Specifically:

[0023] Building the Gauss Pyramid ,in, For the original scale, ;

[0024] Each scale in the elliptical window Internal independent processing, using median estimation of background Obtain the background intensity map :

[0025] ,

[0026] Then, each layer is upsampled back to its original scale and weighted and fused to obtain a fused weight map. :

[0027] ,

[0028] in, As the weight, take geometric decay .

[0029] The elliptical window in S3 is specifically as follows:

[0030] ,

[0031] in, For a local coordinate system, Used to limit diffusion along the direction of the stripes to be processed. The normal coverage area of ​​the column to be processed.

[0032] In S2, the search direction for the maximum grayscale point within this window is specifically: along the local normal of the current column stripe to be processed.

[0033] If the overall confidence level in S2 is lower than the adaptive threshold, interpolation repair can be performed: for columns that are continuously lower than the adaptive threshold, the coarse positioning center of the columns to be processed is replaced in batches using three-point quadratic or spline interpolation.

[0034] In S2, an adaptive window is created, specifically: with the prediction center as the window center, a window of length [length missing] is created along the normal direction. Adaptive window:

[0035] ;

[0036] in, For adaptive radius, The coordinates are one-dimensional sampling coordinates along the normal direction of the laser stripe.

[0037] After the coarse positioning center in S2 is corrected by a parabolic closed curve, it is connected and smoothed to obtain the coarse center line.

[0038] A multi-scale gradient centroid laser centerline extraction system is provided to implement the aforementioned multi-scale gradient centroid laser centerline extraction method, comprising:

[0039] The bounding box detection module acquires a laser stripe image, performs preliminary feature extraction on the laser stripe image, generates a spatial channel weight map based on the query vector and key vector of the preliminary features, enhances the detail feature map of the preliminary features through the spatial channel weight map, performs depthwise separable convolution processing, and connects it with the preliminary feature residual to obtain a stripe feature map with multiple bounding boxes, and treats each bounding box as a column to be processed.

[0040] The coarse positioning center acquisition module predicts the position of the current column to be processed based on the center position of the previous column to be processed to obtain the predicted center. An adaptive window is opened in the normal direction of the predicted center, and the maximum gray level point is searched in the window as the coarse positioning center of the current column to be processed. The comprehensive confidence score is calculated based on the quality of the gray level profile of the current column to be processed. If the comprehensive confidence score is lower than the adaptive threshold, the calculation is performed based on the adjacent columns with a comprehensive confidence score higher than the adaptive threshold, and the coarse positioning center of the current column to be processed is replaced. The coarse positioning centers of all the obtained columns to be processed are connected and smoothed to obtain the coarse centerline.

[0041] The background processing module establishes a local coordinate system and an elliptical window based on the stripe direction of each coarse positioning center on the coarse center line. Within the elliptical window, a Gaussian pyramid is constructed, and background removal processing is performed on each layer of the Gaussian pyramid image to obtain the background removal intensity map of each layer. For each layer's background removal intensity map, it is upsampled back to the original scale and weighted and fused to obtain the final fused weight map.

[0042] The fine positioning center acquisition module calculates the weighted gray-level centroid within an elliptical window based on the fused weighted map. The weighted gray-level centroid is then used as the fine positioning center of the coarse positioning center. All fine positioning centers are connected and smoothed to obtain the center line of the laser stripe.

[0043] Compared with the prior art, the beneficial effects of this application are as follows:

[0044] 1. The stripe feature map acquisition method proposed in this application generates a spatial channel weight map based on the query vector and key vector of preliminary features, which is used to enhance the detail branches and achieve rapid and accurate detection of laser stripe regions. This design can significantly suppress background light spots and scattering noise, reduce the overall computational load, and further improve real-time processing capabilities.

[0045] 2. This application proposes an adaptive coarse localization strategy based on adjacent column association. Utilizing the local continuity of laser stripes rather than global linearity, in the initial center extraction, the center of the previous column to be processed is used as the prediction starting point. Within an adaptive local window, grayscale peaks are searched along the stripe normal direction, and interpolation and smoothing are performed on missing or abnormal columns. This method works stably on straight stripes and is also applicable to arbitrarily smooth and curved stripe trajectories. Even in the event of single-column anomalies caused by overexposure, breakage, or interference, position prediction and interpolation can be performed based on the continuous prior of adjacent columns, ensuring the continuity and initial accuracy of the coarse center line.

[0046] 3. In the fine extraction stage, this application proposes a multi-scale pyramid enhancement method, combined with a Gaussian space weighted centering method, which effectively solves the problems of uneven exposure and noise sensitivity. Under different exposure conditions and background noise environments, it significantly improves the accuracy and robustness of fine positioning center extraction. Attached Figure Description

[0047] Figure 1 This is an example of laser centerline extraction using existing technology;

[0048] Figure 2 This is the result of laser centerline extraction in this application. Detailed Implementation

[0049] Example

[0050] Laser stripe center extraction generally involves two stages: first, the laser stripe area needs to be accurately located or segmented to remove background interference; then, sub-pixel fine extraction is achieved within the stripe area.

[0051] This invention relates to a method and system for extracting the center line of a laser with a multi-scale gradient centroid, comprising the following steps:

[0052] A method for extracting the laser centerline of a multi-scale gradient centroid includes:

[0053] S1. Obtain the laser stripe image, perform preliminary feature extraction on the laser stripe image, generate a spatial channel weight map based on the query vector and key vector of the preliminary features, enhance the detail feature map of the preliminary features through the spatial channel weight map, perform depthwise separable convolution processing, and connect it with the preliminary feature residual to obtain a stripe feature map with multiple bounding boxes, and use each bounding box as a column to be processed.

[0054] This step is based on a depth segmentation-guided target detection and localization method, which aims to address issues such as strong noise, scattered light interference, and background stray light in complex industrial environments. It quickly and accurately identifies the region where the laser stripe is located, providing a stable and reliable candidate region input for subsequent fine extraction of sub-pixel center lines.

[0055] Especially in typical industrial scenarios such as laser welding guidance and path tracking, due to the complex working conditions such as strong metal reflection, multiple diffuse reflection and local high temperature luminescence on the surface of the workpiece being tested, the laser stripes are often obscured by bright areas or reflective interference in the background, resulting in false light spots, broken stripes or blurred diffusion.

[0056] Such interference severely reduces the stability and accuracy of traditional stripe localization methods based on threshold or edge detection, making it difficult to reliably extract and accurately locate laser stripe regions in complex environments.

[0057] To address the aforementioned issues, this step aims to achieve efficient and robust localization in complex industrial scenarios, specifically:

[0058] S1.1 Perform preliminary feature extraction on the laser stripe image to obtain the query vector and key vector of the preliminary features. Through global statistics and similarity calculation, obtain the spatial channel weight map. At the same time, obtain the detail feature map of the preliminary features to be enhanced.

[0059] S1.2. Scale the detail branches pixel-by-pixel and channel-by-channel using the spatial channel weight map to obtain the fused feature map;

[0060] S1.3. Perform depthwise separable convolution on the fused feature map to obtain a depth feature map;

[0061] S1.4. The feature map and the depth feature map are spliced ​​and fused to obtain the spliced ​​feature map;

[0062] S1.5. The residuals of the spliced ​​feature map and the preliminary feature map are added together to obtain a striped feature map with multiple bounding boxes.

[0063] Among them, the introduction of depthwise separable convolution significantly reduces the parameter scale and computational complexity while maintaining effective modeling of spatial semantic information, meeting the deployment requirements of edge computing or real-time processing; and the design of enhancing the details branch to be enhanced by spatial channel weight graph is used to fuse channel and spatial domain attention information, enhance the network's response to weak targets such as thin laser stripes and broken edges, while suppressing the activation of invalid features such as background light spots and reflection interference.

[0064] S2. For the current column to be processed, position prediction is performed based on the center position of the previous column to be processed to obtain the prediction center. An adaptive window is opened in the normal direction of the prediction center, and the maximum gray level point is searched within the window as the coarse positioning center of the current column to be processed. The comprehensive confidence score is calculated based on the quality of the gray level profile of the current column to be processed. If the comprehensive confidence score is lower than the adaptive threshold, the calculation is performed based on the adjacent columns with a comprehensive confidence score higher than the adaptive threshold, and the coarse positioning center of the current column to be processed is replaced. The coarse positioning centers of all obtained columns to be processed are connected and smoothed to obtain the coarse centerline.

[0065] To achieve stable extraction of stripe centerlines in complex backgrounds and environments with strong interference, this application introduces a coarse localization method based on neighbor-column association after obtaining a stripe feature map with multiple bounding boxes, as a pre-step for fine centerline extraction.

[0066] This method is designed to quickly obtain a continuous, robust, and approximately true coarse-grained centerline, providing a stable starting point for subsequent fine extraction. Unlike approaches that rely on the assumption of a global straight line, this paper only assumes local continuity / smoothness: the changes in the center positions of adjacent columns are bounded, thus allowing the search and correction of the current column to be constrained by information from the previous column (or the first two columns).

[0067] Specifically, based on the preceding center position, the predicted center is obtained as follows:

[0068] Let the first The center position of the column is Then construct a first-order or second-order position prediction:

[0069] The first-order position prediction is: ;

[0070] The second-order position prediction is: ;

[0071] Among them, the The center position of column -1 is , No. The center position of column -2 is The prediction center is .

[0072] First-order position prediction is used at the beginning of the sequence, and second-order position prediction is used at other positions to better follow the slow curve.

[0073] After obtaining the prediction center, a windowed search is performed. To avoid being pulled by false peaks at strong reflections or light spots, the search is performed along the local normal of the current column of stripes to be processed.

[0074] Estimating the first using gradient direction or structure tensor The main direction of the column , main direction Normal direction is .by Centered on, in the direction of law The length of the upper opening is Adaptive window , For adaptive radius:

[0075]

[0076] in, For adaptive radius, The coordinates are one-dimensional sampling coordinates along the normal direction of the laser stripe.

[0077] exist The maximum grayscale point is searched within the column. Preferably, the maximum grayscale or the maximum one-dimensional smooth response can be used to obtain the coarse positioning center of the current column. .

[0078] Adaptive radius To balance noise suppression and captureability, the window radius adapts to the local shape:

[0079]

[0080] in, The base radius (constant) represents the minimum / default window thickness given in the absence of prior variations. α, β, and γ are non-negative weighting coefficients that control the effects of fringe width, first-order slope, and second-order curvature on radius amplification, respectively. To estimate the fringe width, it can be obtained from the intra-column profile or a small-scale response. The larger the width, the more diffuse the fringes, and the wider the window should be. , When the curvature or displacement increases, the window is automatically widened, while the high straight section remains strictly controlled to suppress noise.

[0081] Furthermore, to improve initial accuracy, for Perform three-point interpolation sub-pixel correction, setting the gray level of the maximum gray point and its two adjacent sampling points to be... In contrast Location is Based on the corrected difference Perform a closed parabolic correction to obtain the corrected coarse positioning center. :

[0082]

[0083]

[0084] The formula is stable when the maximum gray point is sharp; when the maximum gray point is flat or subject to noise, it can degenerate into a first-order centroid or a three-point linear interpolation.

[0085] To address the difficulty in directly or accurately identifying the point with the highest grayscale due to overexposure, stripe breaks, and strong light spots, this application introduces a comprehensive confidence level judgment in the coarse localization stage. This allows for a robust chain of repair and local constraint smoothing based on the comprehensive confidence level. The core principle is to use an interpretable one-dimensional profile quality index to measure the reliability of the coarse localization center of the current column being processed. When the confidence level is insufficient, bidirectional prediction, interpolation repair, and smoothing constraints are triggered, stabilizing the center sequence with the help of continuous priors from adjacent columns.

[0086] Specifically, the overall confidence level is defined as... :

[0087] ,

[0088] in Normalized score for grayscale peak and valley contrast. The sharpness score is assigned to the quality of the grayscale profile of the current column to be processed. Assess the consistency score for the grayscale profile fitting of the current column to be processed; , These are penalties for overexposure / saturation and multi-peak interference, respectively. Here, the weights and penalty coefficients are determined based on experimental experience: , .

[0089] The adaptive threshold is calculated using the neighborhood median adaptive threshold. :

[0090]

[0091] Where η is a coefficient that scales the local confidence median to a dynamic threshold, controlling the strictness of the threshold; w is the half-window length of the neighborhood, used for robust smoothing of the median; the total window length is 2w+1, which is used when the overall confidence is lower than the adaptive threshold. If the coarse location center is not found, it is calculated based on adjacent columns with a comprehensive confidence level higher than the adaptive threshold, and then replaced with the coarse location center of the current column to be processed.

[0092] Take the left and right nearest trusted columns Weighted calculation yields the replacement column. Replace the coarse center of the current column to be processed:

[0093]

[0094]

[0095] in, It is the fusion weight calculated linearly on the left and right sides, with a value of [0,1].

[0096] This method uses the local continuity prior of adjacent reliable columns. When a column cannot be directly or accurately peaked due to overexposure / spots / fragmentation, a reliable coarse positioning center can still be given under the constraint of the stable trend on both sides.

[0097] Connect the coarse positioning centers of all the columns to be processed and smooth them to obtain a coarse center line.

[0098] Preferably, interpolation repair is performed after replacement for continuous low-confidence intervals. By using three-point quadratic or spline interpolation to batch repair points, stronger smoothing is applied individually to continuous low-confidence intervals to eliminate seams.

[0099] This design allows the deviation to be limited to a small range even if a single column is distorted, thanks to the continuous prior of adjacent columns, thus avoiding abrupt changes in the center line. In experiments, under high exposure and stripe breakage scenarios, the coarse positioning deviation of this application can still be kept within 1-2 pixels, providing a reliable coarse positioning center for the next stage of fine positioning.

[0100] S3. Establish a local coordinate system and an elliptical window based on the stripe direction of each coarse positioning center on the coarse center line. Construct a Gaussian pyramid within the elliptical window. Perform background removal processing on each layer of the Gaussian pyramid image to obtain the background removal intensity map of each layer. For each layer's background removal intensity map, upsample back to the original scale and perform weighted fusion to obtain the final fusion weight map.

[0101] Furthermore, in order to ensure that the fine positioning center is only dominated by the maximum gray level of the stripes and can adapt to different widths and slight curvatures, this step constructs a local coordinate system and an adaptive elliptical window aligned with the stripe direction around each coarse positioning center.

[0102] The specific steps are as follows: For the first Coarse positioning center Gradient estimation of fringe tangential With the direction of the law ( Construct a local coordinate system ( Along the tangential direction, Along the normal direction, take an elliptical window with the coarse positioning center as the center:

[0103] ,

[0104] in, For a local coordinate system, Used to limit diffusion along the direction of the stripes to be processed, taking Pixels The normal coverage area of ​​the column to be processed is adaptively set, taking the stripe width. times.

[0105] By using oriented alignment and width-adaptive local domains, we can focus on the coarse center neighborhood, suppress neighboring stray responses, and allow for fringe width variations and small radius curvatures, providing a consistent and robust working domain for subsequent background removal, pyramid enhancement, and weighted center calculations.

[0106] To stably highlight the true peak center while preserving fringe details under complex noise and uneven exposure conditions, this application employs a multi-scale pyramid enhancement strategy within each fringe feature map. Specifically, it constructs a Gaussian pyramid. ,in, For the original scale, ;

[0107] Each scale in the elliptical window Internal independent processing, using median estimation of background Obtain the background intensity map :

[0108] ,

[0109] Then, each layer is upsampled back to its original scale and weighted and fused to obtain a fused weight map. :

[0110] ,

[0111] in, As the weight, geometric decay can be taken. .

[0112] After multi-scale pyramid enhancement, the lower scale provides natural smoothness and is more robust to strong noise and exposure unevenness; the higher scale preserves key structural details. Cross-scale fusion thus forms a consistent and reliable peak center representation under different fringe widths and signal-to-noise ratios, significantly reducing the traction effect of steep edges and isolated highlights on subsequent weighted centroid localization.

[0113] S4. Based on the fusion weight map, calculate the weighted gray-level centroid within the elliptical window, use the weighted gray-level centroid as the fine positioning center of the coarse positioning center, connect all the fine positioning centers and perform smoothing to obtain the laser stripe center line.

[0114] Building upon multi-scale enhancement and local windowing, it is also necessary to suppress the traction bias caused by steep edge slopes and isolated highlights. To this end, a multiplicative weighting of background intensity removal and elliptical Gaussian space prior is introduced to constrain contributing pixels simultaneously in both the photometric and spatial domains.

[0115] Specifically, first, we define the weights for... Within, No. Pixels at each scale Define the weights within the layer. :

[0116]

[0117] in For the first Remove background intensity map from layer. For local coordinate systems; Assuming an elliptic Gaussian space prior, pixels far from the coarse center are exponentially decayed along the normal direction. The spatial standard deviation within the scale corresponds to the adaptive semi-axis. .index Used to adjust the confidence level of the intensity.

[0118] Then, cross-scale fusion is performed, and each layer is back-projected to the original scale and then weighted and summed:

[0119]

[0120]

[0121] in, As the weight, geometric decay can be taken. This ensures high resolution while preserving detail and low resolution while stabilizing noise.

[0122] Finally, centroid estimation is performed to... To integrate weights, ( , ) are the coordinates of the column center to be processed, and the weighted grayscale centroid is obtained. , Connect all the precise positioning centers and smooth them to obtain the center line of the laser stripe:

[0123]

[0124]

[0125] Preferably, to improve numerical robustness, the fusion weights are adjusted. Apply 90–95% upper quantile clipping to reduce the pull of residual saturation points and isolated reflections; when (like When using a zero-backoff strategy, the relaxation coefficient is taken as follows: , Available Energy self-adaptation, and Synchronous updates ensure that spatial priors are consistent with the window.

[0126] In terms of complexity, the cost per column is approximately Due to the area of ​​the elliptical window With scale number The costs are all relatively small, and the actual overhead is far lower than that of full-image operation; compared with the traditional centroid, the additional cost is mainly the multi-scale retro-projection and pixel-by-pixel weight calculation, but it can be ignored at this level.

[0127] In contrast, traditional centroids are highly sensitive to steep slope edges and isolated highlights, and are prone to shifting under non-uniform illumination and diffused reflections. (See [link to article]). Figure 1 The method in this application employs a triple constraint—intra-layer background removal to eliminate slowly varying baselines, elliptical Gaussian space prior to suppress far-field noise, and cross-scale fusion to resolve scale dependence and local anomalies—ensuring that the centroid contribution primarily originates from the true main peak in the coarse center neighborhood. This allows for stable sub-pixel-level precise localization of the centroid in complex scenes. (See [link to relevant documentation]). Figure 2 .

[0128] A multi-scale gradient centroid laser centerline extraction system is provided to implement the aforementioned multi-scale gradient centroid laser centerline extraction method, comprising:

[0129] The bounding box detection module acquires a laser stripe image, performs preliminary feature extraction on the laser stripe image, generates a spatial channel weight map based on the query vector and key vector of the preliminary features, enhances the detail feature map of the preliminary features through the spatial channel weight map, performs depthwise separable convolution processing, and connects it with the preliminary feature residual to obtain a stripe feature map with multiple bounding boxes, and treats each bounding box as a column to be processed.

[0130] The coarse positioning center acquisition module predicts the position of the current column to be processed based on the center position of the previous column to be processed to obtain the predicted center. An adaptive window is opened in the normal direction of the predicted center, and the maximum gray level point is searched in the window as the coarse positioning center of the current column to be processed. The comprehensive confidence score is calculated based on the quality of the gray level profile of the current column to be processed. If the comprehensive confidence score is lower than the adaptive threshold, the calculation is performed based on the adjacent columns with a comprehensive confidence score higher than the adaptive threshold, and the coarse positioning center of the current column to be processed is replaced. The coarse positioning centers of all the obtained columns to be processed are connected and smoothed to obtain the coarse centerline.

[0131] The background processing module establishes a local coordinate system and an elliptical window based on the stripe direction of each coarse positioning center on the coarse center line. Within the elliptical window, a Gaussian pyramid is constructed, and background removal processing is performed on each layer of the Gaussian pyramid image to obtain the background removal intensity map of each layer. For each layer's background removal intensity map, it is upsampled back to the original scale and weighted and fused to obtain the final fused weight map.

[0132] The fine positioning center acquisition module calculates the weighted gray-level centroid within an elliptical window based on the fused weighted map. The weighted gray-level centroid is then used as the fine positioning center of the coarse positioning center. All fine positioning centers are connected and smoothed to obtain the center line of the laser stripe.

Claims

1. A method for extracting the center line of a laser with a multi-scale gradient centroid, characterized in that, include: S1. Obtain the laser stripe image, perform preliminary feature extraction on the laser stripe image, generate a spatial channel weight map based on the query vector and key vector of the preliminary features, enhance the detail feature map of the preliminary features through the spatial channel weight map, perform depthwise separable convolution processing, and connect it with the preliminary feature residual to obtain a stripe feature map with multiple bounding boxes, and take each bounding box as a column to be processed. S2. For the current column to be processed, position prediction is performed based on the center position of the previous column to be processed to obtain the prediction center. An adaptive window is opened in the normal direction of the prediction center, and the maximum gray level point is searched in the window as the coarse positioning center of the current column to be processed. The comprehensive confidence score is calculated based on the quality of the gray level profile of the current column to be processed. If the comprehensive confidence score is lower than the adaptive threshold, the calculation is performed based on the adjacent columns with a comprehensive confidence score higher than the adaptive threshold, and the coarse positioning center of the current column to be processed is replaced. The coarse positioning centers of all the obtained columns to be processed are connected and smoothed to obtain the coarse center line. S3. Establish a local coordinate system and an elliptical window based on the stripe direction of each coarse positioning center on the coarse center line. Construct a Gaussian pyramid within the elliptical window. Perform background removal processing on each layer of the Gaussian pyramid image to obtain the background removal intensity map of each layer. For each layer's background removal intensity map, upsample back to the original scale and perform weighted fusion to obtain the final fusion weight map. S4. Based on the fusion weight map, calculate the weighted gray-level centroid within the elliptical window, use the weighted gray-level centroid as the fine positioning center of the coarse positioning center, connect all the fine positioning centers and perform smoothing to obtain the laser stripe center line.

2. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, In S1, preliminary feature extraction is performed on the laser stripe image. Based on the query vector and key vector of the preliminary features, a spatial channel weight map is generated. The spatial channel weight map is used to enhance the detail feature map of the preliminary features to be enhanced. Then, depthwise separable convolution processing is performed, and it is connected with the preliminary feature residual. Specifically: S1.1 Perform preliminary feature extraction on the laser stripe image to obtain the query vector and key vector of the preliminary features. Through global statistics and similarity calculation, obtain the spatial channel weight map. At the same time, obtain the detail feature map of the preliminary features to be enhanced. S1.

2. Scale the detail branches pixel-by-pixel and channel-by-channel using the spatial channel weight map to obtain the fused feature map; S1.

3. Perform depthwise separable convolution on the fused feature map to obtain a depth feature map; S1.

4. The feature map and the depth feature map are spliced ​​and fused to obtain the spliced ​​feature map; S1.

5. The residuals of the spliced ​​feature map and the preliminary feature map are added together to obtain a striped feature map with multiple bounding boxes.

3. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, In S2, position prediction is performed based on the preceding center position, and the predicted center is obtained as follows: Let the first The center position of the column is Then construct a first-order or second-order position prediction: The first-order position prediction is: ; The second-order position prediction is: ; Among them, the The center position of column -1 is , No. The center position of column -2 is The prediction center is , First-order position prediction is used at the beginning of the sequence, and second-order position prediction is used at other positions.

4. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, In S3, a Gaussian pyramid is constructed. Background removal is performed on each layer of the Gaussian pyramid image to obtain a background-removed intensity map for each layer. For each background-removed intensity map, it is upsampled back to its original scale and then weighted and fused to obtain the final fused weight map. Specifically: Building the Gauss Pyramid ,in, For the original scale, ; Each scale in the elliptical window Internal independent processing, using median estimation of background Obtain the background intensity map : , Then, each layer is upsampled back to its original scale and weighted and fused to obtain a fused weight map. : , in, As the weight, take geometric decay .

5. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, The elliptical window in S3 is specifically as follows: , in, For a local coordinate system, Used to limit diffusion along the direction of the stripes to be processed. The normal coverage area of ​​the column to be processed.

6. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, In S2, the search direction for the maximum grayscale point within this window is specifically: along the local normal of the current column stripe to be processed.

7. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, If the overall confidence level in S2 is lower than the adaptive threshold, interpolation repair can be performed: for columns that are continuously lower than the adaptive threshold, the coarse positioning center of the columns to be processed is replaced in batches using three-point quadratic or spline interpolation.

8. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, In S2, an adaptive window is created, specifically: with the prediction center as the window center, a window of length [length missing] is created along the normal direction. Adaptive window: ; in, For adaptive radius, The coordinates are one-dimensional sampling coordinates along the normal direction of the laser stripe.

9. The method for extracting the center line of a multi-scale gradient centroid laser according to claim 1, characterized in that, After the coarse positioning center in S2 is corrected by a parabolic closed curve, it is connected and smoothed to obtain the coarse center line.

10. A multi-scale gradient centroid laser centerline extraction system, used to implement the multi-scale gradient centroid laser centerline extraction method according to any one of claims 1-9, characterized in that, include: The bounding box detection module acquires a laser stripe image, performs preliminary feature extraction on the laser stripe image, generates a spatial channel weight map based on the query vector and key vector of the preliminary features, enhances the detail feature map of the preliminary features through the spatial channel weight map, performs depthwise separable convolution processing, and connects it with the preliminary feature residual to obtain a stripe feature map with multiple bounding boxes, and treats each bounding box as a column to be processed. The coarse positioning center acquisition module predicts the position of the current column to be processed based on the center position of the previous column to be processed to obtain the predicted center. An adaptive window is opened in the normal direction of the predicted center, and the maximum gray level point is searched in the window as the coarse positioning center of the current column to be processed. The comprehensive confidence score is calculated based on the quality of the gray level profile of the current column to be processed. If the comprehensive confidence score is lower than the adaptive threshold, the calculation is performed based on the adjacent columns with a comprehensive confidence score higher than the adaptive threshold, and the coarse positioning center of the current column to be processed is replaced. The coarse positioning centers of all the obtained columns to be processed are connected and smoothed to obtain the coarse centerline. The background processing module establishes a local coordinate system and an elliptical window based on the stripe direction of each coarse positioning center on the coarse center line. Within the elliptical window, a Gaussian pyramid is constructed, and background removal processing is performed on each layer of the Gaussian pyramid image to obtain the background removal intensity map of each layer. For each layer's background removal intensity map, it is upsampled back to the original scale and weighted and fused to obtain the final fused weight map. The fine positioning center acquisition module calculates the weighted gray-level centroid within an elliptical window based on the fused weighted map. The weighted gray-level centroid is then used as the fine positioning center of the coarse positioning center. All fine positioning centers are connected and smoothed to obtain the center line of the laser stripe.

Citation Information

Patent Citations

  • High-precision measuring method of laser triangulation

    CN108053441A

  • Line structured light center extraction method and system

    CN111260708A