A sub-pixel center extraction method and device based on a laser image

CN122737221APending Publication Date: 2026-09-11ZHEJIANG HUAZHOU INTELLIGENT EQUIP CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202611009859.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-07
Publication Date
2026-09-11

AI Technical Summary

Technical Problem

[0004]然而,现有的激光亚像素提取方法在应对复杂工业工况时存在显著缺陷:在强噪声、高光或阴影干扰下提取精度易骤降且中心线发生严重漂移;在激光断线或光条畸变时极易出现断链与定位失效,难以同时兼顾高精度、强鲁棒性与实时性要求

Benefits of technology

在本申请的实施例中,针对于现有技术在强噪声、高光、阴影及断线场景下精度骤降、易断链且鲁棒性不足的问题,本申请提供了基于中心像素点沿法线方向的目标筛选区域确定亚像素中心集的解决方案,具体为一种基于激光图像的亚像素中心提取方法,包括:获取待处理激光图像,并依据所述待处理激光图像确定目标处理区域;依据所述目标处理区域确定像素级中心线、与之对应的中心像素集以及对应的目标法线方向;依据所述中心像素集和所述目标法线方向通过预设的第一约束条件确定目标筛选区域;其中,所述第一约束条件包括与所述目标法线方向的夹角小于预设角度阈值的区域;依据所述目标筛选区域确定有效像素集;依据所述有效像素集确定亚像素中心集。本申请解决了复杂工况下有效像素易受干扰导致拟合失真及中心线断链的问题,提升了亚像素定位精度、增强抗干扰能力并保证中心线连续完整。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122737221A_ABST
    Figure CN122737221A_ABST
Patent Text Reader

Abstract

The application provides a laser image-based sub-pixel center extraction method and device, the method comprising: acquiring a to-be-processed laser image, and determining a target processing region according to the to-be-processed laser image; determining a pixel-level center line, a corresponding center pixel set and a corresponding target normal direction according to the target processing region; determining a target screening region through a preset first constraint condition according to the center pixel set and the target normal direction; wherein the first constraint condition comprises a region with an included angle with the target normal direction less than a preset angle threshold; determining an effective pixel set according to the target screening region; and determining a sub-pixel center set according to the effective pixel set. The application solves the problem of fitting distortion and center line disconnection caused by the fact that effective pixels are easily disturbed under complex working conditions, improves sub-pixel positioning accuracy, enhances anti-interference ability and ensures the continuity and integrity of the center line.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, specifically to a method and apparatus for subpixel center extraction based on laser images. Background Technology

[0002] Line structured light 3D measurement and laser contour scanning systems are widely used in industrial inspection and reverse engineering. Their core component lies in the high-precision center extraction of laser stripes or spots. The general definition of laser sub-pixel center extraction methods is: by analyzing the gray-scale spatial distribution characteristics of the laser stripes in the laser image, the precise coordinates of the stripe center at the pixel level are calculated, thereby obtaining a continuous and complete laser centerline, providing a reliable data foundation for subsequent 3D shape reconstruction.

[0003] To improve extraction accuracy, existing laser subpixel center extraction techniques typically employ specific methods such as the gray-level centroid method, traditional Gaussian / parabolic fitting, or the Steger algorithm based on the Hessian matrix. In practice, these existing techniques generally select fixed neighboring pixels near the gray-level peak of the light stripe, or rely solely on a one-dimensional projection fitting using a normal in a single direction. By solving for the extreme points of the gray-level distribution or the parameters of the fitted curve, the subpixel center coordinates are directly output.

[0004] However, existing laser subpixel extraction methods have significant drawbacks when dealing with complex industrial conditions: the extraction accuracy is prone to a sharp drop and the centerline is severely drifted under strong noise, high light or shadow interference; and the chain breakage and positioning failure are very likely to occur when the laser line is broken or the light stripe is distorted, making it difficult to simultaneously meet the requirements of high precision, strong robustness and real-time performance.

[0005] It should be noted that the information in the background section above is only used to enhance the understanding of the background technology of this application, and therefore may include technical information that does not constitute technical information known or easily inferred by a person skilled in the art. Summary of the Invention

[0006] In view of the aforementioned problems, this application is proposed to provide a method and apparatus for sub-pixel center extraction based on laser images that overcomes or at least partially solves the aforementioned problems, comprising: A sub-pixel center extraction method based on laser images, comprising: Acquire the laser image to be processed, and determine the target processing area based on the laser image to be processed; Based on the target processing area, determine the pixel-level center line, the corresponding set of center pixels, and the corresponding target normal direction; The target filtering region is determined based on the central pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions whose angle with the target normal direction is less than a preset angle threshold. The effective pixel set is determined based on the target filtering region; The sub-pixel center set is determined based on the effective pixel set.

[0007] Further, the first constraint also includes: a region where the distance between the corresponding pixel in the center pixel set and the target normal direction is less than a preset distance threshold; the step of determining the target screening region based on the center pixel set and the target normal direction using the preset first constraint includes: An initial filtering region that meets the distance threshold is determined based on the central pixel set and the target normal direction; The target filtering region that meets the angle threshold is determined based on the center pixel set, the target normal direction, and the initial filtering region.

[0008] Further, the step of determining the effective pixel set based on the target filtering region includes: The effective pixel set is determined based on the target filtering area through a preset second constraint condition; wherein the second constraint condition includes: pixels whose gray values ​​are within a preset gray threshold range.

