Centroid extraction method, lidar, robot, and storage medium

By employing an asymmetric Gaussian convolution kernel in the lidar to perform segmented filtering of the echo signal, the problem of inaccurate centroid extraction in existing technologies is solved, thereby improving ranging accuracy.

CN121613426BActive Publication Date: 2026-05-01SHENZHEN CAMSENSE TECHNOLOGIES CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN CAMSENSE TECHNOLOGIES CO LTD
Filing Date
2026-01-30
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing filtering methods cannot perfectly match the energy distribution of the light spot, resulting in inaccurate centroid extraction of lidar and affecting ranging accuracy.

Method used

The original echo signal is segmented and filtered using an asymmetric Gaussian convolution kernel. The asymmetric Gaussian convolution kernel is matched differently for each signal segment curve to improve the filtering effect and extract a more accurate centroid.

Benefits of technology

It improves the ranging accuracy of lidar, effectively filters out high-frequency noise interference by accurately fitting the local shape of the signal, enhances the peak response value, and improves the accuracy of centroid extraction.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121613426B_ABST
    Figure CN121613426B_ABST
Patent Text Reader

Abstract

The embodiment of the application relates to the technical field of laser radar, and discloses a centroid extraction method, a laser radar, a robot and a storage medium, the centroid extraction method first acquires an original echo signal curve output after a target object is detected by the laser radar, divides the original echo signal curve into N continuous signal segment curves, determines an asymmetric Gaussian convolution kernel matched with each signal segment curve, then performs convolution operation on the asymmetric Gaussian convolution kernel and original energy values in the signal segment curve to obtain first target energy values corresponding to the signal segment curve, and the same is repeated until M first target energy values are obtained, and finally a centroid is extracted according to the M first target energy values and corresponding pixel positions. The method adopts the asymmetric Gaussian convolution kernel to perform the convolution operation, accurately fits local shapes of signals, differentiates and matches the asymmetric Gaussian convolution kernel, improves the accuracy of centroid extraction, and further improves the ranging accuracy of the laser radar.
Need to check novelty before this filing date? Find Prior Art

Description

Centroid extraction methods, lidar, robots and storage media Technical Field

[0001] The embodiments of the present invention relate to the field of lidar technology, and in particular to a centroid extraction method, lidar, robot, and storage medium. Background Technology

[0002] In fields such as lidar and high-precision optical imaging, centroid extraction of echo signals based on photosensitive pixel arrays is a core step in achieving precise target positioning. This requires collecting light signals through the pixel array to form a waveform curve of "pixel position - energy value", and then extracting the centroid coordinates of the peak based on the energy distribution characteristics of the waveform, thereby inferring the spatial position information of the target.

[0003] In practical applications, the waveform of echo signals is susceptible to high-frequency noise interference, manifesting as glitches and energy jumps in the waveform. This interference distorts the signal waveform and affects the accuracy of subsequent centroid extraction. Therefore, it is necessary to denoise the original echo signal to more accurately represent the peak centroid. However, current filtering methods cannot perfectly match the energy distribution of the light spot, resulting in poor filtering effects and inaccurate centroid extraction, which in turn leads to low ranging accuracy of the lidar. Summary of the Invention

[0004] The present invention aims to provide a centroid extraction method, a lidar, a robot, and a storage medium, which can improve the ranging accuracy of lidar.

[0005] In a first aspect, embodiments of the present invention provide a centroid extraction method applied to lidar, the method comprising:

[0006] The original echo signal curve output by the lidar after detecting the target object is obtained. The original echo signal curve is a pixel position-energy value curve, and the original echo signal curve includes M original energy values, where M is an integer greater than 1.

[0007] The original echo signal curve is divided into N consecutive signal segment curves, where N is an integer greater than 1;

[0008] For each signal segment curve, determine an asymmetric Gaussian convolution kernel that matches the signal segment curve;

[0009] The asymmetric Gaussian convolution kernel is used to perform a convolution operation with the original energy value in the signal segment curve to obtain the first target energy value corresponding to the signal segment curve. This process is repeated until M first target energy values ​​are obtained.

[0010] The centroid is extracted based on the M first target energy values ​​and their corresponding pixel positions.

[0011] In some embodiments, determining the asymmetric Gaussian convolution kernel that matches the signal segment curve includes:

[0012] Construct the following asymmetric Gaussian function:

[0013] ;

[0014] Where A is the first weight and B is the second weight. 1 is The axis of symmetry of the function 2 is The axis of symmetry of the function for The width of the function for The width of the function, where x is the independent variable, and A, B, 1. 2 Construct a sequence of parameter values;

[0015] The values ​​of W x are determined based on the waveform signal characteristics of the signal segment curve, where the value of W represents the number of effective pixels in the signal segment curve.

[0016] Search for the parameter value sequence in the asymmetric Gaussian function to obtain the target parameter value sequence, wherein the target parameter value sequence makes the waveform signal characteristics of the asymmetric Gaussian function match the waveform signal characteristics of the signal segment curve;

[0017] Substituting the target parameter value sequence and W x values ​​into the asymmetric Gaussian function yields the asymmetric Gaussian convolution kernel that matches the signal segment curve, wherein the asymmetric Gaussian convolution kernel includes W values.

[0018] In some embodiments, the step of performing a convolution operation between the asymmetric Gaussian convolution kernel and the original energy value in the signal segment curve to obtain the first target energy value corresponding to the signal segment curve includes:

[0019] Arrange the original energy values ​​in the signal segment curve according to the order of pixel positions to obtain the original energy value sequence, wherein the original energy value sequence includes K original energy values;

[0020] For the j-th original energy value in the original energy value sequence, a j-th energy value sliding window is formed based on the original energy value sequence, wherein the j-th energy value sliding window is centered on the j-th original energy value, and j is any integer from 1 to K;

[0021] The j-th energy value of the first target is obtained by the following formula:

[0022] ;

[0023] in, The j-th energy value of the first target, right Summation, The asymmetric Gaussian convolution kernel, The i-th value in the j-th energy value sliding window. Let i be the i-th value in the asymmetric Gaussian convolution kernel, where i is any integer from 1 to W.

[0024] In some embodiments, extracting the centroid based on the M first target energy values ​​and their corresponding pixel positions includes:

[0025] Determine a second target energy value, wherein the second target energy value is the largest energy value among M first target energy values;

[0026] The pixel position corresponding to the second target energy value is determined as the centroid.

[0027] In some embodiments, after dividing the original echo signal curve into N consecutive signal segment curves, the method further includes:

[0028] For each signal segment curve, obtain the original energy value corresponding to the first pixel in the signal segment curve;

[0029] If the original energy value corresponding to the first pixel is greater than the first preset energy threshold, then the peak pixel in the signal segment curve is determined.

[0030] Based on the peak pixel, a first target curve in the signal segment curve is determined, and the first target curve is repaired to obtain the final signal segment curve. The first target curve is a signal curve located to the left of the peak pixel, and the pixel position of the pixel on the first target curve is earlier than the pixel position of the peak pixel.

[0031] In some embodiments, the step of repairing the first target curve to obtain the final signal segment curve includes:

[0032] With the peak pixel as the origin, draw a first straight line parallel to the vertical axis;

[0033] Using the first straight line as the axis of symmetry, the original energy values ​​corresponding to the right-side pixels are mapped one by one to the left-side pixels to obtain the mapped energy values. The right-side pixels are the pixels on the second target curve whose original energy values ​​are greater than the environmental noise, and the left-side pixels are the points symmetrical to the right-side pixels about the first straight line. The second target curve is the signal curve on the signal segment curve located to the right of the peak pixel. The pixel position of the pixel on the second target curve is after the pixel position of the peak pixel.

[0034] Each of the left-side pixels forms a third target curve, and the third target curve and the second target curve together constitute the final signal segment curve.

[0035] In some embodiments, the step of repairing the first target curve to obtain the final signal segment curve further includes:

[0036] Obtain the pixels on the first target curve to obtain the first target pixel;

[0037] A polynomial function is used to fit the original energy value and position of each of the first target pixels to obtain the fitting function.

