Object detection method and device, equipment and medium

By clustering and merging single-line lidar point cloud data and extracting key data points, the high computational complexity of single-line lidar object detection is solved, and lightweight obstacle detection and environmental perception are achieved.

CN120673364APending Publication Date: 2025-09-19XINHUA SAN IND INTERNET CO LTD
View PDF 8 Cites 0 Cited by

Patent Information

Application Number
CN202510764222.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-06-09
Publication Date
2025-09-19

AI Technical Summary

Technical Problem

Object detection based on single-line lidar has high computational complexity and is difficult to meet real-time processing requirements.

Method used

By acquiring the target point cloud data generated by a single-line lidar, data points are clustered and merged, key data points are extracted, the boundary envelope of the target object is determined, the data processing volume is reduced, and excessive clustering is suppressed.

Benefits of technology

It achieves accurate representation of object contour shape while reducing data volume, and is suitable for resource-constrained low-cost robot environment perception and path decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120673364A_ABST
    Figure CN120673364A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of data processing, and discloses an object detection method, device and equipment and a medium, and the method comprises the steps: obtaining target point cloud data generated by employing a single-line laser radar; clustering the data points according to the distance between the data points in the target point cloud data to obtain a corresponding original cluster; according to the distance between the end points of each original cluster, merging the original clusters to obtain a corresponding target cluster; the target cluster corresponds to a corresponding target object; key point extraction is carried out on the target cluster, and a plurality of key data points used for representing the boundary shape of the target object are extracted from the target cluster; and determining a boundary envelope of the target object according to the plurality of key data points. According to the invention, the clustering effect can be improved, and high-precision obstacle contour extraction is realized while the real-time performance is ensured.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of data processing technology, and in particular to an object detection method, device, equipment and medium. Background Art

[0002] Controlling intelligent robots and other devices requires environmental perception technology to detect objects in the surrounding environment, such as pedestrians and obstacles. Among the numerous sensors used for environmental perception, lidar (LiDAR) has become an indispensable key sensor for intelligent robots due to its high-precision distance measurement capabilities and insensitivity to ambient lighting conditions. Single-line LiDAR, in particular, demonstrates unique value in specific application scenarios due to its low cost, simple structure, and high reliability.

[0003] However, the current methods of object detection based on single-line lidar generally have high computational complexity and are difficult to meet real-time processing requirements. Summary of the Invention

[0004] In view of this, the present invention provides an object detection method, apparatus, device and medium to solve the problem of high computational complexity of object detection based on single-line laser radar.

[0005] In a first aspect, the present invention provides an object detection method, comprising:

[0006] Acquire target point cloud data generated by a single-line laser radar; the target point cloud data includes a plurality of data points;

[0007] Clustering the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters;

[0008] Merging the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters; the target clusters correspond to corresponding target objects;

[0009] Performing key point extraction on the target cluster, extracting a plurality of key data points for representing the boundary shape of the target object from the target cluster;

[0010] A boundary envelope of the target object is determined according to the plurality of key data points.

[0011] In some optional implementations, obtaining target point cloud data generated using a single-line laser radar includes:

[0012] Obtain the original point cloud data collected by the single-line laser radar;

[0013] Data points in the original point cloud data whose distance from the single-line laser radar exceeds a filtering distance threshold are deleted to generate target point cloud data.

[0014] In some optional implementations, clustering the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters includes:

[0015] For each data point in the target point cloud data, clustering multiple data points whose distances between the data points are less than a preset clustering distance threshold to obtain corresponding original cluster clusters;

[0016] Wherein, for any data point in the original cluster, the distance between it and at least one other data point in the original cluster is less than the cluster distance threshold.

[0017] In some optional implementations, merging the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters includes:

[0018] Identifying endpoints of each of the original clusters; the endpoints include a start point and an end point of the original cluster;

[0019] When the distance between the endpoints of two original clusters is less than a preset merging distance threshold, the two original clusters are merged until there are no two original clusters whose endpoints have a distance less than the merging distance threshold and have not been merged;

[0020] The cluster generated after merging is used as the target cluster.

[0021] In some optional implementations, extracting key points from the target cluster to extract a plurality of key data points for representing the boundary shape of the target object from the target cluster includes:

[0022] Taking the endpoints of the target cluster as key data points;

[0023] Extract mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster, and use the mutation data points as key data points.

[0024] In some optional embodiments, extracting mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster includes:

[0025] Performing a key point extraction operation on each data point in the target cluster in sequence until all data points in the target cluster are traversed;

[0026] The key point extraction operation includes:

[0027] For a data point to be processed on which the key point extraction operation is performed, determining a reference straight line between the data point to be processed and a reference data point; the reference data point is the latest key data point, or another data point that is separated from the data point to be processed by a preset number of data points;

[0028] A data point located between the reference data point and the data point to be processed and whose distance to the reference straight line exceeds a characteristic distance threshold is taken as a key data point.

[0029] In some optional embodiments, the method further comprises:

[0030] Determining a sequence length of a key data point sequence based on a plurality of the key data points including at least an endpoint of the target cluster;

[0031] Delete the target clusters whose sequence length is less than the preset length threshold.

[0032] In some optional implementations, determining the boundary envelope of the target object based on the plurality of key data points includes:

[0033] Determining a structure type corresponding to a boundary of the target object;

[0034] In the case where the structure type is a straight line type, determining a straight line boundary of the target object according to the plurality of key data points, and expanding the straight line boundary by a preset distance to generate an envelope surrounding the straight line boundary;

