Obstacle bounding box calculation method, device, equipment and readable storage medium
By projecting, rotating and splitting the bounding box on the obstacle point cloud, the versatility and accuracy issues of obstacle bounding box calculation in the existing technology are solved, and accurate detection and avoidance of obstacles of various shapes are achieved.
Patent Information
- Application Number
- CN202211352456.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-31
- Publication Date
- 2025-09-19
- Estimated Expiration
- 2042-10-31
AI Technical Summary
In the existing technology, the obstacle bounding box calculation method based on deep learning has poor versatility and cannot output bounding box information of untrained obstacle categories. The clustering-based method can only accurately calculate L-shaped obstacles and cannot handle non-L-shaped obstacles.
By obtaining multiple single-obstacle point clouds on the road, the target single-obstacle point cloud is selected and projected onto the XY plane. The convex hull algorithm is used to calculate the outer contour points, which are then rotated N times according to the preset angle to obtain the shortest bounding box in the X direction. If the length exceeds the preset value, it is split into multiple small bounding boxes, and their volume and posture are calculated.
The accuracy and versatility of obstacle bounding box information are improved, the Y-direction deviation of non-L-shaped obstacles is reduced, the obstacle detection range is expanded, and the probability of misjudgment and collision is avoided.
Smart Images

Figure CN116152327B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of radar point cloud data processing technology, and in particular to an obstacle bounding box calculation method, device, equipment and readable storage medium. Background Art
[0002] A bounding box is a simple geometric space that contains a series of clustered point clouds, where the smallest point cloud contains only a single data point. By obtaining the obstacle bounding box, we can clearly determine the size and orientation of the obstacle, thereby avoiding collisions between the vehicle and the obstacle.
[0003] Currently, obstacle bounding boxes are typically obtained using deep learning-based calculation methods or conventional rule-based clustering-based calculation methods. However, deep learning-based calculation methods can only output bounding box information for trained categories and cannot obtain bounding box information for untrained obstacles, resulting in poor versatility. Conventional rule-based clustering-based calculation methods can only accurately calculate L-shaped obstacle bounding box information and cannot accurately obtain obstacle bounding box information for non-L-shaped obstacle point clouds. Summary of the Invention
[0004] The main purpose of the present invention is to provide an obstacle bounding box calculation method, device, equipment and readable storage medium, aiming to solve the problems of poor versatility of current methods for obtaining obstacle bounding box information and low accuracy of the obtained obstacle bounding box information.
[0005] In a first aspect, the present invention provides a method for calculating an obstacle bounding box, the method comprising:
[0006] Obtain multiple single obstacle point clouds on the road;
[0007] Select any single obstacle point cloud from multiple single obstacle point clouds as the target single obstacle point cloud, and project the target single obstacle point cloud onto the XY plane;
[0008] The outer contour points of the projected target single obstacle point cloud are calculated using the convex hull algorithm;
[0009] The outer contour point is rotated continuously N times according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer;
[0010] Obtain the bounding box of the shortest outer contour point in the X direction from the rotated N outer contour points;
[0011] Detecting whether the length of the bounding box in the X direction exceeds a preset length;
[0012] If the detection result shows that the length in the X direction exceeds the preset length, the bounding box is split into multiple small bounding boxes;
[0013] The volumes and poses of the multiple small bounding boxes are calculated based on the rotation angle corresponding to the bounding box, the length of the X direction and the length of the Y direction corresponding to each of the multiple small bounding boxes, and the height of the target single obstacle point cloud.
[0014] Optionally, the step of splitting the bounding box to obtain multiple small bounding boxes includes:
[0015] The length of the X direction corresponding to the small bounding box is calculated according to the length of the X direction corresponding to the bounding box and the preset length;
[0016] The bounding box is split according to the length of the X direction corresponding to a small bounding box to obtain multiple small bounding boxes.
[0017] Optionally, the step of obtaining multiple single obstacle point clouds on the road surface includes:
[0018] Obtaining a point cloud of obstacles on a road surface, performing cluster analysis on the obstacle point cloud, and obtaining a plurality of single obstacle point clouds.
[0019] Optionally, after the step of detecting whether the length of the bounding box in the X direction exceeds a preset length, the method further includes:
[0020] If the detection result shows that the length in the X direction does not exceed the preset length, the volume and posture of the bounding box are calculated based on the rotation angle corresponding to the bounding box, the length in the X direction and the Y direction corresponding to the bounding box, and the height of the target single obstacle point cloud.
[0021] Optionally, after the step of calculating the volumes and poses of the multiple small bounding boxes based on the rotation angle corresponding to the bounding box, the lengths in the X direction and the Y direction corresponding to the multiple small bounding boxes, and the height of the target single obstacle point cloud, the following steps are included:
[0022] Select any single obstacle point cloud from multiple single obstacle point clouds that have not been selected as the target single obstacle point cloud, project the target single obstacle point cloud onto the XY plane, and use the convex hull algorithm to obtain the outer contour points of the projected target single obstacle point cloud. This process continues until all single obstacle point clouds have been selected, and the volumes and poses of multiple bounding boxes or multiple small bounding boxes are obtained.
[0023] In a second aspect, the present invention further provides an obstacle bounding box calculation device, the obstacle bounding box calculation device comprising:
[0024] A first acquisition module is used to acquire multiple single obstacle point clouds on the road surface;
[0025] A selection module is used to select any single obstacle point cloud from multiple single obstacle point clouds as a target single obstacle point cloud and project the target single obstacle point cloud onto the XY plane;
[0026] The first calculation module is used to calculate the outer contour points of the projected target single obstacle point cloud through a convex hull algorithm;
[0027] A rotation module is used to continuously rotate the outer contour point N times according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer;
[0028] The second acquisition module is used to obtain the enclosing box of the shortest outer contour point in the X direction from the N rotated outer contour points;
[0029] A detection module, configured to detect whether the length of the bounding box in the X direction exceeds a preset length;
[0030] A splitting module is used to split the bounding box into multiple small bounding boxes if the detection result shows that the length in the X direction exceeds the preset length;
[0031] The second calculation module is used to calculate the volume and posture of multiple small bounding boxes based on the rotation angle corresponding to the bounding box, the length of the X direction and the length of the Y direction corresponding to each of the multiple small bounding boxes, and the height of the target single obstacle point cloud.
[0032] Optionally, the second computing module is further configured to:
[0033] If the detection result shows that the length in the X direction does not exceed the preset length, the volume and posture of the bounding box are calculated based on the rotation angle corresponding to the bounding box, the length in the X direction and the Y direction corresponding to the bounding box, and the height of the target single obstacle point cloud.
[0034] Optionally, the splitting module is used to:
[0035] The length of the X direction corresponding to the small bounding box is calculated according to the length of the X direction corresponding to the bounding box and the preset length;
[0036] The bounding box is split according to the length of the X direction corresponding to a small bounding box to obtain multiple small bounding boxes.
[0037] In a third aspect, the present invention also provides an obstacle bounding box calculation device, which includes a processor, a memory, and an obstacle bounding box calculation program stored in the memory and executable by the processor, wherein when the obstacle bounding box calculation program is executed by the processor, the steps of the obstacle bounding box calculation method described above are implemented.
[0038] In a fourth aspect, the present invention further provides a readable storage medium, on which is stored an obstacle bounding box calculation program, wherein when the obstacle bounding box calculation program is executed by a processor, the steps of the obstacle bounding box calculation method described above are implemented.
[0039] In the present invention, multiple single obstacle point clouds on a road surface are obtained; any single obstacle point cloud is selected from the multiple single obstacle point clouds as a target single obstacle point cloud, and the target single obstacle point cloud is projected onto the XY plane; the outer contour points of the projected target single obstacle point cloud are calculated using a convex hull algorithm; the outer contour points are continuously rotated N times according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer; an enclosing box of the outer contour point with the shortest X direction is obtained from the N rotated outer contour points; a detection is performed to determine whether the length of the enclosing box in the X direction exceeds a preset length; if the detection result is that the length in the X direction exceeds the preset length, the enclosing box is split into multiple small enclosing boxes; and the volumes and postures of the multiple small enclosing boxes are calculated based on the rotation angle corresponding to the enclosing box, the lengths in the X direction and the Y direction corresponding to each of the multiple small enclosing boxes, and the height of the target single obstacle point cloud. The present invention selects any single obstacle point cloud from multiple single obstacle point clouds as a target single obstacle point cloud, calculates the outer contour points of the target single obstacle point cloud, and then obtains a bounding box of the shortest outer contour points in the X direction from the N rotated outer contour points. When the length of the bounding box in the X direction exceeds a preset length, the bounding box is split into multiple small bounding boxes. Finally, the volumes and poses of the multiple small bounding boxes are accurately obtained through calculation. Even for non-L-shaped obstacles, the Y-direction (lateral) deviation of the bounding boxes can be reduced, thereby improving the accuracy of obtaining obstacle bounding box information. This avoids the situation in the prior art where deep learning-based calculation methods can only output bounding box information for trained obstacle categories but cannot output bounding box information for untrained obstacle categories. The present invention has strong versatility and a wide range of obstacle detection, solving the problems of poor versatility and low accuracy of the obtained obstacle bounding box information in current methods for obtaining obstacle bounding box information. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 Schematic diagram of the hardware structure of the obstacle bounding box calculation device involved in the embodiment of the present invention;
[0041] Figure 2 Schematic diagram of the flow of the first embodiment of the obstacle bounding box calculation method of the present invention;
[0042] Figure 3 A schematic diagram of a target single obstacle point cloud according to an embodiment of a method for calculating an obstacle bounding box of the present invention;
[0043] Figure 4Schematic diagram of the outer contour points of the projected target single obstacle point cloud according to an embodiment of the obstacle bounding box calculation method of the present invention;
[0044] Figure 5 Schematic diagram of the initial position of the bounding box of a target single obstacle point cloud in the first embodiment of the obstacle bounding box calculation method of the present invention;
[0045] Figure 6 A schematic diagram of an obstacle bounding box according to a second embodiment of the obstacle bounding box calculation method of the present invention;
[0046] Figure 7 A schematic diagram of an obstacle bounding box calculation method according to a third embodiment of the present invention;
[0047] Figure 8a for Figure 7 Schematic diagram after the bounding box in is split;
[0048] Figure 8b This is a three-dimensional schematic diagram of a decomposed obstacle bounding box according to an embodiment of the obstacle bounding box calculation method of the present invention;
[0049] Figure 9 FIG. 1 is a schematic diagram of functional modules of an obstacle bounding box calculation device according to an embodiment of the present invention.
[0050] The purpose, features and advantages of the present invention will be further described with reference to the accompanying drawings and in conjunction with the embodiments. DETAILED DESCRIPTION
[0051] It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention.
[0052] In a first aspect, an embodiment of the present invention provides an obstacle bounding box calculation device, which may be a device with data processing capabilities, such as a personal computer (PC), a laptop computer, or a server.
[0053] Reference Figure 1 , Figure 1Schematic diagram of the hardware structure of the obstacle bounding box calculation device involved in the embodiment of the present invention. In the embodiment of the present invention, the obstacle bounding box calculation device may include a processor 1001 (such as a central processing unit, CPU), a communication bus 1002, a user interface 1003, a network interface 1004, and a memory 1005. Among them, the communication bus 1002 is used to realize the connection and communication between these components; the user interface 1003 may include a display screen (Display), an input unit such as a keyboard (Keyboard); the network interface 1004 may optionally include a standard wired interface, a wireless interface (such as wireless fidelity WIreless-FIdelity, WI-FI interface); the memory 1005 may be a high-speed random access memory (random access memory, RAM), or a stable memory (non-volatile memory), such as a disk memory. The memory 1005 may optionally be a storage device independent of the aforementioned processor 1001. It will be understood by those skilled in the art that Figure 1 The hardware structure shown in the figure does not constitute a limitation of the present invention, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently.
[0054] Continue to refer to Figure 1 , Figure 1 Memory 1005, a computer storage medium, may include an operating system, a network communication module, a user interface module, and an obstacle bounding box calculation program. Processor 1001 may invoke the obstacle bounding box calculation program stored in memory 1005 and execute the obstacle bounding box calculation method provided in an embodiment of the present invention.
[0055] In a second aspect, an embodiment of the present invention provides a method for calculating an obstacle bounding box.
[0056] In one embodiment, referring to Figure 2 , Figure 2 FIG. 1 is a flow chart of the first embodiment of the obstacle bounding box calculation method of the present invention. Figure 2 As shown, the obstacle bounding box calculation method includes:
[0057] Step S10, obtaining multiple single obstacle point clouds on the road surface;
[0058] In this embodiment, the point data set of the product's surface obtained by the measuring instrument is called a point cloud. For example, if the measuring instrument is a laser radar, the point data set of the surface of multiple single obstacles on the road surface obtained by the laser radar is called a point cloud of multiple single obstacles on the road surface.
[0059] Furthermore, in one embodiment, step S10 includes:
[0060] Obtaining a point cloud of obstacles on a road surface, performing cluster analysis on the obstacle point cloud, and obtaining a plurality of single obstacle point clouds.
[0061] In this embodiment, a measuring instrument is used to obtain a point cloud of obstacles on the road surface. The Euclidean distance between two points is then calculated using the Euclidean distance formula. Cluster analysis is then performed on the obstacle point cloud based on the Euclidean distance. If the Euclidean distance is less than or equal to a preset distance, the obstacle is grouped together; if the Euclidean distance is greater than the preset distance, the obstacle is not grouped together. Cluster analysis of the obstacle point cloud yields multiple single obstacle point clouds. As can be readily appreciated, the obstacle point cloud on the road surface is the point cloud of ground objects after the ground has been removed. This prevents the point clouds from clumping together during cluster analysis, which could result in the obstacle point cloud being clustered as a single obstacle.
[0062] Step S20: selecting any single obstacle point cloud from the multiple single obstacle point clouds as a target single obstacle point cloud, and projecting the target single obstacle point cloud onto the XY plane;
[0063] In this embodiment, refer to Figure 3 , Figure 3 Schematic diagram of a target single obstacle point cloud according to an embodiment of the obstacle bounding box calculation method of the present invention. Figure 3 As shown in the figure, after obtaining multiple single-obstacle point clouds, any single-obstacle point cloud is selected from the multiple single-obstacle point clouds as the target single-obstacle point cloud. The target single-obstacle point cloud is then projected onto the XY plane. This converts the three-dimensional target single-obstacle point cloud into a two-dimensional target single-obstacle point cloud, thereby improving the efficiency of obtaining the bounding box of the projected target single-obstacle point cloud using the convex hull algorithm.
[0064] Step S30, calculating the outer contour points of the projected target single obstacle point cloud using a convex hull algorithm;
[0065] In this embodiment, refer to Figure 4 , Figure 4 Schematic diagram of the outer contour points of the projected target single obstacle point cloud according to an embodiment of the obstacle bounding box calculation method of the present invention. Figure 4 As shown in the figure, the convex hull algorithm is used to calculate the outer contour points of the projected target single obstacle point cloud. The convex hull algorithm simply encloses all points with a convex polygon, an algorithm from computational geometry. The convex hull problem can be described as finding the minimum set of points S such that the shape formed by S can contain these points, given a set of points P.
[0066] Step S40, rotating the outer contour point N times continuously according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer;
[0067] In this embodiment, the outer contour points are rotated N times continuously according to a preset angle to obtain the outer contour points after each rotation, for a total of N outer contour points, where N is a positive integer. Taking a preset angle of 1° as an example, to obtain the outer contour points of the target single obstacle point cloud after each rotation of 1° within the range of 0° to 90°, the outer contour points of the target single obstacle point cloud are rotated 1° at a time from the initial position. After 90 consecutive rotations, the outer contour points of the target single obstacle point cloud are obtained after each rotation of 1° within the range of 0° to 90°, for a total of 90 outer contour points of the target single obstacle point cloud after each rotation of 1°.
[0068] Specifically, taking a preset angle of 1° and a number of consecutive rotations N as an example, assuming the initial position of the outer contour point of the target single obstacle point cloud is 0°, the outer contour point of the target single obstacle point cloud is rotated once from the 0° position, i.e., by 1°, to obtain one rotated outer contour point of the target single obstacle point cloud. The outer contour point of the target single obstacle point cloud is then rotated once from the 1° position, i.e., by another 1°, to obtain another rotated outer contour point of the target single obstacle point cloud. The outer contour point of the target single obstacle point cloud is then rotated once from the 2° position, i.e., by another 1°, to obtain another rotated outer contour point of the target single obstacle point cloud. After three rotations, a total of three rotated outer contour points of the target single obstacle point cloud are obtained, and the outer contour point of the target single obstacle point cloud is located at the 3° position. It is readily apparent that the direction of rotation can be either clockwise or counterclockwise. The parameters in this embodiment are for reference only and are not intended to be limiting.
[0069] Step S50, obtaining the enclosing box of the shortest outer contour point in the X direction from the rotated N outer contour points;
[0070] In this embodiment, the outer contour point of the target single obstacle point cloud is L-shaped as an example, referring to Figure 5 , Figure 5 Schematic diagram of the bounding box of a target single obstacle point cloud in the first embodiment of the obstacle bounding box calculation method of the present invention. Figure 5 As shown in the figure, when the bounding box of the outer contour point of the target single obstacle point cloud is at the initial position, the length of the bounding box in the X direction of the outer contour point is dx1, and the length of the bounding box in the Y direction of the outer contour point is dy1. The bounding box of the outer contour point of the target single obstacle point cloud is rotated N times continuously according to the preset angle from the initial position of the bounding box. It is easy to imagine that after each rotation, the length of the bounding box in the X direction of the outer contour point will change, that is, the length of the bounding box in the X direction of each rotated outer contour point is different. Figure 6, Figure 6 FIG. 1 is a schematic diagram of the obstacle bounding box calculation method according to the second embodiment of the present invention. Figure 5 and Figure 6 As shown in the figure, the length of the bounding box in the X direction corresponding to the outer contour point is dx2, and the length of the bounding box in the Y direction corresponding to the outer contour point is dy2, and dx2 is significantly smaller than dx1. It is easy to understand that when the long side of the bounding box of the outer contour point of the L-shaped target single obstacle point cloud is rotated to be parallel to the X axis and the short side is parallel to the Y axis, the length in the X direction is the shortest, that is, dx2 is the shortest. That is, when the long side of the bounding box of the outer contour point of the rotated L-shaped target single obstacle point cloud is parallel to the X axis and the short side is parallel to the Y axis, it is the bounding box of the outer contour point with the shortest X direction.
[0071] Step S60, detecting whether the length of the bounding box in the X direction exceeds a preset length;
[0072] In this embodiment, after obtaining the bounding box of the shortest outer contour point in the X direction, it is detected whether the length of the bounding box of the shortest outer contour point in the X direction exceeds a preset length, so as to adopt a corresponding bounding box calculation strategy according to the detection result.
[0073] Step S70: If the detection result shows that the length in the X direction exceeds the preset length, the bounding box is split into multiple small bounding boxes;
[0074] In this embodiment, if the detection result shows that the length in the X direction exceeds the preset length, the bounding box of the shortest outer contour point in the X direction is split into multiple small bounding boxes to avoid excessive deviation of the bounding box in the Y direction.
[0075] Specifically, if the detection result shows that the length in the X direction exceeds the preset length, taking the bounding box of the target single obstacle point cloud as an example, refer to Figure 7 , Figure 7 FIG3 is a schematic diagram of the obstacle bounding box calculation method according to the third embodiment of the present invention. Figure 8a , Figure 8a for Figure 7 Schematic diagram of the bounding box after splitting. Figure 7 and Figure 8a As shown in the figure, after splitting the bounding box of the outer contour points, four small bounding boxes are obtained. The Y length of each small bounding box is significantly shorter than the Y length of the bounding box when it is not split. That is, splitting the bounding box effectively reduces the Y direction (lateral) deviation of the bounding box, further reducing the probability of misjudgment of a collision between the vehicle and an obstacle and the probability of sudden braking due to an impending collision, thereby improving the user experience and comfort.
[0076] Furthermore, in one embodiment, the step of splitting the bounding box to obtain multiple small bounding boxes includes:
[0077] The length of the X direction corresponding to the small bounding box is calculated according to the length of the X direction corresponding to the bounding box and the preset length;
[0078] The bounding box is split according to the length of the X direction corresponding to a small bounding box to obtain multiple small bounding boxes.
[0079] In this embodiment, the quotient of the X-direction length of the bounding box corresponding to the shortest outer contour point in the X-direction is calculated and divided by a preset length to obtain the number of small bounding boxes to be split into. It is easy to imagine that if the quotient is not an integer, the value added by one is the number of small bounding boxes to be split into. The quotient of the X-direction length of the bounding box corresponding to the shortest outer contour point in the X-direction is then calculated and divided by the number of small bounding boxes to be split into, which is the X-direction length corresponding to a small bounding box.
[0080] Specifically, taking the case where the X-direction length of the bounding box corresponding to the shortest outer contour point in the X-direction is 7m and the preset length is 2m, the quotient of the X-direction length of the bounding box, 7m, divided by the preset length, 2m, is calculated. Because the resulting quotient is not an integer, the quotient of 7 divided by 2 is rounded up and added to obtain the number of small bounding boxes to be split into, which is 4. The quotient of the X-direction length of the bounding box, 7m, divided by the number of small bounding boxes to be split into, 4, is then calculated, resulting in the X-direction length of each small bounding box being 1.75m.
[0081] The bounding box is split according to the standard that the length of a small bounding box in the X direction is 1.75m, and four small bounding boxes are obtained.
[0082] In step S80 , the volumes and poses of the multiple small bounding boxes are calculated based on the rotation angle corresponding to the bounding box, the lengths in the X direction and the Y direction corresponding to the multiple small bounding boxes, and the height of the target single obstacle point cloud.
[0083] In this embodiment, refer to Figure 8b , Figure 8b This is a three-dimensional schematic diagram of the obstacle bounding box calculation method according to an embodiment of the present invention after the bounding box is split. Figure 8b As shown, each small bounding box has its corresponding length in the X direction, length in the Y direction, and length in the Z direction. The volumes of the multiple small bounding boxes can be calculated based on the corresponding lengths in the X direction, lengths in the Y direction, and the height of the target single obstacle point cloud. The length in the Z direction is obtained by calculating the difference between the highest point in the Z axis and the lowest point in the Z axis of the target single obstacle point cloud.
[0084] The product of the number of rotations of the bounding box corresponding to the shortest outer contour point in the X direction and the preset angle is calculated to obtain the rotation angle corresponding to the bounding box of the shortest outer contour point in the X direction. The positions of the center points of the multiple small bounding boxes are then calculated based on the corresponding X-direction lengths and Y-direction lengths of the multiple small bounding boxes and the height of the target single obstacle point cloud. The positions of the center points of the multiple small bounding boxes and the corresponding rotation angles of the bounding boxes can be combined to determine the poses of the multiple small bounding boxes.
[0085] In this embodiment, multiple single-obstacle point clouds on a road surface are obtained; any single-obstacle point cloud is selected from the multiple single-obstacle point clouds as a target single-obstacle point cloud, and the target single-obstacle point cloud is projected onto the XY plane; outer contour points of the projected target single-obstacle point cloud are calculated using a convex hull algorithm; the outer contour points are rotated N times continuously by a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer; a bounding box of the outer contour point with the shortest X direction is obtained from the N rotated outer contour points; a check is performed to determine whether the length of the bounding box in the X direction exceeds a preset length; if the test result shows that the length in the X direction exceeds the preset length, the bounding box is split into multiple small bounding boxes; and the volumes and poses of the multiple small bounding boxes are calculated based on the rotation angle corresponding to the bounding box, the lengths in the X direction and the Y direction corresponding to each of the multiple small bounding boxes, and the height of the target single-obstacle point cloud. Through this embodiment, any single obstacle point cloud is selected from multiple single obstacle point clouds as the target single obstacle point cloud, and the outer contour points of the target single obstacle point cloud are calculated. Then, a bounding box with the shortest outer contour points in the X direction is obtained from the N rotated outer contour points. When the length of the bounding box in the X direction exceeds a preset length, the bounding box is split into multiple small bounding boxes. Finally, the volumes and poses of the multiple small bounding boxes are accurately obtained through calculation. Even for non-L-shaped obstacles, the Y-direction (lateral) deviation of the bounding boxes can be reduced, thereby improving the accuracy of the obtained obstacle bounding box information. This avoids the situation in the prior art where deep learning-based calculation methods can only output bounding box information for trained obstacle categories but cannot output bounding box information for untrained obstacle categories. The method has strong versatility and a wide range of obstacle detection, solving the problems of poor versatility and low accuracy of the obtained obstacle bounding box information in current methods for obtaining obstacle bounding box information.
[0086] Furthermore, in one embodiment, after step S60, the following steps are included:
[0087] If the detection result shows that the length in the X direction does not exceed the preset length, the volume and posture of the bounding box are calculated based on the rotation angle corresponding to the bounding box, the length in the X direction and the Y direction corresponding to the bounding box, and the height of the target single obstacle point cloud.
[0088] In this embodiment, if the detection result shows that the length of the bounding box corresponding to the shortest outer contour point in the X direction does not exceed the preset length, the volume V of the bounding box is calculated based on the X-direction length dx and the Y-direction length dx corresponding to the bounding box, and the height dz of the target single obstacle point cloud. V = dx * dy * dz, where the height of the target single obstacle point cloud is calculated by subtracting the lowest point in the Z-axis direction from the highest point in the Z-axis direction of the target single obstacle point cloud.
[0089] The position of the center point of the bounding box is calculated based on the length of the bounding box in the X direction, the length of the bounding box in the Y direction, and the height of the target single obstacle point cloud. Combined with the rotation angle corresponding to the bounding box of the shortest outer contour point in the X direction, the position of the bounding box can be determined.
[0090] Furthermore, in one embodiment, after step S80, the following steps are included:
[0091] Select any single obstacle point cloud from multiple single obstacle point clouds that have not been selected as the target single obstacle point cloud, project the target single obstacle point cloud onto the XY plane, and use the convex hull algorithm to obtain the outer contour points of the projected target single obstacle point cloud. This process continues until all single obstacle point clouds have been selected, and the volumes and poses of multiple bounding boxes or multiple small bounding boxes are obtained.
[0092] In this embodiment, after calculating the volume and pose of the bounding box of a target single obstacle point cloud, any single obstacle point cloud from multiple unselected single obstacle point clouds is selected as the target single obstacle point cloud. The target single obstacle point cloud is projected onto the XY plane, and the outer contour points of the projected target single obstacle point cloud are obtained using a convex hull algorithm. This is performed until all multiple single obstacle point clouds have been selected. The volumes and poses of multiple bounding boxes or multiple small bounding boxes are obtained, i.e., the volume and pose of the bounding box or small bounding box of each single obstacle point cloud. This ensures comprehensive detection of each single obstacle on the road, reduces the missed detection rate of obstacles, and thus reduces the probability of a collision between the vehicle and the obstacle.
[0093] In a third aspect, an embodiment of the present invention further provides an obstacle bounding box calculation device.
[0094] In one embodiment, referring to Figure 9 , Figure 9 FIG. 1 is a functional module diagram of an embodiment of an obstacle bounding box calculation device of the present invention. Figure 9 As shown, the obstacle bounding box calculation device includes:
[0095] A first acquisition module 10 is used to acquire a plurality of single obstacle point clouds on the road surface;
[0096] A selection module 20 is configured to select any single obstacle point cloud from the multiple single obstacle point clouds as a target single obstacle point cloud, and project the target single obstacle point cloud onto the XY plane;
[0097] The first calculation module 30 is used to calculate the outer contour points of the projected target single obstacle point cloud by using a convex hull algorithm;
[0098] The rotation module 40 is used to continuously rotate the outer contour point N times according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer;
[0099] The second acquisition module 50 is used to obtain the enclosing box of the shortest outer contour point in the X direction from the N rotated outer contour points;
[0100] A detection module 60 is used to detect whether the length of the enclosing frame in the X direction exceeds a preset length;
[0101] A splitting module 70 is configured to split the bounding box into multiple small bounding boxes if the detection result shows that the length in the X direction exceeds a preset length;
[0102] The second calculation module 80 is used to calculate the volumes and postures of the multiple small bounding boxes based on the rotation angle corresponding to the bounding box, the lengths in the X direction and the Y direction corresponding to the multiple small bounding boxes, and the height of the target single obstacle point cloud.
[0103] Furthermore, in one embodiment, the splitting module 70 is configured to:
[0104] The length of the X direction corresponding to the small bounding box is calculated according to the length of the X direction corresponding to the bounding box and the preset length;
[0105] The bounding box is split according to the length of the X direction corresponding to a small bounding box to obtain multiple small bounding boxes.
[0106] Furthermore, in one embodiment, the first acquisition module 10 is specifically configured to:
[0107] Obtaining a point cloud of obstacles on a road surface, performing cluster analysis on the obstacle point cloud, and obtaining a plurality of single obstacle point clouds.
[0108] Furthermore, in one embodiment, the second calculation module 80 is further configured to:
[0109] If the detection result shows that the length in the X direction does not exceed the preset length, the volume of the bounding box is calculated based on the length in the X direction and the length in the Y direction corresponding to the bounding box and the height of the target single obstacle point cloud.
[0110] Furthermore, in one embodiment, the obstacle bounding box calculation device further includes a loop module configured to:
[0111] Select any single obstacle point cloud from multiple single obstacle point clouds that have not been selected as the target single obstacle point cloud, project the target single obstacle point cloud onto the XY plane, and use the convex hull algorithm to obtain the outer contour points of the projected target single obstacle point cloud. This process continues until all single obstacle point clouds have been selected, and the volumes and poses of multiple bounding boxes or multiple small bounding boxes are obtained.
[0112] The functional implementation of each module in the above obstacle bounding box calculation device corresponds to each step in the above obstacle bounding box calculation method embodiment, and their functions and implementation processes are not repeated here one by one.
[0113] In a fourth aspect, an embodiment of the present invention further provides a readable storage medium.
[0114] The readable storage medium of the present invention stores an obstacle bounding box calculation program, wherein when the obstacle bounding box calculation program is executed by a processor, the steps of the obstacle bounding box calculation method as described above are implemented.
[0115] The method implemented when the obstacle bounding box calculation program is executed may refer to the various embodiments of the obstacle bounding box calculation method of the present invention, and will not be described in detail here.
[0116] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or system comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or system. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or system comprising the element.
[0117] The serial numbers of the above embodiments of the present invention are for description only and do not represent the advantages or disadvantages of the embodiments.
[0118] Through the description of the above embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment methods can be implemented by means of software plus the necessary general hardware platform, or of course by hardware, but in many cases the former is a better embodiment. Based on this understanding, the technical solution of the present invention, or the part that contributes to the prior art, can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a number of instructions for enabling a terminal device to execute the methods described in various embodiments of the present invention.
[0119] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for calculating an obstacle bounding box, characterized in that: The obstacle bounding box calculation method includes: Obtain multiple single obstacle point clouds on the road; Select any single obstacle point cloud from multiple single obstacle point clouds as the target single obstacle point cloud, and project the target single obstacle point cloud onto the XY plane; The outer contour points of the projected target single obstacle point cloud are calculated using the convex hull algorithm; The outer contour point is rotated continuously N times according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer; Obtain the bounding box of the shortest outer contour point in the X direction from the rotated N outer contour points; Detecting whether the length of the bounding box in the X direction exceeds a preset length; If the detection result shows that the length in the X direction exceeds the preset length, the bounding box is split into multiple small bounding boxes; The volumes and poses of the multiple small bounding boxes are calculated based on the rotation angle corresponding to the bounding box, the length of the X direction and the length of the Y direction corresponding to each of the multiple small bounding boxes, and the height of the target single obstacle point cloud.
2. The obstacle bounding box calculation method according to claim 1, wherein: The step of splitting the bounding box to obtain multiple small bounding boxes includes: The length of the X direction corresponding to the small bounding box is calculated according to the length of the X direction corresponding to the bounding box and the preset length; The bounding box is split according to the length of the X direction corresponding to a small bounding box to obtain multiple small bounding boxes.
3. The obstacle bounding box calculation method according to claim 1, wherein: The step of obtaining a plurality of single obstacle point clouds on the road surface includes: Obtaining a point cloud of obstacles on a road surface, performing cluster analysis on the obstacle point cloud, and obtaining a plurality of single obstacle point clouds.
4. The obstacle bounding box calculation method according to claim 1, wherein: After the step of detecting whether the length of the bounding box in the X direction exceeds a preset length, the method further includes: If the detection result shows that the length in the X direction does not exceed the preset length, the volume and posture of the bounding box are calculated based on the rotation angle corresponding to the bounding box, the length in the X direction and the Y direction corresponding to the bounding box, and the height of the target single obstacle point cloud.
5. The obstacle bounding box calculation method according to claim 4, wherein: After the step of calculating the volumes and poses of the multiple small bounding boxes based on the rotation angle corresponding to the bounding box, the lengths in the X direction and the Y direction corresponding to the multiple small bounding boxes, and the height of the target single obstacle point cloud, the following steps are included: Select any single obstacle point cloud from multiple single obstacle point clouds that have not been selected as the target single obstacle point cloud, project the target single obstacle point cloud onto the XY plane, and use the convex hull algorithm to obtain the outer contour points of the projected target single obstacle point cloud. This process continues until all single obstacle point clouds have been selected, and the volumes and poses of multiple bounding boxes or multiple small bounding boxes are obtained.
6. An obstacle bounding box calculation device, characterized in that: The obstacle bounding box calculation device includes: A first acquisition module is used to acquire multiple single obstacle point clouds on the road surface; A selection module is used to select any single obstacle point cloud from multiple single obstacle point clouds as a target single obstacle point cloud and project the target single obstacle point cloud onto the XY plane; The first calculation module is used to calculate the outer contour points of the projected target single obstacle point cloud through a convex hull algorithm; A rotation module is used to continuously rotate the outer contour point N times according to a preset angle to obtain a total of N outer contour points after each rotation, where N is a positive integer; The second acquisition module is used to obtain the enclosing box of the shortest outer contour point in the X direction from the N rotated outer contour points; A detection module, configured to detect whether the length of the bounding box in the X direction exceeds a preset length; A splitting module is used to split the bounding box into multiple small bounding boxes if the detection result shows that the length in the X direction exceeds the preset length; The second calculation module is used to calculate the volume and posture of multiple small bounding boxes based on the rotation angle corresponding to the bounding box, the length of the X direction and the length of the Y direction corresponding to each of the multiple small bounding boxes, and the height of the target single obstacle point cloud.
7. The obstacle bounding box calculation device according to claim 6, wherein: The second computing module is further configured to: If the detection result shows that the length in the X direction does not exceed the preset length, the volume and posture of the bounding box are calculated based on the rotation angle corresponding to the bounding box, the length in the X direction and the Y direction corresponding to the bounding box, and the height of the target single obstacle point cloud.
8. The obstacle bounding box calculation device according to claim 6, wherein: The splitting module is used to: The length of the X direction corresponding to the small bounding box is calculated according to the length of the X direction corresponding to the bounding box and the preset length; The bounding box is split according to the length of the X direction corresponding to a small bounding box to obtain multiple small bounding boxes.
9. An obstacle bounding box calculation device, characterized in that: The obstacle bounding box calculation device includes a processor, a memory, and an obstacle bounding box calculation program stored in the memory and executable by the processor, wherein when the obstacle bounding box calculation program is executed by the processor, the steps of the obstacle bounding box calculation method according to any one of claims 1 to 5 are implemented.
10. A readable storage medium, characterized in that: The readable storage medium stores an obstacle bounding box calculation program, wherein when the obstacle bounding box calculation program is executed by a processor, the steps of the obstacle bounding box calculation method according to any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Laser monocular vision fusion positioning mapping method in dynamic scene
CN113345018A
Vehicle attitude estimation method based on laser point cloud and ensemble learning
CN114648585A