[0038] The first target pixel is extended to obtain the pixel position of the virtual pixel, and the pixel position of the virtual pixel is substituted into the fitting function to obtain the corresponding fitting energy value, wherein the pixel position of the virtual pixel is located on the negative half axis of the horizontal axis.

[0039] Substitute the pixel position of the first target pixel into the fitting function to obtain the corresponding fitting energy value, and determine the second target pixel based on the pixel position of the first target pixel and the corresponding fitting energy value;

[0040] Each of the virtual pixels and each of the second target pixels together form the fourth target curve, and the fourth target curve and the second target curve together constitute the final signal segment curve.

[0041] In some embodiments, the step of repairing the first target curve to obtain the final signal segment curve further includes:

[0042] The average energy value is obtained by averaging the mapped energy value and the fitted energy value corresponding to the same pixel position.

[0043] The same pixel location and the corresponding average energy value form a third target pixel, and each of the third target pixels forms a fifth target curve. The fifth target curve and the second target curve together constitute the final signal segment curve.

[0044] In some embodiments, after dividing the original echo signal curve into N consecutive signal segment curves, the method further includes:

[0045] For the h-th signal segment, obtain the fourth target pixel, where h is an integer greater than the first preset value and less than or equal to N;

[0046] Interpolation is performed between two adjacent fourth target pixels to construct sub-pixel points;

[0047] The fourth target pixel and the sub-pixel together constitute the pixels of the h-th signal segment.

[0048] In some embodiments, after dividing the original echo signal curve into N consecutive signal segment curves, the method further includes:

[0049] For each signal segment curve, obtain the peak width of the peak of the signal segment curve;

[0050] A first invalid peak is identified and removed, wherein the peak width of the first invalid peak is greater than a first preset width threshold or less than a second preset width threshold.

[0051] In some embodiments, the method further includes:

[0052] For each signal segment curve, obtain the original energy value corresponding to the peak pixel of the signal segment curve and the ambient noise.

[0053] Obtain the raw energy value of the third target, wherein the raw energy value of the third target is the average value of the raw energy values ​​corresponding to the peak pixels of the environmental noise and the signal segment curve;

[0054] Using the original energy value of the third target as the origin, draw a second straight line parallel to the horizontal axis, and obtain the two intersection points of the second straight line and the signal segment curve;

[0055] The absolute value of the difference between the pixel positions of the two intersection points is determined as the peak width of the signal segment.

[0056] In some embodiments, the method further includes:

[0057] Take the mode of the M original energy values ​​to obtain the mode value;

[0058] The sum of the modal value and the second preset value is determined as the environmental noise.

[0059] In some embodiments, the method further includes:

[0060] For the first signal segment curve, a target peak is determined, wherein the peak width of the target peak is less than or equal to the first preset width threshold and greater than or equal to the second preset width threshold.

[0061] Determine whether multiple target peaks exist;

[0062] If it exists, retain the valid peaks in the target peaks and remove the second invalid peaks in the target peaks, wherein the pixel position corresponding to the valid peak is earlier than the pixel position corresponding to the second invalid peak.

[0063] Secondly, embodiments of the present invention provide a lidar, comprising:

[0064] At least one processor; and,

[0065] A memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the centroid extraction method as described above.

[0066] Thirdly, embodiments of the present invention provide a robot including the lidar described above.

[0067] Fourthly, in this embodiment of the invention, a computer-readable storage medium is provided, the computer-readable storage medium storing computer-executable instructions for causing a computer device to perform the centroid extraction method as described above.

[0068] The beneficial effects of this invention are as follows: Unlike the prior art, the centroid extraction method provided in this invention is applied to LiDAR. The method first obtains the original echo signal curve output by the LiDAR after detecting a target object. The original echo signal curve is a pixel position-energy value curve, containing M original energy values, where M is an integer greater than 1. The original echo signal curve is divided into N consecutive signal segment curves, where N is an integer greater than 1. For each signal segment curve, an asymmetric Gaussian convolution kernel matching the signal segment curve is determined. Then, the asymmetric Gaussian convolution kernel is used to perform convolution operations with the original energy values ​​in the signal segment curve to obtain the first target energy value corresponding to the signal segment curve. This process is repeated until M first target energy values ​​are obtained. Finally, the centroid is extracted based on the M first target energy values ​​and their corresponding pixel positions.

[0069] This centroid extraction method uses an asymmetric Gaussian convolution kernel for convolution operations, which can accurately fit the local morphology of the signal and avoid waveform distortion caused by traditional symmetric Gaussian convolution kernels. At the same time, this method differentiates and matches asymmetric Gaussian convolution kernels according to the asymmetric characteristics of different segments of the original echo signal. It can efficiently filter out high-frequency glitches, jump points and other interference in the strong noise segment, and maximize the enhancement of the peak response value of each segment in the weak noise segment. This greatly improves the signal-to-noise ratio and waveform recognition of the target energy value, avoids the problem of losing weak signal peaks when filtering the whole segment, improves the accuracy of centroid extraction, and thus improves the ranging accuracy of lidar. Attached Figure Description

[0070] One or more embodiments are illustrated by way of example with reference numerals in the accompanying drawings. These illustrations do not constitute a limitation on the embodiments. Elements with the same reference numerals in the drawings are denoted as similar elements. Unless otherwise stated, the figures in the drawings are not to be limited by scale.

[0071] Figure 1 is a schematic flowchart of one centroid extraction method provided in an embodiment of the present invention;

[0072] Figure 2 is a schematic diagram of one type of signal segment curve provided in an embodiment of the present invention;

[0073] Figure 3 is a schematic diagram of one type of asymmetric Gaussian function provided in an embodiment of the present invention;

[0074] Figure 4 is a schematic flowchart of one centroid extraction method provided in an embodiment of the present invention;

[0075] Figure 5 is a schematic diagram of one type of signal segment curve provided in an embodiment of the present invention;

[0076] Figure 6 is a flowchart of step S108 in Figure 4;

[0077] Figure 7 is another flowchart of step S108 in Figure 4;

[0078] Figure 8 is a schematic flowchart of one centroid extraction method provided in an embodiment of the present invention;

[0079] Figure 9 is a schematic diagram of one type of point interpolation provided in an embodiment of the present invention;

[0080] Figure 10 is a schematic diagram of one type of two-point interpolation provided in an embodiment of the present invention;

[0081] Figure 11 is a schematic flowchart of one centroid extraction method provided in an embodiment of the present invention;

[0082] Figure 12 is a schematic diagram of one type of signal segment curve provided in an embodiment of the present invention;

[0083] Figure 13 is a schematic diagram of one centroid extraction device provided in an embodiment of the present invention;

[0084] Figure 14 is a schematic diagram of the structure of one of the robots provided in an embodiment of the present invention. Detailed Implementation

[0085] The present invention will now be described in detail with reference to specific embodiments. These embodiments will help those skilled in the art to further understand the present invention, but do not limit the invention in any way. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of the present invention. These all fall within the scope of protection of the present invention.

[0086] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.

[0087] It should be noted that, unless otherwise specified, the various features in the embodiments of this invention can be combined with each other, all of which are within the protection scope of this invention. Furthermore, although functional modules are divided in the device schematic diagram and a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than the module division in the device or the order in the flowchart. In addition, the terms "first," "second," and "third" used herein do not limit the data or execution order, but only distinguish identical or similar items with substantially the same function and effect.

[0088] Unless otherwise defined, all technical and scientific terms used in this specification have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used in this specification is for the purpose of describing particular embodiments only and is not intended to limit the invention. The term "and / or" as used in this specification includes any and all combinations of one or more of the associated listed items.

[0089] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.

[0090] In the field of LiDAR, centroid extraction is a core signal processing technique that calculates the actual physical center coordinates of the laser spot from the raw echo signal (usually the energy distribution signal) received by the LiDAR detector. The energy centroid of the spot is the centroid coordinate. By calculating the centroid of the energy distribution, the positional accuracy can be improved to the sub-pixel level (e.g., 0.1-0.5 pixels), significantly enhancing the angle measurement and positioning performance of LiDAR.