[0035] In the case where the structure type is a curve type, convex hull extraction is performed based on the plurality of key data points to determine a polygonal envelope corresponding to the boundary of the target object.

[0036] In a second aspect, the present invention provides an object detection device, comprising:

[0037] An acquisition module, configured to acquire target point cloud data generated by a single-line laser radar; the target point cloud data includes a plurality of data points;

[0038] A clustering module, configured to cluster the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters;

[0039] a merging module, configured to merge the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters; the target clusters correspond to corresponding target objects;

[0040] An extraction module, configured to extract key points from the target cluster, and extract a plurality of key data points for representing the boundary shape of the target object from the target cluster;

[0041] An envelope module is used to determine the boundary envelope of the target object according to the multiple key data points.

[0042] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the object detection method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0043] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the object detection method of the first aspect or any corresponding embodiment thereof.

[0044] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the object detection method of the first aspect or any corresponding embodiment thereof.

[0045] The present invention collects point cloud data of the surrounding environment based on a single-line laser radar, reduces the amount of data processing, performs preliminary clustering according to the distance between data points, and then searches for other clusters that can be merged according to the endpoints of the clusters, ultimately obtaining a more accurate clustering result and suppressing over-clustering; by extracting key data points in the clusters, each object in the environment is identified based on the key data points, and the outline of each object is represented in an envelope manner, while reducing the amount of data, the outline shape of the object can also be accurately represented, and high-precision obstacle outline extraction can be achieved while ensuring real-time performance, which can realize lightweight obstacle detection and provide a reliable basis for robot environmental perception and path decision-making, and is particularly suitable for low-cost robots with limited resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0046] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in related technologies, the following briefly introduces the drawings required for use in the specific embodiments or related technical descriptions. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0047] Figure 1 is a flow chart of an object detection method according to an embodiment of the present invention;

[0048] Figure 2is a schematic diagram of an original cluster according to an embodiment of the present invention;

[0049] Figure 3 is a schematic diagram of a target cluster according to an embodiment of the present invention;

[0050] Figure 4 is a schematic flow chart of another object detection method according to an embodiment of the present invention;

[0051] Figure 5 is a schematic diagram of a straight line envelope according to an embodiment of the present invention;

[0052] Figure 6 is a schematic diagram of an envelope of a curve type according to an embodiment of the present invention;

[0053] Figure 7 is a flowchart of yet another object detection method according to an embodiment of the present invention;

[0054] Figure 8 is a structural block diagram of an object detection device according to an embodiment of the present invention;

[0055] Figure 9 Schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0056] To make the purpose, technical solutions, and advantages of the embodiments of the present invention more clear, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without making creative efforts shall fall within the scope of protection of the present invention.

[0057] With the rapid development of technologies such as intelligent robots and autonomous driving, environmental perception, as one of their core technologies, has a decisive impact on the safety and reliability of these systems. In environmental perception and obstacle detection for intelligent robots, 2D (two-dimensional) single-line LiDAR, 3D (three-dimensional) LiDAR, and 3D cameras are widely used key sensors. Each sensor has its own unique advantages and applicable scenarios in the application of obstacle detection algorithms, resulting in different detection effects for different application scenarios and specific obstacles.

[0058] 3D LiDAR excels at capturing the spatial structure of the environment and the 3D outlines of objects by generating rich 3D point cloud data. This point cloud data can be combined with advanced deep learning algorithms to achieve high-precision target detection and classification, thus gaining widespread application in intelligent robotics and autonomous driving.

[0059] 3D cameras not only provide 3D information but also capture RGB (red, green, and blue) image information. This multimodal data provides more comprehensive and richer environmental information. RGB images can be used for color and texture analysis, enabling the identification, detection, classification, and semantic segmentation of environmental obstacles. Notably, the combined use of these sensors is becoming a trend. By fusing data from different sensors, the system can achieve a more accurate and reliable understanding of the environment. For example, combining the high-precision point cloud of a 3D lidar with the RGB images of a 3D camera.

[0060] Existing 3D LiDAR point cloud processing algorithms excel at detecting environmental obstacles, but they are expensive, require high data collection and labeling requirements, require complex and multiple training and parameter adjustments, and place high demands on the controller's computing power, making the overall solution quite expensive. Furthermore, the risk of missed detection of unlabeled or unlearned objects increases safety risks for intelligent robots in operational scenarios.

[0061] While 3D cameras are cheaper than 3D lidar, most have a shorter effective detection range and are more sensitive to environmental factors like light fluctuations. 3D camera obstacle detection algorithms often use a post-processing approach that combines 2D images with point clouds and rely on deep learning algorithms. This results in higher algorithm costs and requires more computing power from the controller.

[0062] 2D single-line lidar can effectively capture environmental obstacle information in the current frame at a lower cost and with the advantage of smaller data volumes per frame. Although it can only detect obstacles at a fixed height, its data volume is far less than that of 3D cameras or 3D lidar, and its rich and diverse processing algorithms make it widely used in practical applications. 2D lidar point cloud data can be processed by a rich set of algorithms, eliminating the need for complex and time-consuming data model training, while still enabling real-time and accurate obstacle detection.

[0063] There are several solutions for processing point clouds from single-line lidar, including density-based point cloud clustering algorithms, line detection based on the Hough transform, and model fitting based on RANSAC (Random Sample Consensus). However, these methods still face numerous challenges in practical applications, including high computational complexity that makes it difficult to meet real-time processing requirements, complex algorithm parameter adjustment, insufficient generalization capabilities across environments, inaccurate point cloud boundary extraction, and the susceptibility to false detections, which can affect subsequent intelligent decision-making and path planning.

