Method and device for processing bounding box, electronic equipment and program product
By acquiring obstacle point clouds, determining the initial bounding box and selecting a reference point, and constructing the target bounding box in combination with preset reconstruction dimensions, the problem of inaccurate bounding box generation caused by incomplete obstacle point clouds is solved, achieving higher shape matching degree and geometric center accuracy.
Patent Information
- Application Number
- CN202511654529.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-12
- Publication Date
- 2026-02-17
AI Technical Summary
In existing technologies, incomplete obstacle point clouds in environmental perception technologies lead to inaccurate bounding box generation, which cannot accurately match the actual shape of obstacles and affects the effectiveness of subsequent applications.
By acquiring obstacle point clouds, an initial bounding box is determined. Based on the obstacle type, a preset reconstruction size is determined. Reference points are selected from the vertices of the initial bounding box to construct the target bounding box. The spatial distribution of obstacles is accurately anchored by combining the reference points and the preset reconstruction size.
It significantly improves the shape matching and geometric center accuracy of the bounding box, ensuring that the target bounding box fits the actual spatial distribution of obstacles and improving the reliability of subsequent applications.
Smart Images

Figure CN121544796A_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a bounding box processing method, bounding box processing apparatus, electronic device, and computer program product. Background Technology
[0002] In environmental perception technologies for autonomous driving, intelligent robotics, and other fields, it is often necessary to collect obstacle point clouds using sensors and construct bounding boxes based on these point clouds to achieve spatial localization, range definition, and subsequent functions such as collision detection and path planning. However, in existing technologies, on the one hand, due to factors such as environmental complexity and distance limitations, the collected obstacle point clouds are prone to incompleteness, resulting in the inability to generate bounding boxes that accurately match the actual shape of the obstacles; on the other hand, existing bounding box processing methods are relatively simple, and the generated bounding boxes cannot accurately fit the actual size of the obstacles, affecting the subsequent application effectiveness of the bounding boxes.
[0003] It should be noted that the information disclosed in the background section above is only used to enhance the understanding of the background of this disclosure, and therefore may include information that does not constitute prior art known to those skilled in the art. Summary of the Invention
[0004] This disclosure provides a bounding box processing method, bounding box processing apparatus, electronic device, and computer program product, thereby overcoming, to at least a certain extent, the problem of the lack of accuracy in bounding boxes generated by the prior art.
[0005] Other features and advantages of this disclosure will become apparent from the following detailed description, or may be learned in part from practice of this disclosure.
[0006] According to one aspect of this disclosure, a bounding box processing method is provided, comprising: acquiring an obstacle point cloud and determining an initial bounding box of an obstacle based on the obstacle point cloud; determining a preset reconstruction size of the initial bounding box of the obstacle according to the obstacle type of the initial bounding box; determining a reference point from the vertices of the initial bounding box of the obstacle; and constructing a target bounding box of the obstacle according to the reference point and the preset reconstruction size.
[0007] In one exemplary embodiment of this disclosure, the step of acquiring obstacle point cloud includes: acquiring environmental point cloud and performing ground segmentation processing on the environmental point cloud to segment the obstacle point cloud from the environmental point cloud.
[0008] In one exemplary embodiment of this disclosure, determining the initial bounding box of an obstacle based on the obstacle point cloud includes: clustering the obstacle point cloud to obtain multiple obstacle point cloud clusters; and constructing a corresponding rectangular bounding box for each obstacle point cloud cluster to obtain the initial bounding box of the obstacle corresponding to each obstacle point cloud cluster.
[0009] In one exemplary embodiment of this disclosure, determining the preset reconstruction size of the initial bounding box of an obstacle based on the obstacle type of the initial bounding box includes: collecting sensing data of the obstacle through a sensing device and determining the obstacle type of the obstacle based on the sensing data; associating the obstacle type with the initial bounding box of the obstacle to determine the obstacle type corresponding to the initial bounding box; and determining the preset reconstruction size of the initial bounding box of the obstacle based on the obstacle type corresponding to the initial bounding box.
[0010] In one exemplary embodiment of this disclosure, determining a reference point from the vertices of the initial bounding box of the obstacle includes: obtaining multiple vertices of the initial bounding box of the obstacle and the origin of a preset point cloud coordinate system; determining a target vertex from the multiple vertices; constructing a connected region based on the target vertex and the origin; and using vertices that satisfy a preset distance condition in the connected region as reference points.
[0011] In one exemplary embodiment of this disclosure, determining the target vertex from the plurality of vertices includes: constructing lines from the origin to each vertex to obtain multiple line segments; and determining the target vertex from the plurality of vertices based on the included angle between any two line segments.
[0012] In one exemplary embodiment of this disclosure, determining a target vertex from the plurality of vertices based on the included angle between any two line segments includes: selecting the vertices corresponding to the two line segments with the largest included angle as the target vertex.
[0013] In one exemplary embodiment of this disclosure, the step of using a vertex that satisfies a preset distance condition as a reference point in the connected region includes: selecting from the plurality of vertices a vertex that belongs to the connected region and is closest to the origin as a reference point.
[0014] In an exemplary embodiment of this disclosure, the preset reconstruction size includes a first directional size and a second directional size; constructing the target bounding box of the obstacle according to the reference point and the preset reconstruction size includes: starting from the reference point, extending in a first direction to a first position point according to the first directional size, and extending in a second direction to a second position point according to the second directional size; the vertices of the initial bounding box include at least the reference point, a first adjacent vertex adjacent to the reference point, and a second adjacent vertex adjacent to the reference point, the first direction being the direction from the reference point to the first adjacent vertex, and the second direction being the direction from the reference point to the second adjacent vertex; constructing the target bounding box of the obstacle according to the reference point, the first position point, and the second position point.
[0015] In one exemplary embodiment of this disclosure, the method further includes: calculating the geometric center coordinates of the target bounding box based on the vertex coordinates of the target bounding box.
[0016] According to one aspect of this disclosure, a bounding box processing apparatus is provided, comprising: an initial bounding box determination module, configured to acquire an obstacle point cloud and determine an initial bounding box of an obstacle based on the obstacle point cloud; a size information determination module, configured to determine a preset reconstruction size of the initial bounding box of the obstacle according to the obstacle type of the initial bounding box; a reference point determination module, configured to determine reference points from the vertices of the initial bounding box of the obstacle; and a target bounding box construction module, configured to construct a target bounding box of the obstacle according to the reference points and the preset reconstruction size.
[0017] According to one aspect of this disclosure, an electronic device is provided, comprising: a processor; and a memory for storing executable instructions of the processor; wherein the processor is configured to perform the bounding box processing method described in any of the preceding claims by executing the executable instructions.
[0018] According to one aspect of this disclosure, a computer program product is provided, comprising a computer program that, when executed by a processor, implements the bounding box processing method described in any of the preceding claims.
[0019] The exemplary embodiments disclosed herein have the following beneficial effects: The method involves acquiring obstacle point clouds and determining initial bounding boxes for obstacles based on these points. A preset reconstruction size for the initial bounding box is then determined based on the obstacle type within the initial bounding box. Reference points are determined from the vertices of the initial bounding box. Finally, a target bounding box for the obstacle is constructed based on the reference points and the preset reconstruction size. On one hand, this exemplary embodiment determines the preset reconstruction size based on the obstacle type of the initial bounding box, providing a size reference that matches the actual shape of different obstacle types. This effectively supplements the bounding box size information missing due to incomplete point clouds, reduces the deviation between the initial bounding box and the actual geometric center of the obstacle, and significantly improves the shape matching degree and geometric center accuracy of the bounding box. On the other hand, by determining reference points from the vertices of the initial bounding box and constructing the target bounding box using the reference points and the preset reconstruction size, the starting position of the target bounding box can be accurately anchored using the reference points. Furthermore, the preset size defines the bounding box range, ensuring that the target bounding box conforms to the actual spatial distribution of the obstacle, further guaranteeing the reliability of subsequent bounding box-based operations.
[0020] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0021] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure. It is obvious that the drawings described below are merely some embodiments of this disclosure, and those skilled in the art can obtain other drawings based on these drawings without any inventive effort.
[0022] Figure 1 This schematically illustrates a flowchart of a bounding box processing method in this exemplary embodiment; Figure 2 This schematic diagram illustrates a target bounding box for determining an obstacle in this exemplary embodiment. Figure 3 This schematic diagram illustrates a structural block diagram of a bounding box processing apparatus in this exemplary embodiment; Figure 4 This embodiment illustrates an electronic device for implementing the above-described method. Detailed Implementation
[0023] Exemplary embodiments will now be described more fully with reference to the accompanying drawings. However, these exemplary embodiments can be implemented in many forms and should not be construed as limited to the examples set forth herein; rather, they are provided so that this disclosure will be more comprehensive and complete, and will fully convey the concept of the exemplary embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
[0024] An exemplary embodiment of this disclosure first provides a bounding box processing method.
[0025] The following is in conjunction with the appendix Figure 1 The exemplary embodiments will be further described as follows: Figure 1 As shown, the bounding box processing method may include the following steps S110~S140: Step S110: Obtain obstacle point cloud and determine the initial bounding box of obstacle based on obstacle point cloud.
[0026] Obstacle point clouds refer to discrete point sets in three-dimensional space used to represent the shape of obstacles. Obstacle point clouds can be acquired in the environment using LiDAR or other sensor devices. For example, environmental point clouds can be acquired first using LiDAR at a preset frequency. The environmental point cloud can include point cloud data of objects such as vehicles, pedestrians, plants, ground, and buildings. Then, the obstacle point cloud can be separated from the environmental point cloud using a specified algorithm.
[0027] An initial bounding box refers to a bounding box that is initially determined based on the obstacle point cloud and can roughly enclose the obstacle. Subsequent reconstructions will be based on this initial bounding box to obtain a more accurate bounding box. The initial bounding box can be two-dimensional or three-dimensional, depending on the specific needs of the scenario. This exemplary embodiment can first perform preliminary processing on the obstacle point cloud to generate a two-dimensional rectangle or three-dimensional cube that can basically enclose the obstacle point cloud. For example, a rectangle or cube can be defined based on the maximum or minimum values of the obstacle point cloud on the X and Y axes, or on the X, Y, and Z axes. The length and width of the rectangle can be determined based on the minimum values on the X and Y axes, or the length, width, and height of the cube can be determined based on the minimum values on the X, Y, and Z axes. Then, this rectangle or cube is used as the initial bounding box. Alternatively, a deep learning model can be used, where the obstacle point cloud is input into a pre-trained neural network, and the model generates the size and position information of the initial bounding box.
[0028] It should be noted that the environment can include multiple obstacles, each of which can correspond to its own obstacle point cloud, and each obstacle point cloud can correspond to an initial bounding box. Subsequently, the initial bounding box of each obstacle point cloud can be reconstructed to obtain the target bounding box corresponding to each obstacle point cloud.
[0029] In an exemplary embodiment, the acquisition of obstacle point clouds described above may include: Acquire environmental point clouds and perform ground segmentation processing on the environmental point clouds to extract obstacle point clouds from the environmental point clouds.
[0030] Environmental point clouds refer to the full-scene 3D point sets obtained by scanning and collecting data from the surrounding environment using sensors such as LiDAR and cameras. These data include information about various objects such as the ground, obstacles, and background. The environmental point clouds record the position coordinates or other attribute information of each point in 3D space. For example, in a parking lot scene, LiDAR scanning yields point cloud data that includes not only the point cloud of the parking lot surface but also the point clouds of vehicles parked inside the parking lot and the pillars supporting it. By analyzing and processing these environmental point clouds, information such as the position and shape of various objects in the scene can be obtained, providing basic data for subsequent tasks such as obstacle detection and path planning. Ground segmentation processing refers to the process of separating ground point clouds from non-ground point clouds from the environmental point clouds. Non-ground point clouds are obstacle point clouds. For example, a random sampling consensus algorithm can be used to fit a ground plane, calculating the distance from all points in the environmental point cloud to this fitted plane. A height threshold is set; points with a distance less than this threshold are considered ground points, while points with a distance greater than the threshold are considered obstacle point clouds. In practical applications, the optimal plane can also be found by iteratively fitting the ground plane.
[0031] In an exemplary embodiment, the above-described initial bounding box for determining obstacles based on obstacle point clouds may include: The obstacle point cloud is clustered to obtain multiple obstacle point cloud clusters; For each obstacle point cloud cluster, construct a corresponding rectangular bounding box to obtain the initial bounding box of each obstacle point cloud cluster corresponding to the obstacle.
[0032] Clustering obstacle point clouds refers to the process of dividing obstacle point clouds, segmented from environmental point clouds, into multiple relatively independent point cloud clusters with similar characteristics based on the spatial relationships and density distribution features between points. In this embodiment, DBSCAN (Density-Based Spatial Clustering of Applications with Noise) can be used for point cloud clustering, or clustering can be performed based on the Euclidean distance between points, grouping points with a distance less than a preset threshold into one class, etc. An obstacle point cloud cluster refers to the result obtained by clustering obstacle point clouds, and each obstacle point cloud cluster can correspond to one obstacle.
[0033] This exemplary embodiment can generate a bounding box of rectangular shape surrounding each obstacle point cloud cluster. For example, the vertices of the bounding box can be determined by calculating the extreme values of the coordinates of all points within the obstacle point cloud cluster on different coordinate axes. It should be noted that the bounding box in this exemplary embodiment can be a two-dimensional bounding box or a three-dimensional bounding box. The following examples will use the smallest two-dimensional rectangle as the initial bounding box for illustration.
[0034] Step S120: Determine the preset reconstruction size of the initial bounding box of the obstacle based on the obstacle type of the initial bounding box.
[0035] Obstacle type refers to information that reflects the category of obstacle attributes, such as vehicle, pedestrian, package, etc. Preset reconstruction size refers to the size adjustment parameters of the bounding box preset according to the obstacle type. In this exemplary embodiment, to generate accurate bounding boxes for obstacles, an adjustment size conforming to the obstacle attributes, i.e., the preset reconstruction size, can be pre-configured. Different types of obstacles have different preset reconstruction sizes; for example, pedestrians and vehicles have different preset reconstruction sizes. Similarly, subcategories of obstacles within the same major category may have different preset reconstruction sizes; for example, pedestrians of different genders or different vehicle models may have different preset reconstruction sizes. In implementation, a mapping table of obstacle types and preset reconstruction sizes can be pre-stored within the system, and the corresponding preset reconstruction size can be looked up in the mapping table based on the determined obstacle type.
[0036] The type of obstacle can be determined by the device through sensors in the environment. For example, an image of the obstacle can be captured in the environment by a camera module and analyzed to determine the type of obstacle. Alternatively, sensor data can be collected in the environment by infrared sensors, millimeter-wave radar sensors, etc., and analyzed to determine the type of obstacle.
[0037] In an exemplary embodiment, determining the preset reconstruction size of the initial bounding box of an obstacle based on the obstacle type of the initial bounding box may include: The obstacle type is determined by collecting sensor data of the obstacle through the sensor device. The obstacle type is associated with the initial bounding box of the obstacle to determine the obstacle type corresponding to the initial bounding box; Based on the obstacle type corresponding to the initial bounding box, determine the preset reconstruction size of the initial bounding box of the obstacle.
[0038] Sensor data, collected by one or more sensing devices such as cameras and radar, describes the physical characteristics and state of obstacles. This data includes, but is not limited to, image data captured by cameras, which records visual features such as the appearance, color, and texture of obstacles; and distance data measured by millimeter-wave radar, which can accurately determine the distance between the obstacle and the sensor. In practical applications, sensor data can be used to accurately identify and understand obstacles. For example, images captured by cameras allow the system to identify the shape and approximate category of obstacles, while distance information provided by millimeter-wave radar provides a basis for judging the distance and relative speed of obstacles. Through the fusion and analysis of this sensor data, the type of obstacle can be perceived more comprehensively and accurately.
[0039] In this exemplary embodiment, obstacle types can be determined based on sensor data. For example, obstacle types that are related to the sensor data can be found through preset rules, or the sensor data can be analyzed and processed through a deep learning model to output obstacle classification results.
[0040] After determining the obstacle type, it can be associated with the obstacle's initial bounding box to determine the obstacle type corresponding to the initial bounding box. Furthermore, based on the mapping relationship between type and size, the preset reconstruction size corresponding to the obstacle's initial bounding box can be found. For example, when the obstacle is determined to be a truck, the preset reconstruction size of the truck's initial bounding box can be determined by looking up a table as 10 meters in length and 2.5 meters in width.
[0041] Step S130: Determine a reference point from the vertices of the initial bounding box of the obstacle.
[0042] The vertices of the initial bounding box can be key points that constitute the bounding box; for example, the four corners of a rectangular bounding box can be considered vertices of the initial bounding box. The reference point refers to the base point when reconstructing the target bounding box. For example, a reference point can be selected from the vertices of the initial bounding box as the starting point for constructing the target bounding box.
[0043] In this exemplary embodiment, after determining the initial bounding box, any vertex from the vertices of the initial bounding box can be arbitrarily selected as the reference point, or a reference point can be selected from the vertices of the initial bounding box using a specific algorithm. For example, after determining the initial bounding box, the distance from each vertex to the origin of the coordinate system can be calculated, and the vertex closest to it can be selected as the reference point. Alternatively, a connected region can be constructed based on the selected vertices, and the reference point can be determined within the connected region.
[0044] Specifically, in an exemplary embodiment, determining the reference point from the vertices of the initial bounding box of the obstacle may include: Obtain multiple vertices of the initial bounding box of the obstacle, as well as the origin of the preset point cloud coordinate system; Determine the target vertex from multiple vertices; Construct a connected region based on the target vertex and the origin; In a connected region, vertices that meet the preset distance conditions are used as reference points.
[0045] The preset point cloud coordinate system refers to a coordinate system defined to uniformly describe the position of each point in the point cloud data. In this exemplary embodiment, the environmental point cloud or the obstacle point cloud can be in the same coordinate system and have the same coordinate origin.
[0046] Multiple vertices of the initial bounding box can be key points that constitute the initial bounding box, such as... Figure 2 As shown, a two-dimensional rectangle is used as the initial bounding box for illustration. The initial bounding box 210 may have vertices A, B, C, and D. This exemplary embodiment can determine the target vertex from it. For example, one or more vertices can be arbitrarily selected as the target vertex, or vertices that meet specific conditions can be selected as the target vertex, or it can be determined in other ways.
[0047] A connected region refers to a region formed by connecting the origin and the target vertex in a preset point cloud coordinate system. In this exemplary embodiment, vertices that meet preset distance conditions within the connected region can be used as reference points. The preset distance conditions can be set as needed. For example, the vertex that is in the connected region and is closest to the origin O can be used as the reference point, i.e., vertex C can be used as the reference point.
[0048] In one exemplary embodiment, determining the target vertex from a plurality of vertices may include: Construct lines from the origin to each vertex to obtain multiple line segments; The target vertex is determined from multiple vertices based on the included angle between any two line segments.
[0049] This exemplary embodiment can connect the origin and each vertex to form multiple line segments, and then determine the target vertex from the multiple vertices based on the included angle between any two line segments.
[0050] like Figure 2As shown, we can connect the origin O and vertex A to form line segment S1, connect the origin O and vertex B to form line segment S2, connect the origin O and vertex C to form line segment S3, and connect the origin O and vertex D to form line segment S4. Then, we can compare the angles between line segments S1 and S2, S1 and S3, S1 and S4, S2 and S3, S2 and S4, and S3 and S4. Based on the comparison of the angles, we can determine the target vertex from vertices A, B, C, and D.
[0051] In an exemplary embodiment, determining the target vertex from multiple vertices based on the included angle between any two line segments may include: The vertices corresponding to the two line segments with the largest included angle are taken as the target vertices.
[0052] This exemplary embodiment can use the vertices corresponding to the two line segments with the largest included angle as the target vertices, for example... Figure 2 As shown, after comparing the included angles between multiple sets of line segments, it is found that the included angle between line segment S2 and line segment S4 is greater than the included angle between the other two line segments. Therefore, vertices B and D in line segments S2 and S4 can be taken as target vertices.
[0053] In an exemplary embodiment, using vertices that satisfy a preset distance condition as reference points in a connected region may include: Select the vertex that belongs to the connected region and is closest to the origin from multiple vertices as the reference point.
[0054] Furthermore, the vertex that belongs to the connected region and is closest to the origin can be selected as the reference point from among multiple vertices, such as... Figure 2 As shown, after determining the target vertices as vertices B and D, the origin O, vertex B, and vertex D can be connected to obtain a connected region 220 of the triangle. Then, the vertex located in this connected region 220 that is closest to the origin O can be used as the reference point, i.e., vertex C.
[0055] Step S140: Construct the target bounding box of the obstacle based on the reference point and the preset reconstruction size.
[0056] After determining the reference point and preset reconstruction dimensions, a target bounding box for the obstacle can be constructed. The preset reconstruction dimensions can include dimensions in both the length and width directions. For example, starting from the reference point, the bounding box can be extended by a certain dimension along its length and width. Based on the extended points and the reference point, the final target bounding box is generated. The target bounding box can more tightly and accurately enclose the obstacle, providing reliable data support for subsequent applications.
[0057] It should be noted that the target bounding box can be larger or smaller than the initial bounding box, and this disclosure does not limit this.
[0058] In one exemplary embodiment, the preset reconstruction size includes a first direction size and a second direction size; Based on the reference point and preset reconstruction size, construct the target bounding box of the obstacle, including: Starting from the reference point, extend along the first direction to the first position point according to the first direction dimension, and extend along the second direction to the second position point according to the second direction dimension; the vertices of the initial bounding box include at least the reference point, the first adjacent vertex adjacent to the reference point, and the second adjacent vertex adjacent to the reference point, the first direction is the direction from the reference point to the first adjacent vertex, and the second direction is the direction from the reference point to the second adjacent vertex; Construct the target bounding box of the obstacle based on the reference point, the first position point, and the second position point.
[0059] The first and second directions are key directions determined based on the geometry of the initial bounding box. The first direction is the direction from the reference point to the first adjacent vertex adjacent to the reference point, and the second direction is the direction from the reference point to the second adjacent vertex adjacent to the reference point, for example, in... Figure 2 In the initial bounding box, vertex C is the reference point. Vertex C has two adjacent vertices, namely vertex B and vertex D. Vertex B can be the first adjacent vertex, and vertex D can be the second adjacent vertex. Therefore, the direction from vertex C to vertex B can be the first direction, and the direction from vertex C to vertex D can be the second direction.
[0060] The preset reconstruction dimensions may include a first direction dimension and a second direction dimension. For example, it may include a length dimension in the length direction and a width dimension in the width direction. After determining the reference point and the extension direction, it can be extended in the first direction and the second direction according to the first direction dimension and the second direction dimension to the first position point and the second position point, for example, in... Figure 2 In the diagram, extending the first dimension from vertex C towards vertex B results in the first position point B'. Extending the second dimension from vertex C towards vertex D results in the second position point D'. Finally, a new target bounding box can be constructed based on the reference point C, the first position point B', and the second position point D', as shown below. Figure 2 The area shown is 230.
[0061] It should be noted that, Figure 2 This is merely an example; in practical applications, if the dimension in the first direction is smaller than the distance between vertex C and vertex B, or the dimension in the second direction is smaller than the distance between vertex C and vertex D, the generated target bounding box may be smaller than the initial bounding box.
[0062] In one exemplary embodiment, the method may further include: Calculate the coordinates of the geometric center of the target bounding box based on the vertex coordinates of the target bounding box.
[0063] After constructing the target bounding box, its geometric center coordinates need to be calculated to more accurately determine the obstacle's position in space. To calculate the X-coordinate of the geometric center, the X-coordinates of all vertices are added together and then divided by the total number of vertices; the same logic applies to calculating the Y-coordinate.
[0064] Based on the above description, in this exemplary embodiment, obstacle point clouds are acquired, and initial bounding boxes of obstacles are determined based on the obstacle point clouds; a preset reconstruction size of the initial bounding box of obstacles is determined according to the obstacle type of the initial bounding box; reference points are determined from the vertices of the initial bounding box of obstacles; and a target bounding box of obstacles is constructed based on the reference points and the preset reconstruction size. On the one hand, this exemplary embodiment determines the preset reconstruction size based on the obstacle type of the initial bounding box, which can provide size references that match the actual shape of different types of obstacles, effectively supplementing the bounding box size information missing due to incomplete point clouds, reducing the deviation between the initial bounding box and the actual geometric center of the obstacle, and significantly improving the shape matching degree and geometric center accuracy of the bounding box. On the other hand, this exemplary embodiment determines the reference points from the vertices of the initial bounding box and constructs the target bounding box by combining the reference points and the preset reconstruction size. The starting position of the target bounding box can be accurately anchored by the reference points, and the bounding box range can be defined by the preset size, ensuring that the target bounding box fits the actual spatial distribution of the obstacle, further ensuring the reliability of subsequent bounding box-based operations.
[0065] An exemplary embodiment of this disclosure also provides a bounding box processing apparatus. (Refer to...) Figure 3 The bounding box processing device 300 may include: an initial bounding box determination module 310, used to acquire obstacle point clouds and determine the initial bounding box of the obstacle based on the obstacle point clouds; a size information determination module 320, used to determine the preset reconstruction size of the initial bounding box of the obstacle according to the obstacle type of the initial bounding box; a reference point determination module 330, used to determine reference points from the vertices of the initial bounding box of the obstacle; and a target bounding box construction module 340, used to construct the target bounding box of the obstacle according to the reference points and the preset reconstruction size.
[0066] In an exemplary embodiment, the initial bounding box determination module 310 includes: a point cloud segmentation unit, configured to acquire an environmental point cloud and perform ground segmentation processing on the environmental point cloud to segment out obstacle point clouds from the environmental point cloud.
[0067] In an exemplary embodiment, the initial bounding box determination module 310 includes: a point cloud clustering unit, used to cluster obstacle point clouds to obtain multiple obstacle point cloud clusters; and an initial bounding box generation unit, used to construct a corresponding rectangular bounding box for each obstacle point cloud cluster to obtain the initial bounding box of each obstacle point cloud cluster corresponding to the obstacle.
[0068] In an exemplary embodiment, the size information determination module 320 includes: an obstacle type determination unit, configured to collect sensing data of an obstacle through a sensing device and determine the obstacle type of the obstacle based on the sensing data; an obstacle type association unit, configured to associate the obstacle type with the initial bounding box of the obstacle to determine the obstacle type corresponding to the initial bounding box; and a size determination unit, configured to determine the preset reconstruction size of the initial bounding box of the obstacle based on the obstacle type corresponding to the initial bounding box.
[0069] In an exemplary embodiment, the reference point determination module 330 includes: a vertex acquisition unit, used to acquire multiple vertices of the initial bounding box of the obstacle and the origin of a preset point cloud coordinate system; a target vertex determination unit, used to determine a target vertex from the multiple vertices; a connected region construction unit, used to construct a connected region based on the target vertex and the origin; and a reference point determination unit, used to select vertices that satisfy a preset distance condition as reference points in the connected region.
[0070] In an exemplary embodiment, the target vertex determination unit includes: a line segment construction subunit, used to construct lines from the origin to each vertex to obtain multiple line segments; and an angle determination subunit, used to determine the target vertex from the multiple vertices based on the angle between any two line segments.
[0071] In an exemplary embodiment, the included angle determination subunit is used to select the vertices corresponding to the two line segments with the largest included angle as the target vertices.
[0072] In one exemplary embodiment, the reference point determination unit includes: a reference point selection subunit, configured to select from a plurality of vertices a vertex that belongs to a connected region and is closest to the origin as a reference point.
[0073] In one exemplary embodiment, the preset reconstruction size includes a first direction size and a second direction size; The target bounding box construction module 340 includes: a position point extension unit, used to extend from a reference point in a first direction to a first position point according to a first direction dimension, and to a second position point in a second direction according to a second direction dimension; the vertices of the initial bounding box include at least the reference point, a first adjacent vertex adjacent to the reference point, and a second adjacent vertex adjacent to the reference point, the first direction being the direction from the reference point to the first adjacent vertex, and the second direction being the direction from the reference point to the second adjacent vertex; and a target bounding box construction unit, used to construct the target bounding box of the obstacle based on the reference point, the first position point, and the second position point.
[0074] In one exemplary embodiment, the apparatus further includes a coordinate calculation module for calculating the geometric center coordinates of the target bounding box based on the vertex coordinates of the target bounding box.
[0075] The specific details of each part of the above-mentioned device have been described in detail in the method section of the implementation plan. For any undisclosed details, please refer to the implementation plan of the method section, and therefore will not be repeated here.
[0076] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to exemplary embodiments of this disclosure, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.
[0077] Exemplary embodiments of this disclosure also provide a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the bounding box processing method described above.
[0078] In one implementation, the computer program product can be a tangible product containing a computer program, such as a computer-readable storage medium storing the computer program. The readable storage medium can be a storage medium based on electrical, magnetic, optical, electromagnetic, infrared, or other signals, including but not limited to: random access memory (RAM), read-only memory (ROM), magnetic tape, floppy disk, flash memory, hard disk drive (HDD), solid-state drive (SSD), etc. For example, the computer program product can be implemented as a non-volatile storage medium storing a computer program, such as read-only memory, NAND flash memory, etc.
[0079] In one implementation, the computer program product can be an intangible product containing a computer program. For example, the computer program product can be implemented as a virtual digital product, such as an executable file, installation package, or other digital file storing the computer program.
[0080] Computer program code can be written in one or more programming languages. Examples of programming languages include C, Java, and C++. Program code can execute entirely on the user's computing device, partially on the user's computing device, or as a standalone software package. It can also execute partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computing device (e.g., via an internet connection provided by a mobile network operator).
[0081] Computer programs can be carried or transmitted via signals such as electrical, magnetic, optical, electromagnetic, and infrared rays. Electronic devices can convert the signals carrying computer programs into digital signals, thereby running the computer programs. When a computer program runs on an electronic device, its code is used to cause the electronic device to execute (more specifically, to execute by the processor of the electronic device) the method steps of various exemplary embodiments of this disclosure, such as the bounding box processing method described above.
[0082] Exemplary embodiments of this disclosure also provide an electronic device. The electronic device may include a processor and a memory. The memory stores executable instructions of the processor, such as program code. The processor executes the executable instructions to perform the methods of this exemplary embodiment. Furthermore, the electronic device may also include a display for displaying a graphical user interface.
[0083] The following is for reference. Figure 4 The electronic device is illustrated by way of a general-purpose computing device. It should be understood that... Figure 4 The electronic device 400 shown is merely an example and should not be construed as limiting the functionality and scope of use of the embodiments disclosed herein.
[0084] like Figure 4 As shown, the electronic device 400 may include: a processor 410, a memory 420, a bus 430, an I / O (input / output) interface 440, a network adapter 450, and a display 460.
[0085] Memory 420 may include volatile memory, such as RAM 421 and cache unit 422, and may also include non-volatile memory, such as ROM 423. Memory 420 may also include one or more program modules 424, including but not limited to: operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. For example, program module 424 may include the modules in the above-described apparatus.
[0086] The processor 410 may include one or more processing units, such as an AP (Application Processor), a modem processor, a GPU (Graphics Processing Unit), an ISP (Image Signal Processor), a controller, an encoder, a decoder, a DSP (Digital Signal Processor), a baseband processor, and / or an NPU (Neural-Network Processing Unit).
[0087] The processor 410 can be used to execute executable instructions stored in the memory 420, such as the bounding box processing method described above.
[0088] Bus 430 is used to connect different components of electronic device 400 and may include a data bus, an address bus and a control bus.
[0089] Electronic device 400 can communicate with one or more external devices 500 (such as keyboard, mouse, external controller, etc.) through I / O interface 440.
[0090] Electronic device 400 can communicate with one or more networks via network adapter 450. For example, network adapter 450 can provide mobile communication solutions such as 3G / 4G / 5G, or wireless communication solutions such as wireless LAN, Bluetooth, and near-field communication. Network adapter 450 can communicate with other modules of electronic device 400 via bus 430.
[0091] Electronic device 400 can display a graphical user interface via display 460.
[0092] although Figure 4Other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems, may also be configured in the electronic device 400.
[0093] As can be seen from the above, the technical solutions disclosed herein can be implemented as methods, apparatus, systems, computer program products, storage media, electronic devices, etc. Those skilled in the art will understand that various aspects of this disclosure can be specifically implemented in the following forms: a completely hardware implementation, a completely software implementation (including firmware, microcode, etc.), or an implementation combining hardware and software aspects, which may be referred to as "circuit," "module," or "system," respectively.
[0094] It should be understood that this disclosure is not limited to the specific methods, steps, or structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. Those skilled in the art will readily conceive of other embodiments based on the specific implementations provided in this disclosure. Therefore, the specific implementations provided in this disclosure are merely exemplary, and the scope and spirit of this disclosure are indicated by the claims, and should cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary technical means in the art not disclosed in this disclosure.
[0095] Those skilled in the art will understand that various aspects of this disclosure can be implemented as systems, methods, or program products. Therefore, various aspects of this disclosure can be embodied in entirely hardware implementations, entirely software implementations (including firmware, microcode, etc.), or implementations combining hardware and software aspects, collectively referred to herein as “circuit,” “module,” or “system.” Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and embodiments are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the claims.
[0096] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is defined only by the appended claims.
Claims
1. A method for processing bounding boxes, characterized in that, include: Obtain obstacle point cloud, and determine the initial bounding box of the obstacle based on the obstacle point cloud; Based on the obstacle type of the initial bounding box, determine the preset reconstruction size of the initial bounding box of the obstacle; Determine a reference point from the vertices of the initial bounding box of the obstacle; Based on the reference point and the preset reconstruction size, construct the target bounding box of the obstacle.
2. The method according to claim 1, characterized in that, The acquisition of obstacle point cloud includes: An environmental point cloud is acquired, and ground segmentation processing is performed on the environmental point cloud to segment out obstacle point clouds from the environmental point cloud.
3. The method according to claim 1, characterized in that, The initial bounding box for determining obstacles based on the obstacle point cloud includes: The obstacle point cloud is clustered to obtain multiple obstacle point cloud clusters; For each obstacle point cloud cluster, construct a corresponding rectangular bounding box to obtain the initial bounding box of each obstacle point cloud cluster corresponding to the obstacle.
4. The method according to claim 1, characterized in that, The step of determining the preset reconstruction size of the initial bounding box of the obstacle based on the obstacle type of the initial bounding box includes: The obstacle is collected by a sensing device, and the obstacle type is determined based on the sensing data. The obstacle type is associated with the initial bounding box of the obstacle to determine the obstacle type corresponding to the initial bounding box; Based on the obstacle type corresponding to the initial bounding box, determine the preset reconstruction size of the initial bounding box of the obstacle.
5. The method according to claim 1, characterized in that, Determining a reference point from the vertices of the initial bounding box of the obstacle includes: Obtain multiple vertices of the initial bounding box of the obstacle, as well as the origin of the preset point cloud coordinate system; Determine the target vertex from the plurality of vertices; Construct a connected region based on the target vertex and the origin; In the connected region, vertices that meet the preset distance conditions are used as reference points.
6. The method according to claim 5, characterized in that, Determining the target vertex from the plurality of vertices includes: Construct lines from the origin to each vertex to obtain multiple line segments; The target vertex is determined from the plurality of vertices based on the included angle between any two line segments.
7. The method according to claim 6, characterized in that, The step of determining the target vertex from the plurality of vertices based on the included angle between any two line segments includes: The vertices corresponding to the two line segments with the largest included angle are taken as the target vertices.
8. The method according to claim 5, characterized in that, The step of using vertices that satisfy a preset distance condition as reference points in the connected region includes: Select the vertex that belongs to the connected region and is closest to the origin from the plurality of vertices as the reference point.
9. The method according to claim 1, characterized in that, The preset reconstruction dimensions include dimensions in a first direction and dimensions in a second direction; The step of constructing the target bounding box of the obstacle based on the reference point and the preset reconstruction size includes: Starting from the reference point, the initial bounding box extends in the first direction to the first position point according to the first direction dimension, and extends in the second direction to the second position point according to the second direction dimension; the vertices of the initial bounding box include at least the reference point, a first adjacent vertex adjacent to the reference point, and a second adjacent vertex adjacent to the reference point, wherein the first direction is the direction from the reference point to the first adjacent vertex, and the second direction is the direction from the reference point to the second adjacent vertex. Based on the reference point, the first position point, and the second position point, construct the target bounding box of the obstacle.
10. The method according to claim 9, characterized in that, The method further includes: Calculate the geometric center coordinates of the target bounding box based on the vertex coordinates of the target bounding box.