[0009] Furthermore, the method involves fitting sub-pixel localization using a preset one-dimensional Gaussian model; the one-dimensional Gaussian model is preset with grayscale amplitude conditions and background grayscale conditions; the step of determining the sub-pixel center set based on the effective pixel set further includes: The corresponding laser stripe pixel width is determined based on the target processing area; The light stripe width condition corresponding to the one-dimensional Gaussian model is determined based on the laser stripe pixel width; The sub-pixel center set is determined based on the effective pixel set and the target normal direction using the corresponding conditions of the one-dimensional Gaussian model.

[0010] Furthermore, the method also includes: The first Euclidean distance between adjacent sub-pixels and the curvature difference of the corresponding fitted curves at adjacent sub-pixels are determined based on the sub-pixel center set. Based on the sub-pixel center set, determine the first offset angle between the line connecting each sub-pixel point and its corresponding center pixel point and the target normal direction; The sub-pixel center set is updated based on the sub-pixel center set, the first Euclidean distance, the curvature difference, and the first offset angle using a third constraint condition.

[0011] Furthermore, the method also includes: Acquire adjacent frame laser images corresponding to the laser image to be processed, and determine the adjacent frame sub-pixel set based on the adjacent frame laser images; The second Euclidean distance between sub-pixel points corresponding to spatial positions and the second offset angle between the lines connecting the sub-pixel points corresponding to spatial positions and the corresponding center pixel points are determined based on the sub-pixel center set and the adjacent frame sub-pixel set. The sub-pixel center set is updated based on the sub-pixel center set, the second Euclidean distance, and the second offset angle using a fourth constraint condition.

[0012] Furthermore, the method also includes: The adjacent frame sub-pixel sets are updated based on the sub-pixel center set, the second Euclidean distance, and the second offset angle using a fourth constraint condition; The subpixel center line is generated by weighted smooth fitting based on the updated subpixel center set and the updated adjacent frame subpixel set; wherein the weight coefficient corresponding to the subpixel center set is greater than the weight coefficient corresponding to the adjacent frame subpixel set.

[0013] A sub-pixel center extraction device based on laser images, comprising: The positioning module is used to acquire the laser image to be processed and determine the target processing area based on the laser image to be processed; The center and normal determination module is used to determine the pixel-level center line, the corresponding set of center pixels, and the corresponding target normal direction based on the target processing area. The target filtering region determination module is used to determine the target filtering region based on the center pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions whose angle with the target normal direction is less than a preset angle threshold. The effective pixel set determination module is used to determine the effective pixel set based on the target screening region; The sub-pixel center set determination module is used to determine the sub-pixel center set based on the effective pixel set.

[0014] A computer electronic device includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor. When executed by the processor, the computer program implements the steps of the sub-pixel center extraction method based on laser images as described above.

[0015] A computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the laser image-based subpixel center extraction method as described above.

[0016] This application has the following advantages: In the embodiments of this application, addressing the problems of drastic accuracy drop, easy chain breakage, and insufficient robustness of existing technologies in scenarios with strong noise, high light, shadow, and broken lines, this application provides a solution for determining the sub-pixel center set based on the target screening region along the normal direction of the center pixel. Specifically, it is a sub-pixel center extraction method based on laser images, including: acquiring a laser image to be processed, and determining a target processing region based on the laser image to be processed; determining a pixel-level centerline, a corresponding set of center pixels, and a corresponding target normal direction based on the target processing region; determining a target screening region based on the set of center pixels and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions where the angle with the target normal direction is less than a preset angle threshold; determining an effective pixel set based on the target screening region; and determining a sub-pixel center set based on the effective pixel set. This application solves the problem of effective pixels being easily interfered with under complex working conditions, leading to fitting distortion and centerline chain breakage, improving sub-pixel positioning accuracy, enhancing anti-interference capability, and ensuring the continuity and integrity of the centerline. Attached Figure Description

[0017] To more clearly illustrate the technical solution of this application, the drawings used in the description of this application will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0018] Figure 1 This is a flowchart illustrating the steps of a sub-pixel center extraction method based on laser images, provided in one embodiment of this application. Figure 2 This is a structural block diagram of a sub-pixel center extraction device based on laser images provided in one embodiment of this application; Figure 3 This is a schematic diagram of the structure of a computer electronic device provided in an embodiment of this application; The attached figures are labeled as follows: 1. Computer electronic device; 2. External device; 3. Processing unit; 4. Bus; 5. Network adapter; 6. I / O interface; 7. Display; 8. Memory; 9. Random access memory; 10. Cache memory; 11. Storage system; 12. Program / utility; 13. Program module. Detailed Implementation

[0019] To make the objectives, features, and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are only some, not all, of the embodiments of this application. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.