[0064] According to an embodiment of the present invention, an embodiment of an object detection method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0065] This embodiment provides an object detection method that can be applied to devices that require environmental perception, such as intelligent robots. Figure 1 is a flow chart of an object detection method according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps.

[0066] Step S101: Obtain target point cloud data generated by a single-line laser radar. The target point cloud data includes a plurality of data points.

[0067] In this embodiment, when a single-line laser radar performs environmental perception, it collects data points on the surfaces of various objects (e.g., obstacles) in the surrounding environment, thereby generating corresponding point cloud data. It is understood that the point cloud data collected by a single-line laser radar is 2D point cloud data, such as point cloud data at a fixed plane height. Furthermore, a single-line laser radar can collect data in real time, thereby collecting multiple frames of point cloud data. This embodiment uses one frame of point cloud data for illustration.

[0068] For ease of description, the point cloud data to be processed is referred to as target point cloud data. For example, the target point cloud data is a frame of point cloud data directly collected by a single-line lidar. Accordingly, the target point cloud data also includes multiple data points, each of which can represent the corresponding position coordinates of the object surface.

[0069] Among them, due to the influence of the installation position of the single-line laser radar, the point cloud data it collects needs to be converted into the robot's own coordinate system, the coordinates of each data point are represented in its own coordinate system, and the target point cloud data is generated for subsequent processing.

[0070] Step S102 : clustering the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters.

[0071] In this embodiment, the distance between each data point in the target point cloud data may be determined, and then clustering may be performed based on the distance between the data points, thereby dividing each data point into a plurality of clusters, namely, original clusters.

[0072] Compared with density-based clustering algorithms such as DBSCAN (Density-Based Spatial Clustering of Applications with Noise), this embodiment clusters by the distance between data points. It is simple to implement, has a small amount of calculation, and is conducive to quickly completing the clustering process.

[0073] Step S103: merging the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters. The target clusters correspond to the corresponding target objects.

[0074] In this embodiment, clustering is performed based on the distance between data points. A distance threshold is typically set to determine whether clustering is acceptable, hereinafter referred to as the clustering distance threshold. Due to the complexity of obstacles in real environments, a high clustering distance threshold can lead to over-clustering, while a low clustering distance threshold can result in omissions and result in data points from the same object being grouped into multiple clusters. To ensure clustering effectiveness, this embodiment further merges the original clusters.

[0075] Specifically, for each original cluster, the endpoints of the original cluster can be determined. Since the original cluster is obtained by clustering 2D point cloud data, all data points in the original cluster are two-dimensional shapes as a whole, and its endpoints include the starting point and the end point. It can be understood that the starting point and the end point are both data points in the original cluster.

[0076] Single-line LiDAR collects a frame of point cloud data through rotational scanning, so the starting and ending points can be determined based on the order in which the data points were collected. For example, for each data point in an original cluster, the first collected data point is used as the starting point, and the last collected data point is used as the ending point.

[0077] After determining the endpoints (including the starting and ending points) of each original cluster, the distance between the endpoints of the original cluster is further used to determine whether two original clusters can be merged into one cluster. Finally, multiple original clusters with close endpoint distances are merged into a new cluster to generate a target cluster. In this embodiment, each data point in the target cluster is regarded as a point on the surface of a target object, and each target cluster corresponds to a target object; the target object is an object to be detected in the surrounding environment, such as an obstacle; for example, each target cluster corresponds to an obstacle.

[0078] Figure 2 A schematic diagram of the original cluster is shown. Figure 2 As shown in Figure 2, after clustering the target point cloud data, four original clusters are generated. Figure 2Each elliptical curve in corresponds to an original cluster. Figure 2 As shown, the first original cluster includes data points a1 to a6, the second original cluster includes data points b1 to b4, the third original cluster includes data points c1 to c6, and the fourth original cluster includes data points d1 to d6. 12 It can be understood that for the first original cluster, its starting point is data point a1 and its end point is data point a6. The endpoints of the remaining original clusters are similar to this and will not be described in detail.

[0079] right Figure 2 The four original clusters shown are merged. If the end point of the first original cluster (data point a6) is close to the starting point of the second original cluster (data point b1), the two can be merged. The merged result can be seen in Figure 3 shown. Figure 3 In the example, the first and second original clusters are merged into one target cluster. The third and fourth original clusters are far away from the endpoints of other clusters and do not meet the distance merging condition. Therefore, the two are respectively used as corresponding target clusters.

[0080] Step S104 : extract key points from the target cluster, and extract a plurality of key data points for representing the boundary shape of the target object from the target cluster.

[0081] In this embodiment, the merged target clusters correspond to the corresponding target objects. Therefore, the boundaries of the target objects can be determined based on the data points in the target clusters, enabling object detection in the surrounding environment. However, since the target clusters contain many data points, directly extracting the boundaries is computationally intensive. Therefore, only the key data points that influence the boundaries are extracted to reduce the subsequent computational effort.

[0082] Specifically, for each target cluster, it can be determined whether each data point therein is a key point representing the boundary shape of the target object. If so, the data point is used as a key data point.

[0083] The starting and ending points of the target cluster represent the starting and ending locations of the target object boundary, so both can be used as key data points. Whether other data points between the starting and ending points are key data points depends on the actual situation.

[0084] Step S105 : determining the boundary envelope of the target object according to the multiple key data points.