[0091] Because the initial captured raw echo signal contains a large amount of high-frequency noise, the peak height cannot be reliably mapped to the corresponding distance value. Therefore, it is necessary to denoise the raw echo signal to express the centroid of the peak in a more characteristic way. However, current filtering methods cannot perfectly match the energy distribution of the light spot, resulting in poor filtering effect, inaccurate centroid extraction, and consequently, low ranging accuracy of the lidar.

[0092] Based on the above reasons, this invention provides a centroid extraction method for use in lidar. This centroid extraction method performs segmented filtering on the original echo signal curve, and for each signal segment, it performs filtering by differentially matching asymmetric Gaussian convolution kernels to improve the filtering effect and extract more accurate filtering, thereby improving the ranging accuracy of lidar.

[0093] Please refer to Figure 1, which is a schematic flowchart of a centroid extraction method provided in an embodiment of the present invention. As shown in Figure 1, the centroid extraction method S100 includes:

[0094] S101. Obtain the original echo signal curve output by the lidar after detecting the target object, wherein the original echo signal curve is a pixel position-energy value curve, and the original echo signal curve includes M original energy values, where M is an integer greater than 1.

[0095] S102. Divide the original echo signal curve into N continuous signal segment curves, where N is an integer greater than 1;

[0096] After the light spot hits the lidar, different pixels on the lidar's camera sensor represent different positions. Whether each pixel receives the laser light and the number of photons received will also result in different energy values ​​collected by each pixel. Pixels that receive the light spot have higher energy values, while pixels that do not receive the light spot have lower energy values. At this point, the photosensitive information on the camera sensor's film, that is, the position and corresponding energy value data of each row of pixels, can be exported. This allows the position parameters of at least one row of pixels on the film and their corresponding energy values ​​to be automatically plotted and exported as a pixel position-energy value curve using plotting software.

[0097] Please refer to Figure 2, which illustrates an example of a pixel position-energy value curve with a single light spot according to an embodiment of the invention. The horizontal axis represents the position data of the pixel point on the photosensitive film of the camera sensor, and the vertical axis represents the energy value of the received light. In the example shown in Figure 2, the pixel position-energy value curve is plotted by extracting the position and energy value data of the four brightest rows of pixels with the light spot on the photosensitive film. The position and energy value data of the four rows of pixels are calculated by projecting and summing them column-wise to obtain a single row of pixels, and these values ​​are used as the values ​​of the horizontal and vertical axes of the pixel position-energy value curve. Optionally, the average value of the data from the four rows of pixels can be taken column-wise and then assigned to a single row of pixels. Optionally, the number of rows of pixels selected can also be any integer greater than or equal to 1. In this embodiment of the invention, selecting an appropriate number of rows of pixels to replace the entire light spot to export data can improve the frame rate of the LiDAR, reduce the resources required for algorithm processing, and thus accelerate the processing speed.

[0098] If the original echo signal curve has M pixels, then it corresponds to M original energy values ​​and M pixel positions.

[0099] To obtain better feature representation in subsequent filtering, different convolution kernels need to be matched at different distances. Therefore, it is necessary to perform region-based or segmented processing based on the distance of obstacles. The distance of obstacles can be represented by their position on the photosensitive film (i.e., pixel position). Therefore, it is only necessary to divide the photosensitive film into segments. For example, if the entire width of the photosensitive film is 500 pixels, it can be divided into four segments: the signal curve for pixel positions 0-200 is the first segment, the signal curve for pixel positions 200-300 is the second segment, the signal curve for pixel positions 300-400 is the third segment, and the signal curve for pixel positions 400-500 is the fourth segment.

[0100] Therefore, in order to perform segmented filtering and match different convolution kernels in segments, the original echo signal curve is divided according to the pixel position, which can be divided into N continuous signal segment curves, where N is an integer greater than 1.

[0101] S103. For each signal segment curve, determine the asymmetric Gaussian convolution kernel that matches the signal segment curve;

[0102] Based on the asymmetric characteristics of the signal segment curve, determine the asymmetric Gaussian convolution kernel that matches the signal segment curve. For example, construct an asymmetric Gaussian function, and then determine the parameters in the asymmetric Gaussian function based on the waveform signal characteristics of the signal segment curve, the number of effective pixels in the signal segment curve, or the number of effective pixels, so as to obtain an asymmetric Gaussian function that matches the signal segment curve. Finally, solve the asymmetric Gaussian convolution kernel based on the asymmetric Gaussian function.

[0103] Specifically, the following asymmetric Gaussian function is first constructed:

[0104] (1)

[0105] Where A is the first weight and B is the second weight. 1 is The axis of symmetry of the function 2 is The axis of symmetry of the function for The width of the function for The width of the function, where x is the independent variable, and A, B, 1. 2 This constitutes a sequence of parameter values.

[0106] Please also refer to Figure 3, which is a schematic diagram of one type of asymmetric Gaussian function curve. As shown in Figure 3, curve L1 is... The graph of the function, curve L2 is The graph of the function, curve L3 is obtained by adding the two. The graph of the function, where, 1=1, 2=2, =5, =5, A=30, B=40.

[0107] It should be noted that the parameter value sequences A, B, 1. 2 It can be set as needed, but different parameter value sequences will result in... The graph of the function and the signal segment curve have different degrees of fit, or different degrees of matching; that is, the waveform characteristics of the signal segment curve determine the parameter values ​​A, B, ... 1. 2 The value of .

[0108] Therefore, by searching for the sequence of parameter values ​​in the asymmetric Gaussian function, we obtain the target sequence of parameter values, where the target sequence of parameter values ​​makes... The waveform signal characteristics of the function match the waveform signal characteristics of the signal segment curve.

[0109] Then, based on the waveform characteristics of the signal segment curve, the values ​​of W x are determined, where the value of W represents the number of effective pixels in the signal segment curve. The signal segment curve includes effective pixels and noise signals. The energy value of the noise signal is lower, while the energy value of the effective pixels is higher. The number of effective pixels refers to the number of pixels remaining in the signal segment curve after removing the noise signal.

[0110] If there are 3 valid pixels, then x can have 3 values; if there are 5 valid pixels, then x can have 5 values. The specific value of x can be set as needed, generally choosing a symmetrical value for ease of calculation. For example, regarding Figure 3... The function x has 16 possible values, that is, W is 16, and the value of x is an integer from -7 to 9 (the graphs of x with values ​​from -7 to -5 and x with values ​​from 7 to 9 are not shown in Figure 3).

[0111] Finally, the sequence of target parameter values ​​and W values ​​of x are substituted into the asymmetric Gaussian function to obtain an asymmetric Gaussian convolution kernel that matches the signal segment curve. The asymmetric Gaussian convolution kernel includes W values.

[0112] For example: regarding Figure 3 The function, the determined sequence of target parameter values ​​is 1=1, 2=2, =5, =5, A=30, B=40, and the determined value of x is an integer from -7 to 9. Substitute the sequence of target parameter values ​​and the value of x into... The function yields the corresponding asymmetric Gaussian convolution kernel. That is, for this segment of the signal curve, The sequence of objective parameter values ​​of the function is 1=1, 2=2, =5, =5, A=30, B=40, the asymmetric Gaussian convolution kernel is [g(-7),g(-6),g(-5),g(-4),g(-3),gf(-2),g(-1),g(0),g(1),g(2),g(3),g(4),g(5),g(6),g(7),g(8),g(9)].

[0113] For other curve segments, the corresponding asymmetric Gaussian convolution kernels are obtained sequentially using the above method. For example, for the second signal segment curve, the target parameter value sequence is A=20, u1=1. =4, B=30, u2=2, =4, W is 15, and x takes the value of an integer from -6 to 8. Substitute this value into... The function yields the corresponding asymmetric Gaussian convolution kernel. For the third signal segment curve, the target parameter value sequence is A=15, u1=1. =3, B=25, u2=2, =3, W is 13, and x takes the value of an integer from -5 to 7. Substitute this value into... The function yields the corresponding asymmetric Gaussian convolution kernel. For the fourth signal segment curve, the target parameter value sequence is A=10, u1=1. =2, B=20, u2=2, =2, W is 11, and x takes the value of an integer from -4 to 6. Substitute this value into... The function yields the corresponding asymmetric Gaussian convolution kernel.