[0020] The inventors, through analysis of existing technologies, discovered that current mainstream extraction methods in the industry have significant shortcomings: 1) Gray-scale centroid method: The calculation logic is simple and the operation speed is fast, and it is mostly used in low-end industrial equipment. However, this method is extremely sensitive to image noise, high light reflection, and shadows. In complex scenes, the positioning error is generally greater than 0.3 pixels, which cannot meet the requirements of high-precision measurement. 2) Traditional Gaussian / parabolic fitting method: This method utilizes the characteristic that the grayscale of the laser stripe approximates a Gaussian distribution for fitting, achieving an accuracy of 0.08~0.1 pixels in typical scenes. However, this method does not remove outliers, and strong light spots and salt-and-pepper noise will severely distort the fitted curve. Furthermore, it cannot handle laser line breakage issues. 3) Steger algorithm: Based on the Hessian matrix, it solves for the light stripe normal and center. It has high theoretical accuracy, but the computational load of second-order matrix operations is huge. The frame rate is insufficient in embedded devices and real-time measurement scenarios, which limits its application. 4) Conventional normal-guided method: It relies on fitting in only one direction and does not combine light stripe width adaptation, line break repair, and inter-frame timing constraints. It has poor robustness under dynamic and occlusion conditions, and lacks systematic processing of highlights, shadows, lines break and salt-and-pepper noise.

[0021] Therefore, traditional laser subpixel extraction methods mostly rely on fixed neighborhoods or single-direction projection, lacking an adaptive screening mechanism for effective pixels in the neighborhood along the normal direction. This results in outlier interference points directly participating in the fitting and distorting the curve. Furthermore, the lack of multidimensional constraints in the effective point extraction process leads to insufficient robustness under complex working conditions.

[0022] Meanwhile, in actual industrial settings, the workpieces being tested commonly suffer from problems such as high-gloss reflection of metal, stray light from the environment, localized shadows, laser beam distortion, and equipment vibration.

[0023] Based on this, one of the core technical concepts of this application is to first dynamically delineate the target screening region corresponding to each pixel by accurately estimating the target normal direction, then accurately screen out the effective pixel set along the normal direction using constraints such as angles, and finally solve for the sub-pixel center based on the effective pixel set using adaptive Gaussian fitting. This concept upgrades the normal direction to a spatial guiding benchmark for effective neighborhood points, eliminates interfering pixels from the source, and adaptively matches the light stripe scale, thereby achieving high-precision and robust sub-pixel positioning under complex working conditions.

[0024] Reference Figure 1 This application illustrates a method for sub-pixel center extraction based on laser images, comprising: S110. Acquire the laser image to be processed, and determine the target processing area based on the laser image to be processed; S120. Determine the pixel-level center line, the corresponding set of center pixels, and the corresponding target normal direction based on the target processing area. S130. Determine the target screening region based on the center pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes the region whose angle with the target normal direction is less than a preset angle threshold. S140. Determine the effective pixel set based on the target filtering region; S150. Determine the sub-pixel center set based on the effective pixel set.

[0025] In the embodiments of this application, addressing the problems of drastic accuracy drop, easy chain breakage, and insufficient robustness of existing technologies in scenarios with strong noise, high light, shadow, and broken lines, this application provides a solution for determining the sub-pixel center set based on the target screening region along the normal direction of the center pixel. Specifically, it is a sub-pixel center extraction method based on laser images, including: acquiring a laser image to be processed, and determining a target processing region based on the laser image to be processed; determining a pixel-level centerline, a corresponding set of center pixels, and a corresponding target normal direction based on the target processing region; determining a target screening region based on the set of center pixels and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions where the angle with the target normal direction is less than a preset angle threshold; determining an effective pixel set based on the target screening region; and determining a sub-pixel center set based on the effective pixel set. This application solves the problem of effective pixels being easily interfered with under complex working conditions, leading to fitting distortion and centerline chain breakage, improving sub-pixel positioning accuracy, enhancing anti-interference capability, and ensuring the continuity and integrity of the centerline.

[0026] The following will further describe a sub-pixel center extraction method based on laser images in this exemplary embodiment.

[0027] It should be noted that the pixel-level centerline is a discrete pixel sequence representing the geometric direction of the laser stripe, and the center pixel set is composed of the set of pixel coordinates constituting the centerline. The target normal direction can be a vector direction perpendicular to or nearly perpendicular to the local direction of the pixel-level centerline, used to guide the search benchmark for effective pixels. The target processing region is a local image window used to limit the calculation range of subsequent algorithms. The region with an angle less than a preset angle threshold in the first constraint condition refers to a fan-shaped or cone-shaped search space expanded in the neighborhood with the target normal direction as the axis of symmetry; this space is used to exclude lateral interference pixels. The effective pixel set is a set of candidate points that satisfy the first constraint condition and possess the grayscale characteristics of the light stripe. The sub-pixel center set is a sub-pixel-level coordinate sequence obtained by a fitting algorithm on the effective pixel set.

[0028] By introducing the target normal direction as a spatial guidance reference, the embodiments of this application can eliminate outlier interference pixels from the source, avoid fitting distortion caused by fixed neighborhood or single-direction projection, and thus improve the positioning accuracy under complex working conditions.

[0029] As an example, the preset angle threshold can be dynamically configured according to the width and curvature of the laser stripe, for example, set to a value between 15 degrees and 35 degrees, and the included angle of the corresponding fan-shaped or conical region is between 30 degrees and 70 degrees, preferably 45 degrees.

[0030] As described in step S110, the laser image to be processed is acquired, and the target processing area is determined based on the laser image to be processed.

[0031] It should be noted that the laser image to be processed can be the original laser grayscale image I(x,y).