[0085] In this embodiment, the target cluster's multiple data points are narrowed down to a limited number of key data points, and the boundary shape of the target object is determined based on these key data points. This embodiment represents the target object's boundary shape in the form of an envelope, which can accurately represent the target object's boundary using an envelope shape with the smallest area.

[0086] The object detection method provided in this embodiment collects point cloud data of the surrounding environment based on a single-line laser radar, reduces the amount of data processing, performs preliminary clustering according to the distance between data points, and then searches for other clusters that can be merged according to the endpoints of the clusters, ultimately obtaining a more accurate clustering result, which can suppress over-clustering; by extracting key data points in the clusters, each object in the environment is identified based on the key data points, and the outline of each object is represented in an envelope manner, while reducing the amount of data, the outline shape of the object can also be accurately represented, and high-precision obstacle outline extraction can be achieved while ensuring real-time performance, which can realize lightweight obstacle detection and provide a reliable basis for robot environmental perception and path decision-making, and is particularly suitable for low-cost robots with limited resources.

[0087] This embodiment provides an object detection method that can be applied to devices that require environmental perception, such as intelligent robots. Figure 4 is a flow chart of an object detection method according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps.

[0088] Step S401: Acquire target point cloud data generated by a single-line laser radar; the target point cloud data includes a plurality of data points.

[0089] For details, please see Figure 1 Step S101 of the illustrated embodiment will not be described in detail here.

[0090] In some optional implementations, the above step S401 "obtaining target point cloud data generated using a single-line laser radar" includes steps A1 and A2.

[0091] Step A1: Acquire original point cloud data collected based on a single-line laser radar; the original point cloud data includes multiple data points.

[0092] Step A2: Delete data points in the original point cloud data whose distance from the single-line laser radar exceeds a preset filtering distance threshold to generate target point cloud data.

[0093] In this embodiment, a filtering distance threshold is pre-set; when a single-line laser radar collects a point cloud, raw point cloud data can be obtained. For each data point in the raw point cloud data, the corresponding depth can be determined, that is, the distance between the data point and the single-line laser radar. If the coordinates of the data point are converted to the robot coordinate system, the distance between the data point and the origin of the robot coordinate system can be used as the distance between the data point and the single-line laser radar.

[0094] If the distance exceeds the preset filtering distance threshold, it can be considered that the data point is not worth paying attention to at present because of the distance, so these data points can be deleted.

[0095] This embodiment implements filtering by filtering the distance threshold to quickly remove invalid data points at long distances, thereby reducing data redundancy and subsequent computational burden.

[0096] Step S402 : clustering the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters.

[0097] For details, please see Figure 1 Step S102 of the illustrated embodiment will not be described in detail here.

[0098] Optionally, the above-mentioned step S402 "clustering the data points according to the distance between each data point in the target point cloud data to obtain corresponding original cluster clusters" may specifically include: for each data point in the target point cloud data, clustering multiple data points whose distance between the data points is less than a preset cluster distance threshold to obtain corresponding original cluster clusters.

[0099] Among them, for any data point in the original cluster, the distance between it and at least one other data point in the original cluster is less than the cluster distance threshold.

[0100] In this embodiment, a distance threshold for achieving preliminary clustering, namely the clustering distance threshold, is pre-set. For any two data points, if the distance between them is less than the clustering distance threshold, it means that the two distance points can be clustered into one category, that is, they belong to the same cluster. Clustering is completed by traversing all data points in the target point cloud data, and multiple original clusters are generated.

[0101] It can be understood that for any data point in the original cluster, the distance between the data point and at least one other data point in the original cluster is less than the cluster distance threshold, so that the data point can be clustered into the original cluster.

[0102] In this embodiment, clustering can be completed by judging whether the distance between data points is less than the clustering distance threshold. The implementation is simple, the amount of calculation is small, and it is conducive to quickly completing the clustering process.

[0103] Step S403 : merging the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters; the target clusters correspond to the corresponding target objects.

[0104] For details, please see Figure 1 Step S103 of the illustrated embodiment will not be described in detail here.

[0105] Optionally, the above step S403 of “merging the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters” may include steps B1 to B3.

[0106] Step B1: Identify the endpoints of each original cluster; the endpoints include the starting point and the end point of the original cluster.

[0107] Step B2: When the distance between the endpoints of two original clusters is less than a preset merging distance threshold, the two original clusters are merged until there is no original cluster whose endpoint distance is less than the merging distance threshold and has not been merged.

[0108] Step B3: Use the cluster generated after merging as the target cluster.

[0109] In this embodiment, a distance threshold is pre-set for determining whether the original clusters can be merged, i.e., the merge distance threshold; wherein, the merge distance threshold needs to be greater than the above-mentioned cluster distance threshold. After determining the endpoints (including the starting point and the end point) of each original cluster, for any two original clusters, it can be determined whether the distance between the endpoints of the two (i.e., the distance between the endpoint of one original cluster and the endpoint of the other original cluster) is less than the merge distance threshold. If it is less than the merge distance threshold, it means that the two original clusters meet the distance merging condition, and therefore the two original clusters can be merged, that is, the two original clusters can be merged into a new cluster.

[0110] Among them, the merged original clusters can be marked as merged, and then continue to judge the distance with other unmerged original clusters until all original clusters are merged, or the distance between some original clusters and the endpoints of any other original clusters exceeds the merge distance threshold. At this time, there are original clusters that cannot be merged, such as Figure 3 The third original cluster, the fourth original cluster, and so on are shown.