[0114] S104. Perform convolution operation between the asymmetric Gaussian convolution kernel and the original energy value in the signal segment curve to obtain the first target energy value corresponding to the signal segment curve, and so on, until M first target energy values ​​are obtained.

[0115] In this embodiment, the convolution operation uses an asymmetric Gaussian convolution kernel matched for each signal segment as a weighted template. The kernel slides position by position on the pixel position-energy value waveform curve of the corresponding signal segment. The original energy value within the sliding window is multiplied by the weight value of the asymmetric Gaussian convolution kernel one by one and then summed to obtain the first target energy value corresponding to that position. After traversing all pixel positions of the signal segment, all first target energy values ​​corresponding to the entire signal segment can be output. If the entire signal segment includes M pixels, corresponding to M pixel positions and original energy values, then M first target energy values ​​can be obtained in the end.

[0116] Specifically, firstly, the raw energy values ​​in the signal segment curve are arranged in chronological order according to their pixel positions, resulting in a raw energy value sequence. This sequence comprises K raw energy values. The raw energy value sequence consists of all raw energy values ​​within the signal segment, arranged in chronological order of pixel positions. For example, for the first signal segment curve, the raw energy value sequence is the raw energy value corresponding to the first pixel to the 200th pixel, where K is 200. For the second signal segment curve, the sequence is the raw energy value corresponding to the 201st pixel to the 300th pixel, where K is 100. For the third signal segment curve, the sequence is the raw energy value corresponding to the 301st pixel to the 400th pixel, where K is 100. For the fourth signal segment curve, the sequence is the raw energy value corresponding to the 401st pixel to the 500th pixel, where K is 100.

[0117] Then, the energy value sliding window is determined. For the j-th original energy value in the original energy value sequence, the j-th energy value sliding window is formed based on the original energy value sequence, where the j-th energy value sliding window is centered on the j-th original energy value, and j is any integer from 1 to K.

[0118] For the first energy value sliding window, the window is centered on the first original energy value. Energy values ​​preceding the first original energy value are padded with 0s, and energy values ​​following the first original energy value are sequentially obtained from the original energy value sequence. The total number of original energy values ​​in the sliding window is W. For example, if W is 11, the first energy value sliding window is [0,0,0,0,0,E1,E2,E3,E4,E5,E6], where E1 to E6 represent the first to sixth original energy values, respectively. Similarly, if W is 11, the sixth energy value sliding window is [E1,E2,E3,E4,E5,E6,E7,E8,E9,E10,E11], where E1 to E11 represent the first to eleventh original energy values, respectively. If W is 11, the sliding window for the Kth energy value is [EK-5,EK-4,EK-3,EK-2,EK-1,EK,0,0,0,0,0], where EK-5 to EK represent the K-5th original energy value to the Kth original energy value, respectively.

[0119] Therefore, the energy value sliding window corresponding to each original energy value can be obtained through the above method. Then, the energy value sliding window is used to perform a weighted operation with the asymmetric Gaussian convolution kernel corresponding to the original energy value to obtain the corresponding first target energy value.

[0120] The energy value of the j-th first target is obtained by the following formula:

[0121] (2)

[0122] in, The j-th first target energy value, right Summation, It is an asymmetric Gaussian convolution kernel. The i-th value in the j-th energy value sliding window. is the i-th value in the asymmetric Gaussian convolution kernel, where i is any integer from 1 to W.

[0123] For example: if =[25, 46, 63, 85, 103, 122, 165, 170, 181, 196, 170, 141, 120, 98, 75, 52, 31], =[0.00008,0.00177,0.02461,0.23200,1.49238,6.58945,20.09182,42.53508,62.74923,64.56192,46.22909,22.93212,7.83482,1.83262,0.29191,0.03152,0.00230], where W is 17, the j-th original energy value is 181, and the j-th first target energy value is obtained using formula (2). .

[0124] Following the above method, the K first target energy values ​​corresponding to the signal segment curve are finally obtained, thus obtaining the K first target energy values ​​corresponding to each signal segment curve.

[0125] It should be noted that the width of the energy value sliding window corresponding to each signal segment curve can be the same or different; that is, the number W of values ​​in the energy value sliding window can be the same or different. For example, the first signal segment curve has 17 values ​​in its energy value sliding window, meaning it is processed using 17 pixels as a basic unit; the second signal segment curve has 15 values ​​in its energy value sliding window, meaning it is processed using 15 pixels as a basic unit; the third signal segment curve has 13 values ​​in its energy value sliding window, meaning it is processed using 13 pixels as a basic unit; and the fourth signal segment curve has 11 values ​​in its energy value sliding window, meaning it is processed using 11 pixels as a basic unit.

[0126] For boundary points between segments, the number of basic units in that signal segment determines which segment the boundary point belongs to. For example, when processing the transition point between the first and second segments, i.e., the 200th pixel, which belongs to the first signal segment, we still use 17 pixels as a basic unit. We select 9 pixels from the first signal segment curve to obtain their corresponding raw energy values, and 7 pixels from the second signal segment curve to obtain their corresponding raw energy values, thus forming a sliding window for the energy value corresponding to the 200th pixel. That is, when processing the sliding window for the energy value corresponding to the 200th pixel, the selected pixel numbers are 191 to 207. Similarly, the processing of boundary points between other segments is similar.

[0127] S105. Extract the centroid based on the M first target energy values ​​and their corresponding pixel positions.

[0128] First, determine the second target energy value, where the second target energy value is the largest among the M first target energy values. Then, determine the position corresponding to the second target energy value as the centroid.

[0129] For example, if M is 500, the original echo signal curve includes 500 pixels, corresponding to 500 original energy values. After convolution, 500 first target energy values ​​are obtained, with each pixel corresponding to one first target energy value. The energy value with the highest value among the 500 first target energy values ​​is selected as the second target energy value, and the pixel position corresponding to the second target energy value is determined as the centroid.

[0130] In summary, this centroid extraction method employs asymmetric Gaussian convolution kernels for convolution operations, which can accurately fit the local morphology of the signal. Furthermore, this method differentiates the asymmetric Gaussian convolution kernels according to the asymmetric characteristics of different segments of the original echo signal. This not only efficiently filters out high-frequency glitches and jump points in the high-noise segment, but also maximizes the peak response values ​​of each segment in the low-noise segment, significantly improving the signal-to-noise ratio and waveform recognition of the target energy value, thus enhancing the accuracy of centroid extraction and improving the ranging accuracy of the lidar.

[0131] In some embodiments, when an obstacle is close to the radar, due to the certain baseline distance between the transmitter and receiver, the light spot cannot fall completely into the photosensitive core. At this time, the obstacle enters the radar blind zone. If it is treated as a normal wave peak, the centroid will inevitably shift.

[0132] Based on the above problems, the centroid extraction method provided in this application embodiment can also repair the signal waveform in the blind zone, and then extract the centroid based on the repaired signal waveform, thereby improving the accuracy of centroid extraction.

[0133] As shown in Figure 4, the method S100 further includes:

[0134] S106. For each signal segment curve, obtain the original energy value corresponding to the first pixel in the signal segment curve;

[0135] S107. If the original energy value corresponding to the first pixel is greater than the first preset energy threshold, then the peak pixel in the signal segment curve is determined.

[0136] S108. Based on the peak pixel, determine the first target curve in the signal segment curve, and repair the first target curve to obtain the final signal segment curve, wherein the first target curve is a signal curve located to the left of the peak pixel, and the pixel position of the pixel on the first target curve is earlier than the pixel position of the peak pixel.