[0032] In one specific implementation, the original laser grayscale image I(x,y) can be preprocessed as follows: Bilateral filtering is used to preserve edge noise reduction, with spatial scale sigma_s=1~3 and grayscale scale sigma_r=10~20; adaptive background subtraction is achieved through local 5×5 windows to eliminate uneven background; grayscale attenuation is performed on highlight pixels with grayscale greater than the global mean +3σ to suppress highlights; morphological processing is performed using 3×3 opening operation and 5×5 closing operation to remove salt-and-pepper noise and fill light bar holes.

[0033] In a specific implementation, bilateral filtering can be implemented in the following way: Bilateral filtering considers both spatial distance and grayscale similarity to preserve edges while denoising. The formula is as follows:

[0034] The spatial weights can be expressed as:

[0035] Gray-scale weights can be expressed as:

[0036] The preferred parameters are: =2, =15.

[0037] In a specific implementation, adaptive background subtraction can be achieved in the following way: Using a 5×5 sliding window, calculate the mean I and standard deviation of the window's grayscale values. Segmentation threshold: T = T + 2 Pixels with a gray level below the threshold are identified as background and subjected to gray level reduction processing.

[0038] In a specific implementation, specular suppression can be achieved in the following way: Statistical global grayscale mean Compared with global standard deviation The attenuation is applied to highlight pixels using the following formula:

[0039] In one specific implementation, coarse positioning of the laser area can be performed in the following way: The edges of the light stripes are enhanced using 3×3 and 5×5 multi-scale gradient operators; iterative thresholding is performed with the gray-scale mean as the initial threshold to complete image binarization; effective regions with an area greater than 50 pixels are retained by connected component filtering; and the initial pixel-level center line C_0 with a single pixel width is extracted using distance transformation and geometric center method.

[0040] As described in step S120, a pixel-level center line, a corresponding set of center pixels, and a corresponding target normal direction are determined based on the target processing area.

[0041] In a specific implementation, the target normal direction can be determined in the following way: For each skeleton point P_i(x_i,y_i) on C_0, a set of 16 neighboring gray-level points is selected for PCA principal component analysis. The eigenvector corresponding to the smallest eigenvalue of the covariance matrix is ​​the laser stripe normal direction \vec{n}_i. A 3×3 window Gaussian weight is used to perform weighted smoothing on the neighboring normals to suppress abrupt changes in the normal direction and adapt to curved laser stripes.

[0042] In a specific implementation, PCA principal component analysis can be performed in the following way: A covariance matrix is ​​constructed for the 16-neighbor pixels of the skeleton point for normal calculation, as shown in the following formula:

[0043] After eigenvalue decomposition of the covariance matrix, the eigenvector corresponding to the smallest eigenvalue is the direction of the laser stripe normal.

[0044] As described in step S130, a target filtering region is determined based on the central pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions whose angle with the target normal direction is less than a preset angle threshold.

[0045] In a specific implementation, the target filtering region can be determined in the following way: Centered on the skeleton point, select a neighborhood of ±3 to ±6 pixels along the normal direction \vec{n}_i; divide the neighborhood into 45° intervals, retain only pixels with an angle ≤22.5° with the normal, and remove lateral interference; remove shadow points with gray levels lower than the local mean +2σ and highlight outliers with gray levels higher than the local mean +3σ.

[0046] As described in step S140, the effective pixel set is determined based on the target filtering region.

[0047] It should be noted that this step can preserve continuous valid pixels in the normal direction and remove isolated noise points.

[0048] In one embodiment of this application, the first constraint further includes: a region where the distance between the corresponding pixel in the center pixel set and the target normal direction is less than a preset distance threshold; the specific process of "determining the target screening region based on the center pixel set and the target normal direction by using the preset first constraint" in step S130 can be further explained in conjunction with the following description.

[0049] An initial filtering region that meets the distance threshold is determined based on the central pixel set and the target normal direction; The target filtering region that meets the angle threshold is determined based on the center pixel set, the target normal direction, and the initial filtering region.

[0050] It should be noted that the preset distance threshold is used to limit the search depth along the normal direction, preventing excessive expansion of the search range from introducing background noise into non-light stripe areas. The initial screening region is a rectangular, strip-shaped, or columnar neighborhood extending along the normal direction, constrained by the preset distance threshold. The target screening region is a fan-shaped or cone-shaped sub-region formed by further superimposing the preset angle threshold constraint on the initial screening region.

[0051] By employing a screening strategy based on a distance range superimposed with an angle range, the embodiments of this application can quickly converge to the potential distribution band of effective pixels with low computational overhead, thereby improving screening efficiency.

[0052] As an example, the preset distance threshold can be adaptively set according to the pixel width of the laser stripe, for example, set to a range of ±3 pixels to ±6 pixels.

[0053] As an example, the initial filtering area can be a set of pixel grids that extends to both sides along the target normal direction from each point of the central pixel set as the starting point, and is covered by the preset distance threshold.

[0054] As an example, the target filtering region can be determined by calculating the angle between each candidate pixel in the initial filtering region and the normal vector, and retaining only pixels with an angle less than or equal to the preset angle threshold.

[0055] In one embodiment of this application, the specific process of "determining the effective pixel set based on the target screening region" in step S140 can be further explained in conjunction with the following description.

[0056] The effective pixel set is determined based on the target filtering area through a preset second constraint condition; wherein the second constraint condition includes: pixels whose gray values ​​are within a preset gray threshold range.