[0111] After the merging is completed, each merged cluster can be used as a target cluster. It is understood that the target cluster may include one or more original clusters.

[0112] In this embodiment, by setting an appropriate merging distance threshold, the original clusters can be merged after preliminary clustering. Even if the clustering distance threshold is set too small, the original clusters with a relatively close distance can be merged into one target cluster through merging, thereby obtaining a more accurate clustering result. Figure 3 As shown, if the cluster distance threshold is set too large, the distance between data point c1 and data point b2 (or data point b3) may be less than the cluster distance threshold, and data point c1 and data points b1 to b4 are classified into one original cluster cluster; the merge distance threshold in this embodiment is used to judge the distance between endpoints, that is, as long as the distance between data point c1 and data point b1 or data point b4 exceeds the merge distance threshold, the two cannot be merged, thereby avoiding the problem of over-clustering to a certain extent.

[0113] Step S404 : extract key points from the target cluster, and extract a plurality of key data points for representing the boundary shape of the target object from the target cluster.

[0114] For details, please see Figure 1 Step S104 of the illustrated embodiment will not be described in detail here.

[0115] In some optional implementations, the above step S404 of “extracting key points from the target cluster to extract a plurality of key data points for representing the boundary shape of the target object from the target cluster” includes the following steps C1 to C2.

[0116] In step C1, the endpoints of the target cluster are used as key data points.

[0117] In step C2, mutation data points whose mutation distance exceeds a preset feature distance threshold are extracted from the target cluster, and the mutation data points are used as key data points.

[0118] In this embodiment, as shown above, the endpoints (including the starting point and the end point) of the target cluster can be used as key data points. In addition, for other data points in the target cluster, the mutation distance of the data point can be determined, which is used to represent the distance that the data point deviates from the overall shape of the target cluster.

[0119] If the mutation distance of a data point exceeds the preset characteristic distance threshold, it is considered a mutation data point. This mutation data point has a significant impact on the boundary shape of the target object and needs to be used as a key data point. Ultimately, the endpoints of the target cluster and the extracted mutation data point are both used as key data points, allowing for the subsequent rapid and accurate determination of the boundary shape of the target object.

[0120] Optionally, the above step C2 "extracting mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster" may include: performing a key point extraction operation on each data point in the target cluster in sequence until all data points in the target cluster are traversed.

[0121] The above-mentioned “key point extraction operation” specifically includes steps C21 to C22.

[0122] Step C21, for the data point to be processed for performing the key point extraction operation, determine the reference straight line between the data point to be processed and the reference data point; the reference data point is the latest key data point, or other data points that are separated from the data point to be processed by a preset number of data points.

[0123] In step C22 , a data point located between the reference data point and the data point to be processed and whose distance to the reference straight line exceeds a characteristic distance threshold is taken as a key data point.

[0124] In this embodiment, for the target cluster, a list for recording key data points is set, and an endpoint (such as the starting point) of the target cluster is added to the list, that is, the latest key data point is initially an endpoint of the target cluster.

[0125] For each data point after a target cluster endpoint, a determination can be made as to whether a key data point can be extracted, i.e., a "key point extraction operation" is performed. For ease of description, the data point currently undergoing the "key point extraction operation" is referred to as the pending data point. Furthermore, a reference data point is determined at this point. The most recent key data point can be used as the reference data point. This latest key data point can be, for example, an endpoint of the target cluster, or a new key data point subsequently determined based on the key point extraction operation.

[0126] Alternatively, other data points that are separated from the data point to be processed by a preset number of data points may be used as reference data points, where the preset number is not less than 1, for example, 1, 2, etc. In general, data points that have undergone key point extraction are preferably used as reference data points. For example, other data points that are separated from the data point to be processed by a preset number of data points and have undergone key point extraction are used as reference data points.

[0127] When performing the key point extraction operation on the data point to be processed, the straight line between the data point to be processed and the benchmark data point is used as the benchmark straight line, and the distance (i.e., mutation distance) of other data points between the benchmark data point and the data point to be processed to the benchmark straight line is calculated. If the distance exceeds the preset feature distance threshold, it means that the other data points between the two have a larger mutation distance, and the data point can be used as a key data point.

[0128] For example, the preset number is 1, that is, there is only one data point between the benchmark data point and the data point to be processed, that is, key point extraction is performed based on the benchmark data point, the data point to be processed and other data points between the two (a total of three data points) to determine whether the other data points between the two are key data points.

[0129] like Figure 3 As shown in the figure, taking the target cluster corresponding to data points c1 to c6 as an example, data point c1 is a key data point; when performing a key point extraction operation on data point c2, there are no other data points between it and data point c1, so no key point can be extracted; when performing a key point extraction operation on data point c3, the reference data point is data point c1. At this time, it is determined whether the distance between data point c2 and the reference straight line corresponding to data point c1 and data point c3 exceeds the preset feature distance threshold. If it exceeds, the data point c2 is regarded as a key data point. Figure 3 As shown, since each data point is basically a straight line, the above distance does not exceed the feature distance threshold, so the data point c2 is not a key data point.

[0130] Similarly, when performing the key point extraction operation on data point c4, the reference data point is data point c2. At this time, the distance between data point c3 and the reference straight lines corresponding to data points c2 and c4 is calculated to complete the judgment. Figure 3 Among the data points c1 to c6 shown, the middle data points c2 to c5 do not meet the above conditions, that is, they are not key data points. Therefore, the key data points of the target cluster only include two endpoints, namely data point c1 and data point c6.

