Line structured light center line extraction post-processing method and system in strong noise environment
By constructing a lightweight deep learning model that includes a residual backbone and an attention mechanism, the problems of low accuracy and poor real-time performance in line laser centerline extraction under strong noise environments are solved, achieving high-precision and robust centerline extraction, which is suitable for industrial-grade real-time processing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU XINMEIWANG MICROELECTRONICS TECHNOLOGY CO LTD
- Filing Date
- 2026-01-29
- Publication Date
- 2026-05-01
AI Technical Summary
Existing line laser centerline extraction schemes struggle to simultaneously achieve high precision, high real-time performance, and high robustness in extremely noisy environments. Traditional algorithms are susceptible to noise interference and have difficult parameter adjustments, while deep learning segmentation algorithms are computationally complex and fail to meet real-time requirements.
We construct a lightweight deep learning classification model that includes a residual backbone and an attention mechanism. We generate standardized sample data through block division and feature calculation, and use probability thresholds to filter and generate effective feature point sets, thereby achieving adaptive adaptation to noisy environments and reducing computational costs.
Achieving high-precision centerline extraction in noisy environments meets the real-time processing requirements of industrial applications, significantly improving the robustness and computational efficiency of the algorithm while reducing the number of model parameters and computational overhead.
Smart Images

Figure CN121962647A_ABST
Abstract
Description
Post-processing method and system for centerline extraction of line structured light under high noise environment Technical Field
[0001] This application relates to the field of structured light vision measurement technology, and in particular to a method and system for post-processing the extraction of the center line of a line structured light under strong noise environment. Background Technology
[0002] Against the backdrop of rapid development in industry and intelligent manufacturing, line structured light 3D measurement technology, due to its non-contact, high-precision, and high-efficiency characteristics, has been widely applied in scenarios such as weld seam tracking, surface defect detection, and foreign object identification. The basic principle of this technology is to project laser lines onto the surface of the object being measured, acquire images of the deformed light stripes modulated by the object's surface using a camera, and then reconstruct the 3D contour by extracting the center line of the laser stripes and combining it with system calibration parameters. The accuracy of extracting the center line of the laser stripes directly determines the final accuracy and reliability of the entire measurement system.
[0003] Existing line laser centerline extraction techniques are mainly divided into two categories: traditional image processing methods and deep learning-based semantic segmentation methods. Traditional methods, such as gray-scale centroid methods, Steger algorithms, edge detection, and morphological thinning, primarily rely on manually designed geometric features or gray-scale distribution rules for extraction. For example, gray-scale centroid methods are fast but have poor anti-interference capabilities; Steger algorithms have high accuracy but require a large amount of computation for second derivatives, making it difficult to meet real-time requirements. Furthermore, in high-noise industrial scenarios such as welding and metallurgy, interference from arc light, spatter, reflections, and ambient light often exists in a complex form. Traditional algorithms, which rely on fixed thresholds or single denoising strategies (such as Gaussian filtering, minimum spanning tree, and curve fitting), are ill-suited to complex and variable noise environments, easily leading to centerline breakage, offset, or false centerline extraction. In addition, traditional algorithms typically require repeated parameter adjustments for different scenarios during engineering deployment, exhibiting weak generalization ability and high maintenance costs.
[0004] With the development of artificial intelligence technology, deep learning-based semantic segmentation methods (such as U-Net and MobileNetv2) have been introduced into this field, modeling centerline extraction as a pixel-level classification task. These methods offer significant improvements in noise immunity compared to traditional algorithms, but their limitations are equally apparent: on the one hand, semantic segmentation networks typically have a large parameter scale, high computational complexity, and large inference latency, making them difficult to deploy on resource-constrained embedded devices or high-speed production lines with extremely high real-time requirements; on the other hand, the output of the segmentation network is usually a laser region mask, still requiring cumbersome post-processing steps to obtain accurate sub-pixel center coordinates, and the model often exhibits output redundancy, making it difficult to achieve a balance between end-to-end efficiency and pixel-level accuracy.
[0005] In summary, existing line laser centerline extraction schemes struggle to simultaneously achieve high accuracy, real-time performance, and robustness in extremely noisy environments. Traditional algorithms are susceptible to noise interference leading to extraction failures and are difficult to adjust parameters. While existing deep learning segmentation algorithms offer enhanced robustness, they are computationally intensive and cannot meet the real-time requirements of high-speed dynamic measurements. Therefore, designing a centerline extraction post-processing method that can adaptively adapt to noisy environments, significantly reduce computational costs while maintaining pixel-level extraction accuracy, and meet the real-time processing needs of industrial applications is a pressing issue in this field. Summary of the Invention
[0006] This application provides a post-processing method and system for extracting the centerline of line structured light in a high-noise environment. This method can adaptively adapt to high-noise environments, significantly reduce computational costs while maintaining pixel-level extraction accuracy, and meet industrial-grade real-time processing requirements. The technical solution provided is as follows: Firstly, this application provides a post-processing method for extracting the centerline of line structured light in a high-noise environment. The method includes: acquiring a structured light stripe image and extracting an initial centerline point set; dividing the initial centerline point set into blocks and performing feature calculations to construct standardized sample data; constructing a deep learning classification model including a residual backbone and an attention mechanism; iteratively training the model using the standardized sample data to generate a line laser centerline classifier; acquiring the feature vector of the image to be detected and inputting it into the trained line laser centerline classifier; filtering and generating an effective feature point set based on a probability threshold; and outputting the effective feature point set as the final line structured light centerline extraction result.
[0007] In a specific implementation scheme, acquiring structured light fringe images and extracting an initial centerline point set, and performing block segmentation and feature calculation on the initial centerline point set to construct standardized sample data includes: acquiring multiple sets of structured light fringe images and performing data augmentation on the images; processing the augmented images using a centerline extraction algorithm to extract a discrete pixel set of the initial centerline, denoted as... ,in, , The total number of pixels. and They represent the first The x and y coordinates of each pixel are calculated. A preset number of pixels are defined as a data block. The discrete pixel set is divided into blocks according to the pixel arrangement order. If the number of pixels in the last data block is less than the preset number, it is padded with zeros at the end. For each pixel, its feature vector is calculated. The features of each pixel include the first-order partial derivative, the second-order partial derivative, the laser line width, the pixel brightness, the direction vector, the distance to the nearest neighbor, and the pixel's own coordinates. , Coordinates; After feature extraction, each pixel is labeled and divided into two categories, effective feature points and non-feature points, according to a preset standard. The feature vector is used as the sample and the category label is used as the supervision signal to construct a complete sample dataset.
[0008] In a specific implementation scheme, the construction of a deep learning classification model including a residual backbone and an attention mechanism, and the iterative training of the model using the standardized sample data to generate a line laser center classifier, includes: the constructed deep learning classification model comprising an initial convolutional layer, a ResNet-like residual backbone network, a lightweight feature aggregation module, a single-parameter attention module, and a classifier, connected in sequence; after the model is constructed, the standardized sample data is divided into a training set and a test set according to a certain ratio, the cross-entropy loss function is selected as the optimization objective, and the Adam optimizer is used for iterative training; when the classification accuracy of the model on the test set reaches a preset standard or the maximum number of iterations is reached, training is stopped, and the final line laser center classifier is obtained.
[0009] In one specific implementation, the initial convolutional layer is used to receive standardized sample data, and uses a 3×3 convolutional kernel in conjunction with batch normalization and ReLU activation function to perform dimensionality upscaling to generate a preliminary feature map with 16 channels to complete basic feature extraction.
[0010] In a specific implementation scheme, the ResNet-like residual backbone network is used to receive the preliminary feature map, perform deep feature mining through three cascaded lightweight residual blocks, and within each residual block, the first 1×1 convolutional layer is used to compress the number of input channels to reduce dimensionality, the second 3×3 convolutional layer is used to extract local features, and finally the third 1×1 convolutional layer is used to restore the channel dimension. The input data of the residual block is directly superimposed on the output data through a bypass branch to establish a shortcut connection, thereby generating a 64-channel deep semantic feature map while preventing gradient vanishing.
[0011] In one specific implementation, the lightweight feature aggregation module receives the deep semantic feature map, performs max pooling operations with kernel scales of 3, 5, and 7 respectively, concatenates the multi-scale results, and then fuses them through 1×1 convolution to generate an aggregated feature map containing different receptive field contours and edge information; the single-parameter attention module receives the aggregated feature map, calculates the inter-channel cosine similarity matrix, and introduces learnable parameters. The channel weights are dynamically generated, and the weights are multiplied with the input feature map to generate a weighted feature map that suppresses noise channel responses. The classifier receives the weighted feature map, transforms it into a one-dimensional vector through adaptive average pooling and a flattening layer, and uses a fully connected layer to map the high-dimensional features into class probability outputs.
[0012] In a specific implementation scheme, the step of acquiring the feature vector of the image to be detected and inputting it into the trained line laser center classifier, and generating an effective feature point set based on probability threshold filtering, includes: acquiring the structured light stripe image to be detected, and extracting the discrete pixel set of the initial center line using a center line extraction algorithm; generating a feature vector sequence of the sample to be detected through a preprocessing procedure for the point set; inputting the feature vector sequence into the line laser center classifier, performing forward inference calculation, and obtaining the confidence probability value corresponding to each pixel. Set probability screening thresholds And filter all prediction results: if If so, the pixel is determined to be the valid laser center point; if If a pixel is not found, it is identified as a background noise point. After removing noise points based on the filtering results, the remaining pixels are recombined to form a set of effective feature points. .
[0013] Secondly, this application provides a post-processing system for extracting the centerline of line structured light under strong noise conditions, employing the following technical solution: A post-processing system for extracting the centerline of line structured light under strong noise conditions, comprising: a sample construction module, used to acquire a structured light stripe image and extract an initial centerline point set, and to perform block division and feature calculation on the initial centerline point set to construct standardized sample data; a model training module, used to construct a deep learning classification model including a residual backbone and an attention mechanism, and to iteratively train the model using the standardized sample data to generate a line laser centerline classifier; a feature selection module, used to acquire the feature vector of the image to be detected and input it into the trained line laser centerline classifier, and to select and generate an effective feature point set based on a probability threshold; and a result output module, used to output the effective feature point set as the final line structured light centerline extraction result.
[0014] Thirdly, this application provides an electronic device, the device including a processor and a memory; the memory stores a program, the program being loaded and executed by the processor to implement a post-processing method for extracting the centerline of a line structured light in a strong noise environment as described in the first aspect.
[0015] Fourthly, this application provides a computer-readable storage medium storing a program that, when executed by a processor, is used to implement a post-processing method for extracting the centerline of a line structured light under strong noise conditions as described in the first aspect.
[0016] In summary, the beneficial effects of this application include at least the following: (1) By constructing a standardized feature vector containing information such as first-order partial derivatives, second-order partial derivatives, and linewidth, and combining it with the channel dynamic weighting mechanism of the single-parameter attention module, the model can deeply explore and accurately distinguish the essential feature differences between laser signals and background noise. This mechanism can adaptively suppress the response of specific noise channels such as arc light, splash, and ambient light, and enhance the effective signal, thereby completely eliminating interference while fully preserving the subtle geometric shape of the laser centerline, achieving high-precision extraction without loss of shape, and solving the industry pain points of low extraction accuracy and incomplete centerline of existing algorithms under complex noise interference.
[0017] (2) This application adopts a lightweight network architecture design. By introducing a ResNet-like residual backbone network and utilizing the bottleneck structure of "1×1 convolution dimensionality reduction - 3×3 convolution extraction - 1×1 convolution dimensionality increase", the number of model parameters and computational overhead are significantly reduced while ensuring deep semantic mining capabilities. This design enables the post-processing time of a single frame image to be controlled in the millisecond level, which can adapt to application scenarios with extremely high real-time requirements, such as high-speed production line positioning or dynamic object contour detection.
[0018] (3) Based on the data-driven model of deep learning, the sample space is expanded by data augmentation, enabling the model to automatically learn the general feature representation under different lighting conditions, different material surfaces and different noise types. This dynamic adaptive mechanism eliminates the dependence on manually set complex rules and can directly adapt to various laser sources, imaging equipment and extreme environments such as high temperature, high humidity and dust, which significantly reduces the debugging difficulty and later maintenance cost of the algorithm in actual engineering deployment.
[0019] First, a structured light fringe image is acquired, and an initial centerline point set is extracted. This initial centerline point set is then segmented and its features are calculated to construct standardized sample data. Next, a deep learning classification model incorporating residual backbones and an attention mechanism is constructed. The model is iteratively trained using the standardized sample data to generate a line laser centerline classifier. Finally, the feature vector of the image to be detected is obtained and input into the trained classifier. A valid feature point set is generated based on a probability threshold as the final extraction result. This application effectively solves the technical problem of existing technologies struggling to simultaneously achieve high accuracy, high real-time performance, and high robustness in extremely noisy environments through the above technical solution. Specifically, addressing the problem that existing deep learning segmentation algorithms are computationally intensive and unable to meet the real-time requirements of high-speed dynamic measurement, this application significantly reduces computational costs by dividing the initial centerline point set into blocks and calculating features, and then using a classifier for filtering, thereby meeting the industrial-grade real-time processing requirements. Addressing the issues of traditional algorithms being susceptible to noise interference and difficult parameter tuning, this application constructs a deep learning classification model containing a residual backbone and an attention mechanism and performs iterative training, achieving adaptive adaptation to noisy environments and significantly improving the algorithm's robustness while maintaining pixel-level extraction accuracy.
[0020] The above description is only an overview of the technical solution of this application. In order to better understand the technical means of this application and to implement it in accordance with the contents of the specification, the preferred embodiments of this application are described in detail below with reference to the accompanying drawings. Attached Figure Description
[0021] Figure 1 is a flowchart illustrating the post-processing method for extracting the centerline of a line structured light beam under strong noise conditions in an embodiment of this application.
[0022] Figure 2 is a schematic diagram of the structure of the deep learning classification model in the embodiment of this application.
[0023] Figure 3 is a structural block diagram of the post-processing system for extracting the center line of a line structured light under strong noise conditions in an embodiment of this application.
[0024] Figure 4 is a block diagram of an electronic device for post-processing of the center line extraction of line structured light in a strong noise environment according to an embodiment of this application. Detailed Implementation
[0025] The specific embodiments of this application will be described in further detail below with reference to the accompanying drawings and examples. The following examples are used to illustrate this application, but are not intended to limit the scope of this application.
[0026] Optionally, this application uses the post-processing method for extracting the center line of line structured light in a strong noise environment provided in various embodiments as an example for application in an electronic device. The electronic device is a terminal or server. The terminal can be a computer, tablet computer, etc. This embodiment does not limit the type of electronic device.
[0027] Referring to Figure 1, it is a flowchart of a method for post-processing the extraction of the center line of line structured light in a strong noise environment provided by an embodiment of this application. The method includes at least the following steps: Step S101: Obtain a structured light stripe image and extract an initial center line point set, and perform block division and feature calculation on the initial center line point set to construct standardized sample data.
[0028] In step S101, the original image containing structured light stripes is acquired and enhanced. An initial centerline point set is extracted and transformed into standardized feature vector samples, constructing a sample dataset containing feature information and category labels. This step aims to expand sample diversity through data augmentation and transform unstructured image data into a unified-dimensional feature matrix through block partitioning and feature engineering, meeting the requirements of deep learning models for input data standardization and feature richness.
[0029] Specifically, firstly, multiple sets of structured light stripe images from different illumination angles and scene conditions are acquired. Then, image enhancement techniques are applied to the original images, including image rotation (±5° range), horizontal flipping, Gaussian noise addition, brightness enhancement, and gamma transformation. Subsequently, existing centerline extraction algorithms (such as the gray-scale centroid method or the Steger algorithm) are used to process the enhanced images, extracting the discrete pixel set of the initial centerline, denoted as... ,in, , The total number of pixels. and They represent the first The x and y coordinates of each pixel.
[0030] In implementation, to ensure a consistent input data structure, a data block is defined as 28 points, and the discrete pixel set is divided into blocks according to the pixel arrangement order. If the last data block has fewer than 28 pixels, it is padded with zeros at the end to ensure that all data blocks have the same length. Next, the feature vector of each pixel is calculated. The features of each pixel include the first-order partial derivative, the second-order partial derivative, the laser line width, the pixel brightness, the direction vector, the distance to the nearest neighbor, and the pixel's own characteristics. , Coordinates. After feature extraction, each pixel is manually labeled and classified into two categories: valid feature points and non-feature points, according to a preset standard. A complete sample dataset is constructed using feature vectors as samples and category labels as supervision signals. To eliminate differences in the dimensions of different features and maintain consistency in model input, all feature data are normalized and mapped to the standard interval [0,1].
[0031] Through the above processing, on the one hand, data augmentation effectively broadens the sample space, enabling the model to have stronger robustness and generalization ability under different noise environments and lighting conditions; on the other hand, block completion and normalization operations ensure the consistency of input dimensions and feature distribution, thus providing high-quality, structured input data for subsequent deep learning model training. Furthermore, the construction based on multi-dimensional feature vectors can comprehensively characterize the grayscale and geometric features of the laser centerline, significantly improving the model's ability to distinguish between noise points and effective feature points.
[0032] Step S102: Construct a deep learning classification model that includes residual backbone and attention mechanism, and use standardized sample data to iteratively train the model to generate a line laser center classifier.
[0033] In step S102, a lightweight deep learning classification model is constructed based on the standardized sample dataset obtained in step S101. This model is used for feature recognition and validity classification of centerline pixels. The model aims to significantly reduce computational complexity while maintaining recognition accuracy, achieving real-time processing capabilities in complex industrial scenarios. The overall model structure consists of an initial convolutional layer, a residual backbone network, a feature aggregation module, a single-parameter attention module, and a classification output layer. A modular design is adopted to balance feature extraction depth and inference efficiency.
[0034] Specifically, referring to Figure 2, which is a schematic diagram of the deep learning classification model in this embodiment, the constructed deep learning classification model includes an initial convolutional layer, a ResNet-like residual backbone network, a lightweight feature aggregation module, a single-parameter attention module, and a classifier, all connected in series. The initial convolutional layer receives standardized sample data and uses 3×3 convolutional kernels in conjunction with batch normalization and ReLU activation function for dimensionality upscaling, generating a preliminary 16-channel feature map to complete basic feature extraction. The ResNet-like residual backbone network receives the preliminary feature map and performs deep feature mining through three cascaded lightweight residual blocks. Within each residual block, a first 1×1 convolutional layer is used to compress the number of input channels to reduce dimensionality, a second 3×3 convolutional layer is used to extract local features, and finally a third 1×1 convolutional layer is used to restore the channel dimension. The input data of the residual block is directly superimposed onto the output data through a bypass branch to establish a shortcut connection, generating a 64-channel deep semantic feature map while preventing gradient vanishing. The lightweight feature aggregation module receives deep semantic feature maps, performs max pooling operations with kernel scales of 3, 5, and 7 respectively, concatenates the multi-scale results, and then fuses them through 1×1 convolution to generate an aggregated feature map containing different receptive field contours and edge information. The single-parameter attention module receives the aggregated feature map, calculates the cosine similarity matrix between channels, and introduces learnable parameters. Channel weights are dynamically generated and multiplied with the input feature map to generate a weighted feature map that suppresses noise channel responses. A classifier receives the weighted feature map, transforms it into a one-dimensional vector through adaptive average pooling and a flattening layer, and then uses a fully connected layer to map the high-dimensional features into class probability outputs.
[0035] It should be noted that the classifier receives the 64-dimensional weighted feature map output by the single-parameter attention module. First, it compresses the spatial dimension to 1×1 using an adaptive average pooling layer, and then converts it into a 64-dimensional one-dimensional feature vector through a flattening layer. Subsequently, a fully connected layer linearly maps this one-dimensional feature vector to a two-dimensional class space (corresponding to valid feature points and non-feature points respectively), obtaining the original discrimination score (Logits) for each class. Finally, a softmax activation function is used to normalize the original discrimination scores, calculating the probability distribution of the current pixel belonging to each class. The normalized value corresponding to the class of the valid feature point is the confidence probability value of that pixel.
[0036] After the model is built, the standardized sample data is divided into training and test sets in a ratio (e.g., 7:3). The cross-entropy loss function is selected as the optimization objective, and the Adam optimizer (with a learning rate of 0.001, momentum of 0.9, and gradient regularization parameter of 0.0001) is used for iterative training. Training stops when the model's classification accuracy on the test set reaches a preset standard (e.g., 96%) or the maximum number of iterations (e.g., 100 rounds), resulting in the final line laser center classifier.
[0037] Through the above processing, the cascaded cooperation of the initial convolutional layer and the residual backbone network achieves an effective transformation of the feature space from shallow geometry to deep semantics. The bottleneck structure design controls the amount of computation while ensuring depth. The feature aggregation module enhances the model's adaptability to laser stripes of different widths and shapes through a multi-scale fusion mechanism. The single-parameter attention module automatically identifies and suppresses noise features by utilizing channel correlation, solving the problem that traditional algorithms have difficulty distinguishing effective signals under strong interference. The overall pipelined processing architecture ensures the efficiency and accuracy of the model during the inference stage.
[0038] Step S103: Obtain the feature vector of the image to be detected and input it into the trained line laser center classifier, and generate an effective feature point set based on the probability threshold.
[0039] In step S103, for the structured light stripe image to be processed, the feature vector of its initial centerline pixel is calculated and normalized. The processed feature vector is then input into the line laser center classifier trained in step S102. The classifier outputs the predicted probability value of each pixel belonging to a valid feature point. Based on a preset probability threshold, the prediction results are binarized, retaining high-probability pixels and removing low-probability noise points, thus outputting the final set of valid feature points. This step aims to utilize the feature distribution patterns learned by the model to denoise and clean the real-time acquired unknown image data, ensuring the reliability and accuracy of the centerline extraction results.
[0040] Specifically, the structured light stripe image to be detected is first acquired, and a discrete pixel set of the initial centerline is extracted using a centerline extraction algorithm. Then, a preprocessing procedure consistent with the model training phase is performed on this pixel set, including fixed-length block segmentation, end padding, and feature calculation operations, thereby generating a feature vector sequence of the sample to be detected. Each feature vector contains features such as first-order partial derivatives, second-order partial derivatives, line width, brightness, direction vector, nearest neighbor distance, and geometric position information. All values are normalized and mapped to the standard interval [0,1]. This feature vector sequence is input into a line laser center classifier, and forward inference calculation is performed to obtain the confidence probability value corresponding to each pixel. During inference, the fully connected layer of the classifier performs a weighted summation of the feature vectors based on the learned weight parameters, outputting a non-normalized response value for the corresponding class. This response value is then transformed into a probability value within the interval [0,1] using the Softmax function, thus obtaining the confidence probability value for each pixel. A probability filtering threshold is then set. (For example ), and filter all prediction results: if If so, the pixel is determined to be the valid laser center point; if If a pixel is not found in the background noise, it is considered a background noise point. After removing noise points based on the filtering results, the remaining pixels are recombined to form a set of effective feature points. .
[0041] Through the above process, step S103 achieves intelligent post-processing of the new input image. This method, relying on the feature recognition capabilities of deep learning models, can accurately distinguish the real laser center signal even in environments with strong noise interference. Compared with traditional algorithms, the probability threshold-based filtering mechanism has stronger adaptability and can effectively suppress complex interferences such as splashing, reflections, and random high-brightness noise, thereby significantly improving the signal-to-noise ratio and centerline positioning accuracy while maintaining the continuity of the centerline.
[0042] Step S104: Output the effective feature point set as the final line structured light centerline extraction result.
[0043] In step S104, the effective feature point set obtained in step S103 is output as the final laser centerline data. This step aims to obtain high-precision centerline coordinates after classification and filtering, thus completing the task of extracting the laser centerline under strong noise conditions.
[0044] Specifically, obtaining the filtered set of valid feature points The extracted line laser center point is formed by the collection of all pixels within the set of effective feature points. The data from this effective feature point set is then output or saved to obtain the final line structured light center line. This process effectively removes strong noise interference.
[0045] In summary, this application provides a post-processing method for extracting the centerline of line structured light in a noisy environment. The method first performs data augmentation and initial centerline extraction on the acquired structured light image. Discrete pixels are transformed into standardized feature vectors containing geometric and grayscale information through a block-based completion strategy and multi-dimensional feature calculation. Subsequently, a deep learning classification model is constructed, integrating a ResNet-like residual backbone network and a single-parameter attention module. Iterative training using a sample dataset is performed to learn the nonlinear classification boundary between noise and signal. During the inference phase, the feature vector of the image to be detected is input into the trained model. Based on the output confidence probability and a preset threshold, pixels are precisely selected, background noise points are removed, and the final set of effective centerline points is output.
[0046] In implementation, addressing the issue that existing technologies are susceptible to extraction failures due to interference from arc light, splashes, and ambient light, this application constructs standardized feature vectors containing information such as first-order partial derivatives, second-order partial derivatives, and linewidth. Combined with a channel dynamic weighting mechanism in a single-parameter attention module, this enables the model to deeply mine and distinguish the essential differences between laser signals and background noise. This mechanism adaptively suppresses noise channel responses and enhances effective signals, thus preserving the geometric shape of the centerline while denoising. A lightweight network architecture is employed. By introducing a ResNet-like residual backbone network and utilizing a bottleneck structure of "1×1 convolution dimensionality reduction—3×3 convolution extraction—1×1 convolution dimensionality enhancement," the number of model parameters and computational overhead are significantly reduced, ensuring deep semantic mining capabilities while significantly improving data processing efficiency.
[0047] Figure 3 is a structural block diagram of a post-processing system for extracting the centerline of a line structured light under strong noise conditions according to an embodiment of this application. The system includes at least the following modules: a sample construction module, used to acquire a structured light stripe image and extract an initial centerline point set, and to perform block division and feature calculation on the initial centerline point set to construct standardized sample data; a model training module, used to construct a deep learning classification model containing a residual backbone and an attention mechanism, and to iteratively train the model using the standardized sample data to generate a line laser centerline classifier; a feature selection module, used to acquire the feature vector of the image to be detected and input it into the trained line laser centerline classifier, and to select and generate an effective feature point set based on a probability threshold; and a result output module, used to output the effective feature point set as the final line structured light centerline extraction result.
[0048] For relevant details, please refer to the above method implementation examples.
[0049] Figure 4 is a block diagram of an electronic device provided in one embodiment of this application. The device includes at least a processor 401 and a memory 402.
[0050] Processor 401 may include one or more processing cores, such as a quad-core processor or an octa-core processor. Processor 401 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). Processor 401 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, processor 401 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, processor 401 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0051] The memory 402 may include one or more computer-readable storage media, which may be non-transitory. The memory 402 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the non-transitory computer-readable storage media in the memory 402 is used to store at least one instruction, which is executed by the processor 401 to implement the post-processing method for extracting the centerline of a line structured light in a high-noise environment provided in the method embodiments of this application.
[0052] In some embodiments, the electronic device may also optionally include: a peripheral device interface and at least one peripheral device. The processor 401, memory 402, and peripheral device interface can be connected via a bus or signal line. Each peripheral device can be connected to the peripheral device interface via a bus, signal line, or circuit board. Indicatively, peripheral devices include, but are not limited to: radio frequency circuits, touch displays, audio circuits, and power supplies.
[0053] Of course, electronic devices may also include fewer or more components, and this embodiment does not limit this.
[0054] Optionally, this application also provides a computer-readable storage medium storing a program that is loaded and executed by a processor to implement the post-processing method for extracting the centerline of a line structured light in a strong noise environment as described in the above method embodiments.
[0055] Optionally, this application also provides a computer product including a computer-readable storage medium storing a program, which is loaded and executed by a processor to implement the post-processing method for extracting the centerline of a line structured light in a strong noise environment as described in the above method embodiments.
[0056] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0057] The above embodiments merely illustrate several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.
Claims
1. A method for post-processing extraction of the centerline of a line structured light beam under high noise conditions, characterized in that, The method includes: acquiring a structured light stripe image and extracting an initial centerline point set; dividing the initial centerline point set into blocks and performing feature calculations to construct standardized sample data; constructing a deep learning classification model including a residual backbone and an attention mechanism; iteratively training the model using the standardized sample data to generate a line laser centerline classifier; acquiring the feature vector of the image to be detected and inputting it into the trained line laser centerline classifier; filtering and generating an effective feature point set based on a probability threshold; and outputting the effective feature point set as the final line structured light centerline extraction result.
2. The post-processing method for extracting the centerline of a line structured light beam under strong noise conditions according to claim 1, characterized in that, The process of acquiring structured light fringe images and extracting an initial centerline point set, followed by segmentation and feature calculation of the initial centerline point set to construct standardized sample data, includes: acquiring multiple sets of structured light fringe images and performing image data augmentation; processing the augmented images using a centerline extraction algorithm to extract a discrete pixel set of the initial centerline, denoted as... ,in, , The total number of pixels. and They represent the first The x and y coordinates of each pixel are calculated. A preset number of pixels are defined as a data block. The discrete pixel set is divided into blocks according to the pixel arrangement order. If the number of pixels in the last data block is less than the preset number, it is padded with zeros at the end. For each pixel, its feature vector is calculated. The features of each pixel include the first-order partial derivative, the second-order partial derivative, the laser line width, the pixel brightness, the direction vector, the distance to the nearest neighbor, and the pixel's own coordinates. 、 Coordinates; After feature extraction, each pixel is labeled and divided into two categories, effective feature points and non-feature points, according to a preset standard. The feature vector is used as the sample and the category label is used as the supervision signal to construct a complete sample dataset.
3. The post-processing method for extracting the centerline of a line structured light beam under strong noise conditions according to claim 1, characterized in that, The construction of a deep learning classification model including a residual backbone and an attention mechanism, and the iterative training of the model using the standardized sample data to generate a line laser center classifier, includes: the constructed deep learning classification model comprising an initial convolutional layer, a ResNet-like residual backbone network, a lightweight feature aggregation module, a single-parameter attention module, and a classifier, connected in sequence; after the model is constructed, the standardized sample data is divided into training and testing sets proportionally, the cross-entropy loss function is selected as the optimization objective, and the Adam optimizer is used for iterative training; training stops when the model's classification accuracy on the testing set reaches a preset standard or the maximum number of iterations is reached, resulting in the final line laser center classifier.
4. The post-processing method for extracting the centerline of a line structured light beam under strong noise conditions according to claim 3, characterized in that, The initial convolutional layer is used to receive standardized sample data. It uses a 3×3 convolutional kernel in conjunction with batch normalization and ReLU activation function to perform dimensionality upscaling and generate a preliminary feature map with 16 channels to complete the basic feature extraction.
5. The post-processing method for extracting the centerline of a line structured light beam under strong noise conditions according to claim 4, characterized in that, The ResNet-like residual backbone network is used to receive the preliminary feature map and perform deep feature mining through three cascaded lightweight residual blocks. Within each residual block, the first 1×1 convolutional layer is used to compress the number of input channels to reduce dimensionality, the second 3×3 convolutional layer is used to extract local features, and finally the third 1×1 convolutional layer is used to restore the channel dimension. The input data of the residual block is directly superimposed on the output data through a bypass branch to establish a shortcut connection, thereby generating a 64-channel deep semantic feature map while preventing gradient vanishing.
6. The post-processing method for extracting the centerline of a line structured light beam under strong noise conditions according to claim 5, characterized in that, The lightweight feature aggregation module receives the deep semantic feature map, performs max pooling operations with kernel scales of 3, 5, and 7 respectively, concatenates the multi-scale results, and then fuses them through 1×1 convolution to generate an aggregated feature map containing different receptive field contours and edge information; the single-parameter attention module receives the aggregated feature map, calculates the inter-channel cosine similarity matrix, and introduces learnable parameters. The channel weights are dynamically generated, and the weights are multiplied with the input feature map to generate a weighted feature map that suppresses noise channel responses. The classifier receives the weighted feature map, transforms it into a one-dimensional vector through adaptive average pooling and a flattening layer, and uses a fully connected layer to map the high-dimensional features into class probability outputs.
7. The post-processing method for extracting the centerline of a line structured light beam under strong noise conditions according to claim 1, characterized in that, The process of acquiring the feature vector of the image to be detected and inputting it into the trained line laser center classifier, and generating an effective feature point set based on probability threshold filtering, includes: acquiring the structured light stripe image to be detected, and extracting the discrete pixel set of the initial center line using a center line extraction algorithm; generating a feature vector sequence of the sample to be detected through a preprocessing procedure for the point set; inputting the feature vector sequence into the line laser center classifier, performing forward inference calculation, and obtaining the confidence probability value corresponding to each pixel. Set probability screening thresholds And filter all prediction results: if If so, the pixel is determined to be the valid laser center point; if If a pixel is not found, it is identified as a background noise point. After removing noise points based on the filtering results, the remaining pixels are recombined to form a set of effective feature points. 。 8. A post-processing system for extracting the centerline of a line structured light beam under high noise conditions, characterized in that, include: The sample construction module is used to acquire structured light stripe images and extract an initial centerline point set, and to perform block division and feature calculation on the initial centerline point set to construct standardized sample data. The model training module is used to construct a deep learning classification model that includes a residual backbone and an attention mechanism, and to iteratively train the model using the standardized sample data to generate a line laser center classifier. The feature selection module is used to obtain the feature vector of the image to be detected and input it into the trained line laser center classifier, and generate an effective feature point set based on the probability threshold; the result output module is used to output the effective feature point set as the final line structured light center line extraction result.
9. An electronic device, characterized in that, The device includes a processor and a memory; the memory stores a program, which is loaded and executed by the processor to implement a post-processing method for extracting the centerline of a line structured light in a strong noise environment as described in any one of claims 1 to 7.
10. A computer-readable storage medium, characterized in that, The storage medium stores a program, which, when executed by a processor, is used to implement a post-processing method for extracting the centerline of a line structured light under strong noise environment as described in any one of claims 1 to 7.