Obstacle detection method and obstacle detection device based on laser point cloud
By clustering and calculating evaluation values of vehicle obstacle point cloud data, the accurate obstacle position is determined, which solves the problem of inaccurate vehicle obstacle position information and improves detection accuracy and safety.
Patent Information
- Application Number
- CN202310416708.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2043-04-13
AI Technical Summary
In the prior art, the obstacle position information of the vehicle is not accurately determined, resulting in direction finding errors.
By acquiring the target point cloud data and performing clustering to obtain point cloud clusters, the area of the bounding box and the evaluation value of the distance from the point to the coordinate system are calculated. The two evaluation values are combined to determine the bounding box corresponding to the minimum value and the location of the obstacle.
It improves the accuracy of laser point cloud target detection, ensures the accuracy of vehicle obstacle location information, and improves vehicle safety.
Smart Images

Figure CN116486371B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of laser radar, and more specifically, to a laser point cloud-based obstacle detection method, a laser point cloud-based obstacle detection device, a computer-readable storage medium, and an electronic device. Background Art
[0002] A laser point cloud is a collection of scanning points, which refers to the three-dimensional coordinates of ground reflection points obtained by the laser radar system when scanning the ground. Each ground reflection point is distributed in the three-dimensional space in the form of a point according to the three-dimensional coordinates, that is, the scanning point.
[0003] In automotive LiDAR, laser point clouds are used to represent obstacle information for the vehicle. Therefore, the accuracy of target detection using these point clouds is crucial. However, existing calculation standards are often inadequate, resulting in large calculation errors and, in turn, direction-finding errors.
[0004] Therefore, there is an urgent need for a method to solve the problem of inaccurate determination of the vehicle's obstacle position information. Summary of the Invention
[0005] The main purpose of this application is to provide a laser point cloud-based obstacle detection method, a laser point cloud-based obstacle detection device, a computer-readable storage medium and an electronic device, so as to at least solve the problem of inaccurate determination of vehicle obstacle position information in the prior art.
[0006] According to one aspect of the present application, a laser point cloud-based obstacle detection method is provided, comprising: acquiring target point cloud data, and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles of a vehicle; determining a plurality of bounding boxes of the point cloud cluster, and calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as a first evaluation value; determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of a predetermined coordinate system, and determining a target evaluation value based on one of the first evaluation values and all of the second evaluation values to obtain a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the position of the point cloud cluster determined by the bounding box, and the predetermined coordinate system is the coordinate system where the point cloud cluster is located; determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster based on the target bounding box.
[0007] Optionally, obtaining target point cloud data includes: obtaining multiple first point cloud data, and performing spatial synchronization processing on the multiple first point cloud data so that the multiple first point cloud data are located in the same coordinate system to obtain second point cloud data, wherein the multiple first point cloud data are point cloud data obtained by multiple laser radar scans; removing abnormal points in the second point cloud data to obtain third point cloud data, wherein there are no other points in a circle with the abnormal point as the center and a predetermined radius as the radius; processing the third point cloud data to obtain non-ground point cloud data in the third point cloud data, and determining that the non-ground point cloud data is the target point cloud data.
[0008] Optionally, the third point cloud data is processed to obtain non-ground point cloud data in the third point cloud data, including: rasterizing the third point cloud data to obtain a plurality of raster data; obtaining a first plane, a second plane and a third plane corresponding to the raster data, wherein the first plane contains a predetermined number of point cloud data, the second plane is perpendicular to the first plane, the second plane is perpendicular to the third plane, and the first plane is perpendicular to the third plane; determining the sum of the distance from each point in the third point cloud data to the first plane, the distance from each point in the third point cloud data to the second plane, and the distance from each point in the third point cloud data to the third plane as the target distance; and determining that the point cloud data whose target distance is greater than a first threshold is the non-ground point cloud data.
[0009] Optionally, the target point cloud data is clustered to obtain multiple point cloud clusters, including: an acquisition step, acquiring a target point in the target point cloud data, determining a point in the target point cloud data whose shortest distance to the target point is less than a second threshold as a collection point, and the collection points form a set, wherein the target point is a point corresponding to any point cloud data in the target point cloud data; a first repetition step, repeating the acquisition step, and any two points in the repetition process are different and are both points in the set; a second repetition step, repeating the acquisition step and the first repetition step a predetermined number of times until the number of collection points in the set remains unchanged, and determining that the set is the point cloud cluster.
[0010] Optionally, determining multiple bounding boxes of the point cloud cluster includes: obtaining a first endpoint and a second endpoint in the point cloud cluster, and determining that the straight line on which the first endpoint and the second endpoint are located is a target straight line, wherein the first endpoint is the point in the point cloud cluster with the largest distance from the y-axis of the predetermined coordinate system, and the second endpoint is the point in the point cloud cluster with the largest distance from the x-axis of the predetermined coordinate system; determining that the point in the point cloud cluster with the largest distance from the target straight line is a rotation point, and determining that a line segment formed by the rotation point and the first endpoint is a first side length, determining that a line segment formed by the rotation point and the second endpoint is a second side length, and forming a bounding box with the first side length and the second side length as adjacent sides; synchronously rotating the first side length and the second side length multiple times around the rotation point, and adjusting the first side length and the second side length during the rotation process, so that the bounding box formed by the first side length and the second side length after each rotation adjustment includes the points in the point cloud cluster, and obtaining multiple bounding boxes by multiple rotations.
[0011] Optionally, determining the second evaluation value according to the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system includes: according to the formula Determine the second evaluation value, wherein A1, B1 and C1 are the coefficients of the linear equation of the x-axis of the coordinate system corresponding to the point cloud cluster, A2, B2 and C2 are the coefficients of the linear equation of the y-axis of the coordinate system corresponding to the point cloud cluster, i 、y i is the coordinate value of the point in the point cloud cluster in the predetermined coordinate system.
[0012] Optionally, a target evaluation value is determined based on one of the first evaluation values and all of the second evaluation values to obtain multiple target evaluation values, including: determining the target evaluation value according to the formula E=aE1+bE2, where E is the target evaluation value, a is the weight coefficient of the first evaluation value, E1 is the first evaluation value, b is the weight coefficient of the second evaluation value, and E2 is the second evaluation value.
[0013] According to another aspect of the present application, a laser point cloud-based obstacle detection device is provided, comprising: an acquisition unit for acquiring target point cloud data and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle; a first determination unit for determining a plurality of bounding boxes of the point cloud cluster, calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as a first evaluation value; a second determination unit for determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of a predetermined coordinate system, and determining a target evaluation value based on one of the first evaluation values and all of the second evaluation values to obtain a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster, and the predetermined coordinate system is the coordinate system in which the point cloud cluster is located; a third determination unit for determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster based on the target bounding box.
[0014] According to another aspect of the present application, a computer-readable storage medium is provided, wherein the computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute any one of the methods described.
[0015] According to another aspect of the present application, an electronic device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to execute any one of the methods described above through the computer program.
[0016] Applying the technical solution of the present application, first, the target point cloud data is acquired, and the target point cloud data is clustered to obtain multiple point cloud clusters; then, multiple bounding boxes of the point cloud cluster are determined, and the areas of the multiple bounding boxes are calculated, and the areas of the bounding boxes are determined as the first evaluation value. According to the distance from each point in the point cloud cluster to each coordinate axis of the predetermined coordinate system, a second evaluation value is determined, and a target evaluation value is determined based on a first evaluation value and all second evaluation values to obtain multiple target evaluation values; finally, the bounding box corresponding to the minimum value among the multiple target evaluation values is determined as the target bounding box, and the position of the obstacle corresponding to the point cloud cluster is determined based on the target bounding box. This method combines two different evaluation values, the first evaluation value and the second evaluation value, to avoid the situation where a single evaluation value causes misdetection of target direction information. Therefore, it can improve the accuracy of target detection of laser point clouds, and further determine accurate obstacle position information of the vehicle. The problem of inaccurate determination of obstacle position information of the vehicle is solved. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] The drawings that constitute part of this application are used to provide a further understanding of this application. The illustrative embodiments of this application and their descriptions are used to explain this application and do not constitute an improper limitation on this application. In the drawings:
[0018] Figure 1 The following is a hardware structure diagram of a mobile terminal that performs a laser point cloud-based obstacle detection method according to an embodiment of the present application;
[0019] Figure 2 A schematic diagram of a process of an obstacle detection method based on laser point cloud provided in accordance with an embodiment of the present application is shown;
[0020] Figure 3 A schematic diagram of a process of a point cloud clustering method provided in an embodiment of the present application is shown;
[0021] Figure 4 A schematic diagram of determining a point cloud cluster bounding box provided in an embodiment of the present application is shown;
[0022] Figure 5 A schematic diagram of a specific process of an obstacle detection method based on laser point cloud provided in an embodiment of the present application is shown;
[0023] Figure 6 The figure shows a structural block diagram of an obstacle detection device based on laser point cloud provided according to an embodiment of the present application.
[0024] The above drawings include the following reference numerals:
[0025] 102. Processor; 104. Memory; 106. Transmission device; 108. Input / output device. DETAILED DESCRIPTION
[0026] It should be noted that, in the absence of conflict, the embodiments and features of the embodiments in this application can be combined with each other. The present application will be described in detail below with reference to the accompanying drawings and in combination with the embodiments.
[0027] In order to enable those skilled in the art to better understand the present invention, the following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in 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. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of this application.
[0028] It should be noted that the terms "first", "second", etc. in the specification and claims of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present application described here. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0029] As introduced in the background technology, the existing technology does not accurately determine the obstacle position information of the vehicle. To solve the above technical problems, the embodiments of the present application provide an obstacle detection method based on laser point cloud, an obstacle detection device based on laser point cloud, a computer-readable storage medium and an electronic device.
[0030] The technical solutions in the embodiments of the present invention will be described clearly and completely below with reference to the accompanying drawings in the embodiments of the present invention.
[0031] The method embodiments provided in the embodiments of the present application can be executed in a mobile terminal, a computer terminal or a similar computing device. Taking running on a mobile terminal as an example, Figure 1 This is a hardware structure diagram of a mobile terminal of an obstacle detection method based on laser point cloud according to an embodiment of the present invention. Figure 1 As shown, the mobile terminal may include one or more ( Figure 1 Only one is shown) a processor 102 (the processor 102 may include but is not limited to a microprocessor MCU or a programmable logic device FPGA and other processing devices) and a memory 104 for storing data, wherein the mobile terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It will be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the mobile terminal. Figure 1 More or fewer components than shown, or with Figure 1 Different configurations shown.
[0032] Memory 104 can be used to store computer programs, such as application software programs and modules, such as the computer program corresponding to the laser point cloud-based obstacle detection method in the embodiments of the present invention. Processor 102 executes the computer programs stored in memory 104 to execute various functional applications and data processing, thereby implementing the aforementioned method. Memory 104 may include high-speed random access memory (RAM) and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, memory 104 may further include memory remotely located from processor 102, which can be connected to the mobile terminal via a network. Examples of such networks include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof. Transmission device 106 is used to receive or transmit data via a network. Specific examples of such networks may include a wireless network provided by the mobile terminal's telecommunications provider. In one example, transmission device 106 includes a network interface controller (NIC), which can be connected to other network devices via a base station to enable communication with the Internet. In one example, the transmission device 106 may be a radio frequency (RF) module, which is used to communicate with the Internet wirelessly.
[0033] In this embodiment, a laser point cloud-based obstacle detection method is provided that runs on a mobile terminal, a computer terminal, or a similar computing device. 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.
[0034] Figure 2 FIG is a flow chart of an obstacle detection method based on laser point cloud according to an embodiment of the present application. Figure 2 As shown, the method includes the following steps:
[0035] Step S201: acquiring target point cloud data and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle;
[0036] Specifically, point cloud data refers to data obtained by laser radar scanning, which is a collection of vectors in a three-dimensional coordinate system. The target point cloud data of the present application is point cloud data formed by obstacle information obtained by vehicle-mounted laser radar scanning. The clustering method can be a spectral clustering algorithm, a hierarchical clustering algorithm, a mean migration algorithm, a comprehensive hierarchical clustering algorithm, a neighbor propagation clustering algorithm, a density clustering algorithm, and a k-means clustering algorithm. Those skilled in the art can choose according to actual conditions. By clustering the above-mentioned target point cloud data, the homogeneity of objects between classes can be maximized, and different data points can be divided into different clusters according to similarity and dissimilarity, and it is ensured that the data in each cluster are as similar as possible, and the data in different clusters are as different as possible.
[0037] Step S202: determining a plurality of bounding boxes of the point cloud cluster, calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as first evaluation values;
[0038] Specifically, multiple bounding boxes corresponding to each point cloud cluster are determined. The shapes of the bounding boxes can be arbitrary, such as rectangles, ellipses, and irregular polygons. In fact, the above bounding boxes are a type of region of interest (ROI). Based on the shapes of the bounding boxes, the corresponding areas are determined. The first evaluation value is used to evaluate the minimization of the bounding box area.
[0039] Step S203: determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determining a target evaluation value based on the first evaluation value and all the second evaluation values, thereby obtaining a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster. The predetermined coordinate system is the coordinate system in which the point cloud cluster is located.
[0040] Specifically, the second evaluation value is used to assess the minimization of the point-to-edge error within the point cloud cluster. The target evaluation value can be determined by summing the first and second evaluation values. This method allows the accuracy of the bounding box to be evaluated using two different evaluation values simultaneously.
[0041] Step S204 : determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
[0042] Specifically, when the target evaluation value is minimized, the most accurate bounding box for the point cloud cluster, known as the target bounding box, can be determined. Based on this target bounding box, the corresponding point cloud cluster is determined, and the location of the obstacle can be determined from this point cloud cluster. This obstacle location information is then transmitted to the vehicle's decision-making and planning module, which uses this information to avoid the obstacle, enhancing vehicle safety. This method can improve the accuracy of determining the location of obstacles facing the vehicle.
[0043] Through this embodiment, first, the target point cloud data is acquired and clustered to obtain multiple point cloud clusters; then, multiple bounding boxes of the point cloud cluster are determined, and the areas of the multiple bounding boxes are calculated. The areas of the bounding boxes are determined as the first evaluation value. The second evaluation value is determined based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system. A target evaluation value is determined based on the first evaluation value and all the second evaluation values to obtain multiple target evaluation values; finally, the bounding box corresponding to the minimum value among the multiple target evaluation values is determined as the target bounding box, and the position of the obstacle corresponding to the point cloud cluster is determined based on the target bounding box. This method combines two different evaluation values, the first evaluation value and the second evaluation value, to avoid the situation where a single evaluation value causes misdetection of target direction information. Therefore, it can improve the accuracy of target detection of the laser point cloud and further determine the accurate obstacle position information of the vehicle. This solves the problem of inaccurate determination of the vehicle's obstacle position information.
[0044] In a specific implementation process, the above-mentioned step S201 can be implemented by the following steps: Step S2011, obtaining multiple first point cloud data, and performing spatial synchronization processing on the multiple first point cloud data so that the multiple first point cloud data are located in the same coordinate system, thereby obtaining second point cloud data, wherein the multiple first point cloud data are point cloud data obtained by multiple laser radar scans; Step S2012, removing abnormal points in the above-mentioned second point cloud data, thereby obtaining third point cloud data, wherein there are no other points within a circle with a predetermined radius and the abnormal point as the center; Step S2013, processing the above-mentioned third point cloud data, obtaining non-ground point cloud data in the above-mentioned third point cloud data, and determining that the above-mentioned non-ground point cloud data is the above-mentioned target point cloud data. In this method, since a vehicle may have multiple laser radars, and the coordinate systems of the point cloud data obtained by each laser radar are different, it is necessary to integrate the point cloud data located in different coordinate systems into the same coordinate system. Spatial synchronization can be performed by means of a transformation matrix, and the total point cloud is obtained by merging, and then the total point cloud is processed. After obtaining the total point cloud, due to the irregularity of the distribution of the point cloud data, some outlier data that are far away from the center point cloud will appear. These outlier data will have a negative impact on data processing. For example, by determining the number of other points in the circle with each point as the center and a predetermined radius as the radius in the total point cloud data, if there are no other points in the circle with the predetermined radius of a certain point, it means that the point is far away from the center point of the total point cloud. Therefore, the point can be determined as an outlier and deleted. These outliers can be removed by some methods such as step S2012. Alternatively, the center point in the second point cloud data can be determined, and points with a distance from the center point greater than a predetermined distance can be determined as outlier points, and these outlier points can be removed. The above-mentioned point cloud preprocessing method can be beneficial to further improve the accuracy of bounding box determination.
[0045] In a specific implementation, step S2013 can be implemented by the following steps: Step S20131, rasterizing the third point cloud data to obtain a plurality of raster data; Step S20132, obtaining a first plane, a second plane, and a third plane corresponding to the raster data, wherein the first plane contains a predetermined number of point cloud data, the second plane is perpendicular to the first plane, the second plane is perpendicular to the third plane, and the first plane is perpendicular to the third plane; Step S20133, determining the sum of the distances from each point in the third point cloud data to the first plane, the distances from each point in the third point cloud data to the second plane, and the distances from each point in the third point cloud data to the third plane as the target distance; Step S20134, determining that point cloud data having a target distance greater than a first threshold is the non-ground point cloud data. During an actual LiDAR scan, some non-obstacle information, i.e., non-ground point data, may be scanned. Therefore, it is necessary to distinguish between this non-obstacle information and obstacle information, i.e., ground point data. The above method uses a point cloud segmentation algorithm to distinguish between ground points and non-ground points. In the above method, the plane equation of the point cloud inside the grid can be estimated by the RANSAC algorithm. The RANSAC algorithm assumes that the data contains correct data and abnormal data, and the correct data is recorded as the internal point and the abnormal data is recorded as the external point. The main ideas of the RANSAC algorithm include randomness and assumptions. Among them, randomness is to randomly select sampled data based on the probability of correct data. According to the law of large numbers, random simulation can approximately obtain the correct result. Assumption is to assume that the selected sampled data are all correct data, and then use these correct data to calculate other points through the model satisfied by the problem, and then give a score to this result. In addition, the above method can also determine the point cloud that needs to be processed in the subsequent process, which can reduce the design difficulty and data processing volume of the subsequent algorithm. In addition to the above method, other filtering methods can also be used to distinguish between ground point and non-ground point data.
[0046] The method of step S20133 can also be implemented in other ways, for example, by setting weight coefficients for the distance from each point to the first plane, the distance from each point in the third point cloud data to the second plane, and the distance from each point in the third point cloud data to the third plane, which can be calculated according to the formula D = ∑0.1×|d x |+0.1×|d y |+0.8×|d z |, determine the target distance, where |d x | is the distance from each point to the first plane, |d y | is the distance from each point to the second plane, |d z| is the distance from each point to the third plane. By increasing the weight of the distance from each point to the third plane and decreasing the weight of the first and second planes, this method can further improve the segmentation algorithm's performance on sloped surfaces. In actual applications, the target distance values are adaptively processed during vehicle travel, assuming that the road surface near the vehicle is primarily ground points, with the specified ROI as the range.
[0047] Step S201 can also be implemented in other ways, such as: Step S2014, an acquisition step, acquiring a target point from the target point cloud data, determining points in the target point cloud data whose shortest distance to the target point is less than a second threshold as set points, and forming a set of these set points, wherein the target point corresponds to any point in the target point cloud data; Step S2015, a first repetition step, repeating the acquisition step, wherein any two points in the repetition process are different and both belong to the set; Step S2016, a second repetition step, repeating the acquisition step and the first repetition step a predetermined number of times until the number of set points in the set remains unchanged, and determining the set as the point cloud cluster. The above method uses the Euclidean clustering algorithm, using distance as a feature, to determine whether point clouds belong to the same cluster based on clustering. Euclidean clustering is a clustering algorithm based on the Euclidean distance metric. A nearest neighbor query algorithm based on a KD-Tree is a preprocessing method that accelerates the Euclidean clustering algorithm. A KD-Tree is a balanced binary tree. If its left subtree is not empty, then the values of all nodes on the left subtree are less than the value of its root node; if its right subtree is not empty, then the values of all nodes on the right subtree are greater than the value of its root node; its left and right subtrees are also binary search trees; in order to effectively find the nearest neighbor, KD-Tree divides the entire space into several small parts. KD-Tree is a binary tree in which each node is a k-dimensional numerical point. Each node on it represents a hyperplane, which is perpendicular to the coordinate axis of the current partition dimension and divides the space into two parts in this dimension, one in its left subtree and the other in its right subtree. That is, if the partition dimension of the current node is d, the coordinate values of all points on its left subtree in the d dimension are less than the current value, and the coordinate values of all points on the right subtree in the d dimension are greater than or equal to the current value. For example Figure 3 As shown, Figure 3 A Euclidean clustering method is shown. First, a point P in the target point cloud data is determined, and a KD-Tree nearest neighbor search is performed on the point to obtain k points close to P. Points with a distance less than a set threshold are clustered into a set Q. When the elements in the set Q no longer increase, other points in the target point cloud data are selected as points P. By repeating the above steps, multiple point cloud clusters can be obtained.
[0048] In a specific implementation process, the above-mentioned step S202 can be implemented by the following steps: step S2021, obtaining the first endpoint and the second endpoint in the above-mentioned point cloud cluster, and determining that the straight line on which the first endpoint and the second endpoint are located is the target straight line, wherein the above-mentioned first endpoint is the point in the above-mentioned point cloud cluster with the largest distance from the y-axis of the above-mentioned predetermined coordinate system, and the above-mentioned second endpoint is the point in the above-mentioned point cloud cluster with the largest distance from the x-axis of the above-mentioned predetermined coordinate system; step S2022, determining that the point in the above-mentioned point cloud cluster with the largest distance from the above-mentioned target straight line is the rotation point, and determining that the line segment formed by the above-mentioned rotation point and the above-mentioned first endpoint is the first side length, determining that the line segment formed by the above-mentioned rotation point and the above-mentioned second endpoint is the second side length, and using the above-mentioned first side length and the above-mentioned second side length as adjacent sides to form the above-mentioned bounding box; step S2023, synchronously rotating the above-mentioned first side length and the above-mentioned second side length multiple times around the above-mentioned rotation point, and adjusting the above-mentioned first side length and the above-mentioned second side length during the rotation process, so that the above-mentioned bounding box formed by the above-mentioned first side length and the above-mentioned second side length after each rotation adjustment includes the points in the above-mentioned point cloud cluster, and obtaining multiple above-mentioned bounding boxes by multiple rotations. This method is a bounding box construction algorithm based on search, and in the search process, it searches for the most appropriate bounding box to represent the above point cloud cluster. Figure 4 As shown, Figure 4 A schematic diagram of search-based bounding box construction is shown. First, two end points in the point cloud cluster are selected to determine a target straight line, and the point in the point cloud cluster with the largest distance to the straight line is determined as the rotation point. The rotation point and the two end points are connected respectively to obtain two side lengths l1 and l2. The rotation point is used as the rotation origin of one corner of the border, and l1 and l2 are used as the two side lengths of the border, which are at right angles. The x-axis is used as the starting position, and the rotation is carried out clockwise or counterclockwise, each rotation is 0.5°, and the rotation stops at 90°. The target evaluation value corresponding to each rotation is determined.
[0049] In the specific implementation process, the above step S203 can be implemented by the following steps: Step S2031, according to the formula Determine the second evaluation value, where A1, B1, and C1 are the coefficients of the linear equation of the x-axis of the coordinate system corresponding to the point cloud cluster, A2, B2, and C2 are the coefficients of the linear equation of the y-axis of the coordinate system corresponding to the point cloud cluster, and x i 、y i is the coordinate value of the point in the point cloud cluster in the predetermined coordinate system. In practice, the above method determines the sum of the distances of each point from the coordinate axis, i.e., the minimum average point-to-edge error. This method can quickly determine the second evaluation value.
[0050] In some embodiments, step S203 may also be implemented in other ways, such as: in step S2032, the target evaluation value is determined according to the formula E=aE1+bE2, where E is the target evaluation value, a is the weight coefficient of the first evaluation value, E1 is the first evaluation value, b is the weight coefficient of the second evaluation value, and E2 is the second evaluation value. This method can balance errors by introducing weight coefficients, thereby taking into account the quantitative relationship between the two evaluation values.
[0051] In order to enable those skilled in the art to more clearly understand the technical solution of the present application, the implementation process of the laser point cloud-based obstacle detection method of the present application will be described in detail below with reference to specific embodiments.
[0052] This embodiment relates to a specific obstacle detection method based on laser point cloud, such as Figure 5 As shown, the following steps are included:
[0053] Step S1: Point cloud preprocessing. This step primarily involves point cloud coordinate conversion and outlier processing. Point cloud data output by multiple on-board LiDARs is spatially synchronized using a transformation matrix to merge and generate a final point cloud for subsequent algorithm processing. Once the final point cloud is generated, outlier processing is performed. For each point cloud, an appropriate radius is selected. If no other point cloud exists within that radius, the point is considered an outlier and removed.
[0054] Step S2: Ground segmentation. This step is to segment the pre-processed point cloud into ground points and non-ground points through the point cloud segmentation algorithm. This step can determine the point cloud that needs to be processed in the subsequent process, reducing the design difficulty and data processing volume of the subsequent algorithm. The point cloud in the space is divided into a grid through the skewness balance filtering algorithm with an adaptive threshold, and the skewness characteristics of the point cloud inside the grid are calculated. The calculation method is: the plane equation of the point cloud inside the grid is estimated through the RANSAC algorithm, and the distance between all point clouds inside the grid and the plane is calculated according to the distance formula. Further, the target distance is calculated based on the sum of the distance from each point in the above-mentioned third point cloud data to the above-mentioned first plane, the distance from each point in the above-mentioned third point cloud data to the above-mentioned second plane, and the distance from each point in the above-mentioned third point cloud data to the above-mentioned third plane. In addition, it can also be calculated according to the formula D=∑0.1×|d x |+0.1×|d y |+0.8×|d z|, calculate the target distance. By increasing the weighting factor for the distance from each point to the third plane and decreasing the weighting factors for the first and second planes, this method can further improve the segmentation algorithm's performance when processing sloped surfaces. In actual applications, the target distance value is adaptively processed during vehicle travel, with the default being that the road surface near the vehicle is primarily ground points, with the specified ROI as the range.
[0055] Step S3: Point cloud clustering. This step further classifies the non-ground points obtained by ground segmentation into point clouds of different clusters. Euclidean clustering can be used as a clustering algorithm. It uses distance as a feature and determines whether point clouds belong to the same cluster based on clustering.
[0056] Step S4: Bounding box construction. This step constructs each point cloud cluster and finds the most appropriate bounding box to represent the point cloud cluster. A search-based bounding box construction algorithm is used. First, two end points in the point cloud cluster are selected to determine a target line. The point in the point cloud cluster with the greatest distance from the line is determined as the rotation point. The rotation point and the two end points are connected to obtain two side lengths l1l2. The rotation point is used as the rotation origin of one corner of the bounding box, and l1l2 is used as the two side lengths of the bounding box. They are at right angles. Starting from the x-axis, the bounding box is rotated clockwise or counterclockwise, each time by 0.5°, and stops at 90°. The target evaluation value corresponding to each rotation is determined.
[0057] The embodiments of the present application also provide an obstacle detection device based on laser point cloud. It should be noted that the obstacle detection device based on laser point cloud in the embodiments of the present application can be used to execute the obstacle detection method based on laser point cloud provided in the embodiments of the present application. The device is used to implement the above-mentioned embodiments and preferred implementation methods, and the details that have been explained will not be repeated here. As used below, the term "module" can be 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 in hardware, or a combination of software and hardware, is also possible and conceivable.
[0058] The following introduces the laser point cloud-based obstacle detection device provided in the embodiments of the present application.
[0059] Figure 6 Schematic diagram of an obstacle detection device based on laser point cloud according to an embodiment of the present application. Figure 6 As shown, the device includes:
[0060] An acquisition unit 10 is configured to acquire target point cloud data and cluster the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle;
[0061] Specifically, point cloud data refers to data obtained by laser radar scanning, which is a collection of vectors in a three-dimensional coordinate system. The target point cloud data of the present application is point cloud data formed by obstacle information obtained by vehicle-mounted laser radar scanning. The clustering method can be a spectral clustering algorithm, a hierarchical clustering algorithm, a mean migration algorithm, a comprehensive hierarchical clustering algorithm, a neighbor propagation clustering algorithm, a density clustering algorithm, and a k-means clustering algorithm. Those skilled in the art can choose according to actual conditions. By clustering the above-mentioned target point cloud data, the homogeneity of objects between classes can be maximized, and different data points can be divided into different clusters according to similarity and dissimilarity, and it is ensured that the data in each cluster are as similar as possible, and the data in different clusters are as different as possible.
[0062] a first determining unit 20, configured to determine a plurality of bounding boxes of the point cloud cluster, calculate areas of the plurality of bounding boxes, and determine the areas of the bounding boxes as first evaluation values;
[0063] Specifically, multiple bounding boxes corresponding to each point cloud cluster are determined. The shapes of the bounding boxes can be arbitrary, such as rectangles, ellipses, and irregular polygons. In fact, the above bounding boxes are a type of region of interest (ROI). Based on the shapes of the bounding boxes, the corresponding areas are determined. The first evaluation value is used to evaluate the minimization of the bounding box area.
[0064] a second determining unit 30 configured to determine a second evaluation value based on a distance between each point in the point cloud cluster and each coordinate axis of a predetermined coordinate system, and to determine a target evaluation value based on the first evaluation value and all the second evaluation values, thereby obtaining a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster, and the predetermined coordinate system is the coordinate system in which the point cloud cluster is located;
[0065] Specifically, the second evaluation value is used to assess the minimization of the point-to-edge error within the point cloud cluster. The target evaluation value can be determined by summing the first and second evaluation values. This method allows the accuracy of the bounding box to be evaluated using two different evaluation values simultaneously.
[0066] The third determining unit 40 is configured to determine the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determine the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
[0067] Specifically, when the target evaluation value is minimized, the most accurate bounding box for the point cloud cluster, known as the target bounding box, can be determined. Based on this target bounding box, the corresponding point cloud cluster is determined, and the location of the obstacle can be determined from this point cloud cluster. This obstacle location information is then transmitted to the vehicle's decision-making and planning module, which uses this information to avoid the obstacle, enhancing vehicle safety. This method can improve the accuracy of determining the location of obstacles facing the vehicle.
[0068] Through this embodiment, the acquisition unit acquires target point cloud data and clusters the target point cloud data to obtain multiple point cloud clusters; the first determination unit determines multiple bounding boxes of the point cloud cluster, calculates the areas of the multiple bounding boxes, and determines the areas of the bounding boxes as the first evaluation value; the second determination unit determines the second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determines a target evaluation value based on the first evaluation value and all the second evaluation values to obtain multiple target evaluation values; the third determination unit determines the bounding box corresponding to the minimum value among the multiple target evaluation values as the target bounding box, and determines the position of the obstacle corresponding to the point cloud cluster based on the target bounding box. The device combines two different evaluation values, the first evaluation value and the second evaluation value, to avoid the situation where a single evaluation value causes false detection of target direction information. Therefore, it can improve the accuracy of target detection of the laser point cloud and further determine the accurate obstacle position information of the vehicle. This solves the problem of inaccurate determination of the vehicle's obstacle position information.
[0069] In a specific implementation, the acquisition unit includes a first acquisition module, a first processing module, and a second processing module. The first acquisition module is used to acquire multiple first point cloud data and perform spatial synchronization processing on the multiple first point cloud data so that the multiple first point cloud data are located in the same coordinate system to obtain second point cloud data, wherein the multiple first point cloud data are point cloud data obtained by multiple laser radar scans; the first processing module is used to remove abnormal points in the second point cloud data to obtain third point cloud data, wherein there are no other points within a circle with a predetermined radius and centered at the abnormal point; the second processing module is used to process the third point cloud data to obtain non-ground point cloud data in the third point cloud data and determine that the non-ground point cloud data is the target point cloud data. In this device, since a vehicle may have multiple laser radars, and the coordinate systems of the point cloud data obtained by each laser radar are different, it is necessary to integrate the point cloud data in different coordinate systems into the same coordinate system. Spatial synchronization can be achieved by using a transformation matrix to merge and obtain a total point cloud, which is then processed. After obtaining the total point cloud, due to the irregular distribution of the point cloud data, some outliers may appear, located far from the central point cloud. These outliers can negatively impact data processing. Therefore, these outliers can be removed using, for example, a first processing module. Alternatively, a central point can be determined in the second point cloud data, and points with a distance greater than a predetermined distance from this central point can be identified as outliers, which can then be removed. The aforementioned point cloud preprocessing device can further improve the accuracy of bounding box determination.
[0070] In a specific implementation, the second processing module includes a processing submodule, an acquisition submodule, a first determination submodule, and a second determination submodule. The processing submodule is configured to perform rasterization processing on the third point cloud data to obtain a plurality of raster data. The acquisition submodule is configured to obtain a first plane, a second plane, and a third plane corresponding to the raster data, wherein the first plane contains a predetermined number of point cloud data, the second plane is perpendicular to the first plane, the second plane is perpendicular to the third plane, and the first plane is perpendicular to the third plane. The first determination submodule is configured to determine the sum of the distance from each point in the third point cloud data to the first plane, the distance from each point in the third point cloud data to the second plane, and the distance from each point in the third point cloud data to the third plane as the target distance. The second determination submodule is configured to determine that point cloud data with a target distance greater than a first threshold is the non-ground point cloud data. During an actual laser radar scanning process, some non-obstacle information, i.e., non-ground point data, may be scanned. Therefore, it is necessary to distinguish between this non-obstacle information and obstacle information, i.e., ground point data. The device uses a point cloud segmentation algorithm to distinguish between ground points and non-ground points. In the above-mentioned device, the plane equation of the point cloud inside the grid can be estimated by the RANSAC algorithm. The RANSAC algorithm assumes that the data contains correct data and abnormal data, and the correct data is recorded as the internal point and the abnormal data is recorded as the external point. The main ideas of the RANSAC algorithm include randomness and assumptions. Among them, randomness is to randomly select sampled data according to the probability of occurrence of correct data. According to the law of large numbers, random simulation can approximately obtain the correct result. Assumption is to assume that the selected sampled data are all correct data, and then use these correct data to calculate other points through the model satisfied by the problem, and then give a score to the result. In addition, the above-mentioned device can also determine the point cloud that needs to be processed in the subsequent process, which can reduce the design difficulty and data processing amount of the subsequent algorithm. In addition to the above-mentioned device, other filtering methods can also be used to distinguish between ground point and non-ground point data.
[0071] The first determination submodule is further used to set weight coefficients for the distance from each point to the first plane, the distance from each point in the third point cloud data to the second plane, and the distance from each point in the third point cloud data to the third plane, which can be calculated according to the formula D = ∑0.1×|d x |+0.1×|d y |+0.8×|d z |, determine the target distance, where |d x | is the distance from each point to the first plane, |d y | is the distance from each point to the second plane, |d z| is the distance from each point to the third plane. By increasing the weight coefficient for the distance from each point to the third plane and decreasing the weight coefficients for the first and second planes, the above-mentioned device can further improve the segmentation algorithm's performance when processing sloped planes. In actual application, the above-mentioned target distance value will be adaptively processed during vehicle driving, and the default is that the vicinity of the vehicle's driving road is primarily ground points, with the specific ROI as the range.
[0072] In some embodiments, the acquisition unit includes a second acquisition module, a first repetition module, and a second repetition module. The second acquisition module is configured to acquire a target point from the target point cloud data and determine as a set point a point in the target point cloud data whose shortest distance to the target point is less than a second threshold. The set points form a set, wherein the target point corresponds to any point in the target point cloud data. The first repetition module is configured to repeat the acquisition step in a first repetition step, wherein any two points in the repetitions are different and both belong to the set. The second repetition module is configured to repeat the acquisition step and the first repetition step a predetermined number of times until the number of set points in the set remains constant, thereby determining the set as the point cloud cluster. The device uses a Euclidean clustering algorithm, characterized by distance, to determine whether point clouds belong to the same cluster based on clustering. Euclidean clustering is a clustering algorithm based on the Euclidean distance metric. A nearest neighbor query algorithm based on a KD-Tree is a preprocessing method that accelerates the Euclidean clustering algorithm. A KD-Tree is a balanced binary tree. If its left subtree is not empty, then the values of all nodes on the left subtree are less than the value of its root node; if its right subtree is not empty, then the values of all nodes on the right subtree are greater than the value of its root node; its left and right subtrees are also binary search trees; in order to effectively find the nearest neighbor, KD-Tree divides the entire space into several small parts. KD-Tree is a binary tree in which each node is a k-dimensional numerical point. Each node on it represents a hyperplane, which is perpendicular to the coordinate axis of the current partition dimension and divides the space into two parts in this dimension, one in its left subtree and the other in its right subtree. That is, if the partition dimension of the current node is d, the coordinate values of all points on its left subtree in the d dimension are less than the current value, and the coordinate values of all points on the right subtree in the d dimension are greater than or equal to the current value. For example Figure 3 As shown, Figure 3 A Euclidean clustering algorithm is shown. First, a point P in the target point cloud data is determined, and a KD-Tree nearest neighbor search is performed on the point to obtain k points close to P. Points with a distance less than a set threshold are clustered into a set Q. When the elements in set Q no longer increase, other points in the target point cloud data are selected as points P. By repeating the above steps, multiple point cloud clusters can be obtained.
[0073] In a specific implementation process, the first determination unit includes a third acquisition module, a first determination module, and an adjustment module, wherein the third acquisition module is used to acquire a first endpoint and a second endpoint in the point cloud cluster, and determine that the straight line on which the first endpoint and the second endpoint lie is a target straight line, wherein the first endpoint is the point in the point cloud cluster with the largest distance from the y-axis of the predetermined coordinate system, and the second endpoint is the point in the point cloud cluster with the largest distance from the x-axis of the predetermined coordinate system; the first determination module is used to determine that the point in the point cloud cluster with the largest distance from the target straight line is a rotation point, and determine that a line segment formed by the rotation point and the first endpoint is a first side length, and a line segment formed by the rotation point and the second endpoint is a second side length, and use the first side length and the second side length as adjacent sides to form a bounding box; the adjustment module is used to synchronously rotate the first side length and the second side length multiple times around the rotation point, and adjust the first side length and the second side length during the rotation process, so that the bounding box formed by the adjusted first side length and the second side length each time includes the points in the point cloud cluster, and multiple bounding boxes are obtained by multiple rotations. The device is based on a search-based bounding box construction algorithm, and during the search process, it searches for the most appropriate bounding box to represent the above point cloud cluster. Figure 4 As shown, Figure 4 A schematic diagram of search-based bounding box construction is shown. First, two end points in the point cloud cluster are selected to determine a target straight line, and the point in the point cloud cluster with the largest distance to the straight line is determined as the rotation point. The rotation point and the two end points are connected respectively to obtain two side lengths l1 and l2. The rotation point is used as the rotation origin of one corner of the border, and l1 and l2 are used as the two side lengths of the border, which are at right angles. The x-axis is used as the starting position, and the rotation is carried out clockwise or counterclockwise, each rotation is 0.5°, and the rotation stops at 90°. The target evaluation value corresponding to each rotation is determined.
[0074] In a specific implementation process, the second determining unit includes a second determining module configured to determine the value of the second determining module according to the formula: Determine the second evaluation value, where A1, B1, and C1 are the coefficients of the linear equation of the x-axis of the coordinate system corresponding to the point cloud cluster, A2, B2, and C2 are the coefficients of the linear equation of the y-axis of the coordinate system corresponding to the point cloud cluster, and x i 、y i is the coordinate value of the point in the point cloud cluster in the predetermined coordinate system. In practice, the device determines the sum of the distances of each point from the coordinate axis, i.e., the minimum average point-to-edge error. The device can quickly determine the second evaluation value.
[0075] In some embodiments, the second determination unit further includes a third determination module configured to determine the target evaluation value according to the formula E=aE1+bE2, where E is the target evaluation value, a is a weight coefficient for the first evaluation value, E1 is the first evaluation value, b is a weight coefficient for the second evaluation value, and E2 is the second evaluation value. By introducing the weight coefficient, the device can balance errors and thus take into account the quantitative relationship between the two evaluation values.
[0076] The aforementioned laser point cloud-based obstacle detection device includes a processor and memory. The aforementioned acquisition unit, first determination unit, second determination unit, and third determination unit are all stored as program units in the memory. The processor executes these program units stored in the memory to implement the corresponding functions. The aforementioned modules are all located in the same processor; alternatively, the aforementioned modules may be located in different processors in any combination.
[0077] The processor contains a kernel, which calls the corresponding program unit from the memory. One or more kernels can be set, and the point cloud is determined by adjusting the kernel parameters.
[0078] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one memory chip.
[0079] An embodiment of the present invention provides a computer-readable storage medium, which includes a stored program. When the program is run, the device where the computer-readable storage medium is located is controlled to execute the laser point cloud-based obstacle detection method.
[0080] Specifically, the obstacle detection method based on laser point cloud includes:
[0081] Step S201: acquiring target point cloud data and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle;
[0082] Specifically, point cloud data refers to data obtained by laser radar scanning, which is a collection of vectors in a three-dimensional coordinate system. The target point cloud data of the present application is point cloud data formed by obstacle information obtained by vehicle-mounted laser radar scanning. The clustering method can be a spectral clustering algorithm, a hierarchical clustering algorithm, a mean migration algorithm, a comprehensive hierarchical clustering algorithm, a neighbor propagation clustering algorithm, a density clustering algorithm, and a k-means clustering algorithm. Those skilled in the art can choose according to actual conditions. By clustering the above-mentioned target point cloud data, the homogeneity of objects between classes can be maximized, and different data points can be divided into different clusters according to similarity and dissimilarity, and it is ensured that the data in each cluster are as similar as possible, and the data in different clusters are as different as possible.
[0083] Step S202: determining a plurality of bounding boxes of the point cloud cluster, calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as first evaluation values;
[0084] Specifically, multiple bounding boxes corresponding to each point cloud cluster are determined. The shapes of the bounding boxes can be arbitrary, such as rectangles, ellipses, and irregular polygons. In fact, the above bounding boxes are a type of region of interest (ROI). Based on the shapes of the bounding boxes, the corresponding areas are determined. The first evaluation value is used to evaluate the minimization of the bounding box area.
[0085] Step S203: determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determining a target evaluation value based on the first evaluation value and all the second evaluation values, thereby obtaining a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster. The predetermined coordinate system is the coordinate system in which the point cloud cluster is located.
[0086] Specifically, the second evaluation value is used to assess the minimization of the point-to-edge error within the point cloud cluster. The target evaluation value can be determined by summing the first and second evaluation values. This method allows the accuracy of the bounding box to be evaluated using two different evaluation values simultaneously.
[0087] Step S204 : determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
[0088] Specifically, when the target evaluation value is minimized, the most accurate bounding box for the point cloud cluster, known as the target bounding box, can be determined. Based on this target bounding box, the corresponding point cloud cluster is determined, and the location of the obstacle can be determined from this point cloud cluster. This obstacle location information is then transmitted to the vehicle's decision-making and planning module, which uses this information to avoid the obstacle, enhancing vehicle safety. This method can improve the accuracy of determining the location of obstacles facing the vehicle.
[0089] Optionally, obtaining target point cloud data includes: obtaining multiple first point cloud data, and performing spatial synchronization processing on the multiple first point cloud data so that the multiple first point cloud data are located in the same coordinate system to obtain second point cloud data, wherein the multiple first point cloud data are point cloud data obtained by multiple laser radar scans; removing abnormal points in the second point cloud data to obtain third point cloud data, wherein there are no other points in a circle with the abnormal point as the center and a predetermined radius as the radius; processing the third point cloud data to obtain non-ground point cloud data in the third point cloud data, and determining that the non-ground point cloud data is the target point cloud data.
[0090] Optionally, the third point cloud data is processed to obtain non-ground point cloud data in the third point cloud data, including: rasterizing the third point cloud data to obtain a plurality of raster data; obtaining a first plane, a second plane and a third plane corresponding to the raster data, wherein the first plane contains a predetermined number of point cloud data, the second plane is perpendicular to the first plane, the second plane is perpendicular to the third plane, and the first plane is perpendicular to the third plane; determining the sum of the distance from each point in the third point cloud data to the first plane, the distance from each point in the third point cloud data to the second plane, and the distance from each point in the third point cloud data to the third plane as the target distance; determining the point cloud data whose target distance is greater than a first threshold as the non-ground point cloud data.
[0091] Optionally, the target point cloud data is clustered to obtain a plurality of point cloud clusters, including: an acquisition step of acquiring a target point in the target point cloud data, determining a point in the target point cloud data whose shortest distance to the target point is less than a second threshold as a collection point, and the collection points forming a collection, wherein the target point is a point corresponding to any point cloud data in the target point cloud data; a first repetition step of repeating the acquisition step, wherein any two points in the repetition process are different and are both points in the collection; a second repetition step of repeating the acquisition step and the first repetition step for a predetermined number of times until the number of collection points in the collection remains unchanged, and determining that the collection is the point cloud cluster.
[0092] Optionally, determining multiple bounding boxes of the point cloud cluster includes: obtaining a first endpoint and a second endpoint in the point cloud cluster, and determining the straight line on which the first endpoint and the second endpoint are located as a target straight line, wherein the first endpoint is the point in the point cloud cluster with the largest distance from the y-axis of the predetermined coordinate system, and the second endpoint is the point in the point cloud cluster with the largest distance from the x-axis of the predetermined coordinate system; determining the point in the point cloud cluster with the largest distance from the target straight line as a rotation point, and determining a line segment formed by the rotation point and the first endpoint as a first side length, determining a line segment formed by the rotation point and the second endpoint as a second side length, and forming a bounding box with the first side length and the second side length as adjacent sides; synchronously rotating the first side length and the second side length multiple times around the rotation point, and adjusting the first side length and the second side length during the rotation process, so that the bounding box formed by the first side length and the second side length after each rotation adjustment includes the points in the point cloud cluster, and obtaining multiple bounding boxes by multiple rotations.
[0093] Optionally, determining the second evaluation value according to the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system includes: according to the formula Determine the second evaluation value, where A1, B1, and C1 are the coefficients of the linear equation of the x-axis of the coordinate system corresponding to the point cloud cluster, A2, B2, and C2 are the coefficients of the linear equation of the y-axis of the coordinate system corresponding to the point cloud cluster, and x i 、y i is the coordinate value of the point in the above point cloud cluster in the above predetermined coordinate system.
[0094] Optionally, a target evaluation value is determined based on the above-mentioned first evaluation value and all the above-mentioned second evaluation values to obtain multiple above-mentioned target evaluation values, including: determining the above-mentioned target evaluation value according to the formula E=aE1+bE2, wherein E is the above-mentioned target evaluation value, a is the weight coefficient of the above-mentioned first evaluation value, E1 is the above-mentioned first evaluation value, b is the weight coefficient of the above-mentioned second evaluation value, and E2 is the above-mentioned second evaluation value.
[0095] An embodiment of the present invention provides a processor, which is used to run a program, wherein the program executes the above-mentioned obstacle detection method based on laser point cloud when running.
[0096] Specifically, the obstacle detection method based on laser point cloud includes:
[0097] Step S201: acquiring target point cloud data and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle;
[0098] Specifically, point cloud data refers to data obtained by laser radar scanning, which is a collection of vectors in a three-dimensional coordinate system. The target point cloud data of the present application is point cloud data formed by obstacle information obtained by vehicle-mounted laser radar scanning. The clustering method can be a spectral clustering algorithm, a hierarchical clustering algorithm, a mean migration algorithm, a comprehensive hierarchical clustering algorithm, a neighbor propagation clustering algorithm, a density clustering algorithm, and a k-means clustering algorithm. Those skilled in the art can choose according to actual conditions. By clustering the above-mentioned target point cloud data, the homogeneity of objects between classes can be maximized, and different data points can be divided into different clusters according to similarity and dissimilarity, and it is ensured that the data in each cluster are as similar as possible, and the data in different clusters are as different as possible.
[0099] Step S202: determining a plurality of bounding boxes of the point cloud cluster, calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as first evaluation values;
[0100] Specifically, multiple bounding boxes corresponding to each point cloud cluster are determined. The shapes of the bounding boxes can be arbitrary, such as rectangles, ellipses, and irregular polygons. In fact, the above bounding boxes are a type of region of interest (ROI). Based on the shapes of the bounding boxes, the corresponding areas are determined. The first evaluation value is used to evaluate the minimization of the bounding box area.
[0101] Step S203: determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determining a target evaluation value based on the first evaluation value and all the second evaluation values, thereby obtaining a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster. The predetermined coordinate system is the coordinate system in which the point cloud cluster is located.
[0102] Specifically, the second evaluation value is used to assess the minimization of the point-to-edge error within the point cloud cluster. The target evaluation value can be determined by summing the first and second evaluation values. This method allows the accuracy of the bounding box to be evaluated using two different evaluation values simultaneously.
[0103] Step S204 : determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
[0104] Specifically, when the target evaluation value is minimized, the most accurate bounding box for the point cloud cluster, known as the target bounding box, can be determined. Based on this target bounding box, the corresponding point cloud cluster is determined, and the location of the obstacle can be determined from this point cloud cluster. This obstacle location information is then transmitted to the vehicle's decision-making and planning module, which uses this information to avoid the obstacle, enhancing vehicle safety. This method can improve the accuracy of determining the location of obstacles facing the vehicle.
[0105] An embodiment of the present invention provides a device, comprising a processor, a memory, and a program stored in the memory and executable on the processor. When the processor executes the program, at least the following steps are performed:
[0106] Step S201: acquiring target point cloud data and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle;
[0107] Step S202: determining a plurality of bounding boxes of the point cloud cluster, calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as first evaluation values;
[0108] Step S203: determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determining a target evaluation value based on the first evaluation value and all the second evaluation values, thereby obtaining a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster. The predetermined coordinate system is the coordinate system in which the point cloud cluster is located.
[0109] Step S204 : determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
[0110] The devices in this article can be servers, PCs, PADs, mobile phones, etc.
[0111] The present application also provides a computer program product, which, when executed on a data processing device, is adapted to execute a program for initializing at least the following method steps:
[0112] Step S201: acquiring target point cloud data and clustering the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing obstacles to the vehicle;
[0113] Step S202: determining a plurality of bounding boxes of the point cloud cluster, calculating the areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as first evaluation values;
[0114] Step S203: determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determining a target evaluation value based on the first evaluation value and all the second evaluation values, thereby obtaining a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster. The predetermined coordinate system is the coordinate system in which the point cloud cluster is located.
[0115] Step S204 : determining the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determining the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
[0116] Obviously, those skilled in the art will appreciate that the various modules or steps of the present invention described above can be implemented using a general-purpose computing device, can be centralized on a single computing device, or can be distributed across a network of multiple computing devices. They can be implemented using program code executable by the computing device, and thus, can be stored in a storage device and executed by the computing device. In some cases, the steps shown or described herein can be performed in a different order than that shown, or can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. Thus, the present invention is not limited to any particular combination of hardware and software.
[0117] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0118] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the steps in the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0119] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.
[0120] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0121] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0122] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0123] Computer-readable media includes permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media (transitory media), such as modulated data signals and carrier waves.
[0124] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus that includes a series of elements includes not only those elements but also other elements not explicitly listed, or includes elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprises a ..." does not exclude the presence of other identical elements in the process, method, commodity, or apparatus that includes the element.
[0125] From the above description, it can be seen that the above embodiments of the present application achieve the following technical effects:
[0126] 1) The obstacle detection method based on laser point cloud of the present application first obtains target point cloud data and clusters the target point cloud data to obtain multiple point cloud clusters; then determines multiple bounding boxes of the point cloud cluster, calculates the areas of the multiple bounding boxes, and determines the area of the bounding box as the first evaluation value. According to the distance from each point in the point cloud cluster to each coordinate axis of the predetermined coordinate system, a second evaluation value is determined, and a target evaluation value is determined based on a first evaluation value and all the second evaluation values to obtain multiple target evaluation values; finally, the bounding box corresponding to the minimum value among the multiple target evaluation values is determined as the target bounding box, and the position of the obstacle corresponding to the point cloud cluster is determined based on the target bounding box. This method combines two different evaluation values, the first evaluation value and the second evaluation value, to avoid the situation where a single evaluation value causes misdetection of target direction information. Therefore, it can improve the accuracy of target detection of laser point cloud, and further determine the accurate obstacle position information of the vehicle. The problem of inaccurate determination of the obstacle position information of the vehicle is solved.
[0127] 2) The obstacle detection device based on laser point cloud of the present application, the acquisition unit acquires the target point cloud data, and clusters the target point cloud data to obtain multiple point cloud clusters; the first determination unit determines multiple bounding boxes of the point cloud cluster, calculates the areas of the multiple bounding boxes, and determines the areas of the bounding boxes as the first evaluation value; the second determination unit determines the second evaluation value according to the distance between each point in the point cloud cluster and each coordinate axis of the predetermined coordinate system, and determines a target evaluation value according to a first evaluation value and all the second evaluation values to obtain multiple target evaluation values; the third determination unit determines the bounding box corresponding to the minimum value of the multiple target evaluation values as the target bounding box, and determines the position of the obstacle corresponding to the point cloud cluster according to the target bounding box. The device combines two different evaluation values, the first evaluation value and the second evaluation value, to avoid the situation where a single evaluation value causes misdetection of target direction information. Therefore, it can improve the accuracy of target detection of laser point cloud, and further determine the accurate obstacle position information of the vehicle. The problem of inaccurate determination of the obstacle position information of the vehicle is solved.
[0128] The above description is merely a preferred embodiment of the present application and is not intended to limit the present application. Various modifications and variations are possible for those skilled in the art. Any modifications, equivalent substitutions, or improvements made within the spirit and principles of the present application shall be included within the scope of protection of the present application.
Claims
1. An obstacle detection method based on laser point cloud, characterized in that: include: Acquire target point cloud data and cluster the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing an obstacle of the vehicle; determining a plurality of bounding boxes of the point cloud cluster, calculating areas of the plurality of bounding boxes, and determining the areas of the bounding boxes as first evaluation values; Determining a second evaluation value based on the distance between each point in the point cloud cluster and each coordinate axis of a predetermined coordinate system, and determining a target evaluation value based on one of the first evaluation values and all of the second evaluation values to obtain a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster, and the predetermined coordinate system is the coordinate system in which the point cloud cluster is located; The bounding box corresponding to the minimum value among the plurality of target evaluation values is determined as a target bounding box, and the position of the obstacle corresponding to the point cloud cluster is determined according to the target bounding box.
2. The method according to claim 1, characterized in that Obtain target point cloud data, including: Acquire a plurality of first point cloud data, and perform spatial synchronization processing on the plurality of first point cloud data so that the plurality of first point cloud data are located in the same coordinate system, thereby obtaining second point cloud data, wherein the plurality of first point cloud data are point cloud data obtained by scanning a plurality of laser radars; removing the outlier in the second point cloud data to obtain third point cloud data, wherein no other points are within a circle having a predetermined radius and the outlier as the center; The third point cloud data is processed to obtain non-ground point cloud data in the third point cloud data, and the non-ground point cloud data is determined to be the target point cloud data.
3. The method according to claim 2, characterized in that Processing the third point cloud data to obtain non-ground point cloud data in the third point cloud data includes: performing rasterization processing on the third point cloud data to obtain a plurality of raster data; Acquire a first plane, a second plane, and a third plane corresponding to the raster data, wherein the first plane contains a predetermined amount of point cloud data, the second plane is perpendicular to the first plane, the second plane is perpendicular to the third plane, and the first plane is perpendicular to the third plane; determining a sum of a distance from each point in the third point cloud data to the first plane, a distance from each point in the third point cloud data to the second plane, and a distance from each point in the third point cloud data to the third plane as a target distance; The point cloud data having a target distance greater than a first threshold is determined to be the non-ground point cloud data.
4. The method according to claim 1, wherein Clustering the target point cloud data to obtain multiple point cloud clusters, including: an acquiring step of acquiring a target point in the target point cloud data, determining a point in the target point cloud data whose shortest distance to the target point is less than a second threshold as a set point, wherein the set points form a set, wherein the target point is a point corresponding to any point cloud data in the target point cloud data; A first repetition step is to repeat the obtaining step, wherein any two points in the repetition process are different and are both points in the set; The second repetition step is to repeat the acquisition step and the first repetition step for a predetermined number of times until the number of the set points in the set remains unchanged, and the set is determined to be the point cloud cluster.
5. The method according to claim 1, wherein Determining a plurality of bounding boxes of the point cloud cluster includes: Acquire a first endpoint and a second endpoint in the point cloud cluster, and determine a straight line on which the first endpoint and the second endpoint lie as a target straight line, wherein the first endpoint is the point in the point cloud cluster with the largest distance from the y-axis of the predetermined coordinate system, and the second endpoint is the point in the point cloud cluster with the largest distance from the x-axis of the predetermined coordinate system; Determine the point in the point cloud cluster that has the largest straight-line distance to the target as the rotation point, determine a line segment formed by the rotation point and the first endpoint as a first side length, determine a line segment formed by the rotation point and the second endpoint as a second side length, and use the first side length and the second side length as adjacent sides to form a bounding box; The first side length and the second side length are synchronously rotated multiple times around the rotation point, and the first side length and the second side length are adjusted during the rotation process so that the bounding box formed by the first side length and the second side length after each rotation adjustment includes the points in the point cloud cluster, and multiple bounding boxes are obtained by multiple rotations.
6. The method according to claim 1, characterized in that Determining a second evaluation value according to the distance between each point in the point cloud cluster and each coordinate axis of a predetermined coordinate system includes: According to the formula Determine the second evaluation value, wherein A1, B1 and C1 are the coefficients of the linear equation of the x-axis of the coordinate system corresponding to the point cloud cluster, A2, B2 and C2 are the coefficients of the linear equation of the y-axis of the coordinate system corresponding to the point cloud cluster, i 、y i is the coordinate value of the point in the point cloud cluster in the predetermined coordinate system.
7. The method according to claim 1, characterized in that Determining a target evaluation value according to one of the first evaluation values and all of the second evaluation values to obtain a plurality of the target evaluation values includes: The target evaluation value is determined according to the formula E=aE1+bE2, where E is the target evaluation value, a is the weight coefficient of the first evaluation value, E1 is the first evaluation value, b is the weight coefficient of the second evaluation value, and E2 is the second evaluation value.
8. An obstacle detection device based on laser point cloud, characterized in that: include: an acquisition unit, configured to acquire target point cloud data and cluster the target point cloud data to obtain a plurality of point cloud clusters, wherein the target point cloud data is point cloud data representing an obstacle to the vehicle; a first determining unit, configured to determine a plurality of bounding boxes of the point cloud cluster, calculate areas of the plurality of bounding boxes, and determine the areas of the bounding boxes as first evaluation values; a second determining unit, configured to determine a second evaluation value based on a distance between each point in the point cloud cluster and each coordinate axis of a predetermined coordinate system, and to determine a target evaluation value based on one of the first evaluation values and all of the second evaluation values, to obtain a plurality of target evaluation values, wherein the target evaluation value is used to evaluate the accuracy of the bounding box in determining the position of the point cloud cluster, and the predetermined coordinate system is the coordinate system in which the point cloud cluster is located; The third determining unit is configured to determine the bounding box corresponding to the minimum value among the plurality of target evaluation values as the target bounding box, and determine the position of the obstacle corresponding to the point cloud cluster according to the target bounding box.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium includes a stored program, wherein when the program is executed, the device where the computer-readable storage medium is located is controlled to execute the method according to any one of claims 1 to 7.
10. An electronic device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to execute the method according to any one of claims 1 to 7 through the computer program.
Citation Information
Patent Citations
Obstacle detection method and device, storage medium and vehicle
CN111289998A
Obstacle detection method and apparatus and storage medium
US20220397673A1