Obstacle detection method, device, equipment and computer storage medium
By acquiring and analyzing the characteristic information of point cloud data and outputting appropriate obstacle labeling types, it solves the problem that obstacle detection is difficult to identify the driving area in intelligent driving, and achieves more accurate obstacle detection and reduces false triggering.
Patent Information
- Application Number
- CN202110306719.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-03-23
- Publication Date
- 2025-02-28
- Estimated Expiration
- 2041-03-23
AI Technical Summary
In the existing intelligent driving technology, obstacle detection algorithms are difficult to accurately identify the actual driving area of the vehicle, resulting in the possible mistriggering of the automatic braking system.
By acquiring point cloud data, point cloud feature information of target obstacles is extracted, and appropriate target annotation types are output based on these feature information, including three-dimensional detection boxes, plane equations or linear equations, to accurately identify the travelable area of the vehicle.
This method can accurately identify the actual driving area of the vehicle in different scenarios, reducing the false triggering of the automatic braking system.
Smart Images

Figure CN115116020B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of intelligent driving technology, and in particular, relates to an obstacle detection method, device, equipment and computer storage medium. Background Art
[0002] As we all know, in the field of intelligent driving, sensor-based obstacle detection algorithms are widely used. Existing obstacle detection algorithms usually output a three-dimensional detection frame of the obstacle. In actual applications, vehicles usually encounter a variety of scenarios, and different annotation types need to be output for different obstacles. For example, in the scenario where the vehicle turns right along the wall or the vehicle turns right along the guardrail or roadside green belt, if the three-dimensional detection frame is still directly output, it is often difficult to accurately identify the actual drivable area of the vehicle, which leads to the problem of easily triggering the automatic braking system (Autonomous Emergency Braking, AEB) by mistake. Summary of the invention
[0003] The embodiments of the present application provide an obstacle detection method, device, equipment and computer storage medium to solve the technical problem that it is difficult to accurately identify the actual drivable area of a vehicle.
[0004] In a first aspect, an embodiment of the present application provides an obstacle detection method, the method comprising:
[0005] Acquire point cloud data, wherein the point cloud data includes a target point cloud corresponding to the target obstacle;
[0006] Acquire point cloud feature information of the target point cloud;
[0007] A target annotation type corresponding to the point cloud feature information is output for the target obstacle, where the target annotation type is a three-dimensional detection box, a plane equation, or a line equation.
[0008] In a second aspect, an embodiment of the present application provides an obstacle detection device, the device comprising:
[0009] A first acquisition module, used to acquire point cloud data, wherein the point cloud data includes a target point cloud corresponding to a target obstacle;
[0010] A second acquisition module is used to acquire point cloud feature information of the target point cloud;
[0011] An output module is used to output a target annotation type corresponding to the point cloud feature information for the target obstacle, where the target annotation type is a three-dimensional detection box, a plane equation, or a line equation.
[0012] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising:
[0013] a processor and a memory storing computer program instructions;
[0014] The processor implements the above obstacle detection method when executing the computer program instructions.
[0015] In a fourth aspect, an embodiment of the present application provides a computer storage medium having computer program instructions stored thereon, and the computer program instructions implement the above-mentioned obstacle detection method when executed by a processor.
[0016] The obstacle detection method, device, equipment and computer storage medium of the embodiment of the present application can obtain point cloud data, and the point cloud data includes a target point cloud corresponding to the target obstacle, thereby obtaining point cloud feature information based on the target point cloud, and then outputting a target annotation type corresponding to the point cloud feature information for the target obstacle, wherein the target annotation type is any one of a three-dimensional detection frame, a plane equation and a straight line equation. The embodiment of the present application obtains point cloud feature information using the target point cloud corresponding to the target obstacle, and can output a corresponding three-dimensional detection frame, a plane equation or a straight line equation according to the point cloud feature information in different scenarios, so that the actual drivable area of the vehicle can be more accurately identified according to the target annotation type, and thus the automatic braking system can be avoided from being triggered inadvertently to a certain extent. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0018] Figure 1 is a flowchart of an obstacle detection method provided in an embodiment of the present application;
[0019] Figure 2 is a schematic diagram of a convex hull point in an embodiment of the present application;
[0020] Figure 3 is a schematic diagram of a convex hull point sequence in an embodiment of the present application;
[0021] Figure 4 is a complete algorithm flow chart of the obstacle detection method provided in the embodiment of the present application;
[0022] Figure 5 is a local algorithm flow chart of the obstacle detection method provided in the embodiment of the present application;
[0023] Figure 6 is a structural schematic diagram of an obstacle detection device provided by another embodiment of the present application;
[0024] Figure 7 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0025] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0026] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0027] In order to solve the problems of the prior art, the embodiments of the present application provide an obstacle detection method, device, equipment and computer storage medium. The obstacle detection method provided by the embodiments of the present application is first introduced below.
[0028] Figure 1 A flow chart of an obstacle detection method provided by an embodiment of the present application is shown. The obstacle detection method can be applied during vehicle driving, and in particular can be applied to special occasions where direct output of a three-dimensional detection frame may result in incorrect identification of the actual drivable area, such as when the obstacle may be a wall, guardrail, or green belt, and the vehicle turns right along it. In order to simplify the description and facilitate understanding, the following description may be based on the scenario of a vehicle turning right along a wall, guardrail, or green belt as an example.
[0029] like Figure 1 As shown, this embodiment provides an obstacle detection method, including:
[0030] Step S101, acquiring point cloud data, where the point cloud data includes a target point cloud corresponding to a target obstacle;
[0031] Step S102, obtaining point cloud feature information of the target point cloud;
[0032] Step S103: outputting a target annotation type corresponding to the point cloud feature information for the target obstacle, where the target annotation type is a three-dimensional detection box, a plane equation, or a line equation.
[0033] In step S101, point cloud data is obtained. Specifically, the point cloud data may be obtained by scanning the vehicle driving environment. There may be one or more obstacles in the driving environment, and the target obstacle may refer to any of these obstacles. Therefore, in the point cloud data, there is usually a target point cloud corresponding to the target obstacle. In combination with some actual application scenarios, the target point cloud corresponding to the target obstacle can be obtained by some specific methods, such as point cloud point clustering, deep learning, etc.; the specific point cloud data acquisition method is not limited here and can be selected according to actual needs.
[0034] In step S102, point cloud feature information of the target point cloud is obtained. It is easy to understand that the target point clouds corresponding to different target obstacles may be different, and the corresponding point cloud feature information may also be different, such as the distribution of the point clouds.
[0035] In some examples, the point cloud feature information may be at least one of length information, width information, and projection features, wherein the length information and width information may be directly obtained based on the distribution of the target point cloud, and the projection features may be obtained based on the projection points of the target projection surface of the target point cloud in a preset coordinate system.
[0036] For example, the preset coordinate system can be a geodetic coordinate system, a sensor coordinate system, a vehicle coordinate system, etc., which is not specifically limited here; and the target projection surface can be a preset plane in the preset coordinate system, such as a projection surface parallel to the ground or approximately parallel to the ground, etc.
[0037] In step S103, the target annotation type corresponding to the point cloud feature information is output for the target obstacle, and the target annotation type is a three-dimensional detection box, a plane equation, or a line equation. Specifically, the point cloud feature information can reflect the type of the target obstacle under certain circumstances, and the point cloud feature information corresponding to different target obstacles may be different, so the corresponding target annotation type can be output according to the point cloud feature information.
[0038] For example, for planar target obstacles such as walls, the plane equation corresponding to the point cloud feature information can be output; for straight line target obstacles such as guardrails or green belts, the straight line equation corresponding to the point cloud feature information can be output; for other types of target obstacles, such as other vehicles and roadblocks on the road, a three-dimensional detection frame can be output.
[0039] The plane equation may be a plane equation or a coefficient of the plane equation, as well as a coordinate value range corresponding to the target obstacle in a preset coordinate system. For example, in general, the plane equation may be obtained by Ax+By+Cz+D=0, and the coefficient of the output plane equation may be (A, B, C, D), based on which the corresponding plane equation may be obtained.
[0040] The straight line equation can be a straight line equation that directly outputs a target straight line; it can also be the coefficient of the straight line equation and the coordinate value range corresponding to the target obstacle in the preset coordinate system, such as the output result (K, B, x min ,x max ).
[0041] The three-dimensional detection frame can be obtained through the coordinates of the target point cloud in a preset coordinate system. The specific acquisition process of the three-dimensional detection frame can be obtained through an existing three-dimensional target detection algorithm, which will not be described in detail here.
[0042] As mentioned above, directly outputting 3D detection frames for all target obstacles may cause the vehicle to invade the drivable area. That is, the selection range of the 3D detection frame may reach the drivable area, causing the actual drivable area to be identified as the obstacle area.
[0043] In this embodiment, the corresponding three-dimensional detection box, plane equation or straight line equation can be output according to the point cloud feature information, so that the output result for the target obstacle can adapt to a variety of different scenarios during vehicle driving, for example, it can adapt to the specific scenario where the vehicle makes a right-angle turn along a wall, guardrail or green belt.
[0044] For example, when a vehicle turns at a right angle along a wall, the 3D detection frame corresponding to the wall may also include the edge of the wall at the top, but the actual drivable area of the vehicle is not affected by the edge of the wall. Therefore, when the 3D detection frame is output for the wall, the edge of the wall may invade the drivable area. At this time, outputting the corresponding plane equation for the wall can help the vehicle more accurately identify the actual drivable area.
[0045] The obstacle detection method of the embodiment of the present application can obtain point cloud data, and the point cloud data includes a target point cloud corresponding to the target obstacle, thereby obtaining point cloud feature information based on the target point cloud, and then outputting a target annotation type corresponding to the point cloud feature information for the target obstacle, wherein the target annotation type is any one of a three-dimensional detection box, a plane equation, and a straight line equation. The embodiment of the present application uses the target point cloud corresponding to the target obstacle to obtain point cloud feature information, and can output a corresponding three-dimensional detection box, a plane equation, or a straight line equation according to the point cloud feature information in different scenarios, so that the actual drivable area of the vehicle can be more accurately identified according to the target annotation type, thereby effectively avoiding the false triggering of the automatic braking system (Autonomous Emergency Braking, AEB).
[0046] Optionally, in one embodiment, the point cloud feature information includes width information of the target point cloud. In step S103, outputting the target annotation type corresponding to the point cloud feature information for the target obstacle may include:
[0047] When the width information is less than or equal to a preset width threshold, a three-dimensional detection frame is output for the target obstacle.
[0048] In this embodiment, the point cloud feature information may include width information of the target point cloud. Specifically, the width information can be obtained based on the coordinates of the target point cloud in a preset coordinate system, or it can be obtained by directly calculating the width information based on the distribution of the target point cloud, or it can be obtained by other methods, which is not specifically limited here.
[0049] The width information may be the width of the target point cloud corresponding to the width direction of the vehicle. The preset coordinate system may be a sensor coordinate system or a vehicle body coordinate system. For example, taking the preset coordinate system as a vehicle body coordinate system, the sensor installation position may be used as the coordinate origin, the length direction of the vehicle may be the X-axis, the width direction of the vehicle may be the Y-axis, and the height direction of the vehicle may be the Z-axis to establish a vehicle body coordinate system. Then, the width information may correspond to the coordinate distribution of the target point cloud in the Y-axis direction.
[0050] When the width information is less than or equal to the preset width threshold, a 3D detection frame is output for the target obstacle. Specifically, the preset width threshold can be set according to the actual situation or according to the empirical value of the measured data. For example, the preset width threshold can be 2m. That is, when the width information is less than or equal to 2m, it can be considered that the target obstacle corresponding to the target point cloud does not belong to a plane type or a straight line type such as a wall, guardrail or green belt. At this time, a 3D detection frame can be output for the target obstacle.
[0051] In this embodiment, the width information of the target point cloud is compared with a preset width threshold. When it is less than or equal to the preset width threshold, the target obstacle is assumed to be a general obstacle such as a road vehicle or roadblock, and a three-dimensional detection frame is output for the target obstacle. It is no longer necessary to determine whether it is a plane-type obstacle such as a wall, guardrail or green belt, or a straight-type obstacle. This can simplify the algorithm steps to a certain extent.
[0052] Optionally, in one embodiment, in step S102, obtaining point cloud feature information of the target point cloud may include:
[0053] Get the width information of the target point cloud;
[0054] When the width information is greater than a preset width threshold, a projection feature of the target point cloud is obtained, where the projection feature is a feature of a plurality of projection points of the target point cloud on a target projection plane in a preset coordinate system;
[0055] Among them, the point cloud feature information includes width information and projection features;
[0056] Correspondingly, in step S103, outputting the target annotation type corresponding to the point cloud feature information for the target obstacle may include:
[0057] Output the target annotation type corresponding to the projection feature for the target obstacle.
[0058] In this embodiment, the point cloud feature information may include width information and projection features, wherein the width information of the target point cloud can be obtained by calculation according to the coordinates of the target point cloud in a preset coordinate system as described above, or by directly obtaining the width information according to the distribution of the target point cloud, or by other methods.
[0059] When the width information is greater than a preset width threshold, a projection feature of the target point cloud is obtained, where the projection feature is a feature of a plurality of projection points of the target point cloud on a target projection plane in a preset coordinate system.
[0060] Specifically, when the width information is greater than a preset width threshold, it is continued to be determined whether the target obstacle is a plane type obstacle or a straight line type obstacle according to the point cloud feature information. The target point cloud can be projected onto a target projection surface in a preset coordinate system to obtain multiple projection points.
[0061] For example, when the width information is greater than a preset width threshold, taking the preset coordinate system as the vehicle body coordinate system as an example, the target projection plane may be an XY plane, that is, the plane where the road surface is located, such as Figure 2 As shown, after projecting the target point cloud onto the XY plane in the vehicle body coordinate system, multiple projection points are obtained.
[0062] It is easy to understand that different target point clouds may be different, and the multiple projection points obtained by the corresponding projections may also be different, such as the distribution of the projection points, the area of the enclosed region, etc. Therefore, the projection features of the target point cloud can be obtained according to the multiple projection points.
[0063] In some examples, the projection feature may be at least one of a first error, a fitting length, and a fitting angle.
[0064] The first error may be a distance error between a projection point and a fitted straight line obtained from a plurality of projection points. Specifically, the first fitted straight line may be obtained by fitting P convex hull points determined from the plurality of projection points, indicating a distance error between the P convex hull points and the first fitted straight line. The convex hull points represent points of a convex polygon surrounding the plurality of projection points, and P is an integer greater than 2.
[0065] The fitting length may be the length of the target fitting straight line obtained after multiple fittings of the P convex hull points, and the fitting angle may be the angle formed by the target fitting straight line and a coordinate axis in the preset coordinate system.
[0066] Output the target annotation type corresponding to the projection feature for the target obstacle. Specifically, when the width information is greater than the preset width threshold, the type of the target obstacle can continue to be reflected according to the projection feature. Different target obstacles may have different corresponding projection features, so the corresponding target annotation type can be output according to the projection feature.
[0067] This embodiment projects the three-dimensional target point cloud onto the target projection plane to obtain two-dimensional projection points, and then outputs the corresponding target annotation type according to the two-dimensional projection characteristics. The three-dimensional conversion is used for two-dimensional calculation, which effectively reduces the calculation complexity and improves the calculation efficiency.
[0068] Optionally, in one embodiment, the point cloud feature information further includes length information of the target point cloud, and obtaining the projection features of the target point cloud may include:
[0069] Obtaining an area ratio between a first area and a second area, wherein the first area is a projection area of the target point cloud on the target projection surface, and the second area is an area calculated according to the length information and the width information;
[0070] When the first area is less than a first threshold value and the area ratio is less than a second threshold value, a first error is obtained based on the multiple projection points, wherein the first error is used to indicate a distance error between the multiple projection points and a first fitting straight line, the first fitting straight line is obtained by fitting based on the multiple projection points, and the projection feature includes the first error;
[0071] Accordingly, the target annotation type corresponding to the projection feature output for the target obstacle may include:
[0072] When the first error is less than the third threshold, a plane equation is output for the target obstacle.
[0073] In this embodiment, the point cloud feature information may also include length information of the target point cloud. Specifically, the length information may be obtained based on the coordinates of the target point cloud in a preset coordinate system, or may be obtained by directly calculating the length information based on the distribution of the target point cloud, or may be obtained by other methods, which are not specifically limited here.
[0074] The length information may be the length of the target point cloud corresponding to the length direction of the vehicle. For example, taking the preset coordinate system as the vehicle body coordinate system, the length information may correspond to the coordinate distribution of the target point cloud in the X-axis direction.
[0075] The area ratio between the first area and the second area is obtained. The first area may be a projection area corresponding to a plurality of projection points, and the projection area may be obtained according to an existing polygon area calculation algorithm, which will not be described in detail herein.
[0076] Specifically, a convex hull point may be determined from a plurality of projection points, and the first area may be calculated based on the convex hull point. Figure 2 As shown in the figure, the convex hull point can be the projection point of the line segments in the figure. For example, the convex hull point can be located in the preset coordinate system according to its coordinates (x j ,y j ) Calculate the projected area S C , projection area S C The calculation formula can be as follows:
[0077]
[0078] Among them, the convex hull points can be numbered according to the clockwise or counterclockwise direction, j represents the number of the convex hull point, (x j ,y j )、(x j+1 ,y j+1 ) represents the coordinates of two adjacent convex hull points, N represents multiple convex hull points for calculation, and in this formula, the formula coefficients can be selected according to actual needs.
[0079] The second area can be obtained based on the length information and the width information. For example, the second area can be the product of the length information and the width information, or the obstacle area can be obtained by the weight of the length information and the width information. The specific method of obtaining the second area can be selected according to actual needs.
[0080] In this embodiment, the second area is equal to the length information multiplied by the width information. RThe calculation formula can be as follows:
[0081] S R =L×W
[0082] Among them, L is the length information and W is the width information.
[0083] The area ratio may be the ratio of the first area to the second area. t The calculation formula can be as follows:
[0084]
[0085] Among them, S C represents the first area, S R Represents the second area.
[0086] When the first area is less than the first threshold and the area ratio is less than the second threshold, a first error is obtained based on multiple projection points. Specifically, when the first area is less than the first threshold and the area ratio is less than the second threshold, the projection feature may include a first error, wherein the first threshold and the second threshold may be set according to actual conditions.
[0087] As described above, the first error may be a distance error between a projection point and a fitted straight line obtained according to a plurality of projection points. Specifically, the first error may be a distance error between the projection point and the fitted straight line obtained according to fitting of P convex hull points determined from the plurality of projection points to obtain a first fitted straight line.
[0088] If the first area is less than the first threshold and the area ratio is less than the second threshold, it can be said that the projection of the target point cloud of the target obstacle on the target projection plane is close to a straight line, which can reflect that the contour of the target obstacle may be similar to a plane shape. At this time, the first error can be obtained, and based on the first error, it is judged whether the contour of the target obstacle conforms to the ideal plane.
[0089] When the first error is less than the third threshold, the plane equation is output for the target obstacle. Specifically, when the first error is less than the third threshold, it can be said that the outline of the target obstacle conforms to the ideal plane, and the target obstacle may be a plane-type obstacle, for example, the target obstacle may be a wall. The vehicle may be in a specific scenario of turning at a right angle along the wall, and the corresponding plane equation is output for the target obstacle. The third threshold can be set according to the actual situation.
[0090] The plane equation may be obtained directly by plane fitting the target point cloud, or by plane fitting the processed target point cloud after corresponding processing, such as denoising and removing impurities, or by other methods, which are not specifically limited here.
[0091] In this embodiment, whether the target obstacle is likely to be a plane type can be preliminarily determined by the first area and the area ratio. When the first area is less than the first threshold and the area ratio is less than the second threshold, the first error can be used to further determine whether the contour of the target obstacle conforms to the ideal plane, so that the corresponding plane equation can be output for the target obstacle, and the actual drivable area of the vehicle can be identified through the plane equation.
[0092] In one example, the plane equation is obtained by plane fitting of the target point cloud. Outputting the plane equation for the target obstacle may specifically include:
[0093] Fit the target point cloud to obtain the target plane;
[0094] Based on the target plane, output the plane equation for the target obstacle.
[0095] In this embodiment, the specific process of plane fitting for the target point cloud can be implemented by the existing RANSAC algorithm, which will not be described in detail here.
[0096] The result of plane fitting can be the coefficients of the plane equation (A, B, C, D), and the plane equation is Ax+By+Cz+D=0. The plane fitting formula can be:
[0097]
[0098] In this formula, p represents the probability that all points are inliers, k represents the number of iterations, w represents the probability that a single iteration is an inlier, n represents the number of points in the point cloud, and SD(k) represents the standard deviation.
[0099] Based on the target plane, a plane equation is output for the target obstacle. Specifically, the output plane equation may be a plane equation for indicating the target plane, or may be a coefficient of the plane equation and a coordinate value range corresponding to the target point cloud in a preset coordinate system.
[0100] Optionally, in one embodiment, obtaining the first error based on multiple projection points may include:
[0101] Determine P convex hull points from the multiple projection points, and the convex polygon formed by the P convex hull points surrounds the multiple projection points, where P is an integer greater than 2, and P is less than or equal to the number of projection points;
[0102] Fit P convex hull points to obtain the first fitting straight line;
[0103] According to the first fitting straight line, a first error is obtained, wherein the first error is used to indicate a first distance error between the P convex hull points and the first fitting straight line.
[0104] Determine P convex hull points from multiple projection points. Specifically, Figure 2 As shown, the convex hull points can be projected points connected by line segments in the figure, and P convex hull points can be connected to form a convex polygon, which surrounds multiple projected points. Among them, based on the fact that the convex polygon needs to be greater than or equal to 3 points, P can be an integer greater than 2, and P is less than or equal to the number of projected points.
[0105] The P convex hull points are fitted to obtain a first fitting straight line. Specifically, the P convex hull points can be fitted based on the first coordinates of the convex hull points in the preset coordinate system to obtain a first fitting straight line and a fitting error of the first fitting straight line. The specific fitting process can be performed by the existing least squares method for straight line fitting, which will not be described in detail here.
[0106] The fitting error may be used to indicate the distance between the P convex hull points and the first fitting straight line, and may be specifically used to indicate the distance between Y-axis coordinates.
[0107] According to the first fitting straight line, a first error is obtained. Specifically, the first error may be the fitting error mentioned above, or may be a plurality of first fitting straight lines obtained by performing multiple fittings on the P convex hull points, and each first fitting straight line corresponds to a fitting error, wherein the minimum value in the fitting errors is selected as the first error.
[0108] The first error can be used to indicate the first distance error between the P convex hull points and the first fitting line, wherein the first distance error can be the sum of the minimum distance squares between the Y-axis coordinates of the P convex hull points and the Y-axis coordinates of the first fitting line. The first error E m The calculation formula is as follows:
[0109]
[0110] Among them, y' j Represents the X-axis coordinate x of the convex hull point j The Y-axis coordinate on the first fitting line, y j Represents the X-axis coordinate x of the convex hull point j The corresponding Y-axis coordinate, N represents multiple convex hull points for calculation.
[0111] Optionally, in one embodiment, outputting a target annotation type corresponding to the projection feature for the target obstacle may further include:
[0112] When the first error is greater than or equal to the third threshold, a three-dimensional detection frame is output for the target obstacle.
[0113] In this embodiment, if the first error is greater than or equal to the third threshold, it can be explained that the contour of the target obstacle is greatly different from the ideal plane. In this case, a three-dimensional detection frame can be output for the target obstacle.
[0114] Optionally, in one embodiment, obtaining the projection features of the target point cloud may further include:
[0115] When the first area is greater than or equal to a first threshold, and / or the area ratio is greater than or equal to a second threshold, obtaining a first coordinate of each convex hull point in a preset coordinate system;
[0116] According to the first coordinate, determine the starting point and P-1 sequence points from the P convex hull points, where the P-1 sequence points are the remaining points in the P convex hull points except the starting point;
[0117] Based on the starting point coordinates in the preset coordinate system, obtaining the point direction;
[0118] According to the point selection direction, each of the P-1 sequence points is sequentially added to the starting point for fitting to obtain a second fitting straight line, and a second error corresponding to each second fitting straight line, wherein the second error is used to indicate a second distance error between the convex hull point participating in fitting the second fitting straight line and the second fitting straight line;
[0119] When the second error obtained by fitting the Mth sequence point with the starting point is greater than or equal to the fourth threshold for the first time, stop fitting, and determine the starting point and the first M-1 sequence points as target points; or when the second error obtained by fitting the starting point with P-1 sequence points is less than the fourth threshold, determine the starting point and P-1 sequence points as target points, where M is less than or equal to P-1;
[0120] Fit the target point to obtain a third fitting straight line;
[0121] Based on the third fitting straight line, a fitting length is obtained, wherein the projection feature also includes the fitting length;
[0122] Accordingly, the target annotation type corresponding to the projection feature output for the target obstacle may include:
[0123] When the fitting length is greater than the fifth threshold, a straight line equation is output for the target obstacle.
[0124] In this embodiment, when the first area is greater than or equal to a first threshold and / or the area ratio is greater than or equal to a second threshold, the projection feature may include a fitting length.
[0125] Specifically, at this time, it can be considered that the outline of the target obstacle is unlikely to be similar to a plane shape, and then the fitting length can be obtained to determine whether the target obstacle is a straight line type such as a guardrail or other target point cloud that is neatly continuous. The specific steps to obtain the fitting length are as follows:
[0126] The first coordinate of each convex hull point in the preset coordinate system is obtained. Specifically, taking the vehicle body coordinate system as an example, the X-axis coordinates and Y-axis coordinates of P convex hull points in the vehicle body coordinate system can be obtained.
[0127] According to the first coordinate, a starting point and P-1 sequence points are determined from the P convex hull points. Specifically, the convex hull point with the smallest X-axis coordinate can be determined as the starting point, or the convex hull point with the smallest Y-axis coordinate can be determined as the starting point. The starting point can be determined from the P convex hull points according to actual conditions. The remaining points of the P convex hull points except the starting point can be sequence points.
[0128] Based on the starting point coordinates of the starting point in the preset coordinate system, the point-taking direction is obtained. Specifically, the point-taking direction can be clockwise or counterclockwise, which can be determined according to the starting point coordinates of the starting point in the preset coordinate system.
[0129] For example, the convex hull point with the smallest X-axis coordinate is determined as the starting point P m At this time, the direction of the point selection can be determined based on the Y-axis coordinate of the starting point, whether it is clockwise or counterclockwise. Specifically, it can be determined based on whether the Y-axis coordinate is greater than 0.
[0130] According to the point selection direction, each of the P-1 sequence points is sequentially added to the starting point for fitting to obtain a second fitting line and a second error corresponding to each second fitting line. Specifically, in order to simplify the description, Figure 3 As shown, in this embodiment, the P convex hull points can be sorted and numbered clockwise, and "point 1" is determined as the starting point P m For example.
[0131] According to the starting point coordinates of "Point 1" in the preset coordinate system, if the clockwise point-taking direction is obtained, the specific fitting point-taking order is "Point 2-Point 3-Point 4-Point 5-Point 6"; if the counterclockwise point-taking direction is obtained, the specific fitting point-taking order is "Point 6-Point 5-Point 4-Point 3-Point 2".
[0132] Each of the P-1 sequence points is added to the starting point P in turn. m The specific process of fitting to obtain the second fitting straight line can be implemented by using the existing least square method, which will not be described in detail here.
[0133] The second error can be used to indicate the second distance error between the convex hull point involved in fitting the second fitting straight line and the second fitting straight line. The second error El The calculation formula can be as follows:
[0134]
[0135] In this formula, (K, B) represents the coefficients of the linear equation of the second fitting straight line, (x j ,y j ) represents the coordinates of the convex hull point, j represents the number of the convex hull point, N represents a plurality of convex hull points participating in fitting the second fitting straight line for calculation. In addition, in practical applications, the formula coefficients can be set according to actual needs.
[0136] When the second error obtained by fitting the Mth sequence point with the starting point is greater than or equal to the fourth threshold for the first time, the fitting is stopped, and the starting point and the first M-1 sequence points are determined as target points. Specifically, when the second error meets the preset error condition, for example, the second error is less than the set fourth threshold, the next sequence point can be taken to join the fitting, until the second error obtained by fitting is greater than or equal to the fourth threshold, the point selection cycle can be terminated. The fourth threshold can be set according to actual conditions.
[0137] When the second error obtained by fitting the Mth sequence point is greater than or equal to the fourth threshold for the first time, the next sequence point of the Mth sequence point may no longer be selected for fitting. m All sequence points before the Mth sequence point are determined as target points.
[0138] For example, if the second error obtained by fitting "Point 1" and "Point 2" is less than the fourth threshold, continue to fit "Point 3" with "Point 1" and "Point 2", and the second error obtained is still less than the fourth threshold, continue to fit "Point 4" with "Point 1", "Point 2" and "Point 3", and the second error obtained is greater than or equal to the fourth threshold, then stop fitting and determine "Point 1", "Point 2" and "Point 3" as target points.
[0139] In this embodiment, there may be another situation, that is, at the starting point P m When the second error obtained by fitting with P-1 sequence points is less than the fourth threshold, the starting point P m Specifically, when the second error is less than the fourth threshold, the next sequence point and the starting point P can be selected. m The fitting is performed until all sequence points are involved in the straight line fitting. At this time, the second error obtained is still smaller than the fourth threshold value. At this time, all P convex hull points can be determined as target points.
[0140] For example, the second error obtained by fitting "point 1" and "point 2" is less than the fourth threshold, and the next point "point 3" is taken to fit "point 1" and "point 2", and the second error obtained is still less than the fourth threshold... until "point 6" is taken, and "point 1", "point 2", "point 3", "point 4", "point 5" and "point 6" are fitted, and the second error obtained is still less than the fourth threshold, that is, the starting point P at this time m If P-1 sequence points are involved in fitting the second fitting straight line, "point 1", "point 2", "point 3", "point 4", "point 5" and "point 6" are all determined as target points.
[0141] The target point is fitted to obtain a third fitting straight line. Specifically, the target point can be fitted with a straight line using the existing least squares method. The specific fitting process is not described here. After fitting, the third fitting straight line L can be obtained. b , the third fitting straight line L b The equation of the straight line is y=Kx+B.
[0142] Based on the third fitting straight line, a fitting length is obtained. Specifically, the fitting length can be obtained by the second coordinate of the target point in the preset coordinate system.
[0143] Taking the vehicle body coordinate system as an example, we can select the point with the smallest and largest X-axis coordinates among the target points, where the X-axis coordinate is x min 、x max , and then according to x min 、x max Calculate the third fitting straight line L b The Y-axis coordinate y in the equation of the line min ,y max , the calculation formula is as follows:
[0144]
[0145] In this formula, (K, B) represents the third fitting straight line L b The coefficients of the equation of the line.
[0146] According to (x min ,y min )、(x max ,y max ) Calculate the fitting length l, the calculation formula is as follows:
[0147]
[0148] When the fitting length is greater than the fifth threshold, the straight line equation is output for the target obstacle. Specifically, when the fitting length is greater than the fifth threshold, it can be said that the target point cloud is relatively neat and continuous, and the target obstacle may be an obstacle such as a guardrail. The vehicle may be in a specific scenario of turning at a right angle along the guardrail, and the corresponding straight line equation is output for the target obstacle. The fifth threshold can be set according to the actual situation.
[0149] Wherein the straight line equation may be the third fitting straight line L b The equation of the straight line.
[0150] In this embodiment, the coordinates of the convex hull points are used, according to the point selection direction, to sequentially add the next sequence point to the starting point for fitting, and the optimal fitting straight line is obtained through multiple iterations, so that the fitting length can be determined, so that the fitting length can be used to judge whether the target obstacle is a straight line type such as a guardrail where the target point cloud is neatly continuous, so as to output the corresponding straight line equation for the target obstacle, and then the actual drivable area of the vehicle can be identified through the straight line equation.
[0151] Optionally, in one embodiment, when the point cloud data is acquired based on sensors in the vehicle, the preset coordinate system is a vehicle body coordinate system, where the sensor is the origin, the length direction of the vehicle body is the X-axis direction, and the width direction is the Y-axis direction.
[0152] Determining a starting point from the P convex hull points according to the first coordinate may include:
[0153] From the P convex hull points, determine the convex hull point closest to the vehicle body in the X-axis direction as the starting point;
[0154] Accordingly, based on the starting point coordinates of the starting point in the preset coordinate system, obtaining the point direction may include:
[0155] Get the point direction based on the coordinate value of the starting point in the Y-axis direction.
[0156] In this embodiment, in order to simplify the description, the sensor can be installed in the middle position of the front of the vehicle as an example, where the X-axis in the vehicle body coordinate system is directed forward and the Y-axis is directed leftward based on the driver's perspective.
[0157] From the P convex hull points, determine the convex hull point closest to the vehicle body in the X-axis direction as the starting point. Specifically, in the vehicle body coordinate system, the point with the smallest X-axis coordinate value can be the starting point P m .
[0158] Based on the coordinate value of the starting point in the Y-axis direction, the point direction is obtained. Specifically, based on the starting point P m Whether the Y-axis coordinate is greater than 0 determines the direction of the point.
[0159] For example, the vehicle can turn right at a right angle along the target obstacle, or it can turn left at a right angle along the target obstacle. The turning direction of the vehicle can be obtained. If the vehicle turns right at a right angle, the target obstacle is on the right side of the vehicle, that is, the target point cloud corresponding to the target obstacle is on the right side of the vehicle. In other words, the P convex hull points obtained after projection of the target point cloud must also be on the right side of the vehicle. It can be inferred that the starting point P is m The Y-axis coordinate is less than or equal to 0.
[0160] When the starting point P m When the Y-axis coordinate of is less than or equal to 0, the point selection direction can be clockwise, that is, corresponding to Figure 3 The points are taken in the positive order of the sorting numbers shown. Similarly, if the vehicle is turning left at a right angle, the starting point P m The Y-axis coordinate is greater than 0, and the point direction can be counterclockwise, that is, corresponding to Figure 3 The points are taken in reverse order of the sort numbers shown.
[0161] This embodiment can determine the point-taking direction by the coordinate value of the starting point in the Y-axis direction, so that the point-taking direction corresponding to the different scenarios of the vehicle turning right or turning left at a right angle can be fitted, thereby obtaining an accurate fitting length, making a more accurate judgment on the target obstacle, and outputting the corresponding target annotation type based on the judgment, thereby more accurately identifying the actual drivable area of the vehicle.
[0162] Optionally, in one embodiment, obtaining the projection features of the target point cloud may further include:
[0163] When the fitting length is less than or equal to the fifth threshold, a fitting angle is obtained based on the third fitting straight line and the X-axis, and the projection feature further includes the fitting angle;
[0164] Accordingly, the target annotation type corresponding to the projection feature output for the target obstacle may include:
[0165] When the fitting angle meets the preset angle condition, the straight line equation is output for the target obstacle.
[0166] In this embodiment, when the fitting length is less than or equal to the fifth threshold, the projection feature may further include a fitting angle.
[0167] Specifically, it can be considered that the target obstacle may not be a straight line type such as a guardrail where the target point cloud is neatly continuous and strip-shaped, and then the fitting angle can be obtained. The fitting angle is used to determine whether the target obstacle may be a straight line type such as a green belt where the target point cloud is poorly neat.
[0168] Based on the third fitting straight line and the X-axis, a fitting angle is obtained. Specifically, the fitting angle may be an angle formed between the third fitting straight line and the X-axis.
[0169] In this embodiment, in a body coordinate system established with the sensor as the coordinate origin, the length direction of the body as the X-axis direction, and the width direction as the Y-axis direction, the fitting angle can be the third fitting straight line L b The angle formed between the X-axis and the X-axis. The calculation formula of the fitting angle θ can be as follows:
[0170]
[0171] In this formula, (K, B) represents the third fitting straight line L b The coefficients of the equation of the line.
[0172] When the fitting angle meets the preset angle condition, the straight line equation is output for the target obstacle. Specifically, the target point cloud corresponding to the green belt has poor uniformity and is intermittent and similar to short strips. When the fitting angle meets the preset angle condition, it proves that the target obstacle may be a green belt, and the vehicle may be in a specific scene of turning at a right angle along the green belt. At this time, the corresponding straight line equation can also be output for the target obstacle. The preset angle condition can be a value range of the preset angle, and the value range can be set according to the actual situation.
[0173] Wherein the straight line equation may be the third fitting straight line L b The equation of the straight line.
[0174] This embodiment determines whether the target obstacle is a straight line type with poor uniformity of the target point cloud such as a green belt by fitting the included angle, and outputs the corresponding straight line equation for the target obstacle, and then the actual drivable area of the vehicle can be identified by the straight line equation.
[0175] Optionally, in one embodiment, outputting a target annotation type corresponding to the projection feature for the target obstacle may include:
[0176] When the fitting angle does not meet the preset angle condition, a three-dimensional detection frame is output for the target obstacle.
[0177] In this embodiment, if the fitting angle does not meet the preset angle condition, it can be explained that the target obstacle does not conform to the straight line type with poor uniformity of the target point cloud such as the green belt. In this case, a three-dimensional detection frame can be output for the target obstacle.
[0178] In one embodiment, Figure 4As shown in the figure, point cloud data can be collected by sensors. The point cloud data includes multiple measurement points. Each measurement point carries the coordinates in the sensor coordinate system. The coordinates in the sensor coordinate system are converted into the coordinates of the vehicle body sensor, and then the measurement points located on the ground are segmented and filtered out. Point cloud clustering is performed on non-ground measurement points to form multiple point clouds, and then the target point cloud corresponding to the target obstacle is obtained after target filtering.
[0179] The sensor can be a single-line laser radar, a multi-line laser radar, or a depth camera, etc.
[0180] The target point cloud is processed for target type, that is, the type of target obstacle is determined, and the output 3D detection frame, plane equation or line equation is determined according to the type of target obstacle. Figure 5 As shown, first determine whether the width information of the target point cloud is greater than the width threshold. If not, the 3D detection frame can be output. If yes, determine whether the target obstacle meets the plane feature, that is, whether it is a plane type obstacle. If yes, the plane equation can be output. If no, determine whether the target obstacle meets the straight line feature, that is, whether it is a straight line type obstacle. If yes, the straight line equation can be output. If no, the 3D detection frame can be output.
[0181] In this embodiment, the order of detecting whether the target obstacle is a plane type or a straight line type can be exchanged, that is, the target obstacle can be detected first whether it is a straight line type and then whether it is a plane type, or the target obstacle can be detected first whether it is a plane type and then whether it is a straight line type.
[0182] This embodiment can detect the target obstacle and output different results of three-dimensional detection frame, plane equation or line equation, which can be applied to various scenarios of vehicle driving. For example, when the vehicle turns, it can reduce the encroachment on the drivable area, so as to accurately identify the actual drivable area of the vehicle, and then solve the problem of erroneous triggering of the automatic braking system (Autonomous Emergency Braking, AEB) when the vehicle turns at right angles along the wall, guardrail or green belt.
[0183] Figure 6 A schematic diagram of the structure of an obstacle detection device provided in an embodiment of the present application is shown. For ease of explanation, only the parts related to the embodiment of the present application are shown.
[0184] Reference Figure 6 , the obstacle detection device comprises:
[0185] A first acquisition module 601 is used to acquire point cloud data, where the point cloud data includes a target point cloud corresponding to a target obstacle;
[0186] The second acquisition module 602 is used to acquire point cloud feature information of the target point cloud;
[0187] The output module 603 is used to output the target annotation type corresponding to the point cloud feature information for the target obstacle, and the target annotation type is a three-dimensional detection box, a plane equation or a line equation.
[0188] Optionally, the point cloud feature information includes width information, and the output module 603 may be specifically configured to output a three-dimensional detection frame for the target obstacle when the width information is less than or equal to a preset width threshold.
[0189] Optionally, the second acquisition module 602 may include:
[0190] The first acquisition submodule is used to obtain width information of the target point cloud;
[0191] A second acquisition submodule is used to acquire projection features of a target point cloud when the width information is greater than a preset width threshold, where the projection features are features of a plurality of projection points of the target point cloud on a target projection plane in a preset coordinate system;
[0192] Among them, the point cloud feature information includes width information and projection features;
[0193] Correspondingly, the output module 603 may be specifically configured to output a target annotation type corresponding to the projection feature for the target obstacle.
[0194] Optionally, the point cloud feature information also includes length information of the target point cloud. The second acquisition submodule may include:
[0195] A first acquisition unit is used to acquire an area ratio between a first area and a second area, wherein the first area is a projection area of the target point cloud on the target projection surface, and the second area is an area calculated according to the length information and the width information;
[0196] A second acquisition unit is used to acquire a first error based on the multiple projection points when the first area is less than the first threshold and the area ratio is less than the second threshold, wherein the first error is used to indicate a distance error between the multiple projection points and a first fitting straight line, the first fitting straight line is obtained by fitting based on the multiple projection points, and the projection feature includes the first error;
[0197] Correspondingly, the output module 603 may be specifically configured to output a plane equation for the target obstacle when the first error is less than a third threshold.
[0198] Optionally, the output module 603 may be specifically configured to output a three-dimensional detection frame for the target obstacle when the first error is greater than or equal to a third threshold.
[0199] Optionally, the second acquisition unit may include:
[0200] A first determining subunit is used to determine P convex hull points from the multiple projection points, where a convex polygon formed by the P convex hull points surrounds the multiple projection points, where P is an integer greater than 2, and P is less than or equal to the number of projection points;
[0201] A first fitting subunit is used to fit P convex hull points to obtain a first fitting straight line;
[0202] The first acquisition subunit is used to acquire a first error according to the first fitting straight line, wherein the first error is used to indicate a first distance error between the P convex hull points and the first fitting straight line.
[0203] Optionally, the second acquisition submodule may further include:
[0204] A third acquisition unit, configured to acquire a first coordinate of each convex hull point in a preset coordinate system when the first area is greater than or equal to a first threshold and / or the area ratio is greater than or equal to a second threshold;
[0205] A first determining unit is used to determine a starting point and P-1 sequence points from the P convex hull points according to the first coordinate, where the P-1 sequence points are the remaining points in the P convex hull points except the starting point;
[0206] A fourth acquisition unit, configured to acquire a point-taking direction based on the starting point coordinates of the starting point in a preset coordinate system;
[0207] A first fitting unit is used to sequentially add each of the P-1 sequence points to the starting point for fitting according to the point selection direction to obtain a second fitting straight line and a second error corresponding to each second fitting straight line, wherein the second error is used to indicate a second distance error between the convex hull point involved in fitting the second fitting straight line and the second fitting straight line;
[0208] A second determining unit is configured to stop fitting when a second error obtained by fitting the Mth sequence point with the starting point is greater than or equal to a fourth threshold for the first time, and determine the starting point and the first M-1 sequence points as target points; or determine the starting point and the P-1 sequence points as target points when a second error obtained by fitting the starting point with the P-1 sequence points is less than the fourth threshold, wherein M is less than or equal to P-1;
[0209] The second fitting unit is used to fit the target point to obtain a third fitting straight line;
[0210] a fifth acquiring unit, configured to acquire a fitting length based on the third fitting straight line, wherein the projection feature further includes the fitting length;
[0211] Correspondingly, the output module 603 may be specifically configured to output a straight line equation for the target obstacle when the fitting length is greater than the fifth threshold.
[0212] Optionally, when the point cloud data is acquired based on sensors in the vehicle, the preset coordinate system is the vehicle body coordinate system, which takes the sensor as the coordinate origin, the length direction of the vehicle body as the X-axis direction, and the width direction as the Y-axis direction.
[0213] The first determining unit may include:
[0214] The second determination subunit is used to determine the convex hull point closest to the vehicle body in the X-axis direction from the P convex hull points as the starting point;
[0215] Correspondingly, the fourth acquisition unit may be specifically configured to acquire the point-taking direction based on the coordinate value of the starting point in the Y-axis direction.
[0216] Optionally, the second acquisition submodule may further include:
[0217] a sixth acquisition unit, configured to acquire a fitting angle based on the third fitting straight line and the X-axis when the fitting length is less than or equal to the fifth threshold, wherein the projection feature further includes the fitting angle;
[0218] Correspondingly, the output module 603 may be specifically configured to output a straight line equation for the target obstacle when the fitting angle satisfies a preset angle condition.
[0219] Optionally, the output module 603 may be specifically configured to output a three-dimensional detection frame for the target obstacle when the fitting angle does not satisfy a preset angle condition.
[0220] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application, and are devices corresponding to the above-mentioned obstacle detection method. All implementation methods in the above-mentioned method embodiment are applicable to the embodiment of the device. Its specific functions and technical effects can be found in the method embodiment part, which will not be repeated here.
[0221] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0222] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application is shown.
[0223] The device may include a processor 701 and a memory 702 storing computer program instructions.
[0224] When the processor 701 executes the computer program, the steps in any of the above method embodiments are implemented.
[0225] Exemplarily, the computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 702, and executed by the processor 701 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the device.
[0226] Specifically, the processor 701 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0227] The memory 702 may include a large capacity memory for data or instructions. By way of example and not limitation, the memory 702 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, the memory 702 may include a removable or non-removable (or fixed) medium. In appropriate cases, the memory 702 may be inside or outside the integrated gateway disaster recovery device. In a specific embodiment, the memory 702 is a non-volatile solid-state memory.
[0228] The memory may include read-only memory (ROM), random access memory (RAM), magnetic disk storage media devices, optical storage media devices, flash memory devices, electrical, optical or other physical / tangible memory storage devices. Thus, typically, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0229] The processor 701 implements any one of the methods in the above embodiments by reading and executing computer program instructions stored in the memory 702 .
[0230] In one example, the electronic device may further include a communication interface 703 and a bus 704. The processor 701, the memory 702, and the communication interface 703 are connected via the bus 704 and communicate with each other.
[0231] The communication interface 703 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0232] Bus 704 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-end bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 704 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0233] In addition, in combination with the method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the methods in the above embodiment is implemented.
[0234] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0235] The functional modules shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. Programs or code segments can be stored in machine-readable media, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable media" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. Code segments can be downloaded via computer grids such as the Internet, intranets, etc.
[0236] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0237] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box 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, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0238] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An obstacle detection method, characterized in that: include: Acquire point cloud data, wherein the point cloud data includes a target point cloud corresponding to the target obstacle; Acquire point cloud feature information of the target point cloud; Outputting a target annotation type corresponding to the point cloud feature information for the target obstacle, the target annotation type being a three-dimensional detection box, a plane equation, or a line equation; The step of obtaining point cloud feature information of the target point cloud includes: Obtaining width information of the target point cloud; When the width information is greater than a preset width threshold, obtaining projection features of the target point cloud, where the projection features are features of a plurality of projection points of the target point cloud on a target projection plane in a preset coordinate system; Wherein, the point cloud feature information includes the width information and the projection feature; The outputting of the target annotation type corresponding to the point cloud feature information for the target obstacle includes: Outputting a target annotation type corresponding to the projection feature for the target obstacle; The point cloud feature information also includes length information of the target point cloud, and the step of obtaining the projection feature of the target point cloud includes: Acquire an area ratio between a first area and a second area, wherein the first area is a projection area of the target point cloud on the target projection surface, and the second area is an area calculated according to the length information and the width information; When the first area is smaller than a first threshold value and the area ratio is smaller than a second threshold value, obtaining a first error based on the multiple projection points, wherein the first error is used to indicate a distance error between the multiple projection points and a first fitting straight line, the first fitting straight line is obtained by fitting based on the multiple projection points, and the projection feature includes the first error; The outputting a target annotation type corresponding to the projection feature for the target obstacle includes: When the first error is less than a third threshold, a plane equation is output for the target obstacle.
2. The method according to claim 1, characterized in that The point cloud feature information includes width information of the target point cloud, and the outputting a target annotation type corresponding to the point cloud feature information for the target obstacle includes: When the width information is less than or equal to a preset width threshold, a three-dimensional detection frame is output for the target obstacle.
3. The method according to claim 1, characterized in that The outputting the target annotation type corresponding to the projection feature for the target obstacle further includes: When the first error is greater than or equal to a third threshold, a three-dimensional detection frame is output for the target obstacle.
4. The method according to claim 1, characterized in that: The obtaining the first error based on the multiple projection points includes: Determine P convex hull points from the multiple projection points, and a convex polygon formed by the P convex hull points surrounds the multiple projection points, where P is an integer greater than 2, and P is less than or equal to the number of projection points; Fitting the P convex hull points to obtain the first fitting straight line; The first error is obtained according to the first fitting straight line, wherein the first error is used to indicate a first distance error between the P convex hull points and the first fitting straight line.
5. The method according to claim 4, characterized in that The step of obtaining the projection features of the target point cloud further includes: When the first area is greater than or equal to a first threshold, and / or the area ratio is greater than or equal to a second threshold, obtaining a first coordinate of each of the convex hull points in a preset coordinate system; According to the first coordinate, determine a starting point and P-1 sequence points from the P convex hull points, where the P-1 sequence points are the remaining points in the P convex hull points except the starting point; Based on the starting point coordinates of the starting point in the preset coordinate system, obtaining a point-taking direction; According to the point selection direction, each of the P-1 sequence points is sequentially added to the starting point for fitting to obtain a second fitting straight line, and a second error corresponding to each second fitting straight line, wherein the second error is used to indicate a second distance error between the convex hull point participating in fitting the second fitting straight line and the second fitting straight line; When the second error obtained by fitting the Mth sequence point with the starting point is greater than or equal to the fourth threshold for the first time, stop fitting, and determine the starting point and the first M-1 sequence points as target points; or when the second error obtained by fitting the starting point with the P-1 sequence points is less than the fourth threshold, determine the starting point and the P-1 sequence points as target points, where M is less than or equal to P-1; Fitting the target point to obtain a third fitting straight line; Based on the third fitting straight line, obtaining a fitting length, wherein the projection feature further comprises the fitting length; The outputting a target annotation type corresponding to the projection feature for the target obstacle includes: When the fitting length is greater than a fifth threshold, a straight line equation is output for the target obstacle.
6. The method according to claim 5, characterized in that In the case where the point cloud data is acquired based on a sensor in a vehicle, the preset coordinate system is a vehicle body coordinate system, which takes the sensor as the coordinate origin, the length direction of the vehicle body as the X-axis direction, and the width direction as the Y-axis direction. Determining a starting point from the P convex hull points according to the first coordinate includes: From the P convex hull points, determine the convex hull point closest to the vehicle body in the X-axis direction as the starting point; The acquiring the point direction based on the starting point coordinates of the starting point in the preset coordinate system includes: Based on the coordinate value of the starting point in the Y-axis direction, the point-taking direction is obtained.
7. The method according to claim 6, characterized in that The step of obtaining the projection features of the target point cloud further includes: When the fitting length is less than or equal to a fifth threshold, acquiring a fitting angle based on the third fitting straight line and the X-axis, the projection feature further comprising the fitting angle; The outputting a target annotation type corresponding to the projection feature for the target obstacle includes: When the fitting angle satisfies a preset angle condition, a straight line equation is output for the target obstacle.
8. The method according to claim 7, characterized in that The outputting a target annotation type corresponding to the projection feature for the target obstacle includes: When the fitting angle does not satisfy a preset angle condition, a three-dimensional detection frame is output for the target obstacle.
9. An obstacle detection device, characterized in that: The device comprises: A first acquisition module, used to acquire point cloud data, wherein the point cloud data includes a target point cloud corresponding to a target obstacle; A second acquisition module is used to acquire point cloud feature information of the target point cloud; An output module, configured to output a target annotation type corresponding to the point cloud feature information for the target obstacle, wherein the target annotation type is a three-dimensional detection box, a plane equation, or a line equation; The second acquisition module includes: A first acquisition submodule is used to acquire width information of the target point cloud; A second acquisition submodule is used to acquire the projection features of the target point cloud when the width information is greater than a preset width threshold, wherein the projection features are features of a plurality of projection points of the target point cloud on a target projection plane in a preset coordinate system; Wherein, the point cloud feature information includes the width information and the projection feature; The output module is also used for: Outputting a target annotation type corresponding to the projection feature for the target obstacle; The point cloud feature information also includes length information of the target point cloud. The second acquisition submodule includes: A first acquisition unit is used to acquire an area ratio between a first area and a second area, wherein the first area is a projection area of the target point cloud on the target projection surface, and the second area is an area calculated according to the length information and the width information; a second acquisition unit, configured to acquire a first error based on the multiple projection points when the first area is smaller than a first threshold and the area ratio is smaller than a second threshold, wherein the first error is used to indicate a distance error between the multiple projection points and a first fitting straight line, the first fitting straight line is obtained by fitting based on the multiple projection points, and the projection feature includes the first error; The output module is also used for: When the first error is less than a third threshold, a plane equation is output for the target obstacle.
10. An electronic device, characterized in that: The device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the obstacle detection method according to any one of claims 1 to 8 is implemented.
11. A computer storage medium, characterized in that: The computer storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the obstacle detection method according to any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Point cloud data processing method and device
CN108345822A
Full-category 3D obstacle detection method and system and medium
CN111414848A