[0137] The determination of whether an obstacle has entered the blind zone is based on the original energy value corresponding to the first pixel. If the original energy value corresponding to the first pixel is less than or equal to a first preset energy threshold, it indicates that the original energy value corresponding to the first pixel is small, the signal curve to the left of the first pixel is relatively complete, and it is determined that the obstacle has not entered the blind zone. If the original energy value corresponding to the first pixel is greater than the first preset energy threshold, it indicates that the original energy value corresponding to the first pixel is large, the signal curve to the left of the first pixel is incomplete, and it indicates that the obstacle has entered the blind zone, in which case blind zone repair measures can be taken. The first preset energy threshold can be set as needed, such as 50.

[0138] The specific repair process is as follows: First, find the highest point of the peak, which is the peak pixel. Its corresponding original energy value is the largest in the signal segment curve, as shown by point P1 in Figure 5. Point P1 is the peak pixel. Then, determine the first target curve. The first target curve is a segment of the signal segment curve, located to the left of the peak pixel. The pixel position of the first target curve precedes the pixel position of the peak pixel. The first pixel on the first target curve is the first pixel of the entire signal segment curve.

[0139] The first target curve is repaired by imagining an extension of it, extending the curve so that the pixel position is on the negative half of the x-axis, in order to complete the curve to the left of the peak pixel and complete the curve of the signal segment.

[0140] In some embodiments, the signal segment curve further includes a second target curve, wherein the second target curve is a curve located to the right of the peak pixel, and the pixel position of the pixel on the second target curve is after the pixel position of the peak pixel.

[0141] In some embodiments, the first target curve is repaired based on the second target curve, as shown in FIG6, step S108 includes:

[0142] S1081. Using the peak pixel as the origin, draw a first straight line parallel to the vertical axis;

[0143] S1082. Using the first straight line as the axis of symmetry, map the original energy values ​​corresponding to the right-side pixels to the left-side pixels one by one to obtain the mapped energy values. The right-side pixels are the pixels on the second target curve whose original energy values ​​are greater than the environmental noise, and the left-side pixels are the points symmetrical to the right-side pixels about the first straight line. The second target curve is the signal curve on the signal segment curve located to the right of the peak pixel. The pixel position of the pixel on the second target curve is after the pixel position of the peak pixel.

[0144] S1083. Each of the left-side pixels forms a third target curve, and the third target curve and the second target curve together constitute the final signal segment curve.

[0145] The first straight line is shown as line L4 in Figure 5. The right-side pixels are shown as points P2 and P3 in Figure 5. The pixel positions of the right-side pixels are after the pixel positions of the peak pixels, and the original energy value corresponding to the right-side pixels is greater than the environmental noise, meaning the right-side pixels are valid pixels. Using line L4 as the axis of symmetry, the original energy values ​​corresponding to the right-side pixels are mapped one by one to the left-side pixels to obtain the mapped energy values. The final original energy values ​​corresponding to the left-side pixels are then determined as the mapped energy values.

[0146] For example, if the pixel position of the peak pixel is 9 and the pixel position of a certain right pixel is 16, the corresponding original energy value is 120. Then the original energy value corresponding to the right pixel is mapped to a left pixel with a pixel position of 2. The left pixel and the right pixel are symmetrical about the line L4, and their final original energy value is assigned to 120.

[0147] Similarly, the original energy values ​​of each right-side pixel are mapped to the left-side pixels one by one, resulting in the mapped energy values ​​for the left-side pixels. All the left-side pixels together form a new signal curve, i.e., the third target curve. This third target curve, together with the second target curve, constitutes the final signal segment curve. In the subsequent centroid extraction process, the final signal segment curve is used as the reference for extraction.

[0148] Therefore, in this embodiment, the first target curve is repaired based on the second target curve, and the right-side pixels on the second target curve are mapped to form a new curve, namely the third target curve. The repaired third target curve and the second target curve together constitute the final signal segment curve, so as to improve the accuracy of centroid extraction when performing centroid extraction based on the signal segment curve.

[0149] In some embodiments, the repair can also be performed based on the trend of the first target curve, as shown in Figure 7. Step S108 further includes:

[0150] S1084. Obtain the pixel points on the first target curve to obtain the first target pixel points;

[0151] S1085. A polynomial function is used to fit the original energy value and position of each of the first target pixels to obtain the fitting function.

[0152] The first target pixel is a pixel on the first target curve, which is a real pixel, such as point P4 and point P5 in Figure 5. A fitting equation is obtained by fitting the first target pixel and its corresponding original energy value. This fitting equation represents the trend of the first target curve, and the first target curve is then extended based on this fitting equation.

[0153] A polynomial function is used to fit the original energy value and pixel position of each first target pixel to obtain the fitting function. The fitting function can be a quadratic polynomial fitting function or a cubic polynomial fitting function.

[0154] Taking a quadratic fitting function as an example, the following fitting function is constructed:

[0155] (3)

[0156] in, Let A, B, and C be the pixel positions, and A, B, and C be the parameters to be fitted. This represents the original energy value.

