Laser ranging method and device, electronic equipment and readable storage medium
By obtaining depth data and confidence scores from time-of-flight histograms, performing point cloudification and weighting, and cluster analysis, the problem of medium identification in multipath phenomena in laser ranging is solved, improving ranging accuracy and clustering efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-20
- Publication Date
- 2026-03-17
AI Technical Summary
Existing laser ranging technologies cannot accurately distinguish between the target object and the optoelectronic components when there are media such as glass, water, or semi-transparent objects, resulting in low ranging accuracy. Furthermore, algorithms based on the itof method and machine learning are not accurate enough when they are sensitive to noise or dependent on the dataset.
By obtaining depth data and confidence scores from the time-of-flight histogram of the target scene measured by dToF, removing low-confidence scatter points, performing point cloudification, calculating the scatter point spacing and assigning weight values, and conducting cluster analysis, the medium causing multipath phenomena can be identified.
It improves the accuracy of laser ranging, effectively identifies and distinguishes different targets, reduces noise interference, improves clustering accuracy, and accurately detects media with multipath phenomena.
Smart Images

Figure CN116068523B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of ranging technology, and in particular to a laser ranging method, apparatus, electronic device, and readable storage medium. Background Technology
[0002] Laser ranging uses a laser as a light source to accurately measure the distance to a target object. Compared to other ranging methods, it can operate day and night and also improves ranging accuracy. However, if there are glass, water, or semi-transparent objects between the target object and the photoelectric components, multipath problems will occur, leading to lower ranging accuracy.
[0003] To eliminate errors in distance measurement caused by multipath propagation and improve the accuracy of laser ranging, related technologies employ multipath elimination methods from ITOF (Indirect Time-of-Flight) measurements. Current methods include: 1. Using spectral estimation to solve for the depth and amplitude of each component using multi-frequency measurements. This method parameterizes the multipath problem, treating the peak value, flight distance, and ambient light variables as unknowns. Changing the frequency yields multiple equations, and the peak value is solved using linear algebra. 2. Introducing machine learning methods for data processing, using single-frequency measurements to achieve multipath elimination. The measured data is stored as an image; based on this, the depth imaging process is represented as a spatially varying convolution, and a convolutional neural network is used to correct multipath errors.
[0004] However, overall, the itof method cannot accurately distinguish between media such as glass, water, and translucent objects and the target object. The final output is a measured depth value, but due to its inability to precisely differentiate between them, the accuracy of the output depth value is not high. Furthermore, multi-frequency measurement based on the spectrum can calculate the direct path signal with low computational cost, but this type of method is sensitive to noise and performs poorly in scenarios with low signal-to-noise ratios. Meanwhile, the accuracy of single-frequency measurement algorithms based on machine learning is highly dependent on the dataset, and the model itself does not have a high degree of fit with the physical characteristics of the sensor.
[0005] Therefore, accurately detecting and identifying the medium that causes multipath phenomena in order to improve the accuracy of laser ranging is a technical problem that needs to be solved by technicians in this field. Summary of the Invention
[0006] This application provides a laser ranging method, apparatus, electronic device, and readable storage medium, which can accurately detect and identify the medium causing multipath phenomena, thereby improving the accuracy of laser ranging.
[0007] To address the aforementioned technical problems, the embodiments of the present invention provide the following technical solutions:
[0008] One embodiment of the present invention provides a laser ranging method, comprising:
[0009] For each scatter point, obtain the depth data of the first and second target peaks and the confidence scores corresponding to each of the two target peaks in the time-of-flight histogram of the target scene measured by dToF.
[0010] Based on the confidence levels of the first and second target peaks of each scatter point and a preset confidence threshold, scatter points below the confidence threshold are removed to obtain multiple candidate scatter points.
[0011] The depth data of each candidate scatter point is processed into point cloud to reconstruct each two-dimensional depth data into three-dimensional space;
[0012] Based on the candidate scattered points after point cloudification, determine the weight values of the positional relationships between the candidate scattered points;
[0013] The distance between each candidate scatter point is calculated based on the weight values, and the discrete points are filtered based on the distance values between each candidate scatter point to select the effective scatter points.
[0014] Cluster analysis was performed on each effective scatter point, and the characteristic value of each type of substance was calculated;
[0015] Based on the target feature information corresponding to the target medium and the feature value of each type of substance, it is determined whether the target medium exists; the target medium is the medium that causes multipath phenomenon in the target scene.
[0016] Optionally, the step of determining the weight values of the positional relationships between candidate scatter points based on the candidate scatter points after point cloudification includes:
[0017] Determine the positive or negative sign of each candidate scatter point based on whether it belongs to the first target peak or the second target peak.
[0018] Based on the confidence level and sign of the current peak of each candidate scatter point, the weight values of the positional relationship between each candidate scatter point are determined.
[0019] Optionally, determining the sign of each candidate scatter point based on whether it belongs to the first target peak or the second target peak includes:
[0020] For each candidate scatter point, determine whether the attributes of the current scatter point and its neighboring scatter points in the target neighborhood belong to the same type of target peak;
[0021] If the current scatter point and the first neighboring scatter point belong to the same type of target peak, then assign the same sign to the current scatter point and the first neighboring scatter point;
[0022] If the current scatter point and the first neighboring scatter point belong to different types of target peaks, then the current scatter point and the first neighboring scatter point are assigned different signs.
[0023] Optionally, calculating the spacing between candidate scatter points based on each weight value includes:
[0024] For each candidate scatter point, if the current scatter point and its first neighboring scatter point in the target neighborhood belong to different types of target peaks, then the first spacing relationship is used to calculate the spacing between the current scatter point and the first neighboring scatter point; the first spacing relationship is: d ab =[CI a -(±1)CI b ]×W ab ;
[0025] If the current scatter point and its first neighboring scatter point within the target neighborhood belong to the same type of target peak, then the second spacing formula is used to calculate the spacing between the current scatter point and the first neighboring scatter point; the second spacing formula is: d ab =CI a -CI b ;
[0026] Where, d ab CI is the distance between the current scatter point a and the first neighboring scatter point b. a CI represents the confidence level corresponding to the peak to which the current scatter point a belongs. b W represents the confidence level of the peak to which the first neighboring scatter point a belongs. ab The weight value is the positional relationship between the current scatter point and the first neighboring scatter point; if the current scatter point and its first neighboring scatter point in the target neighborhood belong to the first target peak, then it is 1; if the current scatter point and its first neighboring scatter point in the target neighborhood belong to the second target peak, then it is -1.
[0027] Optionally, the filtering of discrete points based on the spacing values between each candidate scatter point includes:
[0028] For each candidate scatter point, identify the target neighboring scatter points within the target neighborhood of the current scatter point whose distance value is greater than a preset distance threshold;
[0029] If the total number of neighboring scattered points of the current scattered point is greater than a preset discrete threshold, then the current scattered point is a discrete point;
[0030] If the total number of neighboring scattered points of the current scattered point is less than or equal to a preset discrete threshold, then the current scattered point is a valid scattered point.
[0031] Optionally, the cluster analysis of each valid scatter point includes:
[0032] Assign an infinite distance to two valid scattered points at the same pixel location, and keep the distance between two valid scattered points at different pixel locations unchanged.
[0033] Construct a state table and a distance table; the state table is used to record whether each valid scatter point has undergone clustering processing; the distance table is used to store the distance between each valid scatter point.
[0034] The traversal addressing conditions are determined based on the distribution of each valid scatter point and the distance between each valid scatter point.
[0035] Based on the state table, the distance table, and the traversal addressing conditions, each valid scattered point is clustered, and the number of traversal addressing stops is counted.
[0036] Based on the clustering results and the number of times the traversal addressing stops, the total number of clusters and the number of valid scatter points contained in each cluster are determined.
[0037] Optionally, after determining whether the target medium exists based on the target feature information corresponding to the target medium and the feature values of each type of substance, the method further includes:
[0038] If a target medium exists, the spatial location and physical dimensions of the target medium in the target scene are calculated based on the feature values of the valid scattered points under the category to which the target medium belongs.
[0039] Another embodiment of the present invention provides a laser ranging device, comprising:
[0040] The data acquisition module is used to acquire the depth data of the first target peak and the second target peak in the time-of-flight histogram of the dToF measurement target scene from each scatter point, as well as the confidence level corresponding to each of the two target peaks.
[0041] The low confidence filtering module is used to remove scatter points that are lower than the confidence threshold based on the confidence of the first target peak and the second target peak of each scatter point and a preset confidence threshold, so as to obtain multiple candidate scatter points.
[0042] The point cloudification processing module is used to perform point cloudification processing on the depth data of each candidate scatter point in order to reconstruct each two-dimensional depth data into three-dimensional space.
[0043] The weight calculation module is used to determine the weight values of the positional relationships between candidate scattered points based on the candidate scattered points after point cloudification.
[0044] The scatter distance calculation module is used to calculate the distance between each candidate scatter point based on each weight value;
[0045] The discrete point filtering module is used to filter discrete points based on the spacing between each candidate scatter point in order to select valid scatter points.
[0046] The clustering module is used to perform cluster analysis on each valid scatter point and calculate the characteristic value of each type of substance;
[0047] The medium determination module is used to determine whether the target medium exists based on the target feature information corresponding to the target medium and the feature value of each type of substance; the target medium is the medium that causes multipath phenomenon in the target scene.
[0048] This invention also provides an electronic device, including a processor, which executes a computer program stored in a memory to implement the steps of the laser ranging method as described in any of the preceding claims.
[0049] Finally, this embodiment of the invention also provides a readable storage medium storing a computer program that, when executed by a processor, implements the steps of the laser ranging method as described in any of the preceding claims.
[0050] The advantages of the technical solution provided in this application are as follows: Based on the peak data and corresponding confidence levels of each scattered point collected in the scene, by filtering low-confidence scattered points and discrete scattered points, noise and interference points can be removed, and effective scattered points can be selected, which can improve the accuracy and efficiency of subsequent clustering of scattered points. In addition, based on the spatial distribution of different scattered points and the characteristics of the time-of-flight histogram, weight values are set for each scattered point mapped to three-dimensional space, which can effectively distinguish different targets in the scene. This can not only effectively improve the accuracy of subsequent clustering, but also identify different targets that are very close to each other, effectively improving the accuracy of laser ranging. Finally, by comparing the characteristics of the medium that can cause multipath phenomena with the various features obtained after clustering, the medium that causes multipath phenomena can be accurately detected and identified, which is conducive to improving the accuracy of laser ranging.
[0051] Furthermore, embodiments of the present invention also provide corresponding implementation devices, electronic devices, and readable storage media for the laser ranging method, further making the method more practical. The devices, electronic devices, and readable storage media have corresponding advantages.
[0052] It should be understood that the above general description and the following detailed description are merely exemplary and do not limit this application. Attached Figure Description
[0053] To more clearly illustrate the technical solutions of the embodiments of the present invention or related technologies, the drawings used in the description of the embodiments or related technologies will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0054] Figure 1 This is a schematic flowchart of a laser ranging method provided in an embodiment of the present invention;
[0055] Figure 2 This is an illustrative scene diagram provided for an embodiment of the present invention;
[0056] Figure 3 This is a schematic diagram of the effective scatter points selected according to an embodiment of the present invention;
[0057] Figure 4 This is a schematic diagram of clustering results in an illustrative scenario provided by an embodiment of the present invention;
[0058] Figure 5 A structural diagram of a specific embodiment of the laser ranging device provided in this invention;
[0059] Figure 6 This is a structural diagram of a specific embodiment of the electronic device provided in this invention. Detailed Implementation
[0060] To enable those skilled in the art to better understand the present invention, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Obviously, the described embodiments are merely some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0061] The terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish different objects, not to describe a specific order. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or device that includes a series of steps or units is not limited to the listed steps or units, but may include steps or units not listed. After introducing the technical solutions of the embodiments of the present invention, various non-limiting embodiments of this application are described in detail below.
[0062] First see Figure 1 , Figure 1 This is a flowchart illustrating a laser ranging method provided in an embodiment of the present invention. The embodiment of the present invention may include the following:
[0063] S101: Obtain the depth data of the first and second target peaks and the confidence scores corresponding to each of the two target peaks from each scatter point in the time-of-flight histogram of the target scene measured by dToF.
[0064] This embodiment targets a real-world scenario for laser ranging, employing dToF (direct Time-of-Flight) technology. The dToF chip includes a VCSEL (Vertical-Cavity Surface-Emitting Laser), a SPAD (Single-Photon Avalanche Diode), and a TDC (Time Digital Converter). The SPAD is a photodetector avalanche diode with single-photon detection capability, generating current even with a weak light signal. The VCSEL emits pulse waves into the scene, and the SPAD receives the pulse waves reflected back from the target object. The TDC records the flight time of each received light signal, i.e., the time interval between the emitted and received pulses. dToF emits and receives N light signals within a single frame measurement time, then performs a time-of-flight histogram analysis on the recorded N flight times. The flight time with the highest frequency is used to calculate the depth of the object being measured. The scatter points correspond to actual measurement points in the target scene, and each scatter point uniquely corresponds to a time-of-flight histogram. For each scatter point's time-of-flight histogram, if there are more than two peak data points (i.e., bin values), the two peaks with the largest and second largest signal strength are selected as the first target peak and the second target peak, respectively. Then, the confidence level (SNDR) corresponding to each target peak of each scatter point can be calculated using any existing technology to represent the proportion of a single peak in the total signal. This application does not impose any limitations on this. Of course, due to the location of the scatter points or the characteristics of the scatter points themselves, there may be fewer than two peak data points in the time-of-flight histogram. A default value (i.e., preset peak data) can be preset, and the preset peak data and the peak data in the time-of-flight histogram can be used as the first target peak and the second target peak, respectively.
[0065] S102: Based on the confidence levels and confidence thresholds of the first and second target peaks for each scatter point, remove scatter points below the confidence threshold to obtain multiple candidate scatter points.
[0066] Considering that scattered points contain noise points and outliers, in order to improve the accuracy of subsequent measurements, a confidence threshold can be set in advance according to the actual application scenario and the user's measurement accuracy requirements. Scattered points below the confidence threshold are identified as outliers or noise points. For ease of description, the scattered points obtained after filtering all scattered points through low confidence are called candidate scattered points.
[0067] S103: Perform point cloudification on the depth data of each candidate scatter point.
[0068] This step performs depth cloudification on the scattered points that have been filtered for low confidence, which is to convert the two-dimensional depth data into three-dimensional depth data. In other words, the two-dimensional depth data of each candidate scattered point is projected or reconstructed into three-dimensional space to facilitate the subsequent processing of the relationship between point density and scattered points.
[0069] S104: Based on the candidate scattered points after point cloudification, determine the weight values of the positional relationships between the candidate scattered points.
[0070] After performing point cloudification on each candidate point in the previous step, the spatial distribution of all candidate points can be obtained. After point cloudification, each candidate point corresponds to a peak. Considering that candidate points corresponding to different peaks may be the same, and considering that there may be situations in the target scene where different types of material points are very close to each other, causing the second echo of the same light to be considered as the same category, such as a target person close to the glass, such as... Figure 2 As shown, if the distance between a person and the glass is close, it is a case where points of different types of materials are very close to each other. In order to distinguish the points that are close to each other, that is, to identify the points that are spatially close but belong to the same type, this step can assign weights to the positional relationships of each candidate point.
[0071] S105: Calculate the spacing between each candidate scatter point based on each weight value, and filter the discrete points based on the spacing between each candidate scatter point.
[0072] It is understandable that both the target medium and the object being measured have a certain physical size, meaning they are clusters of multiple points. Therefore, this step requires filtering out isolated points, discrete points, or outliers—that is, removing points that are unlikely to belong to the target medium or the object being measured—to select effective scattered points and improve the accuracy and efficiency of subsequent clustering. Figure 3 As shown. Furthermore, in order to more accurately identify the true isolated points, when calculating the spacing between different candidate points, it is necessary to use the weight values assigned to the positional relationships between each candidate point in the previous step.
[0073] As an optional implementation, for each candidate scatter point, the target neighboring scatter points within the target neighborhood of the current scatter point whose distance value is greater than a preset distance threshold can be determined first. If the total number of all target neighboring scatter points of the current scatter point is greater than a preset discrete threshold, then the current scatter point is identified as a discrete point; if the total number of all target neighboring scatter points of the current scatter point is less than or equal to the preset discrete threshold, then the current scatter point is identified as a valid scatter point. In this embodiment, the target neighboring scatter points refer to scatter points within the target neighborhood of the current scatter point whose distance value is greater than the preset distance threshold. The values of the preset distance threshold and the preset discrete threshold can be flexibly determined according to the actual application scenario, and this application does not impose any limitations on them. For example, if the target neighborhood of the current scatter point a contains 30 points, and if there are 20 points with a distance greater than the preset discrete threshold of 50, then a is a discrete point; if there are 5 points with a distance greater than 50, then point a is a valid scatter point.
[0074] S106: Perform cluster analysis on each valid scatter point and calculate the characteristic value of each type of substance.
[0075] This step can use any clustering algorithm to perform cluster analysis on each valid scatter point. Based on the clustering results, valid scatter points belonging to the same type of substance will be classified into the same category. Each category includes multiple scatter points. For each type of substance after clustering, based on the data of all scatter points of that type of substance, any feature calculation method can be selected to calculate the feature value of each type of substance according to the actual scenario.
[0076] S107: Determine whether a target medium exists based on the target feature information corresponding to the target medium and the feature values of each type of substance.
[0077] The target medium in this step is the medium in the target scene that causes multipath phenomena. The characteristic information of the medium is pre-calculated as a standard. For ease of description, the medium to be identified in this application is called the target medium, and the corresponding characteristic information is called target characteristic information. Characteristic information can be used to identify the data of the medium, and the type of calculated features can be determined based on some characteristics of the medium, such as... Figure 2Taking glass as an example, when the target object is behind the glass, and the glass is flat with edges, the target feature information corresponds to a set of features including spatial location information, flatness, boundary characteristics, and peak point ratio (weaker relative to the target object, such as a person). The feature values of each type of material are of the same type as the target feature information. Again, using glass as an example, for each type of material in the previous step, the spatial location information, flatness, and peak point ratio of all real measurement points included in the current material type are calculated sequentially. By comparing the target feature information with the feature values calculated for each type of material, the material that is the same or similar is the target medium. To improve the efficiency of target medium identification, a decision tree can be pre-constructed based on the parameterized features of the target medium, such as spatial location features, distribution features, and signal strength features. The decision tree can then be used for rapid feature matching and medium identification.
[0078] Furthermore, if the existence of a target medium is determined, and if the target medium is a tangible object, the spatial position and physical size of the target medium in the target scene can be calculated based on the characteristic values of the valid scattered points under the category to which the target medium belongs. Based on the spatial position and physical size of the target medium, depth measurement can be performed according to the valid points.
[0079] In the technical solution provided by this invention, based on the peak data and corresponding confidence levels of each scattered point collected in the scene, noise and interference points can be removed by filtering low-confidence scattered points and discrete scattered points, thus obtaining effective scattered points. This improves the accuracy and efficiency of subsequent clustering of each scattered point. Furthermore, weight values are assigned to each scattered point mapped to three-dimensional space based on the spatial distribution and time-of-flight histogram characteristics of different scattered points, effectively distinguishing different targets in the scene. This not only effectively improves the accuracy of subsequent clustering but also identifies different targets that are very close together, effectively improving the accuracy of laser ranging. Finally, the features of the medium that can cause multipath phenomena are compared with the various features obtained after clustering, thereby accurately detecting and identifying the medium that causes multipath phenomena, further improving the accuracy of laser ranging.
[0080] It should be noted that there is no strict order of execution for the steps in this application. As long as they conform to a logical order, these steps can be executed simultaneously or in a certain preset order. Figure 1 This is just an illustrative example and does not mean that this is the only possible execution order.
[0081] In the above embodiments, there is no limitation on how to perform step S104. This embodiment provides an optional calculation method for the weight of the positional relationship between each candidate scatter point, which may include the following steps:
[0082] First, determine the sign of each candidate scatter point based on whether it belongs to the first or second target peak. This sign is used to separate scatter points that do not belong to the same peak. For example, candidate scatter points belonging to the first target peak are positive, and candidate scatter points belonging to the second target peak are negative. Then, for the weight values, the weight values of the positional relationship between each candidate scatter point can be determined based on the confidence level and sign of the current peak of each candidate scatter point.
[0083] Optionally, for each candidate scatter point, it is determined whether the attributes of the current scatter point and its neighboring scatter points within the target neighborhood belong to the same type of target peak. If the current scatter point and the first neighboring scatter point belong to the same type of target peak, then the current scatter point and the first neighboring scatter point are assigned the same sign; if the current scatter point and the first neighboring scatter point belong to different types of target peaks, then the current scatter point and the first neighboring scatter point are assigned different signs. In this embodiment, the sign refers to positive or negative, and the range of the target neighborhood can be flexibly determined according to the actual situation. For example, it can be a circle with the current scatter point as the center and a radius of 35mm. For each scatter point, the depth data of the corresponding first target peak and second target peak are obtained in step S101. After the point cloudification processing, each scatter point corresponds to a peak, that is, it corresponds to the first target peak or the second target peak. In other words, the target peak types in this embodiment include two types, namely the first target peak and the second target peak. After determining the sign of each candidate scatter point, based on the confidence level, it reflects the signal strength. To avoid situations where adjacent objects are too close and the echoes of the same ray are mistakenly classified as belonging to the same category, if two valid scatter points (e.g., scatter point a and scatter point b) have the same sign, a preset value m (e.g., 1) can be directly used to determine the weight. If two valid scatter points have different signs, the weight can be determined according to the relationship (CI). a –CI b ) / CI a +m determines the weight value.
[0084] Furthermore, the process of calculating the distance between each candidate scatter point based on its weight values may include: for each candidate scatter point, if the current scatter point and its first neighboring scatter point within the target neighborhood belong to the same type of target peak, then the second distance relationship is used to calculate the distance between the current scatter point and the first neighboring scatter point; the second distance relationship is: d ab =CI a -CI b If the current scatter point and its first neighboring scatter point within the target neighborhood belong to different types of target peaks, then the first spacing formula is used to calculate the spacing between the current scatter point and the first neighboring scatter point; the first spacing formula is: d ab =[CI a -(±1)CI b ]×W ab ;
[0085] Where, d ab CI is the distance between the current scatter point a and its first neighboring scatter point b. a CI represents the confidence level of the peak to which the current scatter point a belongs. b W represents the confidence level of the peak corresponding to the first nearest neighbor scatter point a. ab The weight value is the positional relationship between the current scatter point and the first neighboring scatter point; if the current scatter point and the first neighboring scatter point in its target neighborhood belong to the first target peak, then (±1) in the above first spacing relationship is positive 1; if the current scatter point and the first neighboring scatter point in its target neighborhood belong to the second target peak, then it is -1.
[0086] As can be seen from the above, setting weight values for the positional relationships of each effective scatter point is beneficial to improving clustering accuracy, identifying different material targets that are very close together, and improving ranging accuracy.
[0087] The above embodiments do not impose any limitations on how to perform cluster analysis on each valid scatter point. However, it is understood that obtaining accurate and effective depth information requires distinguishing and identifying the target medium in the measurement scenario, and clustering is a key technology in this process. Traditional clustering methods include partition-based clustering, point density-based clustering, and hierarchical clustering. For target media such as glass, glass detection mainly involves spatial glass information, thus it is closer to point density-based clustering methods. The most commonly used method is DBSCAN (Density-Based Spatial Clustering of Applications with Noise), a density clustering method that characterizes the compactness of sample distribution based on a set of "neighborhood" parameters. It examines the connectivity between samples from the perspective of sample density, defining a cluster as the largest set of density-connected points. It can divide regions with sufficiently high density into clusters and can discover clusters of arbitrary shapes in noisy spatial databases. However, in the application scenarios described in this application, due to the involvement of single and double peaks, simply judging based on spatial point density will cause double peaks at the same location to cluster into one class, failing to effectively distinguish the viscosity phenomenon of spatial points. In other words, it is impossible to distinguish different types of substances that are very close to each other, such as within half a meter. To further improve ranging accuracy, an optional clustering method is also provided below, which may include the following:
[0088] Assign an infinite distance to two valid scattered points at the same pixel location, and keep the distance between two valid scattered points at different pixel locations unchanged.
[0089] Construct a state table and a distance table;
[0090] The traversal addressing conditions are determined based on the distribution of each valid scatter point and the distance between each valid scatter point.
[0091] Based on the state table, distance table, and traversal addressing conditions, each valid scatter point is clustered, and the number of traversal addressing stops is counted.
[0092] Based on the clustering results and the number of times the traversal addressing stops, determine the total number of clusters and the number of valid scatter points contained in each cluster.
[0093] In this embodiment, by assigning corresponding attributes to disordered, attributeless bimodal speckles, the entire data points are rearranged based on noise filtering: bimodals with the same phase (i.e., bimodal data stored as an image, two data points at the same pixel position (i.e., bimodal data in the same signal)) are assigned differentiated weights, while bimodal data with different phases are assigned equal weights. This allows for the differentiation of two nearby objects, effectively preventing the phenomenon of two echo signals from the same light source being classified as the same type. Weights are introduced to construct a state table and a distance table for traversal addressing. The state table records whether each valid speckle point has undergone clustering processing, indicating whether a point has been included in the clustering algorithm to prevent repeated calculations of the same point. The distance table stores the distances between valid speckles, identifying the spatial distribution relationship between points and analyzing point density distribution. By traversing the speckles and judging the density of neighboring points, a clustering category is grown, ultimately achieving automatic determination of the number of clusters and generation of results for each category. Figure 4 The clustering result diagram shows that cluster1 can be glass, cluster2 can be a target object in the scene such as a laboratory panel, and cluster3 can be the wall behind the target object. Furthermore, existing clustering methods such as KNN and k-means require extracting the total number of known categories. The above embodiment sets a traversal addressing condition: the number of traversal addressing stops equals the number of categories. The traversal addressing stopping condition is determined by the distance table and the distribution of data points, ensuring that no new points are generated without clustering, thus improving clustering efficiency.
[0094] This invention also provides a corresponding apparatus for the laser ranging method, further enhancing its practicality. The apparatus can be described from both a functional module perspective and a hardware perspective. The laser ranging apparatus provided in this invention is described below, and the laser ranging apparatus described below corresponds to the laser ranging method described above.
[0095] From the perspective of functional modules, see Figure 5 , Figure 5This is a structural diagram of a laser ranging device provided in an embodiment of the present invention, used to implement the laser ranging method provided in this application. In this embodiment, the laser ranging device may include or be divided into one or more program modules, which are stored in a storage medium and executed by one or more processors to complete the laser ranging method disclosed in any embodiment. The program module referred to in this application is a series of computer program instruction segments capable of performing a specific function, and is more suitable than the program itself for describing the execution process of the laser ranging device in the storage medium. The following description will specifically introduce the functions of each program module in this embodiment:
[0096] The data acquisition module 501 is used to acquire the depth data of the first target peak and the second target peak in the time-of-flight histogram of the dToF measurement target scene from each scatter point, as well as the confidence level corresponding to each of the two target peaks.
[0097] The low confidence filtering module 502 is used to remove scatter points with confidence values below the confidence threshold based on the confidence values of the first target peak and the second target peak of each scatter point and the confidence threshold, thereby obtaining multiple candidate scatter points.
[0098] The point cloudification processing module 503 is used to perform point cloudification processing on the depth data of each candidate scatter point in order to reconstruct each two-dimensional depth data into a three-dimensional space.
[0099] The weight calculation module 504 is used to determine the weight values of the positional relationship between each candidate scatter point based on each candidate scatter point after point cloudification.
[0100] The scatter distance calculation module 505 is used to calculate the distance between each candidate scatter point based on each weight value;
[0101] The discrete point filtering module 506 is used to filter discrete points based on the spacing value between each candidate scatter point in order to select effective scatter points.
[0102] Clustering module 507 is used to perform cluster analysis on each valid scatter point and calculate the characteristic value of each type of substance;
[0103] The medium determination module 508 is used to determine whether a target medium exists based on the target feature information corresponding to the target medium and the feature value of each type of substance; the target medium is the medium in the target scene that causes multipath phenomenon.
[0104] Optionally, in some embodiments of this example, the weight calculation module 504 may be further used to: determine the positive or negative sign of each candidate scatter point based on whether each candidate scatter point belongs to the first target peak or the second target peak; and determine the weight value of the positional relationship between each candidate scatter point based on the confidence and sign of the current peak of each candidate scatter point.
[0105] As an optional implementation of the above embodiments, the weight calculation module 504 may be further used to: for each candidate scatter point, determine whether the attributes of the current scatter point and each of its neighboring scatter points in the target neighborhood belong to the same type of target peak; if the current scatter point and the first neighboring scatter point belong to the same type of target peak, then assign the same sign to the current scatter point and the first neighboring scatter point; if the current scatter point and the first neighboring scatter point belong to different types of target peaks, then assign different signs to the current scatter point and the first neighboring scatter point.
[0106] As an optional implementation of the above embodiments, the scatter distance calculation module 505 may be further used for:
[0107] For each candidate scatter point, if the current scatter point and its first neighboring scatter point in the target neighborhood belong to different types of target peaks, then the first spacing formula is used to calculate the spacing between the current scatter point and the first neighboring scatter point; the first spacing formula is: d ab =[CI a -(±1)CI b ]×W ab ;
[0108] If the current scatter point and its first neighboring scatter point in the target neighborhood belong to the same type of target peak, then the second spacing formula is used to calculate the spacing between the current scatter point and the first neighboring scatter point; the second spacing formula is: d ab =CI a -CI b ;
[0109] Where, d ab CI is the distance between the current scatter point a and its first neighboring scatter point b. a The confidence level corresponding to the peak to which the current scatter point a belongs is (±1)CI. b W represents the confidence level of the peak corresponding to the first nearest neighbor scatter point a. ab This is the weight value between the current scatter point and its first neighboring scatter point; if the current scatter point and its first neighboring scatter point in the target neighborhood belong to the first target peak, then it is 1; if the current scatter point and its first neighboring scatter point in the target neighborhood belong to the second target peak, then it is -1.
[0110] Optionally, in some other embodiments of this example, the discrete point filtering module 506 described above can also be used for:
[0111] For each candidate scatter point, identify the target neighboring scatter points within the target neighborhood of the current scatter point whose distance value is greater than a preset distance threshold;
[0112] If the total number of neighboring scattered points of the current scattered point is greater than the preset discrete threshold, then the current scattered point is a discrete point;
[0113] If the total number of neighboring scattered points of the current scattered point is less than or equal to the preset discrete threshold, then the current scattered point is a valid scattered point.
[0114] Optionally, in some further embodiments of this example, the clustering module 507 may also be used for:
[0115] Assign an infinite distance to two valid scattered points at the same pixel location, and keep the distance between two valid scattered points at different pixel locations unchanged.
[0116] Construct a state table and a distance table; the state table records whether each valid scatter point has undergone clustering; the distance table stores the distances between each valid scatter point.
[0117] The traversal addressing conditions are determined based on the distribution of each valid scatter point and the distance between each valid scatter point.
[0118] Based on the state table, distance table, and traversal addressing conditions, each valid scatter point is clustered, and the number of traversal addressing stops is counted.
[0119] Based on the clustering results and the number of times the traversal addressing stops, determine the total number of clusters and the number of valid scatter points contained in each cluster.
[0120] Optionally, in some other embodiments of this example, the above-mentioned device may further include a medium physical parameter calculation module, which is used to calculate the spatial location and physical size of the target medium in the target scene based on the characteristic values of the valid scattered points under the category to which the target medium belongs, if a target medium exists.
[0121] The functions of each functional module of the laser ranging device described in the embodiments of the present invention can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0122] As can be seen from the above, the embodiments of the present invention can accurately detect and identify the medium that causes multipath phenomena, which is beneficial to improving the accuracy of laser ranging.
[0123] The laser ranging device mentioned above is described from the perspective of functional modules. Furthermore, this application also provides an electronic device, which is described from the perspective of hardware. Figure 6 This is a schematic diagram of the structure of the electronic device provided in one embodiment of this application. For example... Figure 6 As shown, the electronic device includes a memory 60 for storing a computer program; and a processor 61 for executing the computer program to implement the steps of the laser ranging method as described in any of the above embodiments.
[0124] The processor 61 may include one or more processing cores, such as a quad-core processor or an octa-core processor. The processor 61 may also be a controller, microcontroller, microprocessor, or other data processing chip. The processor 61 may be implemented using at least one hardware form selected from DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), and PLA (Programmable Logic Array). The processor 61 may also include a main processor and a coprocessor. The main processor, also known as a CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state. In some embodiments, the processor 61 may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. In some embodiments, the processor 61 may also include an AI (Artificial Intelligence) processor, which is used to handle computational operations related to machine learning.
[0125] The memory 60 may include one or more computer-readable storage media, which may be non-transitory. The memory 60 may also include high-speed random access memory and non-volatile memory, such as one or more disk storage devices or flash memory devices. In some embodiments, the memory 60 may be an internal storage unit of an electronic device, such as a server hard drive. In other embodiments, the memory 60 may be an external storage device of an electronic device, such as a plug-in hard drive on a server, a Smart Media Card (SMC), a Secure Digital (SD) card, or a Flash Card. Furthermore, the memory 60 may include both internal and external storage units of the electronic device. The memory 60 can be used not only to store application software and various types of data installed on the electronic device, such as code in the process of executing the laser ranging method, but also to temporarily store data that has been output or will be output. In this embodiment, the memory 60 is used to store at least the following computer program 601, which, after being loaded and executed by the processor 61, is capable of implementing the relevant steps of the laser ranging method disclosed in any of the foregoing embodiments. In addition, the resources stored in the memory 60 may also include an operating system 602 and data 603, and the storage method may be temporary storage or permanent storage. The operating system 602 may include Windows, Unix, Linux, etc. The data 603 may include, but is not limited to, data corresponding to laser ranging results.
[0126] In some embodiments, the aforementioned electronic device may further include a display screen 62, an input / output interface 63, a communication interface 64 (or network interface), a power supply 65, and a communication bus 66. The display screen 62 and input / output interface 63, such as a keyboard, are user interfaces; optional user interfaces may also include standard wired interfaces, wireless interfaces, etc. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen, etc. The display may also be appropriately referred to as a display screen or display unit, used to display information processed in the electronic device and to display a visual user interface. The communication interface 64 may optionally include a wired interface and / or a wireless interface, such as a Wi-Fi interface, a Bluetooth interface, etc., typically used to establish communication connections between the electronic device and other electronic devices. The communication bus 66 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. This bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6 The bus is represented by a single thick line, but this does not mean that there is only one bus or one type of bus.
[0127] Those skilled in the art will understand that Figure 6 The structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, such as sensors 67 that perform various functions.
[0128] The functions of each functional module of the electronic device described in the embodiments of the present invention can be specifically implemented according to the methods in the above method embodiments. The specific implementation process can be referred to the relevant descriptions in the above method embodiments, which will not be repeated here.
[0129] As can be seen from the above, the embodiments of the present invention can accurately detect and identify the medium that causes multipath phenomena, which is beneficial to improving the accuracy of laser ranging.
[0130] It is understood that if the laser ranging method in the above embodiments is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and executes all or part of the steps of the methods in the various embodiments of this application. The aforementioned storage medium includes: USB flash drive, mobile hard drive, read-only memory (ROM), random access memory (RAM), electrically erasable programmable ROM, register, hard disk, multimedia card, card-type memory (e.g., SD or DX memory), magnetic memory, removable disk, CD-ROM, magnetic disk or optical disk, and other media capable of storing program code.
[0131] Based on this, embodiments of the present invention also provide a readable storage medium storing a computer program, wherein the computer program, when executed by a processor, performs the steps of the laser ranging method described in any of the above embodiments.
[0132] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the hardware disclosed in the embodiments, including devices and electronic equipment, since they correspond to the methods disclosed in the embodiments, the descriptions are relatively simple; relevant parts can be referred to the method section.
[0133] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0134] The foregoing has provided a detailed description of a laser ranging method, apparatus, electronic device, and readable storage medium provided in this application. Specific examples have been used to illustrate the principles and implementation methods of the invention. The descriptions of the embodiments above are merely for the purpose of helping to understand the method and core ideas of the invention. It should be noted that those skilled in the art can make various improvements and modifications to this application without departing from the principles of the invention, and these improvements and modifications also fall within the protection scope of the claims of this application.
Claims
1. A laser ranging method, characterized by, The method comprises the following steps: obtaining, from each scatter point, depth data of a first target peak and a second target peak in a time-of-flight histogram of a target scene measured by dToF, and confidence of each target peak; removing, based on the confidence of the first target peak and the second target peak of each scatter point and a preset confidence threshold, scatter points with confidence lower than the confidence threshold, to obtain a plurality of candidate scatter points; performing point cloud processing on the depth data of each candidate scatter point to reconstruct the two-dimensional depth data to a three-dimensional space; confirming, according to each candidate scatter point after the point cloud processing, a weight value of the positional relationship between the candidate scatter points; calculating, according to each weight value, a distance between the candidate scatter points, and filtering the scatter points based on the distance value between the candidate scatter points to screen out effective scatter points; performing clustering analysis on each effective scatter point and calculating a characteristic value of each type of matter; judging, according to target characteristic information corresponding to the target medium and the characteristic value of each type of matter, whether the target medium exists; the target medium is a medium that causes multipath phenomenon in the target scene; wherein the calculation of the distance between the candidate scatter points according to the weight value comprises: For each candidate scatter point, if the current scatter point and a first neighboring scatter point within a target neighborhood of the current scatter point belong to different types of target peaks, a first distance relationship is invoked to calculate a distance between the current scatter point and the first neighboring scatter point; the first distance relationship is: ; If the current scatter point and a first neighboring scatter point within its target neighborhood belong to the same type of target peak, a second distance relationship is invoked to calculate the distance between the current scatter point and the first neighboring scatter point; the second distance relationship is: ; wherein, is the distance between the current scatter point a and the first neighboring scatter point b, is the confidence corresponding to the peak to which the current scatter point a belongs, is the confidence corresponding to the peak to which the first neighboring scatter point a belongs, is the weight value between the positional relationship of the current scatter point and the first neighboring scatter point; if the current scatter point and the first neighboring scatter point within its target neighborhood belong to the first target peak, it is 1, if the current scatter point and the first neighboring scatter point within its target neighborhood belong to the second target peak, it is -1.
2. The laser ranging method of claim 1, wherein, the confirmation of the weight value of the positional relationship between the candidate scatter points according to each candidate scatter point after the point cloud processing comprises: determining the positive and negative signs of each candidate scatter point according to whether the candidate scatter point belongs to the first target peak or the second target peak; determining the weight value of the positional relationship between the candidate scatter points based on the confidence and the sign of the current peak of each candidate scatter point.
3. The laser ranging method of claim 2, wherein, the determination of the positive and negative signs of each candidate scatter point according to whether the candidate scatter point belongs to the first target peak or the second target peak comprises: for each candidate scatter point, judging whether the attributes of the current scatter point and each adjacent scatter point in the target neighborhood of the current scatter point belong to the same type of target peak; if the current scatter point and the first adjacent scatter point belong to the same type of target peak, assigning the same sign to the current scatter point and the first adjacent scatter point; if the current scatter point and the first adjacent scatter point belong to different types of target peaks, assigning different signs to the current scatter point and the first adjacent scatter point.
4. The laser ranging method of claim 1, wherein, the filtering of the scatter points based on the distance value between the candidate scatter points comprises: for each candidate scatter point, determining the target adjacent scatter points in the target neighborhood of the current scatter point that have a distance value greater than a preset distance threshold; if the total number of the target adjacent scatter points of the current scatter point is greater than a preset dispersion threshold, the current scatter point is a discrete scatter point; if the total number of the target adjacent scatter points of the current scatter point is less than or equal to the preset dispersion threshold, the current scatter point is an effective scatter point.
5. The laser ranging method according to any one of claims 1 to 4, characterized in that, the clustering analysis of each effective scatter point comprises: assigning an infinite distance between two effective scatter points at the same pixel position, and maintaining the distance between two effective scatter points at different pixel positions unchanged; constructing a state table and a distance table; the state table is used to record whether each effective scatter point has been processed by clustering; the distance table is used to store the distance between each effective scatter point; determining a traversal addressing condition according to the distribution of each effective scatter point and the distance between each effective scatter point; Based on the state table, the distance table and the traversal addressing condition, each valid scatter point is clustered, and the number of times of stopping traversal addressing is counted; According to the clustering result and the number of times of stopping traversal addressing, the total number of categories and the valid scatter points contained in each category are determined.
6. The laser ranging method of claim 5, wherein, After determining whether the target medium exists according to the target characteristic information corresponding to the target medium and the characteristic value of each category of substance, the method further comprises: If the target medium exists, the spatial position and the physical size of the target medium in the target scene are calculated according to the characteristic value of the valid scatter point under the category to which the target medium belongs.
7. A laser range finder device, characterized by, Comprise: The data acquisition module is used for acquiring the depth data of the first target peak and the second target peak in the time-of-flight histogram of the dToF measurement target scene and the confidence of each corresponding target peak from each scatter point; The low confidence filtering module is used for removing the scatter points below the confidence threshold based on the confidence of the first target peak and the second target peak of each scatter point and the preset confidence threshold, to obtain a plurality of candidate scatter points; The point cloud processing module is used for point cloud processing of the depth data of each candidate scatter point, to reconstruct each two-dimensional depth data to three-dimensional space; The weight calculation module is used for confirming the weight value of the positional relationship between each candidate scatter point according to each candidate scatter point after point cloud processing; The scatter point distance calculation module is used for calculating the distance between each candidate scatter point according to each weight value; The discrete point filtering module is used for filtering discrete points based on the distance value between each candidate scatter point, to screen out valid scatter points; The clustering module is used for clustering analysis of each valid scatter point, and calculating the characteristic value of each category of substance; The medium judgment module is used for determining whether the target medium exists according to the target characteristic information corresponding to the target medium and the characteristic value of each category of substance; the target medium is the medium causing the multipath phenomenon in the target scene; The scatter point distance calculation module is further used for: For each candidate scatter point, if the current scatter point and a first neighboring scatter point within a target neighborhood of the current scatter point belong to different types of target peaks, a first distance relationship is invoked to calculate a distance between the current scatter point and the first neighboring scatter point; the first distance relationship is: ; If the current scatter point and a first neighboring scatter point within its target neighborhood belong to the same type of target peak, then a second distance relationship is invoked to calculate the distance between the current scatter point and the first neighboring scatter point; the second distance relationship is: ; wherein, is the distance between the current scatter point a and the first neighboring scatter point b, is the confidence corresponding to the peak to which the current scatter point a belongs, is the confidence corresponding to the peak to which the first neighboring scatter point a belongs, is the weight value between the positional relationship of the current scatter point and the first neighboring scatter point; if the current scatter point and the first neighboring scatter point within its target neighborhood belong to the first target peak, it is 1, and if the current scatter point and the first neighboring scatter point within its target neighborhood belong to the second target peak, it is -1.
8. An electronic device, comprising: The processor and the memory are included, and the processor is used for implementing the steps of the laser ranging method in any one of claims 1 to 6 when executing the computer program stored in the memory.
9. A readable storage medium, characterized by, The computer program is stored on the readable storage medium, and the computer program is executed by the processor to implement the steps of the laser ranging method in any one of claims 1 to 6.
Citation Information
Patent Citations
Vehicle target identification method and storage medium
CN114359876A
Target identification method and system for three-dimensional point cloud data
CN115131240A