A line structured light center extraction method based on space-time inertial tracking and multi-dimensional adaptive reconstruction
By employing spatiotemporal inertial tracking and multidimensional adaptive reconstruction, the problems of blind extraction of laser centerline under strong arc light and material generalization are solved, the consumption of computational resources is reduced, and a smooth transition is achieved at the breakpoint, outputting a high-fidelity skeleton sequence.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- GUILIN UNIV OF ELECTRONIC TECH
- Filing Date
- 2026-05-11
- Publication Date
- 2026-07-14
Smart Images

Figure CN122391669A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of machine vision and image signal processing technology, and in particular to a high-fidelity method for extracting the center features of high-frequency line structured light under interference from strong electric arc light, strong reflection, and large particle splash. Background Technology
[0002] In industrial robot structured light vision tracking scenarios, high-quality laser centerline extraction is a prerequisite for all subsequent 3D shape measurement and trajectory calculation.
[0003] Real welding and processing sites are filled with extreme optical interference. First, the moment the welding torch ignites the arc, it generates extremely strong arc light. Traditional full-image edge search algorithms are prone to mistaking the edge of the arc light for laser features, causing the extracted laser center line to be severely "pulled" away from its actual physical position.
[0004] Different metal materials (such as highly reflective stainless steel and heavily oxidized carbon steel) have vastly different diffuse reflectance to lasers. Traditional gray-scale centroid methods often use fixed empirical thresholds (such as a fixed percentage of the maximum gray level to be removed) to eliminate background noise. This static, single threshold cannot adapt to dynamic changes in the reflectance of materials, often causing the extracted sub-pixel centroid to shift towards the high-gloss diffuse reflectance region.
[0005] Welding spatter creates large areas of bright, detached noise in images. Traditional visual algorithms rely heavily on two-dimensional image morphology (such as opening and closing operations) or two-dimensional convolutional filtering to remove such spatter. This not only consumes a huge number of CPU clock cycles, causing a sharp drop in the detection frame rate, but also easily produces abrupt, physically inaccurate angles at the point of disconnection and reconnection. Summary of the Invention
[0006] The technical problem to be solved by this invention is to provide a method for extracting the center of a line structured light based on spatiotemporal inertial tracking and multidimensional adaptive reconstruction, so as to solve the problems of existing technologies being easily blinded by strong arc light, having poor material generalization ability, excessive consumption of computational power for spatter removal, and low smoothness of breakpoint interpolation.
[0007] To solve the above-mentioned technical problems, the present invention adopts the following technical solution: a method for extracting the center of a line structured light based on spatiotemporal inertial tracking and multidimensional adaptive reconstruction, comprising the following steps:
[0008] The original image containing structured light stripes is acquired and preprocessed with filtering. During the line-by-line downward scanning process, a spatiotemporal tracking mechanism is introduced. The horizontal coordinate successfully extracted from the previous line is used as the temporal prior to dynamically set locally restricted regions of interest (ROIs) and forcibly isolate global strong light sources (such as electric arc light) from the search field of view.
[0009] Within a local field of view, the steepest rising edge of the laser energy is locked using a first-order gradient. Subsequently, a two-dimensional spatiotemporal background sampling data block is constructed across multiple rows. The anti-reflective peak clipping baseline is adaptively calculated using mathematical statistics properties. On this baseline, the local sub-pixel coordinates are accurately extracted using the symmetric centroid method, forming a one-dimensional reduced point cloud sequence.
[0010] A one-dimensional sliding window with a large span is constructed. Instead of full sorting, a fast selection algorithm with linear time complexity is used to accurately obtain the local median, instantly removing outliers that deviate from the median.
[0011] For the broken areas damaged by splashing, healthy point cloud nodes are searched upwards and downwards. Linear fitting is performed using least squares regression with safety singularity protection. Context space interpolation is performed along the fitting path, and one-dimensional mean smoothing is performed to output an absolutely pure high-fidelity skeleton sequence.
[0012] The beneficial effects of this invention are as follows: First, this invention introduces spatiotemporal physical inertia from a cybernetics perspective, breaking the blindness of passive scanning in traditional algorithms. By utilizing a dynamically narrow tracking domain, without increasing additional recognition computing power, it completely blocks the pulling and inducing effect of arc light on the laser centerline from a physical mechanism.
[0013] Second, this invention achieves nonlinear environment adaptation based on local signal-to-noise ratio. By employing a statistical bimodal valley-finding strategy for two-dimensional spatiotemporal background blocks, it completely eliminates the reliance on manual parameter tuning, enabling the system to automatically remove diffuse reflection trails and maintain sub-pixel accuracy even under complex material conditions such as extremely high reflectivity and severe corrosion.
[0014] Third, this invention demonstrates an extremely strong ability to squeeze out underlying computing resources. It creatively reduces the complex two-dimensional descrambling task to a one-dimensional manifold, and with the fast selection algorithm, it achieves the clearing of large-scale scrambling noise within a microsecond time window. Combined with context regression interpolation with safety protection, it perfectly realizes the physical smooth transition at the point of disconnection and reconnection.
[0015] Fourth, this invention achieves perfect decoupling between the underlying visual perception and the upper-level specific welding process. It innovatively proposes a cascaded feature extraction architecture combining "global topology compression with dynamic vector collinearity suppression." While preserving the macroscopic orientation of complex weld seams, it accurately extracts all real physical topological turning points (such as V-shaped valleys and lap edges). This mechanism is no longer limited to a single feature point output but provides a rigorously denoised set of real geometric feature points, allowing users to flexibly set the final welding target point according to different welding task requirements (such as bottom finding and edge finding), greatly expanding the industrial generalization capability and applicable boundaries of visual algorithms. Attached Figure Description
[0016] Figure 1This is an overall flowchart of the line structured light center extraction method of the present invention;
[0017] Figure 2 This is a diagram showing the original feature extraction effect of the present invention based on spatiotemporal inertial constraints;
[0018] Figure 3 This is a comparison diagram of splashes and outlier noise filtered by the one-dimensional median filter of this invention;
[0019] Figure 4 This invention provides a smooth reconstruction image based on context regression for interpolation of broken edges.
[0020] Figure 5 This is the noise-free, absolute geometric fine skeleton light bar pattern that is the final output of this invention.
[0021] Figure 6 These are the feature points obtained using the RDP algorithm in this invention.
[0022] Figure 7 These are the actual feature points obtained after collinearity suppression in this invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments and accompanying drawings. Figure 1 The diagram shown is an overall flowchart of the line structured light center extraction method based on spatiotemporal inertial tracking and multidimensional adaptive reconstruction of the present invention. The method specifically includes the following steps:
[0024] Step 1: Acquire a grayscale image containing structured light stripes and perform Gaussian smoothing filtering to eliminate underlying high-frequency shot noise. Establish a scan tracking state machine and initialize valid prior coordinate variables. With fracture fault-tolerant counter .
[0025] In the process of scanning the image line by line (with In the case of a behavior example, a dynamic region of interest is established based on the prior coordinates of the previous row. Its search boundary... The rules are set independently as follows:
[0026]
[0027]
[0028] In equations (1) and (2), The set radius of the dynamic tracking window; This represents the total number of columns in the image. This mechanism ensures that the algorithm searches only within the physical inertial extension region of the laser, thus naturally immune to interference from strong arc light at a distance.
[0029] Step 2: Within the above constraint domain, calculate the horizontal difference of pixels, and lock in the optimal horizontal coordinate where the gradient is greater than the set threshold and the grayscale conforms to the peak characteristics. .
[0030] To address the center-of-gravity shift caused by dynamic changes in reflectivity, this invention constructs a two-dimensional spatiotemporal background block on the left and right sides, spanning the current scan line $y$ and the two lines above and below it (creating a total depth of 5 lines), avoiding the high-brightness energy core. The average grayscale value of the effective pixels within this data block is then calculated. The variance is then used to calculate the background standard deviation. Based on mathematical statistics Criteria, Dynamic Peak Shaving Baseline The computational models are independent as follows:
[0031]
[0032] Subsequently, within a tiny symmetrical window centered on the peak, baseline noise is stripped away, and sub-pixel centroids are calculated. The formulas are independent as follows:
[0033]
[0034] After successful extraction, update the prior coordinates. The fault tolerance counter is then reset to zero; if an extreme breakpoint is encountered, the fault tolerance counter is incremented, and when it exceeds the tolerance limit, the local tracking domain is released and a full image search is performed again. After this step, the two-dimensional image is extremely compressed and stripped into a one-dimensional center point coordinate sequence containing a very small number of outliers. Figure 2 The image shown is an illustration of the original feature extraction effect based on spatiotemporal inertial constraints of the present invention. It can be seen that at this stage, the main body of the light stripe has been extracted, but there are still scattered splash noises around it.
[0035] Step 3, construct a length of A one-dimensional sliding window is used. To overcome the computational bottleneck of full sorting, a fast selection algorithm based on the Quickselect mechanism in C++ (such as std::nth_element) is called, achieving a time complexity of [missing information]. Accurately obtain the median of a local coordinate subset .
[0036] Calculate the absolute Euclidean distance of the current point's x-coordinate from the median. If it is identified as splash or highlight detached noise, it will be logically removed, thereby clearing large areas of stray noise. For example... Figure 3 The image shown is a comparison of splash noise and outlier noise filtered by the one-dimensional median filter of this invention. The splash noise that was removed in the image was effectively identified and isolated.
[0037] Step 4: For topological fracture zones formed by splash damage or attenuation of native reflection, the algorithm explores up to 10 healthy points at both ends of the fracture zone to construct a local context fitting set. A least-squares regression technique based on Euclidean distance is used to analyze the local rigidity trend and obtain the direction vector of the fitted line. With reference coordinates .
[0038] To prevent near-vertical straight lines from causing floating-point overflow and crashes due to minimal vertical components during spatial interpolation, a safe truncation component is established. In the missing Implement coordinate reconstruction:
[0039]
[0040] Step 5: Perform short-window moving mean filtering on the continuous one-dimensional sequence after discontinuity interpolation to completely eliminate high-frequency stepped jagged edges introduced by local reconstruction and microscopic reflections, such as... Figure 5 As shown, this is the noise-free absolute geometric fine skeleton light stripe pattern output by the present invention. At this point, the light stripe has high-fidelity physical coherence.
[0041] Step 6: To extract feature points for downstream trajectory planning by the robot, global topology compression based on tolerance constraints is performed on the high-fidelity center sequence. The Ramer-Douglas-Peucker (RDP) algorithm is called, and a pixel tolerance for deviation is set. (Recommended value is 2.0 to 5.0 pixels), compressing redundant smoothed points into an initial feature sequence that includes topological inflection trends. For example... Figure 6 The image shown is a feature point map obtained using the RDP algorithm in this invention. It can be seen that redundant straight-line points have been significantly compressed. To further eliminate "pseudo-corner points on straight lines" remaining due to minor pixel jitter, this invention introduces a dynamic vector collinearity suppression mechanism. Points currently confirmed as true features are used as dynamic reference points. Take the point to be determined With the next reference point Calculate vectors and The dot product and cross product can be solved precisely using the arctangent function. The true interior angle at the location. When the interior angle is greater than the set collinearity suppression threshold (e.g., ... When ), explain Points located on a smooth straight line segment are suppressed and discarded as pseudo-corner noise; when the interior angle is less than the threshold, it is confirmed. The actual physical angle is retained in the final feature set. For example... Figure 7 As shown, this is a map of real feature points obtained after collinearity suppression according to the present invention. Only topological inflection points with physical significance are retained in the map.
[0042] Thus, this pipeline has completed the dimensionality reduction from massive two-dimensional pixels to a pure one-dimensional topology, outputting a "set of real geometric feature points" containing all physical transitions (such as bevel start points, valley bottoms, and end points). As for which feature point in the set is designated as the robotic arm's final "welding target point" in actual control, this is left to the upper-level application to select as needed based on the specific joint type (e.g., valley bottom point for V-grooves, edge inflection point for lap joints). This invention provides the lowest-level, highest-fidelity unified data support for all these differentiated applications.
[0043] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
Claims
1. A method for extracting the center of a line structured light based on spatiotemporal inertial tracking and multidimensional adaptive reconstruction, characterized in that, Includes the following steps: Step 1: Acquire an image containing structured light stripes, scan row by row, and use the effective extracted horizontal coordinates of the previous row as a temporal inertial prior to dynamically define the local region of interest for the current row and shield against global strong light source interference. Step 2: Within the local area of interest, the steepest rising edge is found using the gradient of adjacent pixels to lock the laser peak; a two-dimensional spatiotemporal background sampling block is constructed by spreading outward from the peak; the dynamic peak-shaving baseline is calculated using statistical criteria; and the sub-pixel center coordinates of the current row are extracted by the weighted gray-level centroid method to obtain the initial one-dimensional point cloud sequence. Step 3: Construct a large-span one-dimensional sliding window, use a fast selection algorithm to obtain the median of the local coordinate sequence, calculate the absolute distance of each point in the initial one-dimensional point cloud sequence from the median, and remove outlier splash noise points that exceed the distance threshold; Step 4: For the fracture zone generated after noise removal, a set number of healthy neighbor nodes are collected on both sides of the fracture zone. The least squares method is used to perform local linear regression fitting, and the missing center coordinates are spatially interpolated along the slope of the regression line. Step 5: Perform one-dimensional moving average smoothing on the interpolated point cloud sequence to eliminate pixel staircases and interpolation jagged edges, and output a high-precision, uninterrupted high-fidelity line structured light center point set. Step 6: Perform global topological compression based on pixel tolerance constraints on the center point set to extract the initial feature sequence; Subsequently, a dynamic vector collinearity suppression mechanism based on state machine updates is introduced to calculate the true interior angles of adjacent spatial vectors, remove pseudo-corner noise points on smooth lines, and output the final set of true geometric feature points, providing an absolutely pure underlying data source for the selection of various differentiated welding targets downstream.
2. The method according to claim 1, characterized in that, In step 2, the specific construction of the two-dimensional spatiotemporal background sampling block and the dynamic peak-shaving baseline are described. The calculation method is as follows: Based on the currently locked peak horizontal coordinate, the sampled area is expanded to the left and right sides, skipping the core halo region. Then, a background column of a specified width is extracted and combined with several adjacent rows above and below the current row to jointly construct a two-dimensional spatiotemporal background sampling block. Calculate the average grayscale value of all background pixels within the sampling block. with standard deviation Based on mathematical statistics principles, dynamic peak shaving baseline The calculation is as follows: in, The set statistical truncation coefficient; if the calculated dynamic peak clipping baseline exceeds the set safety ratio lower limit of the maximum gray value of the peak, it degenerates into using a fixed ratio for noise truncation.
3. The method according to claim 1, characterized in that, In step 2, the sub-pixel center coordinates of the weighted gray-level centroid method The calculation method is as follows: A symmetrical integration window is established with the peak abscissa as the center, and only gray values higher than the dynamic peak-shaving baseline are processed. Perform a weighted calculation on the pixels: in, The x-coordinate of the pixel within the symmetric integration window. This represents the pixel grayscale value at that coordinate.
4. The method according to claim 1, characterized in that, In step 4, the specific methods for local linear regression fitting and spatial interpolation are as follows: Collect healthy point clouds before and after the fault zone, fit local regression lines, and extract the direction vectors of the lines. coordinates of a point on the line ; To prevent the denominator from being divided by zero due to the vertical slope during spatial interpolation, the ordinate component of the direction vector is... By performing truncation protection, the safe longitudinal component is obtained. ; missing lines interpolated x-coordinate at the location The calculation is as follows: .
5. The method according to claim 1, characterized in that, In step 6, the specific method for extracting the real geometric feature point set is as follows: The high-fidelity center point set output in step 5 is subjected to topological compression using the Douglas-Peucker algorithm, while preserving the initial feature sequence under the set pixel tolerance constraints. Initialize the final feature set by forcibly pushing the first point of the initial feature sequence; set the last element of the final feature set as the dynamic reference point, traverse the points to be determined and subsequent reference points in the initial feature sequence, and calculate the interior angles at the points using vector dot product and cross product: If the interior angle is less than the set collinearity suppression threshold, a rigid topological bend is identified at this point, and it is pressed into the final feature set as a real feature point, while the dynamic reference point is updated synchronously; if it is greater than or equal to the threshold, it is determined to be a collinear pseudo-corner point and is removed; finally, the tail point is forcibly pressed in, and the real geometric feature point set is output.
6. An electronic device, characterized in that, The electronic device includes a processor and a memory, the memory storing at least one instruction or at least one program segment, the at least one instruction or the at least one program segment being loaded and executed by the processor to implement the line structured light center extraction method based on spatiotemporal inertial tracking and multidimensional adaptive reconstruction as described in any one of claims 1-4.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores at least one instruction or at least one program, which, when executed, is used to implement the line structured light center extraction method based on spatiotemporal inertial tracking and multidimensional adaptive reconstruction as described in any one of claims 1-4.