[0157] Based on the least squares method, the parameters are obtained. ,in, Indicates to Inverting a matrix express[ The matrix of [1] for The transpose of .

[0158] Substituting the original energy value and position of each first target pixel into formula (3), the parameters to be fitted are obtained, and the fitting function is obtained. .

[0159] For example, the pixel position x_list=[1,2,3,4,5,6,7,8] of the first target pixel corresponds to the original energy value. =[200,220,230,251,260,265,270,281], substitute each pixel position and the corresponding original energy value into formula (3), and obtain the parameters A, B, and C to be fitted based on the least squares method, thus obtaining the final fitting function. .

[0160] S1086. Extend the first target pixel to obtain the pixel position of the virtual pixel, and substitute the pixel position of the virtual pixel into the fitting function to obtain the corresponding fitting energy value, wherein the pixel position of the virtual pixel is located on the negative half axis of the horizontal axis.

[0161] S1087. Substitute the pixel position of the first target pixel into the fitting function to obtain the corresponding fitting energy value, and determine the second target pixel based on the pixel position of the first target pixel and the corresponding fitting energy value.

[0162] S1088, Each of the virtual pixels and each of the second target pixels together form a fourth target curve, and the fourth target curve and the second target curve together constitute the final signal segment curve.

[0163] The pixel position of the virtual pixel is obtained by extending the first target pixel. For example, the position interval is determined based on the pixel position of the first target pixel, the pixel position of the first virtual pixel is determined based on the pixel position of the first target pixel and the position interval, and the pixel position of the remaining virtual pixels is determined based on the pixel position of the first virtual pixel and the position interval.

[0164] For example, if the pixel position of the first target pixel is x_list=[1,2,3,4,5,6,7,8], then the position interval is determined to be 1. Based on the pixel position 1 of the first target pixel and the position interval 1, the pixel position of the first virtual pixel is determined to be 0. Based on 0 and the position interval 1, the pixel position of the second virtual pixel is determined to be -1, the pixel position of the third virtual pixel is -2, the pixel position of the fourth virtual pixel is -3, and so on, so that the pixel positions of the virtual pixels are [0,-1,-2,-3,-4,-5,-6,-7].

[0165] It should be noted that the number of virtual pixels can be set as needed; it can be the same as or greater than the number of first target pixels. The more virtual pixels there are, the more accurate the fourth target curve obtained subsequently based on the virtual pixels will be.

[0166] Then, substitute the pixel positions of each virtual pixel into the final fitting function. The fitted energy value corresponding to each virtual pixel is obtained, and the pixel position of each first target pixel is substituted into the final fitting function. The corresponding fitted energy value is obtained. Then, based on the pixel position of the first target pixel and the corresponding fitted energy value, the second target pixel is determined. The pixel position of the second target pixel is the same as the pixel position of the first target pixel, and the original energy value of the second target pixel is the corresponding fitted energy value. For example, if the first target pixel is (… E1), will Substitution ,get Then the second target pixel is obtained as ( , ).

[0167] Each virtual pixel and each second target pixel form a fourth target curve. The fourth target curve is a curve obtained based on the trend of the first target curve. The fourth target curve completes the curve to the left of the peak pixel, thus realizing the repair of the blind spot.

[0168] The fourth target curve and the second target curve together constitute the final signal segment curve. Compared with the signal segment curve before repair (including the first target curve and the second target curve), the repaired signal segment curve is more complete, making the subsequent centroid extraction more accurate.

[0169] In some embodiments, when repairing the first target curve, the first target curve can also be repaired based on the pixels on the second target curve and the trend of the first target curve.

[0170] First, the mapping energy value of each left pixel is obtained through steps S1081 to S1082. Then, the fitting energy value of each virtual pixel and the fitting energy value of each second target pixel are obtained based on steps S1084 to S1087. Next, the average value of the mapping energy value and the fitting energy value corresponding to the same pixel position is obtained to obtain the average energy value. The pixel position and the corresponding average energy value form the third target pixel. Each third target pixel forms the fifth target curve. The fifth target curve and the second target curve together constitute the final signal segment curve.

[0171] For example, the pixel position of a certain left-hand pixel is Its corresponding mapping energy value is E1', and the pixel position of a certain virtual pixel is... Or the pixel position of a certain second target pixel is The corresponding fitted energy value is Then, based on the mapped energy value E1' and the fitted energy value The average energy value (E1'+) was obtained. If ) / 2, then the third target pixel is determined, and its pixel position is . Its corresponding energy value is (E1'+ ) / 2. And so on, we can obtain the third target pixels corresponding to each pixel position, and these third target pixels form the fifth target curve.

[0172] The purpose of taking the mean is to balance the results obtained by mapping and fitting methods, making the mean of the mapped and fitted energy values ​​closer to the true value, thus improving the accuracy of subsequent centroid extraction. Compared to the signal segment curves before repair (including the first and second target curves), using the repaired signal segment curves (including the fifth and second target curves) to extract the centroid is more accurate.

[0173] In some embodiments, since the width of the distant peak changes significantly, in order to improve the peak resolution and adapt the asymmetric Gaussian convolution kernel to the distant signal waveform, the distant waveform is interpolated in this embodiment.

[0174] As shown in Figure 8, the method S100 further includes:

[0175] S109. For the h-th signal segment, obtain the fourth target pixel, where h is an integer greater than the first preset value and less than or equal to N;

[0176] The h-th signal segment is the one that is furthest from the others, and each pixel in the h-th signal segment is the fourth target pixel. For example, if N is 4, then h can be 3 or 4, and each pixel in the 3rd signal segment is the fourth target pixel, and each pixel in the 4th signal segment is the fourth target pixel.

[0177] S110. Perform interpolation between two adjacent fourth target pixels to construct sub-pixel points;

[0178] One-point linear interpolation is used to construct the pixel position corresponding to the sub-pixel based on the pixel position corresponding to the two adjacent fourth target pixels. Then, two-point linear interpolation is used to construct the original energy value corresponding to the sub-pixel based on the original energy value corresponding to the two adjacent fourth target pixels and the pixel position corresponding to the sub-pixel.

[0179] For example, if the pixel positions corresponding to two adjacent fourth target pixels are x1=461 and x2=462, and their corresponding original energy values ​​are y1=86 and y2=80, as shown in Figure 9, a one-point linear interpolation is used to construct the pixel position corresponding to the sub-pixel. This pixel position depends on the center of x1 and x2, so x=461.5. As shown in Figure 10, based on x1, x2, x, y1, and y2, the original energy value corresponding to the sub-pixel is obtained, and the equation is constructed: (x-x1) / (x2-x1)=(y-y1) / (y2-y1), where x1=461, x2=462, y1=86, y2=80. Substituting x=461.5 into the above equation, the original energy value corresponding to the sub-pixel is obtained as y=83.

[0180] It should be noted that the pixel position of a sub-pixel can be the center of the pixel positions corresponding to two adjacent fourth target pixels, or it can be at 1 / 3 and 2 / 3 of the line connecting the pixel positions corresponding to two adjacent fourth target pixels. For example, if x1=481, x2=482, y1=57, y2=51, then two sub-pixels are constructed between two adjacent pixels. The pixel position corresponding to one sub-pixel is x=481.3. Substituting into the constructed equation, the original energy value corresponding to the sub-pixel is y=55.2. The pixel position corresponding to the other sub-pixel is x=481.6. Substituting into the constructed equation, the original energy value corresponding to the sub-pixel is y=55.4.

[0181] S111. The fourth target pixel and the sub-pixel are combined to form the pixel of the h-th signal segment.

[0182] The sub-pixels obtained through interpolation are added to the h-th signal segment. The fourth target pixel and the sub-pixels together constitute the final pixel of the h-th signal segment, so as to participate in the subsequent convolution operation and extract the centroid.

[0183] In some embodiments, invalid peaks in the signal segment curve need to be removed before centroid extraction to improve the accuracy of centroid extraction. As shown in Figure 11, the method S100 further includes:

[0184] S112. For each signal segment curve, obtain the peak width of the peak of the signal segment curve;

[0185] First, for each signal segment curve, obtain the original energy value corresponding to the peak pixel of the signal segment curve and the ambient noise. Then, obtain the original energy value of the third target, which is the average of the original energy values ​​corresponding to the peak pixel of the signal segment curve and the ambient noise. Next, with the original energy value of the third target as the origin, draw a second straight line parallel to the horizontal axis and obtain the two intersection points of the second straight line and the signal segment curve. Finally, determine the peak width of the signal segment as the absolute value of the difference between the pixel positions of the two intersection points.

[0186] Environmental noise is defined as the most frequent of the M original energy values, or a value that fluctuates within a certain range around the most frequent original energy value. Therefore, the mode of the M original energy values ​​is taken to obtain the mode value, and the sum of the mode value and a second preset value is determined as the environmental noise.

[0187] For example, if there are 500 raw energy values, the mode of the 500 raw energy values ​​is calculated, resulting in a mode value of 4. The second preset value that is then floated upwards is 3, so the environmental noise value is 7.

[0188] After obtaining the environmental noise, a horizontal straight line is drawn based on the average value of the environmental noise and the original energy value corresponding to the peak pixel. The horizontal straight line will intersect the peak at two points on the left and right. The absolute value of the difference between the pixel positions of the two intersection points is the width of the peak.

[0189] For example, the signal segment curve is shown in Figure 12. The ambient noise is 7, the peak value is 196, and the average of the two is 101.5. Therefore, the original energy value of the third target is 101.5. A second straight line L5 parallel to the horizontal axis is drawn with 101.5. The two intersection points of the second straight line L5 and the signal segment curve are point A and point B. The absolute value of the difference between the pixel position of point A and the pixel position of point B is determined as the peak width of the signal segment.

[0190] S113. Determine the first invalid peak and remove the first invalid peak, wherein the peak width of the first invalid peak is greater than a first preset width threshold or less than a second preset width threshold.

[0191] If the peak width of some waveform signals is too large or too small, it will affect the accuracy of centroid extraction, and such peaks will be considered invalid. If the peak width is greater than a first preset width threshold, it indicates that the peak is too wide, and it will be considered a first invalid peak and discarded. If the peak width is less than a second preset width threshold, it will also be considered a first invalid peak and discarded.

[0192] The first preset width threshold and the second preset width threshold can be set as needed. They can be determined based on the base width threshold. The first preset width threshold is twice the base width threshold, and the second preset width threshold is half the base width threshold.

[0193] Furthermore, the reference width threshold for each segment can be the same, or different reference width thresholds can be matched for different signal segments. For example, the reference width threshold for the first signal segment is 15, the reference width threshold for the second signal segment is 13, the reference width threshold for the third signal segment is 11, and the reference width threshold for the fourth signal segment is 9.

[0194] For example, for the first signal segment, the first preset width threshold is 30 and the second preset width threshold is 7.5. If the peak width of the peak is greater than 30 or the peak width of the peak is less than 7.5, then the peak is regarded as the first invalid peak and is removed.

[0195] In some embodiments, if there are multiple peaks in each signal segment, and the peak width of each peak is less than or equal to a first preset width threshold and greater than or equal to a second preset width threshold, then the peak with the highest peak value (highest original energy value) is retained, and the other peaks are set as invalid peaks.

[0196] The higher the peak value, the stronger the signal, and the more likely it is to be the target object. Therefore, the highest peak value is retained and used in the subsequent centroid extraction process.

[0197] In some embodiments, lidar needs to identify objects made of a special material like glass. When a laser pulse hits the glass, it passes through the glass, resulting in two points of impact: one on the glass in front of it, and the other on the object behind it. Therefore, it is necessary to identify the glass based on the signal segment curve to obtain the light spot falling on the glass. However, because the light spot passes through the glass, the reflected energy within the glass is weak. Therefore, the glass can only be detected at close range, and it will only exist in the first segment. It is only necessary to judge and identify within the first segment of the signal segment curve.

[0198] For the first segment of the signal curve, a target peak is determined, wherein the peak width of the target peak is less than or equal to a first preset width threshold and greater than or equal to a second preset width threshold. Then, it is determined whether there are multiple target peaks. If so, the valid peaks among the target peaks are retained, and the second invalid peaks among the target peaks are removed. The pixel position corresponding to the valid peak is earlier than the pixel position corresponding to the second invalid peak.

[0199] For the first segment of the signal curve, the peaks that meet the width threshold condition are identified as target peaks. If there are multiple target peaks, the peak with the earliest pixel position (the peak with the smallest pixel position coordinate value) is retained, and the other peaks are set as invalid peaks and removed.

[0200] Therefore, in this embodiment of the application, before centroid extraction, blind zone repair measures are taken for ultra-close-range blind zone situations, the missing signal on the left is repaired, interpolation processing is used to construct sub-pixel points for signal segments with excessively large resolution at long distances, some excessively wide or narrow peaks are removed, and special materials such as glass are accurately identified, thereby improving the accuracy of subsequent centroid extraction and thus improving ranging accuracy.

[0201] In summary, this centroid extraction method employs an asymmetric Gaussian convolution kernel for convolution operations, which can accurately fit the local morphology of the signal and avoid waveform distortion caused by traditional symmetric Gaussian convolution kernels. Furthermore, this method differentiates the asymmetric Gaussian convolution kernels based on the asymmetric characteristics of different segments of the original echo signal. This not only efficiently filters out high-frequency glitches and jump points in the high-noise segment but also maximizes the peak response values ​​of each segment in the low-noise segment, significantly improving the signal-to-noise ratio and waveform discernibility of the target energy value. It avoids the problem of losing weak signal peaks during whole-segment filtering, thus improving the accuracy of centroid extraction and consequently enhancing the ranging accuracy of the lidar.

[0202] Please refer to Figure 13, which is a schematic diagram of a centroid extraction device provided in an embodiment of the present invention. This centroid extraction device is applied to a lidar system; specifically, it is applied to one or more processors of the lidar system.

[0203] As shown in Figure 13, the centroid extraction device 200 includes: an acquisition module 201, a division module 202, a determination module 203, a calculation module 204, and an extraction module 205.

[0204] The acquisition module 201 is used to acquire the original echo signal curve output by the lidar after detecting the target object. The original echo signal curve is a pixel position-energy value curve, which includes M original energy values, where M is an integer greater than 1. The division module 202 is used to divide the original echo signal curve into N continuous signal segment curves, where N is an integer greater than 1. The determination module 203 is used to determine an asymmetric Gaussian convolution kernel that matches the signal segment curve for each signal segment curve. The operation module 204 is used to perform convolution operation with the original energy values ​​in the signal segment curve using the asymmetric Gaussian convolution kernel to obtain the first target energy value corresponding to the signal segment curve. This process is repeated until M first target energy values ​​are obtained. The extraction module 205 is used to extract the centroid based on the M first target energy values ​​and the corresponding pixel positions.

[0205] In this embodiment of the invention, the centroid extraction device can also be constructed from hardware components. For example, the centroid extraction device can be constructed from one or more chips, and the chips can work in coordination to complete the centroid extraction method described in the above embodiments. Furthermore, the centroid extraction device can also be constructed from various logic devices, such as general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), microcontrollers, ARM (Acorn RISC Machine) or other programmable logic devices, discrete gate or transistor logic, discrete hardware components, or any combination of these components.

