Obstacle recognition method and device, electronic equipment and computer storage medium
By clustering spatial points collected by ultrasonic sensors, determining the clustering distance using ranging distance and echo intensity, and combining geometric distribution features and echo features for obstacle recognition, this technology solves the error problem caused by ignoring the attenuation of ultrasonic ranging accuracy with distance in existing technologies, thereby improving the accuracy and robustness of obstacle recognition.
Patent Information
- Application Number
- CN202511068991.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-31
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2045-07-31
AI Technical Summary
Existing obstacle recognition methods ignore the characteristic that ultrasonic ranging accuracy decays with distance, resulting in large errors in long-distance detection points, affecting the accuracy and robustness of obstacle recognition.
By clustering ultrasonic points collected by multiple ultrasonic sensors at the same time into spatial points in the same preset coordinate system, the clustering distance is determined using the ranging distance and echo intensity, and obstacle identification is performed by combining geometric distribution features and echo features.
The accuracy and robustness of obstacle recognition are improved, and the error of long-distance detection points caused by ignoring the attenuation of ultrasonic ranging accuracy with distance is avoided.
Smart Images

Figure CN120820948A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of ultrasonic technology, and in particular to an obstacle recognition method, device, electronic equipment and computer storage medium. Background Art
[0002] Ultrasonic sensors are currently widely used in scenarios such as low-speed autonomous driving, parking assistance systems, and robot navigation to detect close-range obstacles. Existing obstacle recognition methods collect echo distance and signal strength information from multiple ultrasonic sensors and determine the presence of obstacles through simple threshold filtering or geometric projection.
[0003] Existing obstacle recognition methods ignore the characteristic that ultrasonic ranging accuracy decays with distance, resulting in large errors in long-distance detection points, affecting the accuracy and robustness of obstacle recognition. Summary of the Invention
[0004] The present invention aims to provide an obstacle recognition method, device, electronic device and computer storage medium, which can improve the accuracy of obstacle recognition.
[0005] The embodiments of the present invention can be implemented as follows: In a first aspect, the present invention provides an obstacle identification method, the method comprising: Acquire multiple spatial points, where the multiple spatial points include corresponding points of multiple ultrasonic points collected by at least one ultrasonic sensor at the same time in the same preset coordinate system; Clustering the plurality of spatial points to obtain at least one cluster, wherein a cluster distance between any two spatial points in the clustering process is determined based on a ranging distance and an echo intensity of an ultrasonic point corresponding to each of the two spatial points; Obstacle identification is performed on each of the clusters.
[0006] In an optional embodiment, the step of clustering the multiple spatial points to obtain at least one cluster includes: For each of the spatial points, determining a distance attenuation factor of the spatial point according to the ranging distance of the ultrasonic point corresponding to the spatial point, and determining an intensity weighting factor of the spatial point according to the echo intensity of the ultrasonic point corresponding to the spatial point; For a spatial point pair consisting of any two spatial points in the plurality of spatial points, calculating a cluster distance of the spatial point pair according to a distance attenuation factor and an intensity weighting factor of each spatial point in the spatial point pair; According to the clustering distance of all spatial point pairs, the multiple spatial points are clustered to obtain the at least one cluster cluster. The two spatial points in any spatial point pair in the same cluster cluster are neighbors, and the neighbor relationship is determined based on the clustering distance of the spatial point pair and the clustering radius of each spatial point in the spatial point pair.
[0007] In an optional embodiment, before the step of clustering the plurality of spatial points according to the clustering distances of all pairs of spatial points to obtain the at least one cluster, the step includes: For any target spatial point pair among all the spatial pairs, calculating the adjustment radius of each spatial point of the target spatial pair according to a preset adjustment coefficient and the ranging distance of the ultrasonic point corresponding to each spatial point of the target spatial pair; Calculating the clustering radius of each spatial point of the target space pair according to the preset basic clustering radius and the adjustment radius of each spatial point of the target space pair; If the clustering distance of the target space pair is less than the minimum value of the clustering radius of the spatial points in the target space pair, it is determined that the two spatial points of the target space pair are in a neighbor relationship.
[0008] In an optional embodiment, the step of performing obstacle identification on each of the clusters includes: For any target cluster, if the target cluster appears continuously in spatial points at multiple consecutive moments, obstacle recognition is performed on the target cluster according to the geometric distribution characteristics of the spatial points in the target cluster.
[0009] In an optional embodiment, the geometric distribution characteristics of the spatial points in the target cluster include the total number of spatial points in the target cluster and the average distance of the ranging distances of all spatial points in the target cluster; The step of performing obstacle identification on the target cluster according to the geometric distribution characteristics of the spatial points in the target cluster comprises: If the total number is greater than or equal to a preset number and the average distance is less than a preset working distance, the target cluster is determined to be an obstacle; otherwise, the target cluster is determined to be a non-obstacle.
[0010] In an optional embodiment, after determining that the target cluster is an obstacle, the method further includes: Extracting geometric features from the spatial points of the target cluster, wherein the geometric features include the length of the bounding box of the target cluster and the density of the spatial points of the target cluster; Extracting echo features from echo data of ultrasonic points corresponding to spatial points of the target cluster, wherein the echo features include average echo intensity, minimum echo distance, and echo ratio of the first echo to the second echo; If the echo ratio is greater than or equal to the preset ratio, the average echo intensity is greater than the preset intensity, the length is greater than the preset length, the density is greater than the preset density, and the minimum echo distance is less than the preset distance, then the target cluster is determined to be a high obstacle; otherwise, the target cluster is determined to be a low obstacle.
[0011] In an optional embodiment, for any target cluster, if the target cluster appears continuously in spatial points at multiple consecutive moments, then before the step of performing obstacle identification on the target cluster based on geometric distribution characteristics of the spatial points in the target cluster, the step includes: Obtain each cluster obtained by clustering spatial points at multiple consecutive moments, where the multiple consecutive moments include a target moment corresponding to the target cluster; For any candidate cluster at any time other than the target time among the multiple consecutive time moments, if the distance between the centroid of the candidate cluster and the centroid of the target cluster is less than a preset distance, and the difference between the size of the candidate cluster and the size of the target cluster is less than a preset difference, then it is determined that the target cluster appears at the time corresponding to the candidate cluster; If the number of moments at which the target cluster appears is greater than a preset number, and the moments at which the target cluster appears are continuous, it is determined that the target cluster appears continuously in the spatial points at multiple continuous moments.
[0012] In an optional embodiment, the step of acquiring multiple spatial points includes: Acquire each ultrasonic point collected by at least one ultrasonic sensor at the same time; Calculating the corresponding point of each ultrasonic point in the preset coordinate system; For any target ultrasonic point, if the corresponding point of the target ultrasonic point is within the target horizontal field of view angle, the corresponding point of the target ultrasonic point is used as the spatial point of the target ultrasonic wave. The target horizontal field of view angle is the horizontal field of view angle of the ultrasonic sensor that collects the target ultrasonic point. Each of the ultrasonic points is used as the target ultrasonic point one by one to obtain the multiple spatial points.
[0013] In a second aspect, the present invention provides an obstacle recognition device, comprising: An acquisition module, configured to acquire a plurality of spatial points, wherein the plurality of spatial points include corresponding points of a plurality of ultrasonic points acquired by at least one ultrasonic sensor at the same time in the same preset coordinate system; a clustering module, configured to cluster the plurality of spatial points to obtain at least one cluster, wherein a cluster distance between any two spatial points in the clustering process is determined based on a ranging distance and an echo intensity of an ultrasonic point corresponding to each of the two spatial points; The recognition module is used to perform obstacle recognition on each of the clusters.
[0014] In a third aspect, the present invention provides an electronic device comprising a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the obstacle recognition method as described in any one of the aforementioned embodiments when executing the program.
[0015] In a fourth aspect, the present invention provides a computer storage medium having a computer program stored thereon, which, when executed by a processor, implements the obstacle recognition method as described in any one of the aforementioned embodiments.
[0016] Compared with the prior art, the present invention has the following beneficial effects: When clustering multiple ultrasonic points collected by an ultrasonic sensor at the same time in the same preset coordinate system, the present invention determines the clustering distance between two spatial points based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points. This avoids the error in long-distance detection points caused by ignoring the characteristic that the ultrasonic ranging accuracy decays with distance, thereby improving the accuracy and robustness of recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the embodiments. It should be understood that the following drawings only illustrate certain embodiments of the present invention and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 This is an example flowchart of the obstacle recognition method provided in this embodiment.
[0019] Figure 2 This is an example diagram of determining a spatial point using a single radar provided in this embodiment.
[0020] Figure 3 This is an example diagram of determining a spatial point using dual radars provided in this embodiment.
[0021] Figure 4This is a block diagram of an example of the obstacle recognition device provided in this embodiment.
[0022] Figure 5 This is a block diagram of an example of an electronic device provided in this embodiment.
[0023] Icons: 10 - electronic device; 11 - processor; 12 - memory; 13 - bus; 100 - obstacle recognition device; 110 - acquisition module; 120 - clustering module; 130 - recognition module. DETAILED DESCRIPTION
[0024] To make the objectives, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions of the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Generally, the components of the embodiments of the present invention described and shown in the drawings herein can be arranged and designed in various different configurations.
[0025] Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the invention as claimed, but rather merely represents selected embodiments of the present invention. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without creative effort are intended to fall within the scope of protection of the present invention.
[0026] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.
[0027] In the description of the present invention, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. appear, the orientation or position relationship indicated is based on the orientation or position relationship shown in the accompanying drawings, or is the orientation or position relationship in which the product of the invention is usually placed when in use. It is only for the convenience of describing the present invention and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be understood as a limitation on the present invention.
[0028] In addition, the terms "first", "second", etc., if used, are merely used to distinguish and describe, and should not be understood as indicating or implying relative importance.
[0029] It should be noted that, in the absence of conflict, the features in the embodiments of the present invention may be combined with each other.
[0030] To address the technical problem that existing technologies ignore the characteristic that ultrasonic ranging accuracy decays with distance, resulting in large errors in long-distance detection points, ultimately affecting the accuracy and robustness of obstacle identification, this embodiment provides an obstacle identification method, device, electronic device, and computer storage medium. The core improvement lies in determining the clustering distance based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points when spatially clustering ultrasonic points. This improves the rationality of the clusters obtained by clustering, ultimately improving the accuracy and robustness of obstacle identification within the clusters. This method is described in detail below.
[0031] Please refer to Figure 1 , Figure 1 This is a flowchart of an obstacle identification method provided in this embodiment. The method includes the following steps: Step S101 : Acquire a plurality of spatial points, where the plurality of spatial points include corresponding points of a plurality of ultrasonic points collected by at least one ultrasonic sensor at the same time in the same preset coordinate system.
[0032] In this embodiment, the spatial point can be the position representation of the ultrasonic point of the echo reflected by the obstacle collected by the ultrasonic sensor in a unified preset coordinate system, and its specific representation can be a two-dimensional spatial coordinate. The preset coordinate system refers to the global coordinate system defined in the application system, or an absolute coordinate system set based on the ground or other reference system. For example, the application system includes, but is not limited to, a vehicle system or a robot system. Taking the vehicle system as an example, the preset coordinate system can be a Cartesian coordinate system with the center point of the vehicle as the origin. One spatial point corresponds to one ultrasonic point, and the ultrasonic sensor also collects the ranging distance and echo intensity of each ultrasonic point. The ranging distance refers to the original detection distance of the ultrasonic point from the sensor to the obstacle, and the echo intensity is the signal amplitude of the echo received by the ultrasonic point, which reflects the signal quality of the ultrasonic point. Generally speaking, the larger the ranging distance, the higher the ranging error, and the higher the echo intensity, the more reliable the ultrasonic point.
[0033] In this embodiment, clustering is performed based on the spatial points of multiple ultrasonic points at the same time, which can avoid erroneous clustering caused by timing errors at different sensor acquisition times.
[0034] Step S102 , clustering multiple spatial points to obtain at least one cluster, wherein the cluster distance between any two spatial points in the clustering process is determined based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points.
[0035] In this embodiment, ultrasonic points reflecting echoes from the same obstacle are more likely to be grouped together, with each cluster representing a potential target. Cluster distance is used to determine whether two spatial points should be grouped together. To avoid misclassification and missed clustering due to ranging errors, different distances and echo intensities are weighted differently when calculating the cluster distance. This allows for more tolerant clustering of distant points while maintaining high clustering accuracy for close-in points with high signal-to-noise ratios.
[0036] Step S103: performing obstacle identification on each cluster.
[0037] In this embodiment, each cluster only means a potential target, but whether the target is an obstacle requires further identification. The specific identification method can be further identification based on the distribution characteristics and echo characteristics of the spatial points in the cluster.
[0038] The above method provided in this embodiment, when clustering multiple ultrasonic points collected by the ultrasonic sensor at the same time in the same preset coordinate system, determines the clustering distance between two spatial points based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points. This avoids the error in long-distance detection points caused by ignoring the characteristic that the ultrasonic ranging accuracy decays with distance, and improves the accuracy and robustness of recognition.
[0039] In an optional embodiment, since different ultrasonic sensors have different horizontal fields of view, the detection capability of each ultrasonic sensor only covers a specific range of its horizontal field of view when in operation. To avoid pseudo-clustering of objects from different horizontal fields of view but close to each other and effectively improve the geometric consistency and physical rationality of the clustering results, this embodiment provides a method for obtaining spatial points: First, each ultrasonic point collected by at least one ultrasonic sensor at the same time is obtained; In this embodiment, according to the needs of the actual application scenario, there can be one or more ultrasonic sensors, and multiple ultrasonic sensors can be distributed at different positions of a vehicle or other mobile platform, thereby covering a wider spatial area and improving the comprehensiveness and accuracy of obstacle recognition.
[0040] It should be noted that in an environment with high noise, in order to avoid the influence of noise data, the original data collected by the ultrasonic sensor can be preprocessed to screen out the highly reliable ultrasonic points, and then the spatial points can be determined from the screened ultrasonic points. The preprocessing includes, but is not limited to: (1) reasonably filtering the ranging distances of the original data to exclude abnormal data such as 0 or other over-limit values; (2) screening highly reliable ultrasonic points in combination with the signal-to-noise ratio: the signal-to-noise ratio is calculated from the echo intensity and the background noise level, and the noise can be estimated by sampling in the empty window section when the target echo is not received. For the original data of any point, the calculation formula of its signal-to-noise ratio is: , where C is a constant. For example, C is taken as 20, Aecho is the echo intensity, and Anoise is the average value of the background noise amplitude. The highly reliable ultrasonic points simultaneously meet the following conditions: SNR > 10dB; the ranging distance d is within the effective range. For example, 0.2m < d < 5m, and the echo intensity is greater than the preset threshold. For example, the preset threshold is 50.
[0041] Secondly, calculate the corresponding points of each ultrasonic point in the preset coordinate system; In this embodiment, each ultrasonic point has a local coordinate relative to its所属ultrasonic sensor during acquisition. To achieve the fusion and unified analysis of the data of multiple ultrasonic sensors, these local coordinates need to be converted to a unified preset coordinate system. The conversion process usually depends on the installation position and orientation information of the ultrasonic sensor and is achieved through geometric transformation.
[0042] Thirdly, for any target ultrasonic point, if the corresponding point of the target ultrasonic point is within the target horizontal field of view angle, then the corresponding point of the target ultrasonic point is used as the spatial point of the target ultrasonic wave. The target horizontal field of view angle is the horizontal field of view angle of the ultrasonic sensor that collects the target ultrasonic point; Fourthly, each ultrasonic point is taken as the target ultrasonic point one by one to obtain multiple spatial points.
[0043] In this embodiment, to more clearly illustrate the method of determining spatial points, this embodiment takes the ultrasonic sensor as a radar for illustration. Please refer to Figure 2 , Figure 2 is an example diagram for determining spatial points when there is a single radar provided in this embodiment, Figure 2 In it, point A is the position point where radar A is located, the green arc ADD` is the target horizontal field of view angle, that is, the FOV of radar A, point B is the position point where the obstacle is located, point C is the corresponding point of a certain ultrasonic point in the preset coordinate system, the line segment AC is the measured distance, and the line segment AB is the distance between the radar and the obstacle. If point C is within the FOV of radar A, then point C is used as a spatial point to participate in subsequent clustering; otherwise, point C cannot be used as a spatial point.
[0044] Please refer to Figure 3 , Figure 3 This is an example diagram of determining a spatial point using dual radars provided in this embodiment. Figure 3 In the figure, point A and point F are the locations of radar A and radar F respectively, the green arcs ADD' and ABB' are the target horizontal field of view angles of radar A and radar F respectively, point C is the corresponding point of a certain ultrasonic point in the preset coordinate system, circle A is a circle with point A as the center and the measured distance of A as the radius, circle B is a circle with point B as the center and the measured distance of B as the radius. Only when point C is within the FOV of radar A and radar F at the same time, point C is considered as a spatial point and participates in subsequent clustering. Otherwise, point C is not considered as a spatial point and does not participate in clustering. Figure 3 If the point C shown is not within the FOV of radar A but within the FOV of radar F, or point C is neither within the FOV of radar A nor within the FOV of radar F, then point C is not considered as a spatial point and does not participate in clustering.
[0045] After obtaining multiple spatial points, in order to reasonably weigh the impact of ranging distance and echo intensity on clustering distance, the proximity relationship between spatial points is dynamically adjusted by clustering distance. This embodiment provides a clustering implementation method: First, for each spatial point, the distance attenuation factor of the spatial point is determined according to the ranging distance of the ultrasonic point corresponding to the spatial point, and the intensity weighting factor of the spatial point is determined according to the echo intensity of the ultrasonic point corresponding to the spatial point; In this embodiment, the distance attenuation factor reflects the influence of the ranging distance on the cluster distance calculation. Generally speaking, the distance attenuation factor decreases with increasing ranging distance to reflect the weaker spatial correlation between distant points. For example, if a spatial point is farther away from the ultrasonic point, its corresponding distance attenuation factor is smaller, indicating that the point has a lower correlation with neighboring points during the clustering process, and thus is given less weight when calculating the cluster distance.
[0046] As a specific implementation method, the distance attenuation factor DF can be calculated using the following formula: , where d is the ranging distance, is the adjustment factor, and its value is between 0.2 and 0.5. The larger it is, the more sensitive it is to the influence of ranging distance. The larger d is, the larger DF is.
[0047] In this embodiment, echo intensity reflects the ability of an obstacle surface to reflect ultrasound. Generally speaking, a greater echo intensity indicates a stronger signal and more reliable positioning. Therefore, the intensity weighting factor is used to increase the influence of points with higher echo intensity in the clustering process.
[0048] As a specific implementation, the intensity weighting factor IF can be calculated using the following formula: ,in, is the echo intensity, is the expected median intensity, which can be determined through experimental data. It is a control factor used to control the steepness trend and adjust the slope of the formula. The greater the echo intensity, the closer the IF is to 1; the smaller the echo intensity, the closer the IF is to 0. The intensity weighting factor is used to weaken the "proximity" of spatial points participating in clustering.
[0049] Secondly, for a spatial point pair consisting of any two spatial points in multiple spatial points, the clustering distance of the spatial point pair is calculated according to the distance attenuation factor and intensity weighting factor of each spatial point in the spatial point pair; In this embodiment, for any spatial point pair, its cluster distance can be calculated using the following formula: ,in, represents the clustering distance of spatial point pairs, and are two spatial points in a spatial point pair, and Space points and The spatial coordinates of Represents a spatial point and The Euclidean distance between and Space points The distance attenuation factor and intensity weighting factor of and Space points The distance attenuation factor and intensity weighting factor are calculated from the formula. It can be seen from the formula that in a pair of spatial points, if both points have high echo intensity and a close ranging distance, their corresponding clustering distance will be relatively small, indicating that they are more likely to belong to the same target.
[0050] Finally, according to the clustering distance of all spatial point pairs, multiple spatial points are clustered to obtain at least one cluster. The two spatial points in any spatial point pair in the same cluster are neighbors. The neighbor relationship is determined based on the clustering distance of the spatial point pair and the clustering radius of each spatial point in the spatial point pair.
[0051] In this embodiment, the neighbor relationship means that two spatial points have a strong correlation in spatial distribution and are suitable to be classified into the same cluster.
[0052] It should be noted that existing clustering algorithms can also be used for clustering, except that the clustering distance used during clustering is the clustering distance determined according to the ranging distance and echo intensity provided in this embodiment. Clustering algorithms include, but are not limited to, DBSCAN (Density-Based Spatial Clustering of Applications with Noise), K-Means, etc.
[0053] In an optional embodiment, in order to reflect the difference in ranging distances of ultrasonic points corresponding to different spatial points and the different effects on the clustering threshold, that is, for spatial points at close distances (usually less than 1.5m), the clustering threshold should be stricter, and for spatial points at long distances (usually greater than 1.5m), the clustering threshold should be appropriately relaxed. This embodiment provides an implementation method for determining neighbor relationships: First, for any target spatial point pair in all spatial pairs, the adjustment radius of each spatial point in the target spatial pair is calculated based on the preset adjustment coefficient and the ranging distance of the ultrasonic point corresponding to each spatial point in the target spatial pair; In this embodiment, the preset adjustment coefficient can be an empirical parameter that matches the performance of the ultrasonic sensor and the characteristics of environmental interference. It is used to adjust the dynamic range of the clustering radius to meet the accuracy requirements for obstacle detection at different distances. For example, the preset adjustment coefficient is set to 0.05 / m. The adjustment radius changes dynamically with the ranging distance. The smaller the ranging distance, the smaller the clustering radius and the stricter the constraints. Conversely, the larger the clustering radius, the greater the error tolerance. This allows spatial points farther away to have a larger clustering radius, increasing their likelihood of being identified as neighbors during the clustering process, thereby improving the robustness of long-distance obstacle detection.
[0054] Secondly, the clustering radius of each spatial point of the target space pair is calculated according to the preset basic clustering radius and the adjustment radius of each spatial point of the target space pair; In this embodiment, the preset basic clustering radius is a fixed value preset according to the typical detection capability of the ultrasonic sensor and a preset target. For example, the preset basic clustering radius is set to 0.1 m.
[0055] In this embodiment, the cluster radius of each spatial point can be calculated using the following formula: ,in, is the clustering radius of the spatial points, is the preset basic clustering radius, is the preset adjustment coefficient, is the measured distance of the spatial point, is the adjustment radius of the spatial point.
[0056] Finally, if the clustering distance of the target spatial pair is less than the minimum value of the clustering radius of the spatial points in the target spatial pair, the two spatial points in the target spatial pair are determined to be neighbors.
[0057] In this embodiment, if the target spatial pair includes spatial point 1 and spatial point 2, the clustering radius of spatial point 1 is 0.45m, and the clustering radius of spatial point 2 is 0.55m, the minimum value of the two is 0.45m, and the clustering distance of the target spatial pair is 0.3m. Since 0.3m is less than 0.45m, spatial point 1 and spatial point 2 are neighbors.
[0058] In an optional implementation, in order to avoid false detection caused by sudden or short-lived targets, this embodiment further provides a method for implementing obstacle recognition using spatial points at multiple consecutive moments: For any target cluster, if the target cluster appears continuously in spatial points at multiple consecutive moments, obstacle recognition is performed on the target cluster according to the geometric distribution characteristics of the spatial points in the target cluster.
[0059] In this embodiment, the ultrasonic sensor continuously collects ultrasonic data in a time series. Therefore, for each of the multiple consecutive moments, a set of spatial points is generated. Each set of points is clustered to obtain a corresponding cluster set. The cluster set includes at least one cluster formed by clustering the spatial points at that moment. If the same cluster appears at a predetermined number of consecutive moments across multiple moments, the cluster is considered a stable target, not a sudden, short-lived one.
[0060] In this embodiment, the geometric distribution feature characterizes the distribution characteristics of the spatial points in the clusters to which they belong, and can reflect the structure and stability of the target clusters from the spatial distribution concentration of the spatial points.
[0061] In this embodiment, the method of using spatial points at multiple consecutive moments to identify obstacles can effectively filter out false clusters caused by occasional noise, signal interference or sensor misdetection, while retaining the real obstacle clustering results with persistent characteristics.
[0062] In an optional implementation manner, in order to improve the reliability of determining whether the target clusters appear continuously, this embodiment further provides a specific determination method: First, obtain each cluster obtained by clustering spatial points at multiple consecutive moments, where the multiple consecutive moments include the target moment corresponding to the target cluster; In this embodiment, multiple consecutive moments refer to a set of time points arranged in chronological order, including the target moment corresponding to the target cluster and several other moments that are adjacent or close to the target moment in time, to facilitate dynamic tracking and judgment of the existence status of the target cluster in the time dimension. For example, if the target cluster corresponds to 10:00:00 am on a certain day, and the ultrasonic sensor collects echo data every 5 seconds, the consecutive moments can be 9:59:50, 9:59:55, 10:00:00, 10:00:05, 10:00:10, and 10:00:15 am on that day.
[0063] Secondly, for any candidate cluster at any time other than the target time among multiple consecutive time moments, if the distance between the centroid of the candidate cluster and the centroid of the target cluster is less than a preset distance, and the difference between the size of the candidate cluster and the size of the target cluster is less than a preset difference, then it is determined that the target cluster appears at the time corresponding to the candidate cluster; In this embodiment, the centroid of a cluster refers to the geometric center of all spatial points in the cluster, which characterizes the approximate position of the cluster in space, and can usually be obtained by performing weighted average or arithmetic average calculation on the coordinate values of each spatial point in the cluster in a preset coordinate system. The size of a cluster refers to the size of the range occupied by the cluster in space, and can usually be characterized by calculating the distribution degree of all spatial points in the cluster relative to the centroid. In this embodiment, the size of a cluster may include, but is not limited to, one or more combinations of geometric parameters such as the maximum extension length of the cluster in each spatial dimension, the area of the bounding box, and the maximum distance between spatial points. For example, the spatial range of the cluster can be described in the form of a bounding box, that is, by determining the maximum and minimum values of all spatial points in the cluster in the x and y directions, a minimum square or rectangle surrounding the cluster is constructed, and the length of each side is used as the size parameter.
[0064] In this embodiment, by comparing the centroid distance and size difference between the target cluster at the target moment and candidate clusters at other moments, it is possible to effectively determine whether the two have spatial structural consistency, thereby identifying clusters that persist across the time dimension. When the centroid distance is less than a preset distance and the size difference is less than a preset difference, the candidate cluster is determined to have a high degree of spatial structural similarity with the target cluster, and the target cluster is considered to still exist at the moment corresponding to the candidate cluster.
[0065] Finally, if the number of moments at which the target cluster appears is greater than a preset number and the moments at which the target cluster appears are continuous, it is determined that the target cluster appears continuously in the spatial points at multiple continuous moments.
[0066] In this embodiment, the preset number can be set according to actual needs. For example, the preset number is set to 3.
[0067] As another specific implementation method of trajectory tracking of target clusters, it can be implemented through a historical sliding window mechanism. The specific implementation method is as follows: (1) Assign a unique representation to the clusters generated by the spatial points in each frame (each frame corresponds to a moment); (2) Match the cluster of the current frame with the trajectory of the previous frame: the matching conditions include, but are not limited to: the center of mass distance < the preset distance, and the difference between the sizes is less than the preset difference; if the match is successful, update the trajectory and record the frame information, otherwise, generate a new trajectory record.
[0068] (3) A sliding window is maintained for each trajectory (e.g., the last 3 to 5 frames). If the cluster appears continuously, the confidence is increased by a step (e.g., +10). If it appears in the current frame but is continuous in the historical frames, the confidence is decreased by a step (e.g., -5). If the confidence is ≥ the set threshold (e.g., 30), the cluster is considered a stable cluster.
[0069] (4) For the case where the target does not appear in the interrupted 1~2 frames, interpolation prediction processing can be used, that is, using the historical position to predict the possible position of the current frame.
[0070] (5) If the number of frames in which the target trajectory is continuously missing is greater than the threshold frame (e.g., 3 frames), the target corresponding to the cluster is determined to have disappeared.
[0071] In an optional implementation, for stable clusters, in order to effectively evaluate the density and spatial distribution concentration of spatial points, this embodiment also provides a method for implementing obstacle identification for target clusters based on geometric distribution characteristics: If the total number is greater than or equal to the preset number and the average distance is less than the preset working distance, the target cluster is determined to be an obstacle; otherwise, the target cluster is determined to be a non-obstacle.
[0072] In this embodiment, the geometric distribution characteristics of the spatial points in the target cluster include the total number of spatial points in the target cluster and the average distance of the ranging distances of all spatial points in the target cluster. The total number and the average distance can be used to judge the distribution concentration of the spatial points. The higher the distribution concentration, the greater the probability of an obstacle.
[0073] In this embodiment, the preset number can be set according to the situation in which there may be obstacles reflecting ultrasonic waves in actual application scenarios. The preset working distance can be the effective working distance of the ultrasonic sensor, for example, 5m.
[0074] In an optional embodiment, since obstacles of different heights may have different geometric features and echo characteristics, after determining that the target cluster is an obstacle, the category of the target cluster may be further determined based on the geometric features and echo characteristics. One determination method is: First, geometric features are extracted from the spatial points of the target cluster. The geometric features include the length of the bounding box of the target cluster and the density of the spatial points of the target cluster. In this embodiment, the geometric morphological features characterize the spatial structural characteristics of the target clusters, and are a geometric description of the physical form of the target clusters. The bounding box is the smallest rectangle that can completely contain all the spatial points in the target clusters, and its length refers to the extension length of the bounding box in a certain main direction. The length is usually calculated as the side length of the bounding box in the corresponding direction, which is used to reflect the size of the obstacle in space. The density of spatial points is the number of spatial points contained in a unit area, which is obtained by dividing the total number of spatial points in the cluster by the area of the bounding box, and is used to characterize the density of the spatial point distribution in the cluster.
[0075] Secondly, the echo features are extracted from the echo data of the ultrasonic points corresponding to the spatial points of the target clusters. The echo features include the average echo intensity, the minimum echo distance, and the echo ratio of the first echo to the second echo. In this embodiment, the echo characteristics characterize the ultrasonic reflection characteristics of the target cluster. The average echo intensity is the average value of the echo intensities of the ultrasonic points corresponding to all spatial points in the target cluster, and is used to reflect the strength of the surface reflection ability of the object corresponding to the target cluster. The minimum echo distance is defined as the distance value with the shortest echo return time among the ultrasonic points corresponding to all spatial points in the target cluster, and is used to characterize the distance between the point closest to the ultrasonic sensor in the cluster and the sensor. The echo ratio of the first echo and the second echo is defined as the intensity ratio of the first echo to the second echo at the same ultrasonic point, and the ratio is statistically analyzed at the cluster level to reflect whether the object corresponding to the cluster has multiple reflection characteristics, such as metal surfaces, multi-layer structures, etc.
[0076] Finally, if the echo ratio is greater than or equal to the preset ratio, the average echo intensity is greater than the preset intensity, the length is greater than the preset length, the density is greater than the preset density, and the minimum echo distance is less than the preset distance, the target cluster is determined to be a high obstacle; otherwise, the target cluster is determined to be a low obstacle.
[0077] In this embodiment, tall obstacles are generally more likely to have multiple reflections, have higher average echo intensity, have more reflection points, and are densely packed, making them more likely to be detected at close range. This judgment method fully considers the geometric significance of obstacles, the significance of reflection intensity, and their proximity to the ultrasonic sensor, thereby achieving a precise classification of obstacle heights.
[0078] In this embodiment, the preset ratio, preset intensity, preset length, preset density, and preset distance can all be set according to the needs of the actual scenario. For example, the preset ratio is set to 2 times, the preset length is set to 1m, the preset density is set to 10, and the preset distance is set to 50cm.
[0079] As another implementation method, machine learning methods can also be used to convert geometric features and echo features into feature vectors. The feature vectors include, but are not limited to: (1) geometric dimensions: length, width, number of points, area, and the ratio of the first and second echoes; (2) density: number of points / area; (3) echo intensity: average echo intensity, maximum echo intensity, and echo intensity variance. The feature vectors are input into a pre-trained obstacle recognition and classification model, and the output is the category of the obstacle, i.e., high obstacle / low obstacle. For example, high obstacles are walls, cars, people, etc., and low obstacles are limit blocks, closed ground locks, etc.
[0080] In order to execute the corresponding steps in the above embodiment and various possible implementations, the following provides an implementation method of the obstacle recognition device 100. Figure 4 , Figure 4 This is a block diagram of the obstacle recognition device provided in this embodiment. It should be noted that the basic principles and technical effects of the obstacle recognition device 100 provided by the present invention are the same as those of the corresponding above-mentioned embodiments. For the sake of brief description, they are not mentioned in this embodiment.
[0081] The obstacle recognition device 100 includes an acquisition module 110 , a clustering module 120 , and a recognition module 130 .
[0082] The acquisition module 110 is configured to acquire a plurality of spatial points, where the plurality of spatial points include corresponding points of a plurality of ultrasonic points collected by at least one ultrasonic sensor at the same time in the same preset coordinate system.
[0083] The clustering module 120 is used to cluster multiple spatial points to obtain at least one cluster, wherein the cluster distance between any two spatial points in the clustering process is determined based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points.
[0084] The identification module 130 is configured to identify obstacles for each cluster.
[0085] In an optional embodiment, the clustering module 120 is specifically configured to: For each spatial point, a distance attenuation factor of the spatial point is determined according to the ranging distance of the ultrasonic point corresponding to the spatial point, and an intensity weighting factor of the spatial point is determined according to the echo intensity of the ultrasonic point corresponding to the spatial point; For a spatial point pair consisting of any two spatial points in a plurality of spatial points, the clustering distance of the spatial point pair is calculated according to the distance attenuation factor and intensity weighting factor of each spatial point in the spatial point pair; According to the clustering distance of all spatial point pairs, multiple spatial points are clustered to obtain at least one cluster. The two spatial points in any spatial point pair in the same cluster are neighbors. The neighbor relationship is determined based on the clustering distance of the spatial point pair and the clustering radius of each spatial point in the spatial point pair.
[0086] In an optional embodiment, the clustering module 120 is further configured to: For any target spatial point pair in all spatial pairs, the adjustment radius of each spatial point of the target spatial pair is calculated according to the preset adjustment coefficient and the ranging distance of the ultrasonic point corresponding to each spatial point of the target spatial pair; Calculate the clustering radius of each spatial point of the target space pair according to the preset basic clustering radius and the adjustment radius of each spatial point of the target space pair; If the clustering distance of the target spatial pair is less than the minimum value of the clustering radius of the spatial points in the target spatial pair, the two spatial points in the target spatial pair are determined to be neighbors.
[0087] In an optional embodiment, the identification module 130 is specifically configured to: For any target cluster, if the target cluster appears continuously in spatial points at multiple consecutive moments, obstacle recognition is performed on the target cluster according to the geometric distribution characteristics of the spatial points in the target cluster.
[0088] In an optional embodiment, the geometric distribution characteristics of the spatial points in the target cluster include the total number of spatial points in the target cluster and the average distance of the ranging distances of all spatial points in the target cluster; When performing obstacle identification on the target cluster based on the geometric distribution characteristics of the spatial points in the target cluster, the identification module 130 is further configured to: If the total number is greater than or equal to the preset number and the average distance is less than the preset working distance, the target cluster is determined to be an obstacle; otherwise, the target cluster is determined to be a non-obstacle.
[0089] In an optional embodiment, the identification module 130 is further configured to: Extracting geometric features from the spatial points of the target cluster, the geometric features including the length of the bounding box of the target cluster and the density of the spatial points of the target cluster; Extract echo features from the echo data of the ultrasonic points corresponding to the spatial points of the target clusters. The echo features include the average echo intensity, the minimum echo distance, and the echo ratio of the first echo to the second echo. If the echo ratio is greater than or equal to the preset ratio, the average echo intensity is greater than the preset intensity, the length is greater than the preset length, the density is greater than the preset density, and the minimum echo distance is less than the preset distance, the target cluster is determined to be a high obstacle; otherwise, the target cluster is determined to be a low obstacle.
[0090] In an optional embodiment, the identification module 130 is further configured to: Obtain each cluster obtained by clustering spatial points at multiple consecutive moments, where the multiple consecutive moments include a target moment corresponding to the target cluster; For any candidate cluster at any time other than the target time among multiple consecutive time moments, if the distance between the centroid of the candidate cluster and the centroid of the target cluster is less than a preset distance, and the difference between the size of the candidate cluster and the size of the target cluster is less than a preset difference, then it is determined that the target cluster appears at the time corresponding to the candidate cluster; If the number of moments at which the target cluster appears is greater than a preset number, and the moments at which the target cluster appears are continuous, it is determined that the target cluster appears continuously in the spatial points at multiple continuous moments.
[0091] In an optional implementation manner, the acquisition module 110 is specifically configured to: Acquire each ultrasonic point collected by at least one ultrasonic sensor at the same time; Calculate the corresponding point of each ultrasonic point in the preset coordinate system; For any target ultrasonic point, if the corresponding point of the target ultrasonic point is within the target horizontal field of view angle, the corresponding point of the target ultrasonic point is taken as the spatial point of the target ultrasonic wave. The target horizontal field of view angle is the horizontal field of view angle of the ultrasonic sensor that collects the target ultrasonic point. Each ultrasonic point is taken as a target ultrasonic point one by one to obtain multiple spatial points.
[0092] The embodiment of the present invention further provides a block diagram of an electronic device 10, which implements the obstacle recognition method of the aforementioned embodiment. Figure 5 , Figure 5 This is a block diagram of an electronic device 10 provided in this embodiment. The electronic device 10 includes a processor 11 , a memory 12 , and a bus 13 . The processor 11 and the memory 12 are connected via the bus 13 .
[0093] Processor 11 can be an integrated circuit chip with signal processing capabilities. During implementation, each step of the obstacle recognition method described in the above embodiment can be completed by hardware integrated logic circuits or software instructions within processor 11. Processor 11 can be a general-purpose processor, including a CPU (Central Processing Unit) or a Network Processor (NP). It can also be a DSP (Digital Signal Processor), an ASIC (Application Specific Integrated Circuit), an FPGA (Field Programmable Logic Gate Array), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0094] The memory 12 is used to store a program for implementing the obstacle recognition method. The program may be a software function module stored in the memory 12 in the form of software or firmware or fixed in the OS (Operating System) of the electronic device 10 .
[0095] After receiving the execution instruction, the processor 11 executes the program to implement the obstacle recognition method of the aforementioned embodiment.
[0096] This embodiment provides a computer storage medium having a computer program stored thereon. When the computer program is executed by a processor, the obstacle recognition method as described in the above embodiments is implemented.
[0097] In summary, an embodiment of the present invention provides an obstacle identification method, device, electronic device and computer storage medium, the method comprising: obtaining multiple spatial points, the multiple spatial points comprising corresponding points of multiple ultrasonic points collected by at least one ultrasonic sensor at the same time in the same preset coordinate system; clustering the multiple spatial points to obtain at least one clustering cluster, wherein the clustering distance between any two spatial points in the clustering process is determined based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points; and performing obstacle identification on each clustering cluster. Compared with the prior art, this embodiment has at least the following advantages: (1) When clustering multiple ultrasonic points collected by the ultrasonic sensor at the same time in the same preset coordinate system, the clustering distance between two spatial points is determined based on the ranging distance and echo intensity of the ultrasonic point corresponding to each of the two spatial points, thereby avoiding the error of long-distance detection points caused by ignoring the characteristic that the ultrasonic ranging accuracy decays with distance, and improving the accuracy and robustness of recognition; (2) The clustering radius is dynamically determined, so that the clustering of close-range points is stricter and the false clustering rate is reduced, and the clustering of long-range points is moderately relaxed to ensure the integrity of the target, and the intensity weighting factor controls the participation of spatial points corresponding to ultrasonic points with weaker intensity in clustering; (3) Through geometric morphological features and echo features, high and low obstacles can be distinguished, effectively assisting the obstacle avoidance strategy; (4) Combined with the time continuity dimension, the dynamic behavior of obstacles can be effectively tracked and judged.
[0098] The above descriptions are merely various embodiments of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications or substitutions that can be readily conceived by a person skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be based on the scope of protection of the claims.
Claims
1. An obstacle recognition method, characterized in that: The method comprises: Acquire multiple spatial points, where the multiple spatial points include corresponding points of multiple ultrasonic points collected by at least one ultrasonic sensor at the same time in the same preset coordinate system; Clustering the plurality of spatial points to obtain at least one cluster, wherein a cluster distance between any two spatial points in the clustering process is determined based on a ranging distance and an echo intensity of an ultrasonic point corresponding to each of the two spatial points; Obstacle identification is performed on each of the clusters.
2. The method according to claim 1, characterized in that The step of clustering the plurality of spatial points to obtain at least one cluster comprises: For each of the spatial points, determining a distance attenuation factor of the spatial point according to the ranging distance of the ultrasonic point corresponding to the spatial point, and determining an intensity weighting factor of the spatial point according to the echo intensity of the ultrasonic point corresponding to the spatial point; For a spatial point pair consisting of any two spatial points in the plurality of spatial points, calculating a cluster distance of the spatial point pair according to a distance attenuation factor and an intensity weighting factor of each spatial point in the spatial point pair; According to the clustering distance of all spatial point pairs, the multiple spatial points are clustered to obtain the at least one cluster cluster. The two spatial points in any spatial point pair in the same cluster cluster are neighbors, and the neighbor relationship is determined based on the clustering distance of the spatial point pair and the clustering radius of each spatial point in the spatial point pair.
3. The method according to claim 2, characterized in that Before the step of clustering the plurality of spatial points according to the clustering distances of all pairs of spatial points to obtain the at least one cluster, the method further comprises: For any target spatial point pair among all the spatial pairs, calculating the adjustment radius of each spatial point of the target spatial pair according to a preset adjustment coefficient and the ranging distance of the ultrasonic point corresponding to each spatial point of the target spatial pair; Calculating the clustering radius of each spatial point of the target space pair according to the preset basic clustering radius and the adjustment radius of each spatial point of the target space pair; If the clustering distance of the target space pair is less than the minimum value of the clustering radius of the spatial points in the target space pair, it is determined that the two spatial points of the target space pair are in a neighbor relationship.
4. The method according to claim 1, wherein The step of performing obstacle identification on each of the clusters comprises: For any target cluster, if the target cluster appears continuously in spatial points at multiple consecutive moments, obstacle recognition is performed on the target cluster according to the geometric distribution characteristics of the spatial points in the target cluster.
5. The method according to claim 4, characterized in that The geometric distribution characteristics of the spatial points in the target cluster include the total number of spatial points in the target cluster and the average distance of the ranging distances of all spatial points in the target cluster; The step of performing obstacle identification on the target cluster according to the geometric distribution characteristics of the spatial points in the target cluster comprises: If the total number is greater than or equal to a preset number and the average distance is less than a preset working distance, the target cluster is determined to be an obstacle; otherwise, the target cluster is determined to be a non-obstacle.
6. The method according to claim 5, characterized in that After determining that the target cluster is an obstacle, the method includes: Extracting geometric features from the spatial points of the target cluster, wherein the geometric features include the length of the bounding box of the target cluster and the density of the spatial points of the target cluster; Extracting echo features from echo data of ultrasonic points corresponding to spatial points of the target cluster, wherein the echo features include average echo intensity, minimum echo distance, and echo ratio of the first echo to the second echo; If the echo ratio is greater than or equal to the preset ratio, the average echo intensity is greater than the preset intensity, the length is greater than the preset length, the density is greater than the preset density, and the minimum echo distance is less than the preset distance, then the target cluster is determined to be a high obstacle; otherwise, the target cluster is determined to be a low obstacle.
7. The method according to claim 4, characterized in that For any target cluster, if the target cluster appears continuously in spatial points at multiple consecutive moments, before the step of performing obstacle identification on the target cluster based on the geometric distribution characteristics of the spatial points in the target cluster, the method includes: Obtain each cluster obtained by clustering spatial points at multiple consecutive moments, where the multiple consecutive moments include a target moment corresponding to the target cluster; For any candidate cluster at any time other than the target time among the multiple consecutive time moments, if the distance between the centroid of the candidate cluster and the centroid of the target cluster is less than a preset distance, and the difference between the size of the candidate cluster and the size of the target cluster is less than a preset difference, then it is determined that the target cluster appears at the time corresponding to the candidate cluster; If the number of moments at which the target cluster appears is greater than a preset number, and the moments at which the target cluster appears are continuous, it is determined that the target cluster appears continuously in the spatial points at multiple continuous moments.
8. The method according to claim 1, characterized in that The step of obtaining multiple spatial points includes: Acquire each ultrasonic point collected by at least one ultrasonic sensor at the same time; Calculating the corresponding point of each ultrasonic point in the preset coordinate system; For any target ultrasonic point, if the corresponding point of the target ultrasonic point is within the target horizontal field of view angle, the corresponding point of the target ultrasonic point is used as the spatial point of the target ultrasonic wave. The target horizontal field of view angle is the horizontal field of view angle of the ultrasonic sensor that collects the target ultrasonic point. Each of the ultrasonic points is used as the target ultrasonic point one by one to obtain the multiple spatial points.
9. An obstacle recognition device, characterized in that: The device comprises: An acquisition module, configured to acquire a plurality of spatial points, wherein the plurality of spatial points include corresponding points of a plurality of ultrasonic points acquired by at least one ultrasonic sensor at the same time in the same preset coordinate system; a clustering module, configured to cluster the plurality of spatial points to obtain at least one cluster, wherein a cluster distance between any two spatial points in the clustering process is determined based on a ranging distance and an echo intensity of an ultrasonic point corresponding to each of the two spatial points; The recognition module is used to perform obstacle recognition on each of the clusters.
10. An electronic device, characterized in that: The system comprises a processor and a memory, wherein the memory is used to store a program, and the processor is used to implement the obstacle recognition method according to any one of claims 1 to 8 when executing the program.
11. A computer storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the obstacle recognition method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Warehouse logistics AGV obstacle detection method and device, equipment and medium
CN112731338A
Laser radar target detection method and system based on Euclidean clustering
CN115372995A
3D laser radar detection method based on laser intensity
CN117741694A
Device and method for clustering radar reflection point and electronic apparatus
JP2021034025A
Radar tracking method, noise removal method, device and instrument
JP2022087822A
Cited By
A substation safety distance monitoring method based on ultrasonic ranging
CN122386308A