[0057] It should be noted that the second constraint is used to further filter outoutliers from the candidate pixels after spatial screening whose light intensity does not meet the light stripe distribution characteristics. The preset grayscale threshold range is a closed interval that limits the upper and lower limits of the effective light stripe grayscale, used to eliminate dark pixels caused by shadow occlusion and high-saturation pixels caused by strong light reflection.

[0058] By introducing grayscale amplitude constraints, the embodiments of this application can ensure that all pixels participating in subsequent fitting belong to the true light stripe energy distribution, thus avoiding abnormal grayscale values ​​from distorting the fitting curve.

[0059] As an example, the grayscale threshold range can be dynamically calculated based on the grayscale mean and standard deviation of the local sliding window, or it can be set as an exclusionary threshold condition, for example, removing shadow points with grayscale values ​​lower than the local mean + 2σ, and removing highlight outliers with grayscale values ​​higher than the local mean + 3σ.

[0060] As an example, the effective pixel set can be constructed by traversing the target filtering area and retaining only pixels whose grayscale values ​​meet the grayscale threshold range conditions.

[0061] In an additional embodiment of this application, the method involves fitting sub-pixel localization using a preset one-dimensional Gaussian model; the one-dimensional Gaussian model is preset with grayscale amplitude conditions and background grayscale conditions; the specific process of "determining the sub-pixel center set based on the effective pixel set" in step S150 can be further explained in conjunction with the following description.

[0062] The corresponding laser stripe pixel width is determined based on the target processing area; The light stripe width condition corresponding to the one-dimensional Gaussian model is determined based on the laser stripe pixel width; The sub-pixel center set is determined based on the effective pixel set and the target normal direction using the corresponding conditions of the one-dimensional Gaussian model.

[0063] It should be noted that the one-dimensional Gaussian model is a mathematical function used to describe the gray-level energy distribution of the laser stripe along the normal direction. Its core parameters include the center position, stripe width, gray-level amplitude, and background gray-level. The laser stripe pixel width can be obtained by calculating the projection span of the effective pixel set within the target processing area along the normal direction. The stripe width condition is a model parameter constraint dynamically initialized according to the actual stripe scale, used to limit the search range of the stripe width parameter during the fitting process.

[0064] By adaptively matching the light stripe width condition, the embodiments of this application can avoid the mismatch problem of fixed parameter fitting in light stripe distortion or width variation scenarios, and improve the robustness of sub-pixel positioning.

[0065] As an example, the light stripe width condition can be set to a range of one-third to one-half of the width of the laser stripe pixel.

[0066] As an example, the grayscale amplitude condition can be set to 80% to 100% of the maximum grayscale value of the effective pixel set, and the background grayscale condition can be set to 50% to 80% of the minimum grayscale value of the effective pixel set.

[0067] In a specific implementation, the sub-pixel center set can be determined in the following way: For the selected effective point set Si, a one-dimensional Gaussian model is established, as shown in the following formula:

[0068] In the formula, t is the coordinate of the normal direction. For sub-pixel center, A is the width of the light stripe, A is the grayscale value, and B is the background grayscale.

[0069] The Gaussian scale is adaptively initialized based on the laser stripe pixel width D, with constraints D / 3 ≤ σ ≤ D / 2. Robust weighted least squares iterative optimization is employed, setting the weights of outliers with residuals greater than 2σ to 0.05~0.1 to reduce outlier interference. Finally, the sub-pixel center coordinates are obtained. Positioning accuracy ≤ 0.08 pixels.

[0070] In an additional embodiment of this application, the method further includes: The first Euclidean distance between adjacent sub-pixels and the curvature difference of the corresponding fitted curves at adjacent sub-pixels are determined based on the sub-pixel center set. Based on the sub-pixel center set, determine the first offset angle between the line connecting each sub-pixel point and its corresponding center pixel point and the target normal direction; The sub-pixel center set is updated based on the sub-pixel center set, the first Euclidean distance, the curvature difference, and the first offset angle using a third constraint condition.

[0071] It should be noted that the first Euclidean distance is used to quantify the spatial dispersion of adjacent sub-pixels to detect potential line breaks or jumps. The curvature difference is used to characterize the smoothness change of the centerline orientation at adjacent sub-pixels to identify abnormally curved or distorted regions. The first offset angle is used to measure the degree of deviation of the sub-pixel from the theoretical normal direction to evaluate the geometric consistency of the positioning results.

[0072] By introducing spatial topology and geometric constraints, the embodiments of this application can automatically identify and eliminate abnormal positioning points that do not conform to physical continuity, and repair centerline breaks caused by occlusion or noise.

[0073] As an example, the threshold for determining the first Euclidean distance can be set to a range of 2 to 3 pixels. As an example, the curvature difference threshold can be set to no more than 0.1 radians.

[0074] As an example, the first offset angle threshold can be set to no more than 15 degrees.

[0075] In an additional embodiment of this application, the method further includes: Acquire adjacent frame laser images corresponding to the laser image to be processed, and determine the adjacent frame sub-pixel set based on the adjacent frame laser images; The second Euclidean distance between sub-pixel points corresponding to spatial positions and the second offset angle between the lines connecting the sub-pixel points corresponding to spatial positions and the corresponding center pixel points are determined based on the sub-pixel center set and the adjacent frame sub-pixel set. The sub-pixel center set is updated based on the sub-pixel center set, the second Euclidean distance, and the second offset angle using a fourth constraint condition.