[0206] The centroid extraction device in this embodiment of the invention can be a device with an operating system. This operating system can be Android, iOS, or other possible operating systems; this embodiment of the invention does not impose specific limitations.

[0207] The centroid extraction device provided in this embodiment of the invention can realize all the processes that the above-mentioned centroid extraction method can achieve. To avoid repetition, it will not be described again here.

[0208] It should be noted that the above-described centroid extraction device can execute the centroid extraction method provided in the embodiments of the present invention, and has the corresponding functional modules and beneficial effects of the method. Technical details not described in detail in the embodiments of the centroid extraction device can be found in the centroid extraction method provided in the embodiments of the present invention.

[0209] This invention also provides a robot. Please refer to Figure 14, which is a schematic diagram of the hardware structure of a robot provided in this invention.

[0210] As shown in Figure 14, the robot 300 includes at least one processor 301, a memory 302, and a lidar 303 connected in communication (Figure 14 shows a bus connection with one processor as an example).

[0211] The processor 301 provides computing and control capabilities to control the robot 300 to perform corresponding tasks, such as controlling the robot 300 to perform the centroid extraction method in any of the above method embodiments. This method first obtains the original echo signal curve output by the lidar after detecting the target object. The original echo signal curve is a pixel position-energy value curve, which includes M original energy values, where M is an integer greater than 1. The original echo signal curve is divided into N consecutive signal segment curves, where N is an integer greater than 1. For each signal segment curve, an asymmetric Gaussian convolution kernel that matches the signal segment curve is determined. Then, the asymmetric Gaussian convolution kernel is used to perform convolution operation with the original energy values ​​in the signal segment curve to obtain the first target energy value corresponding to the signal segment curve. This process is repeated until M first target energy values ​​are obtained. Finally, the centroid is extracted based on the M first target energy values ​​and the corresponding pixel positions.

[0212] This centroid extraction method uses an asymmetric Gaussian convolution kernel for convolution operations, which can accurately fit the local morphology of the signal and avoid waveform distortion caused by traditional symmetric Gaussian convolution kernels. At the same time, this method differentiates and matches asymmetric Gaussian convolution kernels according to the asymmetric characteristics of different segments of the original echo signal. It can efficiently filter out high-frequency glitches, jump points and other interference in the strong noise segment, and maximize the enhancement of the peak response value of each segment in the weak noise segment. This greatly improves the signal-to-noise ratio and waveform recognition of the target energy value, avoids the problem of losing weak signal peaks when filtering the whole segment, improves the accuracy of centroid extraction, and thus improves the ranging accuracy of lidar.

[0213] Processor 301 can be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip, or any combination thereof; it can also be a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The aforementioned PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0214] The memory 302, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and modules, such as the program instructions / modules corresponding to the centroid extraction method in the embodiments of the present invention. The processor 301 can implement the centroid extraction method in any of the above method embodiments by running the non-transitory software programs, instructions, and modules stored in the memory 302. To avoid repetition, it will not be described again here.

[0215] Specifically, memory 302 may include volatile memory (VM), such as random access memory (RAM); memory 302 may also include non-volatile memory (NVM), such as read-only memory (ROM), flash memory, hard disk drive (HDD), solid-state drive (SSD), or other non-transitory solid-state storage devices; memory 302 may also include combinations of the above types of memory.

[0216] In this embodiment of the invention, the memory 302 may further include memory remotely configured relative to the processor, and these remote memories can be connected to the processor via a network. Examples of such networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.

[0217] In some embodiments, the lidar 303 includes pulse lidar, continuous wave lidar, and other types of lidar.

[0218] In this embodiment of the invention, the robot 300 may also have wired or wireless network interfaces, keyboards, and input / output interfaces for input and output. The robot 300 may also include other components for implementing device functions, which will not be elaborated here.

[0219] This invention also provides a computer-readable storage medium, such as a memory including program code, which can be executed by a processor to complete the centroid extraction method in the above embodiments. For example, the computer-readable storage medium may be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), magnetic tape, floppy disk, and optical data storage device, etc.