[0131] by Figure 3 The data points d1 to d 12 For example, based on the above judgment process, it can be determined that data point d5, data point d7, and data point d8 have a large mutation distance, so all three can be used as key data points. The determined key data points include: data point d1, data point d5, data point d7, data point d8, data point d 12 .

[0132] In this embodiment, for each data point whose coordinates have been determined, based on the point-to-line distance formula, the distance from a data point to the line corresponding to the other two data points (reference data point, data point to be processed) (i.e., the reference line) can be easily and quickly calculated. By judging whether the distance exceeds the feature distance threshold, key data points can be quickly selected. These key points can represent significant changes in the boundary, which is conducive to the subsequent accurate representation of the boundary contour based on a small number of key data points.

[0133] Optionally, after step S404, the method may further include: determining the sequence length of the key data point sequence based on multiple key data points including at least the endpoints of the target cluster; and deleting the target cluster corresponding to a sequence length less than a preset length threshold.

[0134] In this embodiment, after determining the endpoints and other key data points of the target cluster, these key data points can form a sequence, namely the key data point sequence, and then the sequence length corresponding to the key data point sequence can be determined; if the sequence length is less than the preset length threshold, it means that the boundary of the target object corresponding to the target cluster is small and may be an invalid object, so the target cluster can be deleted to improve the accuracy and stability of the final contour generation.

[0135] Since the key data points used to generate the key data point sequence include at least the endpoints of the target cluster, and the endpoints of the target cluster correspond to the starting point and end point, the first and last points of the key data point sequence correspond to the starting point and end point of the target cluster, respectively. When calculating the sequence length, the calculation can be based only on the two endpoints of the target cluster, that is, the distance between the two endpoints is used as the sequence length. To improve the accuracy of the sequence length, it is preferred to calculate based on more key data points, that is, calculate the distance between any two adjacent key data points, and use the sum of these distances as the sequence length.

[0136] Step S405 : determining the boundary envelope of the target object according to the multiple key data points.

[0137] Specifically, the above step S405 “determining the boundary envelope of the target object according to multiple key data points” includes steps S4051 to S4053.

[0138] Step S4051: Determine the structure type corresponding to the boundary of the target object.

[0139] Step S4052: When the structure type is a straight line type, a straight line boundary of the target object is determined based on a plurality of key data points, and the straight line boundary is expanded outward by a preset distance to generate an envelope surrounding the straight line boundary.

[0140] Step S4053: When the structure type is a curve type, convex hull extraction is performed based on multiple key data points to determine the polygonal envelope corresponding to the boundary of the target object.

[0141] In this embodiment, in order to improve the expression accuracy of the obstacle contour, differentiated processing strategies are adopted for different types of boundary structures to balance boundary compactness and computational efficiency.

[0142] Specifically, when determining the boundary envelope of a target object, the first step is to determine the structural type corresponding to the boundary of the target object. This structural type includes, for example, a straight line type and a curved line type. The structural type can be determined based on the number of key data points. For example, if the number of key data points is 2, meaning it only includes the two endpoints of the target cluster, then the boundary of the corresponding target object is essentially a straight line, which is a realization type. Conversely, if the number of key data points is greater than 2, then it is classified as a curved line type.

[0143] For a straight line type boundary, the straight line boundary of the target object can be determined directly based on the key data points. The straight line boundary is, for example, a line segment between two endpoints. Moreover, the straight line boundary is expanded outward, that is, expanded outward by a certain preset distance, so as to form a closed envelope that can surround the straight line boundary. The envelope can represent the boundary of the target object.

[0144] by Figure 3 Taking the second target cluster shown in the figure as an example, Figure 5 Figure 2 shows a schematic diagram of a straight line envelope. Figure 5 As shown in FIG, the target cluster includes only two key data points, namely, data point c1 and data point c6, which expand outward a certain distance in the direction of the line connecting the two to form a closed polygonal obstacle envelope.

[0145] As for the curve-type boundary, the convex hull corresponding to the multiple key data in this embodiment represents the boundary envelope of the target object based on the convex hull, and the envelope is a polygon.

[0146] by Figure 3 Taking the third target cluster shown in the figure as an example, Figure 6 Figure 1 shows an envelope diagram of the curve type. Figure 6 As shown, the key data points of the target cluster include: data point d1, data point d5, data point d7, data point d8, data point d 12 Using algorithms such as the Graham scan method for convex hull extraction can generate a polygonal envelope with the smallest area that best fits the boundary shape of the target object; in addition, the polygonal envelope can be smoothed to improve the representation effect.

[0147] In this embodiment, the above processing yields an envelope representing the boundaries of each obstacle, providing a reliable basis for the robot's environmental perception and path decision-making. This method boasts a simple overall process flow and minimal computational effort, making it suitable for real-time deployment on embedded platforms. While ensuring accuracy, it also reduces system resource consumption, demonstrating strong practical applicability and potential for widespread adoption.

[0148] In addition, the object detection method provided in this embodiment only requires the configuration of a small number of parameters, such as the above-mentioned clustering distance threshold, merging distance threshold, point-to-line feature distance threshold, sequence length threshold, etc., and does not require the adjustment of excessive and complex parameters, and has strong generalization ability.

[0149] Figure 7 Another flow chart of the object detection method is shown in FIG. Figure 7 As shown, the method includes the following steps.

[0150] Step S701: Initialize parameter configuration.

[0151] For example, configure the cluster distance threshold, merge distance threshold, point-to-line feature distance threshold, sequence length threshold, etc.