[0076] It should be noted that the adjacent frame sub-pixel set is a set of sub-pixel coordinates extracted from preceding or subsequent time frames, used to provide a temporal reference. The second Euclidean distance is used to quantify the drift of the positioning results between the current frame and adjacent frames at the same spatial location. The second offset angle is used to quantify the rotational change in the centerline direction between the two frames.

[0077] As an example, the adjacent frame laser images can be two frames immediately before and after the laser image to be processed. These adjacent frame laser images can be acquired continuously using a global shutter camera at a fixed frame rate.

[0078] As an example, the threshold for determining the second Euclidean distance can be set to no more than 0.15 pixels.

[0079] As an example, the second offset angle threshold can be set to no more than 10 degrees.

[0080] In one specific implementation, breakpoints in adjacent sub-pixels can be determined and repaired in the following way: The system identifies breaks as points where the Euclidean distance between adjacent sub-pixels is greater than 2 pixels. Only breaks with a curvature difference ≤ 0.1 rad and a direction difference ≤ 15° are matched and connected. Cubic spline interpolation is used to generate smooth transition curves between breaks to repair centerline breaks caused by occlusion and shadows.

[0081] In an additional embodiment of this application, the method further includes: The adjacent frame sub-pixel sets are updated based on the sub-pixel center set, the second Euclidean distance, and the second offset angle using a fourth constraint condition; The subpixel center line is generated by weighted smooth fitting based on the updated subpixel center set and the updated adjacent frame subpixel set; wherein the weight coefficient corresponding to the subpixel center set is greater than the weight coefficient corresponding to the adjacent frame subpixel set.

[0082] It should be noted that the process of updating the sub-pixel set of adjacent frames involves applying the temporal constraint logic of the current frame in reverse to the historical frame data to achieve dual-end temporal filtering. The weighted smoothing fitting is a calculation process that combines the coordinate data of the current frame and adjacent frames and performs linear or nonlinear fusion according to a preset ratio.

[0083] By assigning a higher weighting coefficient to the current frame, this embodiment of the application uses timing information to suppress noise while prioritizing the preservation of the measurement authenticity at the current moment, thus avoiding the loss of high-frequency details caused by excessive smoothing.

[0084] As an example, the weight coefficient corresponding to the sub-pixel center set can be set to 0.6, and the weight coefficient corresponding to the adjacent frame sub-pixel set can be set to 0.2.

[0085] As an example, the weighted smoothing fitting can employ a weighted average strategy over three consecutive frames, with the current frame having the highest weight.

[0086] As an example, the subpixel centerline can be generated by performing cubic spline interpolation or least squares polynomial fitting on the weighted fused coordinate sequence.

[0087] In a specific implementation, timing consistency filtering can be achieved in the following way: Constraints are set for continuously acquired image frames: the distance between the center line points of adjacent frames at the same position is ≤0.15 pixels and the directional angle is ≤10° to remove abrupt abnormal points; a weighted average smoothing of 3 consecutive frames is used, with the current frame having a weight of 0.6 and the preceding and following frames each having a weight of 0.2 to suppress positioning jitter in motion and vibration scenes.

[0088] As the apparatus embodiment is basically similar to the method embodiment, it is described in a relatively simple manner. For relevant details, please refer to the description of the method embodiment.

[0089] Reference Figure 2 This application illustrates a sub-pixel center extraction device based on a laser image, comprising: The positioning module 210 is used to acquire the laser image to be processed and determine the target processing area based on the laser image to be processed; The center and normal determination module 220 is used to determine the pixel-level center line, the corresponding set of center pixels, and the corresponding target normal direction based on the target processing area. The target filtering region determination module 230 is used to determine the target filtering region based on the center pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions whose angle with the target normal direction is less than a preset angle threshold. The effective pixel set determination module 240 is used to determine the effective pixel set based on the target screening region; The sub-pixel center set determination module 250 is used to determine the sub-pixel center set based on the effective pixel set.

[0090] In one embodiment of this application, the first constraint further includes: a region whose distance from the corresponding pixel in the center pixel set along the target normal direction is less than a preset distance threshold; the target filtering region determination module 230 includes: The initial filtering region determination submodule is used to determine an initial filtering region that meets the distance threshold based on the center pixel set and the target normal direction; The target filtering region determination submodule is used to determine the target filtering region that meets the angle threshold based on the center pixel set, the target normal direction, and the initial filtering region.

[0091] In one embodiment of this application, the effective pixel set determination module 240 includes: The effective pixel set determination submodule is used to determine the effective pixel set based on the target screening area through a preset second constraint condition; wherein, the second constraint condition includes: pixels whose gray values ​​are within a preset gray value threshold range.

[0092] In one embodiment of this application, the device involves fitting sub-pixel localization using a preset one-dimensional Gaussian model; the one-dimensional Gaussian model is preset with grayscale amplitude conditions and background grayscale conditions; the sub-pixel center set determination module 250 further includes: The laser stripe pixel width determination submodule is used to determine the corresponding laser stripe pixel width based on the target processing area; The light stripe width condition determination submodule is used to determine the light stripe width condition corresponding to the one-dimensional Gaussian model based on the width of the laser stripe pixels. The sub-pixel center set determination submodule is used to determine the sub-pixel center set based on the effective pixel set and the target normal direction through the corresponding conditions of the one-dimensional Gaussian model.