[0220] This invention also provides a computer program product comprising one or more lines of program code stored in a computer-readable storage medium. A processor of an electronic device reads the program code from the computer-readable storage medium and executes the program code to complete the method steps of the centroid extraction method provided in the above embodiments.

[0221] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs.

[0222] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented using software and a general-purpose hardware platform, or of course, using hardware. Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The storage medium can be a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM), etc.

[0223] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; under the concept of the present invention, the technical features of the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations of different aspects of the present invention as described above, which are not provided in detail for the sake of brevity; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for centroid extraction, characterized in that, The method, applied to lidar, includes: acquiring the original echo signal curve output by the lidar after detecting a target object, wherein the original echo signal curve is a pixel position-energy value curve, and the original echo signal curve includes M original energy values, where M is an integer greater than 1; dividing the original echo signal curve into N consecutive signal segment curves, where N is an integer greater than 1; for each signal segment curve, determining an asymmetric Gaussian convolution kernel that matches the signal segment curve; performing a convolution operation between the asymmetric Gaussian convolution kernel and the original energy values ​​in the signal segment curve to obtain the first target energy value corresponding to the signal segment curve, and so on, until M first target energy values ​​are obtained; extracting the centroid based on the M first target energy values ​​and the corresponding pixel positions; and constructing the following asymmetric Gaussian function: Where A is the first weight and B is the second weight. 1 is The axis of symmetry of the function 2 is The axis of symmetry of the function for The width of the function, for The width of the function, where x is the independent variable, and A, B, 1、 2 A parameter value sequence is constructed; W values ​​of x are determined based on the waveform signal characteristics of the signal segment curve, where the value of W represents the number of effective pixels in the signal segment curve; a parameter value sequence is searched in the asymmetric Gaussian function to obtain a target parameter value sequence, wherein the target parameter value sequence makes the waveform signal characteristics of the asymmetric Gaussian function match the waveform signal characteristics of the signal segment curve; the target parameter value sequence and the values ​​of W x are substituted into the asymmetric Gaussian function to obtain the asymmetric Gaussian convolution kernel that matches the signal segment curve. The asymmetric Gaussian convolution kernel includes W values; the original energy values ​​in the signal segment curve are arranged in order of pixel position to obtain an original energy value sequence, wherein the original energy value sequence includes K original energy values; for the j-th original energy value in the original energy value sequence, a j-th energy value sliding window is formed based on the original energy value sequence, wherein the j-th energy value sliding window is centered on the j-th original energy value, and j is any integer from 1 to K; the j-th first target energy value is obtained by the following formula: ;in, For the j-th energy value of the first target, To Summation, The asymmetric Gaussian convolution kernel, For the j-th energy value in the sliding window, the i-th value is... Let i be the i-th value in the asymmetric Gaussian convolution kernel, where i is any integer from 1 to W.

2. The method according to claim 1, characterized in that, The step of extracting the centroid based on the M first target energy values ​​and their corresponding pixel positions includes: determining a second target energy value, wherein the second target energy value is the energy value with the largest value among the M first target energy values; and determining the pixel position corresponding to the second target energy value as the centroid.

3. The method according to claim 1, characterized in that, After dividing the original echo signal curve into N consecutive signal segment curves, the method further includes: for each signal segment curve, obtaining the original energy value corresponding to the first pixel in the signal segment curve; if the original energy value corresponding to the first pixel is greater than a first preset energy threshold, then determining the peak pixel in the signal segment curve; determining a first target curve in the signal segment curve based on the peak pixel, and repairing the first target curve to obtain the final signal segment curve, wherein the first target curve is a signal curve located to the left of the peak pixel, and the pixel position of the pixel on the first target curve precedes the pixel position of the peak pixel.

4. The method according to claim 3, characterized in that, The step of repairing the first target curve to obtain the final signal segment curve includes: drawing a first straight line parallel to the vertical axis with the peak pixel as the origin; mapping the original energy values ​​corresponding to the right-side pixels to the left-side pixels one by one with the first straight line as the axis of symmetry to obtain mapped energy values, wherein the right-side pixels are pixels on the second target curve whose original energy values ​​are greater than the environmental noise, and the left-side pixels are the points symmetrical to the right-side pixels about the first straight line; the second target curve is the signal curve on the signal segment curve located to the right of the peak pixel, and the pixel positions of the pixels on the second target curve are after the pixel positions of the peak pixel; each of the left-side pixels forms a third target curve, and the third target curve and the second target curve together constitute the final signal segment curve.

5. The method according to claim 4, characterized in that, The step of repairing the first target curve to obtain the final signal segment curve further includes: acquiring pixels on the first target curve to obtain first target pixels; fitting the original energy value and position corresponding to each first target pixel using a polynomial function to obtain a fitting function; extending the first target pixels to obtain the pixel position of virtual pixels, and substituting the pixel position of the virtual pixels into the fitting function to obtain the corresponding fitted energy value, wherein the pixel position of the virtual pixels is located on the negative half-axis of the horizontal axis; substituting the pixel position of the first target pixels into the fitting function to obtain the corresponding fitted energy value, and determining second target pixels based on the pixel position of the first target pixels and the corresponding fitted energy value; each virtual pixel and each second target pixel together form a fourth target curve, and the fourth target curve and the second target curve together constitute the final signal segment curve.

6. The method according to claim 5, characterized in that, The step of repairing the first target curve to obtain the final signal segment curve further includes: obtaining the average of the mapped energy value and the fitted energy value corresponding to the same pixel position to obtain an average energy value; the same pixel position and the corresponding average energy value form a third target pixel point, and each of the third target pixel points forms a fifth target curve, and the fifth target curve and the second target curve together constitute the final signal segment curve.

7. The method according to claim 1, characterized in that, After dividing the original echo signal curve into N consecutive signal segment curves, the method further includes: for the h-th signal segment, obtaining a fourth target pixel, where h is an integer greater than a first preset value and less than or equal to N; performing interpolation processing between two adjacent fourth target pixels to construct sub-pixel points; and combining the fourth target pixel points and the sub-pixel points to constitute the pixel points of the h-th signal segment.

8. The method according to claim 1, characterized in that, After dividing the original echo signal curve into N consecutive signal segment curves, the method further includes: for each signal segment curve, obtaining the peak width of the peak of the signal segment curve; determining a first invalid peak and removing the first invalid peak, wherein the peak width of the first invalid peak is greater than a first preset width threshold or less than a second preset width threshold.

9. The method according to claim 8, characterized in that, The method further includes: for each signal segment curve, obtaining the original energy value corresponding to the peak pixel of the signal segment curve and the ambient noise; obtaining the third target original energy value, wherein the third target original energy value is the average value of the original energy values ​​corresponding to the peak pixel of the signal segment curve and the ambient noise; drawing a second straight line parallel to the horizontal axis with the third target original energy value as the origin, and obtaining two intersection points of the second straight line and the signal segment curve; determining the absolute value of the difference between the pixel positions of the two intersection points as the peak width of the signal segment.

10. The method according to claim 9, characterized in that, The method further includes: taking the mode of the M original energy values ​​to obtain the mode value; and determining the sum of the mode value and a second preset value as the environmental noise.

11. The method according to claim 8, characterized in that, The method further includes: determining a target peak for a first signal segment curve, wherein the peak width of the target peak is less than or equal to the first preset width threshold and greater than or equal to the second preset width threshold; determining whether there are multiple target peaks; if so, retaining the valid peaks among the target peaks and removing the second invalid peaks among the target peaks, wherein the pixel position corresponding to the valid peak is earlier than the pixel position corresponding to the second invalid peak.

12. A lidar, characterized in that, include: At least one processor; And a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the at least one processor to enable the at least one processor to perform the centroid extraction method as described in any one of claims 1-11.

13. A robot, characterized in that, include: The lidar as described in claim 12.

14. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable instructions for causing a computer device to perform the centroid extraction method as described in any one of claims 1-11.

Citation Information

Patent Citations

  • Underground target identification positioning and imaging method

    CN115877374A

  • Semiconductor processing defect detection method based on artificial intelligence

    CN121095250A