[0152] Step S702: Acquire the point cloud data collected by the single-line laser radar, perform coordinate conversion, and determine the original point cloud data.

[0153] Step S703: Filter out invalid point clouds at long distances to obtain target point cloud data.

[0154] Step S704: Perform initial clustering based on the distance between data points to obtain original clusters.

[0155] Step S705 , merging original clusters with similar distances to obtain a target cluster.

[0156] Step S706: extract key data points from the target cluster and determine the sequence length, which may represent the length of the trajectory corresponding to the boundary of the target object.

[0157] Step S707 determines whether the sequence length meets the requirements. That is, it determines whether the sequence length is greater than the length threshold. If it meets the requirements, the process continues to step S708. Otherwise, the process ends for the target cluster or re-executes step S706 to process the next target cluster.

[0158] Step S708: Generate a closed boundary envelope.

[0159] Step S709: output obstacle information.

[0160] The object detection method provided in this embodiment utilizes 2D point cloud data from a single-line lidar to achieve real-time and accurate detection of environmental obstacles and provide envelope information of the obstacles. This lightweight processing method not only significantly improves the real-time performance of point cloud processing and reduces reliance on the robot controller's computing power, but also increases the accuracy of point cloud boundary extraction, providing favorable support for the robot's intelligent decision-making and local path planning. The method's parameter setting is simple, requiring only a small number of core parameters to be configured, effectively reducing the complexity of system debugging while enhancing adaptability and generalization capabilities in a variety of application scenarios. This reduces the difficulty of algorithm deployment and maintenance, making it easier to implement in products.

[0161] In this embodiment, an object detection device is also provided, which is used to implement the above-mentioned embodiments and preferred embodiments. The details already described will not be repeated here. As used below, the term "module" can refer to a combination of software and / or hardware that implements a predetermined function. Although the devices described in the following embodiments are preferably implemented in software, implementation using hardware, or a combination of software and hardware, is also possible and contemplated.

[0162] This embodiment provides an object detection device, such as Figure 8 Shown, including:

[0163] An acquisition module 801 is configured to acquire target point cloud data generated by a single-line laser radar; the target point cloud data includes a plurality of data points;

[0164] A clustering module 802 is configured to cluster the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters;

[0165] A merging module 803 is configured to merge the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters; the target clusters correspond to corresponding target objects;

[0166] An extraction module 804 is configured to extract key points from the target cluster, and extract a plurality of key data points for representing the boundary shape of the target object from the target cluster;

[0167] The envelope module 805 is configured to determine the boundary envelope of the target object according to the plurality of key data points.

[0168] In some optional implementations, the acquisition module 801 acquires target point cloud data generated by a single-line laser radar, including:

[0169] Obtain the original point cloud data collected by the single-line laser radar;

[0170] Data points in the original point cloud data whose distance from the single-line laser radar exceeds a filtering distance threshold are deleted to generate target point cloud data.

[0171] In some optional implementations, the clustering module 802 clusters the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters, including:

[0172] For each data point in the target point cloud data, clustering multiple data points whose distances between the data points are less than a preset clustering distance threshold to obtain corresponding original cluster clusters;

[0173] Wherein, for any data point in the original cluster, the distance between it and at least one other data point in the original cluster is less than the cluster distance threshold.

[0174] In some optional implementations, the merging module 803 merges the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters, including:

[0175] Identifying endpoints of each of the original clusters; the endpoints include a start point and an end point of the original cluster;

[0176] When the distance between the endpoints of two original clusters is less than a preset merging distance threshold, the two original clusters are merged until there are no two original clusters whose endpoints have a distance less than the merging distance threshold and have not been merged;

[0177] The cluster generated after merging is used as the target cluster.

[0178] In some optional implementations, the extraction module 804 performs key point extraction on the target cluster, extracting a plurality of key data points for representing the boundary shape of the target object from the target cluster, including:

[0179] Taking the endpoints of the target cluster as key data points;

[0180] Extract mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster, and use the mutation data points as key data points.

[0181] In some optional implementations, the extraction module 804 extracts mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster, including:

[0182] Performing a key point extraction operation on each data point in the target cluster in sequence until all data points in the target cluster are traversed;

[0183] The key point extraction operation includes:

[0184] For a data point to be processed on which the key point extraction operation is performed, determining a reference straight line between the data point to be processed and a reference data point; the reference data point is the latest key data point, or another data point that is separated from the data point to be processed by a preset number of data points;

[0185] A data point located between the reference data point and the data point to be processed and whose distance to the reference straight line exceeds a characteristic distance threshold is taken as a key data point.

[0186] In some optional implementations, the extraction module 804 is further configured to:

[0187] Determining a sequence length of a key data point sequence based on a plurality of the key data points including at least an endpoint of the target cluster;

[0188] Delete the target clusters whose sequence length is less than the preset length threshold.

[0189] In some optional implementations, the root envelope module 805 determines the boundary envelope of the target object according to the plurality of key data points, including:

[0190] Determining a structure type corresponding to a boundary of the target object;

[0191] In the case where the structure type is a straight line type, determining a straight line boundary of the target object according to the plurality of key data points, and expanding the straight line boundary by a preset distance to generate an envelope surrounding the straight line boundary;

[0192] In the case where the structure type is a curve type, convex hull extraction is performed based on the plurality of key data points to determine a polygonal envelope corresponding to the boundary of the target object.

[0193] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.

[0194] The object detection device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific Integrated Circuit) circuit, including a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0195] The embodiment of the present invention also provides a computer device having the above Figure 8 The object detection device shown.