[0093] In one embodiment of this application, the apparatus further includes: The first adjacent sub-pixel processing module is used to determine the first Euclidean distance between adjacent sub-pixels and the curvature difference of the corresponding fitted curves at adjacent sub-pixels based on the sub-pixel center set. The second adjacent sub-pixel processing module is used to determine, based on the sub-pixel center set, the first offset angle between the line connecting each sub-pixel and its corresponding center pixel and the target normal direction. The first sub-pixel center set update module is used to update the sub-pixel center set based on the sub-pixel center set, the first Euclidean distance, the curvature difference, and the first offset angle through a third constraint condition.

[0094] In one embodiment of this application, the apparatus further includes: The adjacent frame acquisition module is used to acquire adjacent frame laser images corresponding to the laser image to be processed, and to determine the adjacent frame sub-pixel set based on the adjacent frame laser images; The adjacent frame processing module is used to determine, based on the sub-pixel center set and the adjacent frame sub-pixel set, the second Euclidean distance between sub-pixel points corresponding to spatial positions, and the second offset angle between the line connecting the sub-pixel point corresponding to the spatial position and the corresponding center pixel point. The second sub-pixel center set update module is used to update the sub-pixel center set based on the sub-pixel center set, the second Euclidean distance, and the second offset angle through a fourth constraint condition.

[0095] In one embodiment of this application, the apparatus further includes: The adjacent frame sub-pixel set update module is used to update the adjacent frame sub-pixel set based on the sub-pixel center set, the second Euclidean distance, and the second offset angle through a fourth constraint condition; The subpixel centerline generation module is used to generate subpixel centerlines by weighted smooth fitting based on the updated subpixel center set and the updated adjacent frame subpixel sets; wherein the weight coefficient corresponding to the subpixel center set is greater than the weight coefficient corresponding to the adjacent frame subpixel sets.

[0096] Reference Figure 3 The illustration shows a computer electronic device for implementing a sub-pixel center extraction method based on laser images according to this application, which may specifically include the following: The aforementioned computer electronic device 1 is manifested in the form of a general-purpose computing device. The components of the computer electronic device 1 may include, but are not limited to: one or more processors or processing units 3, memory 8, and a bus 4 connecting different system components (including memory 8 and processing unit 3).

[0097] Bus 4 represents one or more of several bus architectures, including memory buses or memory controllers, peripheral buses, graphics acceleration ports, processors, or local buses using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Audio / Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0098] Computer electronic device 1 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer electronic device 1, including volatile and non-volatile media, removable and non-removable media.

[0099] Memory 8 may include computer system readable media in the form of volatile memory, such as random access memory 9 and / or cache memory 10. Computer electronic device 1 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 11 may be used to read and write non-removable, non-volatile magnetic media (commonly referred to as a "hard disk drive"). Although Figure 3 As not shown, a disk drive for reading and writing to a removable non-volatile disk (such as a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (such as a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 4 via one or more data media interfaces. The memory may include at least one program product having a set (e.g., at least one) of program modules 13 configured to perform the functions of the embodiments of this application.

[0100] A program / utility 12 having a set (at least one) of program modules 13 may be stored, for example, in memory. Such program modules 13 include—but are not limited to—an operating system, one or more application programs, other program modules 13, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 13 typically perform the functions and / or methods described in the embodiments of this application.

[0101] The computer electronic device 1 can also communicate with one or more external devices 2 (e.g., keyboard, pointing device, display 7, camera, etc.), and with one or more devices that enable an operator to interact with the computer electronic device 1, and / or with any device that enables the computer electronic device 1 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through the I / O interface 6. Furthermore, the computer electronic device 1 can also communicate with one or more networks (e.g., local area network (LAN)), wide area network (WAN), and / or public networks (e.g., the Internet) through the network adapter 5. Figure 3 As shown, network adapter 5 communicates with other modules of computer electronic device 1 via bus 4. It should be understood that, although... Figure 3 Not shown, it may be combined with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing unit 3, external disk drive array, RAID system, tape drive and data backup storage system 11, etc.

[0102] The processing unit 3 executes various functional applications and data processing by running programs stored in memory 8, such as implementing a sub-pixel center extraction method based on laser images provided in the embodiments of this application.

[0103] That is, when the processing unit 3 executes the above procedure, it performs the following: acquiring a laser image to be processed, and determining a target processing area based on the laser image to be processed; determining a pixel-level center line, a corresponding set of center pixels, and a corresponding target normal direction based on the target processing area; determining a target filtering area based on the set of center pixels and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes areas where the angle with the target normal direction is less than a preset angle threshold; determining an effective pixel set based on the target filtering area; and determining a sub-pixel center set based on the effective pixel set.

[0104] In this application embodiment, this application also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a sub-pixel center extraction method based on laser images as provided in all embodiments of this application.

[0105] That is, when the program is executed by the processor, it performs the following: acquiring a laser image to be processed, and determining a target processing area based on the laser image to be processed; determining a pixel-level center line, a corresponding set of center pixels, and a corresponding target normal direction based on the target processing area; determining a target filtering area based on the set of center pixels and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes areas where the angle with the target normal direction is less than a preset angle threshold; determining an effective pixel set based on the target filtering area; and determining a sub-pixel center set based on the effective pixel set.

[0106] Any combination of one or more computer-readable media may be used. A computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium can be, for example—but not limited to—an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this document, a computer-readable storage medium can be any tangible medium that contains or stores a program that can be used by or in connection with an instruction execution system, apparatus, or device.

[0107] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including—but not limited to—electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of transmitting, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0108] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof. These programming languages ​​include object-oriented programming languages ​​such as Java, Smalltalk, and C++, as well as conventional procedural programming languages ​​such as C or similar languages. The program code can be executed entirely on the operator's computer, partially on the operator's computer, as a standalone software package, partially on the operator's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the operator's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider). The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably.