[0196] See also Figure 9 , Figure 9 is a structural diagram of a computer device provided by an optional embodiment of the present invention, such as Figure 9 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components utilize different buses to communicate with each other and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of a GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories. Equally, multiple computer devices can be connected, and each device provides part of the necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 9 A processor 10 is taken as an example.

[0197] The processor 10 may be a central processing unit, a network processor, or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic, or any combination thereof.

[0198] The memory 20 stores instructions that can be executed by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0199] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system and application programs required for at least one function; the data storage area may store data created based on the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0200] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0201] The computer device further includes a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0202] The embodiment of the present invention also provides a computer-readable storage medium. The above-mentioned method according to the embodiment of the present invention can be implemented in hardware, firmware, or implemented as a computer code that can be recorded in a storage medium, or implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and downloaded through a network and will be stored in a local storage medium, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state drive, etc.; further, the storage medium can also include a combination of the above-mentioned types of memory. It can be understood that a computer, a processor, a microprocessor controller or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor or hardware, the method shown in the above embodiment is implemented.

[0203] A portion of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the form in which the computer program instruction exists in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc. Accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium that can be accessed by the computer.

[0204] Although the embodiments of the present invention have been described with reference to the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations should all be included in the scope of protection of the present invention.

Claims

1. An object detection method, characterized in that: The method comprises: Acquire target point cloud data generated by a single-line laser radar; the target point cloud data includes a plurality of data points; Clustering the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters; Merging the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters; the target clusters correspond to corresponding target objects; Performing key point extraction on the target cluster, extracting a plurality of key data points for representing the boundary shape of the target object from the target cluster; A boundary envelope of the target object is determined according to the plurality of key data points.

2. The method according to claim 1, characterized in that The obtaining of target point cloud data generated by a single-line laser radar includes: Obtain the original point cloud data collected by the single-line laser radar; Data points in the original point cloud data whose distance from the single-line laser radar exceeds a filtering distance threshold are deleted to generate target point cloud data.

3. The method according to claim 1, characterized in that The data points are clustered according to the distances between the data points in the target point cloud data to obtain corresponding original clusters, including: For each data point in the target point cloud data, clustering multiple data points whose distances between the data points are less than a preset clustering distance threshold to obtain corresponding original cluster clusters; Wherein, for any data point in the original cluster, the distance between it and at least one other data point in the original cluster is less than the cluster distance threshold.

4. The method according to claim 1 or 3, characterized in that The merging of the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters includes: Identifying endpoints of each of the original clusters; the endpoints include a start point and an end point of the original cluster; When the distance between the endpoints of two original clusters is less than a preset merging distance threshold, the two original clusters are merged until there are no two original clusters whose endpoints have a distance less than the merging distance threshold and have not been merged; The cluster generated after merging is used as the target cluster.

5. The method according to claim 1, wherein The step of extracting key points from the target cluster to extract a plurality of key data points for representing the boundary shape of the target object includes: Taking the endpoints of the target cluster as key data points; Extract mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster, and use the mutation data points as key data points.

6. The method according to claim 5, characterized in that Extracting mutation data points whose mutation distance exceeds a preset feature distance threshold from the target cluster includes: Performing a key point extraction operation on each data point in the target cluster in sequence until all data points in the target cluster are traversed; The key point extraction operation includes: For a data point to be processed on which the key point extraction operation is performed, determining a reference straight line between the data point to be processed and a reference data point; the reference data point is the latest key data point, or another data point that is separated from the data point to be processed by a preset number of data points; A data point located between the reference data point and the data point to be processed and whose distance to the reference straight line exceeds a characteristic distance threshold is taken as a key data point.

7. The method according to claim 5, characterized in that The method further comprises: Determining a sequence length of a key data point sequence based on a plurality of the key data points including at least an endpoint of the target cluster; Delete the target clusters whose sequence length is less than the preset length threshold.

8. The method according to claim 1, characterized in that Determining the boundary envelope of the target object according to the plurality of key data points includes: Determining a structure type corresponding to a boundary of the target object; In the case where the structure type is a straight line type, determining a straight line boundary of the target object according to the plurality of key data points, and expanding the straight line boundary by a preset distance to generate an envelope surrounding the straight line boundary; In the case where the structure type is a curve type, convex hull extraction is performed based on the plurality of key data points to determine a polygonal envelope corresponding to the boundary of the target object.

9. An object detection device, characterized in that: The device comprises: An acquisition module, configured to acquire target point cloud data generated by a single-line laser radar; the target point cloud data includes a plurality of data points; A clustering module, configured to cluster the data points according to the distances between the data points in the target point cloud data to obtain corresponding original clusters; a merging module, configured to merge the original clusters according to the distances between the endpoints of the original clusters to obtain corresponding target clusters; the target clusters correspond to corresponding target objects; An extraction module, configured to extract key points from the target cluster, and extract a plurality of key data points for representing the boundary shape of the target object from the target cluster; An envelope module is used to determine the boundary envelope of the target object according to the multiple key data points.

10. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the object detection method according to any one of claims 1 to 8 by executing the computer instructions.

11. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the object detection method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • System and method for detecting position information of vehicles around target vehicle

    CN109270543A

  • Obstacle detection method and device, storage medium and vehicle

    CN111289998A

  • Obstacle sensing method and device based on single-line laser radar and computer terminal

    CN111308500A

  • Road environment element sensing method based on laser radar

    CN111985322A

  • Method for detecting obstacle in front of vehicle

    CN115327572A