[0109] Although preferred embodiments of the present application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of the embodiments of the present application.

[0110] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal device. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or terminal device that includes said element.

[0111] The above provides a detailed description of the sub-pixel center extraction method and apparatus based on laser images provided in this application. Specific examples have been used to illustrate the principles and implementation methods of this application. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A sub-pixel center extraction method based on laser images, characterized in that, include: Acquire the laser image to be processed, and determine the target processing area based on the laser image to be processed; Based on the target processing area, determine the pixel-level center line, the corresponding set of center pixels, and the corresponding target normal direction; The target filtering region is determined based on the central pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions whose angle with the target normal direction is less than a preset angle threshold. The effective pixel set is determined based on the target filtering region; The sub-pixel center set is determined based on the effective pixel set.

2. The method according to claim 1, characterized in that, The first constraint further includes: a region where the distance between the corresponding pixel in the center pixel set and the target normal direction is less than a preset distance threshold; the step of determining the target screening region based on the center pixel set and the target normal direction using the preset first constraint includes: An initial filtering region that meets the distance threshold is determined based on the central pixel set and the target normal direction; The target filtering region that meets the angle threshold is determined based on the center pixel set, the target normal direction, and the initial filtering region.

3. The method according to claim 1, characterized in that, The step of determining the effective pixel set based on the target filtering region includes: The effective pixel set is determined based on the target filtering area through a preset second constraint condition; wherein the second constraint condition includes: pixels whose gray values ​​are within a preset gray threshold range.

4. The method according to claim 1, characterized in that, The method involves fitting sub-pixel localization using a preset one-dimensional Gaussian model; the one-dimensional Gaussian model has preset grayscale amplitude conditions and background grayscale conditions; the step of determining the sub-pixel center set based on the effective pixel set further includes: The corresponding laser stripe pixel width is determined based on the target processing area; The light stripe width condition corresponding to the one-dimensional Gaussian model is determined based on the laser stripe pixel width; The sub-pixel center set is determined based on the effective pixel set and the target normal direction using the corresponding conditions of the one-dimensional Gaussian model.

5. The method according to claim 1, characterized in that, The method further includes: The first Euclidean distance between adjacent sub-pixels and the curvature difference of the corresponding fitted curves at adjacent sub-pixels are determined based on the sub-pixel center set. Based on the sub-pixel center set, determine the first offset angle between the line connecting each sub-pixel point and its corresponding center pixel point and the target normal direction; The sub-pixel center set is updated based on the sub-pixel center set, the first Euclidean distance, the curvature difference, and the first offset angle using a third constraint condition.

6. The method according to claim 1, characterized in that, The method further includes: Acquire adjacent frame laser images corresponding to the laser image to be processed, and determine the adjacent frame sub-pixel set based on the adjacent frame laser images; The second Euclidean distance between sub-pixel points corresponding to spatial positions and the second offset angle between the lines connecting the sub-pixel points corresponding to spatial positions and the corresponding center pixel points are determined based on the sub-pixel center set and the adjacent frame sub-pixel set. The sub-pixel center set is updated based on the sub-pixel center set, the second Euclidean distance, and the second offset angle using a fourth constraint condition.

7. The method according to claim 6, characterized in that, The method further includes: The adjacent frame sub-pixel sets are updated based on the sub-pixel center set, the second Euclidean distance, and the second offset angle using a fourth constraint condition; The subpixel center line is generated by weighted smooth fitting based on the updated subpixel center set and the updated adjacent frame subpixel set; wherein the weight coefficient corresponding to the subpixel center set is greater than the weight coefficient corresponding to the adjacent frame subpixel set.

8. A sub-pixel center extraction device based on laser images, characterized in that, include: The positioning module is used to acquire the laser image to be processed and determine the target processing area based on the laser image to be processed; The center and normal determination module is used to determine the pixel-level center line, the corresponding set of center pixels, and the corresponding target normal direction based on the target processing area. The target filtering region determination module is used to determine the target filtering region based on the center pixel set and the target normal direction through a preset first constraint condition; wherein, the first constraint condition includes regions whose angle with the target normal direction is less than a preset angle threshold. The effective pixel set determination module is used to determine the effective pixel set based on the target screening region; The sub-pixel center set determination module is used to determine the sub-pixel center set based on the effective pixel set.

9. A computer electronic device, characterized in that, The method includes a processor, a memory, and a computer program stored in the memory and capable of running on the processor, wherein the computer program, when executed by the processor, implements the steps of the sub-pixel center extraction method based on laser images as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, which, when executed by a processor, implements the steps of the subpixel center extraction method based on laser images as described in any one of claims 1 to 7.