Method and device for acquiring voxel information in three-dimensional space, equipment and storage medium
By converting point cloud data into a three-dimensional coordinate system and generating voxel information in the autonomous driving system, the contradiction between obstacle recognition accuracy and real-time performance is solved, and more sophisticated obstacle representation and recognition are achieved.
Patent Information
- Application Number
- CN202310333424.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-30
- Publication Date
- 2024-10-01
AI Technical Summary
In the field of autonomous driving, the number of voxels of obstacles in the existing technology determines the accuracy of the obstacle. However, the processing resources of the vehicle are limited and it is difficult to find a balance between real-time and accuracy, resulting in the size and shape recognition of obstacles. Not refined enough.
By converting the point cloud data to a three-dimensional coordinate system, voxelizing it according to the preset size, and using the key points of the point cloud within the voxel and external graphics to generate voxel information, including position information and size information, thereby realizing different voxels. accurate representation.
It improves the accuracy of the position and size representation of obstacles, enhances the accuracy of obstacle recognition, and reduces the demand for computing resources.
Smart Images

Figure CN118736104A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of obstacle detection, and in particular to a method, device, equipment and storage medium for acquiring voxel information in a three-dimensional space. Background Art
[0002] In the field of autonomous driving, the process of generating obstacles is very important, especially when generating the size and shape of obstacles. The more accurate the obstacles are, the more beneficial it will be for subsequent autonomous driving decision-making and other work.
[0003] In the prior art, sensors are often used to collect point cloud information of obstacles, and then the three-dimensional space is divided into voxels to obtain multiple voxels and voxel information of each voxel (such as the position information and size information of the voxel, where the voxel information is preset), and then the voxel information of the voxels containing the point cloud is used to generate obstacles, and then the size and shape of the obstacles are obtained. In this way, the number of voxels determines the accuracy of the generated obstacles. The more voxels there are in a unit space, the finer the size and shape of the obstacles, but more processing resources and processing time are also required in the process of generating obstacles.
[0004] In the field of autonomous driving, the processing resources of the vehicle computer are limited, and the real-time requirements for data are very high, and the processing time limit is short. Therefore, when the number of voxels is fixed, how to obtain more accurate voxel information becomes the key to improving the accuracy of obstacles. Summary of the invention
[0005] In order to solve the above technical problem or at least partially solve the above technical problem, at least one embodiment of the present disclosure provides a method, device, equipment and storage medium for acquiring voxel information in a three-dimensional space.
[0006] In a first aspect, the present disclosure provides a method for acquiring voxel information in a three-dimensional space, comprising:
[0007] Convert the acquired point cloud data into a three-dimensional coordinate system;
[0008] voxelize the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels;
[0009] According to the point cloud data contained in each voxel of the plurality of voxels, voxel information corresponding to each voxel is generated by using key points of the point cloud in the voxel and circumscribed graphics of the point cloud, wherein the voxel information includes position information and size information of the voxel.
[0010] In a second aspect, the present disclosure provides a device for acquiring voxel information in a three-dimensional space, comprising:
[0011] A conversion module, used to convert the acquired point cloud data into a three-dimensional coordinate system;
[0012] A segmentation module, used for voxelizing the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels;
[0013] A generation module is used to generate voxel information corresponding to each voxel according to the point cloud data contained in each voxel of the multiple voxels, using the key points of the point cloud in the voxel and the external graphics of the point cloud, wherein the voxel information includes the position information and size information of the voxel.
[0014] In a third aspect, the present disclosure provides a computer device, including: a processor and a memory;
[0015] The processor is used to execute any of the methods for acquiring voxel information in a three-dimensional space provided by the embodiments of the present disclosure by calling the program or instruction stored in the memory.
[0016] In a fourth aspect, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium stores a program or instruction, wherein the program or instruction enables a computer to execute any method for acquiring voxel information in a three-dimensional space provided in any of the embodiments of the present disclosure.
[0017] In a fifth aspect, the present disclosure provides a computer program product, which is used to execute any method for acquiring voxel information in a three-dimensional space provided by the embodiments of the present disclosure.
[0018] Compared with the prior art, the technical solution provided by the embodiments of the present disclosure has at least the following advantages:
[0019] In the disclosed embodiment, the acquired point cloud data is converted into a three-dimensional coordinate system, and the three-dimensional space in the three-dimensional coordinate system is voxelized according to a preset size to obtain a plurality of voxels, and then, based on the point cloud data contained in each voxel in the plurality of voxels, the key points of the point cloud in the voxel and the external graphics of the point cloud are used to generate the voxel information corresponding to each voxel, and the voxel information includes the position information and size information of the voxel. By adopting the above technical solution, after the three-dimensional space is divided into a plurality of voxels of fixed size, the position information and size information corresponding to each voxel are further determined as the real voxel information of the voxel according to the point cloud data contained in each voxel, thereby realizing the calculation of the real position and real size of the voxel according to the point cloud data, so that the sizes of different voxels can be different, and the accurate voxel position and voxel size can be obtained, which is conducive to improving the representation accuracy of the obstacle position and size, and improving the accuracy of obstacle recognition. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0021] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0022] Figure 1 A schematic diagram of a flow chart of a method for acquiring voxel information in a three-dimensional space provided by an embodiment of the present disclosure;
[0023] Figure 2 A schematic diagram of a flow chart of a method for acquiring voxel information in a three-dimensional space provided by another embodiment of the present disclosure;
[0024] Figure 3 A schematic diagram showing a process of a method for acquiring voxel information in a three-dimensional space in a specific embodiment of the present disclosure is shown;
[0025] Figure 4 A schematic diagram of the structure of a device for acquiring voxel information in a three-dimensional space provided by an embodiment of the present disclosure. DETAILED DESCRIPTION
[0026] In order to more clearly understand the above-mentioned purposes, features and advantages of the present disclosure, the present disclosure is further described in detail below in conjunction with the accompanying drawings and embodiments. It is understandable that the described embodiments are part of the embodiments of the present disclosure, rather than all of the embodiments, and the specific embodiments described herein are only used to explain the present disclosure, rather than to limit the present disclosure. In the absence of conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other. Based on the described embodiments of the present disclosure, all other embodiments obtained by ordinary technicians in the field belong to the scope of protection of the present disclosure.
[0027] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0028] Figure 1A flow chart of a method for acquiring voxel information in a three-dimensional space provided in an embodiment of the present disclosure is provided. The method for acquiring voxel information in a three-dimensional space can be executed by a device for acquiring voxel information in a three-dimensional space provided in an embodiment of the present disclosure. The device for acquiring voxel information in a three-dimensional space can be implemented using software and / or hardware and can be integrated on a computer device, which can be a computer, server or other electronic device.
[0029] like Figure 1 As shown, the method for acquiring voxel information in a three-dimensional space provided by an embodiment of the present disclosure may include the following steps:
[0030] Step 101: convert the acquired point cloud data into a three-dimensional coordinate system.
[0031] The point cloud data of obstacles can be obtained using various sensors, such as LiDAR. LiDAR is a system that integrates three technologies: laser, global navigation satellite system (GNSS) and inertial navigation system (INS). Through the combination of these three technologies, it can not only actively and in real time perceive the dynamic spatial position relationship of the environment and objects, but also generate accurate three-dimensional spatial models under the condition of consistent absolute measurement points. It is used in surface remote sensing, such as data acquisition of ground elevation and landforms, forestry surveys, as well as autonomous driving and high-precision map production.
[0032] LiDAR actively emits a laser beam and measures the time it takes for the light to hit an object or surface and then reflect back to calculate the distance from the target point to the laser radar. The above behavior will obtain millions of data points in a rapid and repeated process. Using these data points, the system will build a complex "map" of the geographic space surface it is measuring, called a "point cloud." Since the point cloud is the feedback value of the laser radar's received beam on the object, each point in the point cloud contains three-dimensional coordinate values, which are the three elements we often call x, y, and z.
[0033] In the disclosed embodiment, the point cloud data collected by the laser radar can be obtained, and the obtained laser radar point cloud data can be converted into a three-dimensional coordinate system. Since each point in the laser radar point cloud data contains a three-dimensional coordinate value, during the conversion, the obtained point cloud data can be converted into a three-dimensional coordinate system based on the three-dimensional coordinate value contained in each point.
[0034] Step 102 : voxelize the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels.
[0035] Among them, the preset size can be pre-set according to actual needs. For example, the preset size can be set to 0.1m*0.1m*0.1m, 0.1m*0.2m*0.1m, 0.1m*0.1m*0.2m, 0.1m*0.2m*0.3m, and so on.
[0036] In the embodiment of the present disclosure, for a three-dimensional space in a three-dimensional coordinate system, the three-dimensional space may be divided into voxels according to a fixed preset size, and the three-dimensional space may be divided into a plurality of voxels of the same size.
[0037] Exemplarily, assuming that the spatial range of the three-dimensional space is 30m*30m*10m and the preset size is 0.1m*0.1m*0.1m, the three-dimensional space is voxelized according to the preset size, and the three-dimensional space can be divided into (300, 300, 100) voxels of equal size.
[0038] At this point, the voxel division has been completed, and initial voxel information has been obtained, which includes initial position information and initial size information.
[0039] Step 103 , based on the point cloud data contained in each voxel of the plurality of voxels, voxel information corresponding to each voxel is generated using key points of the point cloud in the voxel and external graphics of the point cloud, wherein the voxel information includes position information and size information of the voxel.
[0040] In the disclosed embodiment, for each divided voxel, the point cloud data contained in the voxel can be determined, and then the real voxel information of the voxel can be determined based on the point cloud data contained in the voxel, the key points of the point cloud in the voxel and the external graphics of the point cloud, wherein the real voxel information includes the position information of the voxel and the size information of the voxel.
[0041] The key point of the intra-voxel point cloud may be the centroid of the intra-voxel point cloud, and the circumscribed figure of the intra-voxel point cloud may be the minimum circumscribed cuboid of the intra-voxel point cloud.
[0042] The actual position information and size information of the voxel can be represented by different parameters, which will be described below with examples.
[0043] Exemplarily, the position information of a voxel can be represented by the coordinates corresponding to the centroid of the point cloud within the voxel, and the size information of the voxel can be represented by the coordinates of each vertex of the minimum circumscribed cuboid of the point cloud within the voxel.
[0044] Exemplarily, the position information of a voxel can be represented by the offset between the coordinates of the center point of the voxel and the coordinates corresponding to the center of mass of the point cloud within the voxel, and the size information of the voxel can be represented by the length, width and height of the minimum circumscribed cuboid of the point cloud within the voxel.
[0045] The method for acquiring voxel information in a three-dimensional space of the disclosed embodiment converts the acquired point cloud data into a three-dimensional coordinate system, and voxelizes the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels, and then generates voxel information corresponding to each voxel according to the point cloud data contained in each voxel in the plurality of voxels, and the voxel information includes the position information and size information of the voxel. By adopting the above technical solution, after the three-dimensional space is divided into a plurality of voxels of fixed size, the position information and size information corresponding to each voxel are further determined as the real voxel information of the voxel according to the point cloud data contained in each voxel, thereby realizing the calculation of the real position and real size of the voxel according to the point cloud data, so that the sizes of different voxels can be different, and accurate voxel position and voxel size can be obtained, which is conducive to improving the representation accuracy of the position and size of obstacles, and improving the accuracy of obstacle recognition.
[0046] In an optional embodiment of the present disclosure, Figure 2 As shown, in Figure 1 Based on the illustrated embodiment, step 103 may include the following sub-steps:
[0047] Step 201 : determining a non-empty voxel containing at least one point from the plurality of voxels according to the position of each point in the point cloud data.
[0048] In the embodiment of the present disclosure, after the three-dimensional space is divided into multiple voxels, it is possible to determine whether each voxel contains a point or a point cloud based on the position of each point in the point cloud data, that is, the coordinate value contained in each point, and filter out voxels containing at least one point from the multiple voxels. In the embodiment of the present disclosure, a voxel containing at least one point is called a non-empty voxel.
[0049] In an optional implementation of the present disclosure, non-empty voxels and empty voxels containing no points may be marked separately to facilitate identification of whether there is an object in the voxel.
[0050] Exemplarily, a non-empty voxel containing at least one point may be assigned a value of 1, indicating that the voxel is occupied and there is an object in the voxel; an empty voxel containing no point may be assigned a value of 0, indicating that the voxel is not occupied and there is no object in the voxel.
[0051] Step 202 : According to at least one point in the non-empty voxel, determine the centroid of the point cloud in the non-empty voxel as the key point based on a centroid calculation rule.
[0052] Among them, the centroid calculation rule can be a preset rule for determining the centroid of the point cloud in a non-empty voxel. If there is only one point in the non-empty voxel, the point can be determined as the centroid, and the coordinates of the point are the coordinates of the centroid; if there are multiple points in the non-empty voxel, the centroid of the point cloud in the non-empty voxel and its corresponding coordinates can be calculated according to the coordinate values of each point in the non-empty voxel, the mass of each point and other information by the currently commonly used method of determining the centroid of the point cloud. The coordinates of the centroid can represent the position of the centroid, that is, the position coordinates.
[0053] In the embodiment of the present disclosure, for any non-empty voxel, the center of mass of the point cloud in the non-empty voxel can be determined based on all points contained in the non-empty voxel (called a point cloud) and based on the center of mass calculation rule, and the center of mass is used as the key point of the point cloud in the non-empty voxel.
[0054] Step 203: Determine the position information of the non-empty voxel according to the key point based on a preset position determination rule.
[0055] In the disclosed embodiment, for each non-empty voxel screened out, the position information corresponding to each non-empty voxel can be determined according to the key points of the point cloud in the non-empty voxel and based on a preset position determination rule.
[0056] In an optional implementation of the present disclosure, the position determination rule includes: determining the position coordinates corresponding to the key point as the position information of the non-empty voxel. Thus, in the embodiment of the present disclosure, for any non-empty voxel, when determining the position information of the non-empty voxel based on the key point and the preset position determination rule, the position coordinates of the determined key point can be directly determined as the position information corresponding to the non-empty voxel.
[0057] Since the key point of the point cloud in a non-empty voxel is the centroid of the point cloud, the centroid of the point cloud represents the average position of the mass distribution of the point cloud, and the point cloud describes obstacles in geographic space, in the embodiments of the present disclosure, the centroid of the point cloud can be used to characterize the true position of the obstacle. Since the general obstacle detection algorithm in three-dimensional space divides the three-dimensional space into voxels to identify obstacles, in the embodiments of the present disclosure, in order to determine the true position of the voxel, the coordinates of the centroid of the point cloud in the voxel (i.e., the key point) can be used as the position information of the voxel.
[0058] As a possible implementation method, the position determination rule includes: determining the coordinate offset of the center point of the non-empty voxel relative to the key point as the position information of the non-empty voxel. Thus, in the embodiment of the present disclosure, for any non-empty voxel, when determining the position information of the non-empty voxel based on the key point and the preset position determination rule, the first coordinate of the center point of the non-empty voxel can be first obtained, and then the coordinate offset of the center point of the non-empty voxel relative to the key point of the point cloud in the non-empty voxel can be determined based on the first coordinate and the second coordinate corresponding to the key point of the point cloud in the non-empty voxel, wherein the coordinate offset includes the offset corresponding to each coordinate axis in the three-dimensional coordinate system, and then the first coordinate of the center point of the non-empty voxel and the coordinate offset of the center point relative to the key point of the point cloud in the non-empty voxel are determined as the position information of the non-empty voxel.
[0059] It can be understood that after the spatial range of the three-dimensional space is divided into a plurality of voxels of the same size according to a fixed preset size, the coordinates of the center point of each voxel can be determined. For the convenience of description and to facilitate the distinction from the coordinates of the key points of the point cloud in the non-empty voxel, in the embodiment of the present disclosure, the coordinates corresponding to the center point of the non-empty voxel are referred to as the first coordinates, and the coordinates corresponding to the key points of the point cloud in the non-empty voxel are referred to as the second coordinates.
[0060] In the embodiment of the present disclosure, when determining the position information of each non-empty voxel, the coordinate offset of the center point of the non-empty voxel relative to the key point of the point cloud within the non-empty voxel can be calculated based on the first coordinate corresponding to the center point of the non-empty voxel and the second coordinate corresponding to the key point of the point cloud within the non-empty voxel, wherein the coordinate offset includes the offset of the center point relative to the key point on the x, y and z axes of the three-dimensional coordinate system, respectively, and the offset can be expressed by the coordinate difference between the center point and the key point on the same coordinate axis.
[0061] For example, assuming that the first coordinate of the center point of a non-empty voxel is (x 1 ,y 1 ,z 1 ), the second coordinate corresponding to the key point of the point cloud in the non-empty voxel is (x 2 ,y 2 ,z 2 ), then the coordinate offset of the center point of the non-empty voxel relative to the key point of the point cloud can be recorded as (dx, dy, dz), where dx = x 1 -x 2 ,dy=y 1 -y 2 , dz=z 1 -z 2 .
[0062] It can be understood that when a non-empty voxel includes only one point, the coordinates of the point can be regarded as the second coordinates of the key point, and the coordinate offset of the center point of the non-empty voxel relative to the point can be regarded as the coordinate offset of the center point of the non-empty voxel relative to the key point.
[0063] For example, assuming that the first coordinate of the center point of a non-empty voxel is (x 1 ,y 1 ,z 1 ), the non-empty voxel contains only one point, the coordinates of which are (x 3 ,y 3 ,z 3 ), then the coordinate offset of the center point of the non-empty voxel relative to the key point of the point cloud (i.e., the point) can be recorded as (dx, dy, dz), where dx = x 1 -x 3 ,dy=y 1 -y 3 , dz=z 1 -z 3 .
[0064] After that, after determining the coordinate offset of the center point of the non-empty voxel relative to the centroid of the key point, the first coordinate corresponding to the center point and the determined coordinate offset can be determined as the position information of the non-empty voxel.
[0065] For example, the position information of non-empty voxels can be expressed as (x 1 ,y 1 ,z 1 ,dx,dy,dz), where (x 1 ,y 1 ,z 1 ) represents the coordinates of the center point of the non-empty voxel, and (dx, dy, dz) represents the coordinate offset of the center point of the non-empty voxel relative to the key point of the point cloud within the non-empty voxel.
[0066] In the embodiment of the present disclosure, the center of mass of the point cloud in the non-empty voxel is determined based on at least one point in the non-empty voxel, and the position information of the non-empty voxel is determined based on the center of mass. Thus, the true position of the voxel is determined according to the position of the center of mass of the point cloud in the non-empty voxel, which can improve the accuracy of the voxel position and make the voxel representation of the obstacle position more accurate.
[0067] Step 204: Determine the size information of the non-empty voxel using the circumscribed graph corresponding to at least one point in the non-empty voxel.
[0068] The circumscribed figure refers to the circumscribed figure of all points contained in the non-empty voxel, and the circumscribed figure may be, for example, a minimum circumscribed cuboid.
[0069] In an optional embodiment of the present disclosure, for any non-empty voxel, when determining the size information of the non-empty voxel using the circumscribed figure corresponding to at least one point in the non-empty voxel, the minimum circumscribed figure of all the points in the non-empty voxel can be determined first, for example, the minimum circumscribed cuboid of all the points in the non-empty voxel can be determined, and then the coordinates of each vertex of the minimum circumscribed figure can be determined, and then the coordinates of each vertex can be used to characterize the size information of the non-empty voxel.
[0070] In an optional embodiment of the present disclosure, when determining the size information of a non-empty voxel using an external figure corresponding to at least one point in the non-empty voxel, the minimum external cuboid of at least one point in the non-empty voxel can be first determined based on at least one point in the non-empty voxel, and then the size information of the non-empty voxel can be determined based on the length, width and height of the minimum external cuboid.
[0071] Among them, when determining the minimum circumscribed cuboid of at least one point in the non-empty voxel according to at least one point in the non-empty voxel, the currently commonly used method of determining the minimum circumscribed cuboid can be used for implementation, and the present disclosure does not limit the specific implementation method of determining the minimum circumscribed cuboid. It can be understood that the minimum circumscribed cuboid can be a cuboid or a cube. The determined minimum circumscribed rectangle can be represented by the coordinates of each vertex.
[0072] In the embodiment of the present disclosure, when determining the minimum circumscribed cuboid, different methods can be selected to determine the minimum circumscribed cuboid of at least one point in the non-empty voxel according to the different numbers and positions of points contained in the non-empty voxel. The following example is used for exemplary explanation.
[0073] As an example, assuming that a non-empty voxel contains at least two points, and at least two of the at least two points are not on the same plane, the currently commonly used method can be used to determine the minimum circumscribed cuboid of these points.
[0074] As an example, assuming that at least two points contained in a non-empty voxel are on the same plane, the currently commonly used method can be used to determine the minimum circumscribed rectangle of these points, and for another coordinate axis that is not involved in the plane where these points are located, the length on the coordinate axis can be determined based on the preset side length, thereby obtaining a cuboid, and the cuboid is used as the minimum circumscribed cuboid of these points. For example, assuming that multiple points contained in a non-empty voxel are all on the plane yoz, and the preset side length is 0.2, the minimum circumscribed rectangle of these points can be determined based on these points, and the coordinates of each vertex of the minimum circumscribed rectangle can be obtained, and for the x-axis, the coordinates on the x-axis can be determined based on the preset side length of 0.2 to obtain a cuboid. For example, the determined minimum circumscribed rectangle can be used as a face of the cuboid, and the coordinates of the vertex when the length is 0.2 in the positive or negative direction of the x-axis can be determined, and the coordinates of the other four vertices of the cuboid can be obtained, thereby obtaining the coordinates of each vertex on the minimum circumscribed cuboid. For another example, the determined minimum circumscribed rectangle can be used as the mid-section of a cuboid, and the x-coordinate values of the four vertices of the minimum circumscribed rectangle can be increased by 0.1 and decreased by 0.1 respectively, while the y-axis and z-axis coordinates remain unchanged, to obtain eight new coordinate points. The cuboid enclosed by these eight new coordinate points is determined as the minimum circumscribed cuboid of at least two points in a non-empty voxel.
[0075] As an example, assuming that a non-empty voxel contains only one point, a cube containing the point can be determined as the minimum circumscribed cuboid of the point according to a preset side length. Alternatively, a cuboid containing the point can be determined as the minimum circumscribed cuboid of the point according to a preset length, a preset width, and a preset height. Alternatively, the non-empty voxel can also be used as the minimum circumscribed cuboid.
[0076] Next, after determining the minimum circumscribed cuboid of at least one point in the non-empty voxel, the length, width and height of the minimum circumscribed cuboid are also determined. Further, the size information of the non-empty voxel can be determined based on the length, width and height of the minimum circumscribed cuboid.
[0077] As a possible implementation manner, when determining the size information of the non-empty voxel according to the length, width and height of the minimum circumscribed cuboid, the length, width and height of the minimum circumscribed cuboid may be directly used as the size information of the non-empty voxel.
[0078] As a possible implementation method, when determining the size information of non-empty voxels based on the length, width and height of the minimum circumscribed cuboid, each side length of the minimum circumscribed cuboid can be compared with the preset length, wherein each side length includes the lengths corresponding to the length, width and height of the minimum circumscribed cuboid, and the preset length can be set according to actual needs, such as setting the preset length to 0.1; when there is a side length less than the preset length in each side length, the side length less than the preset length is updated to the preset length, and then based on each updated side length, the size information of the non-empty voxel is determined.
[0079] That is to say, in the embodiment of the present disclosure, for the determined minimum circumscribed cuboid, the length, width and height of the minimum circumscribed cuboid can be compared with the preset length respectively. If at least one side length of the length, width and height is less than the preset length, the side length less than the preset length is replaced with the preset length, and then the updated side length is used as the size information of the non-empty voxel. Thus, each side length in the size information of the non-empty voxel is not less than the preset length, so as to avoid the final determined non-empty voxel size being too small, resulting in a large number of holes, making the voxel discontinuous, thereby affecting the detection result of the obstacle.
[0080] Exemplarily, in the disclosed embodiment, the size information of a non-empty voxel may be expressed as (dl, dw, dh), where dl represents the length of the minimum bounding rectangle, dw represents the width of the minimum bounding rectangle, and dh represents the height of the minimum bounding rectangle.
[0081] For example, assuming that the length, width, and height of the minimum circumscribed cuboid determined according to the points in a non-empty voxel are 0.2, 0.1, and 0.08, respectively, the size information of the non-empty voxel can be determined to be (0.2, 0.1, 0.08).
[0082] For another example, assuming the preset length is 0.1, the length, width, and height of the minimum circumscribed cuboid determined based on the points in a non-empty voxel are 0.2, 0.1, and 0.08 respectively. It can be determined that the height of the minimum circumscribed cuboid is less than the preset length, and the height of the minimum circumscribed cuboid is updated to 0.1. The final size information of the non-empty voxel is (0.2, 0.1, 0.1).
[0083] In the embodiment of the present disclosure, the minimum circumscribed cuboid of at least one point in the non-empty voxel is determined based on at least one point in the non-empty voxel, and the size information of the non-empty voxel is determined based on the length, width and height of the minimum circumscribed cuboid. Thus, it is possible to determine the true size of the voxel based on the position of the point cloud contained in the non-empty voxel, thereby improving the accuracy of the voxel size and making the voxel representation of the obstacle contour more precise.
[0084] In an optional embodiment of the present disclosure, when a non-empty voxel contains only one point, it can also be determined that the length, width and height of the minimum circumscribed cuboid of the point are all 0. In this case, the above-mentioned method of comparing the length, width and height of the minimum circumscribed cuboid with the preset length can be adopted. When there is a side length less than the preset length among the length, width and height, the side length less than the preset length is updated to the preset length, and then the size information of the non-empty voxel is determined based on each updated side length, so as to determine the size information of the non-empty voxel when the non-empty voxel contains only one point.
[0085] In the disclosed embodiment, when a non-empty voxel contains only one point, the length, width and height of the smallest circumscribed cuboid of the point are all 0, and the preset length is a number greater than 0. The length, width and height of the smallest circumscribed cuboid are obviously smaller than the preset length, so the preset length can be determined as the size information of the non-empty voxel containing one point. Assuming the preset length is 0.1, for a non-empty voxel containing only one point, (0.1, 0.1, 0.1) can be used as the real size information of the non-empty voxel.
[0086] It should be noted that in the embodiment of the present disclosure, there is no particular order for executing step 203 and step 204. The two can be executed simultaneously or one after the other. The present disclosure only takes the execution of step 204 after step 203 as an example, which cannot be used as a limitation of the present disclosure.
[0087] Step 205: Generate voxel information corresponding to the non-empty voxel based on the position information and the size information.
[0088] In the disclosed embodiment, for each non-empty voxel, after the position information and size information of the non-empty voxel are determined, the voxel information of the non-empty voxel can be generated based on the position information and size information of the same non-empty voxel.
[0089] For example, assuming that the position information of a non-empty voxel is represented by the coordinates corresponding to the key points of the point cloud in the non-empty voxel, and the size information of the non-empty voxel is represented by the length, width and height of the smallest circumscribed cuboid of all point clouds in the non-empty voxel, the voxel information of the non-empty voxel can be expressed as (x 0 ,y 0 ,z 0 ,dl,dw,dh), where (x 0 ,y 0 ,z 0 ) represents the coordinates corresponding to the key points of the point cloud in the non-empty voxel, dl represents the length of the minimum enclosing rectangle, dw represents the width of the minimum enclosing rectangle, and dh represents the height of the minimum enclosing rectangle.
[0090] For example, assuming that the position information of a non-empty voxel is represented by the coordinates of the center point of the non-empty voxel and the coordinate offset of the center point relative to the key point of the point cloud in the non-empty voxel, and the size information of the non-empty voxel is represented by the length, width and height of the minimum circumscribed cuboid of all point clouds in the non-empty voxel, the voxel information of the non-empty voxel can be expressed as (x 1 ,y 1 ,z 1 ,dx,dy,dz,dl,dw,dh), where (x 1 ,y 1 ,z 1 ) represents the coordinates corresponding to the center point of the non-empty voxel, (dx, dy, dz) represents the coordinate offset of the center point of the non-empty voxel relative to the key point of the point cloud in the non-empty voxel, dl represents the length of the minimum enclosing rectangle, dw represents the width of the minimum enclosing rectangle, and dh represents the height of the minimum enclosing rectangle.
[0091] The method for acquiring voxel information in three-dimensional space of the embodiment of the present disclosure determines a non-empty voxel containing at least one point from multiple voxels according to the position of each point in the point cloud data, and determines the centroid of the point cloud in the non-empty voxel as a key point based on a centroid calculation rule according to at least one point in the non-empty voxel, and determines the position information of the non-empty voxel based on the determined key point and a preset position determination rule, and determines the size information of the non-empty voxel using an external figure corresponding to at least one point in the non-empty voxel, and then generates voxel information corresponding to the non-empty voxel based on the position information and the size information, thereby filtering out occupied non-empty voxels from the divided multiple voxels, and determining the corresponding voxel information only for the non-empty voxels, which can reduce the amount of calculation, and the position information and size information of the non-empty voxel are determined according to at least one point in the non-empty voxel, which realizes the dynamic generation of voxel information according to the points in the voxel, so that the position and size of the obstacle are represented more precisely, which is conducive to improving the accuracy of obstacle detection.
[0092] In an optional embodiment of the present disclosure, when converting the acquired lidar point cloud data into a three-dimensional coordinate system, multiple frames of point cloud data collected by the lidar for the same obstacle can be first obtained, and then the multiple frames of point cloud data can be converted into the same three-dimensional coordinate system. During the conversion, if the same three-dimensional coordinate position corresponds to multiple points in the multiple frames of point cloud data, the multiple points are deduplicated.
[0093] Usually, when a laser radar collects point cloud data of an obstacle, a frame of point cloud of the obstacle is obtained at one time. It is difficult for one frame of point cloud to fully describe all the information of the entire obstacle. Therefore, in the embodiment of the present disclosure, multiple frames of point cloud data collected by the laser radar for the same obstacle at different times can be obtained, and then the obtained multiple frames of point cloud data can be spliced. Splicing refers to converting multiple frames of point cloud data into the same three-dimensional coordinate system. It can be understood that for the same three-dimensional coordinate position in three-dimensional space, more than one frame of point cloud data may contain the point corresponding to the position. In this case, when splicing, the multiple points corresponding to the position can be deduplicated, and only one point is retained to be displayed in the three-dimensional coordinate system. Alternatively, in the case where a three-dimensional coordinate position corresponds to multiple points, the data of multiple points corresponding to the same three-dimensional coordinate position can also be averaged, and the obtained average value is used as the information of the point corresponding to the three-dimensional coordinate position in the three-dimensional coordinate system.
[0094] In the embodiment of the present disclosure, by acquiring multiple frames of point cloud data and converting the multiple frames of point cloud data into the same coordinate system, a denser point cloud can be obtained, so that the point cloud data displayed in the three-dimensional coordinate system can better reflect all the information of the real obstacles.
[0095] Figure 3 FIG. 2 is a schematic diagram showing a process of obtaining voxel information in a three-dimensional space in a specific embodiment of the present disclosure. Figure 3 As shown, firstly, the laser radar point cloud data is obtained, and the multi-frame point cloud data is spliced to convert the multi-frame point cloud data into the same three-dimensional coordinate system. Then, the three-dimensional space in the three-dimensional coordinate system is voxelized to obtain multiple voxels, and for each voxel, it is determined whether the voxel is occupied according to the point cloud position, and the unoccupied empty voxel (marked with 0) and the occupied non-empty voxel (marked with 1) are identified. Then, for the non-empty voxel, the voxel information corresponding to the non-empty voxel can be calculated according to at least one point cloud in the non-empty voxel, wherein the voxel information includes position information and size information. When calculating the position information, the centroid of the point cloud in the non-empty voxel can be calculated first, and the coordinate offset of the center point of the non-empty voxel relative to the centroid of the point cloud can be determined, and the actual position of the non-empty voxel can be characterized based on the coordinates of the center point of the non-empty voxel and the determined coordinate offset. When calculating the size information, the minimum circumscribed cuboid of the point cloud in the non-empty voxel can be calculated first, and then the actual size of the non-empty voxel can be determined based on the length, width and height of the minimum circumscribed cuboid. By adopting the solution disclosed in the present invention, the real position and size of the voxel can be dynamically determined. Compared with the currently commonly used method of fixing the voxel size, the dynamic voxel information representation can more accurately represent the real position and outline of the obstacle.
[0096] In order to implement the above embodiment, the present disclosure also provides a device for acquiring voxel information in a three-dimensional space.
[0097] Figure 4 A schematic diagram of the structure of a device for acquiring voxel information in a three-dimensional space provided in one embodiment of the present disclosure. The device can be implemented using software and / or hardware and can be integrated on a computer device, which can be an electronic device such as a computer or a server.
[0098] like Figure 4 As shown, the device 40 for acquiring voxel information in a three-dimensional space provided by the embodiment of the present disclosure may include: a conversion module 401, a segmentation module 402 and a generation module 403, wherein:
[0099] A conversion module 401 is used to convert the acquired point cloud data into a three-dimensional coordinate system;
[0100] A segmentation module 402 is used to voxelize the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels;
[0101] The generation module 403 is used to generate voxel information corresponding to each voxel according to the point cloud data contained in each voxel of the multiple voxels, using the key points of the point cloud in the voxel and the external graphics of the point cloud, and the voxel information includes the position information and size information of the voxel.
[0102] Optionally, the generating module 403 includes:
[0103] A first determining unit, configured to determine, from the plurality of voxels, a non-empty voxel containing at least one point according to the position of each point in the point cloud data;
[0104] A second determining unit is used to determine the centroid of the point cloud in the non-empty voxel as the key point based on a centroid calculation rule according to at least one point in the non-empty voxel;
[0105] A third determining unit, configured to determine the position information of the non-empty voxel according to the key point and based on a preset position determination rule;
[0106] A fourth determining unit, configured to determine size information of the non-empty voxel by using a circumscribed graph corresponding to at least one point in the non-empty voxel;
[0107] A generating unit is used to generate voxel information corresponding to the non-empty voxel based on the position information and the size information.
[0108] Optionally, the position determination rule includes: determining the position coordinates corresponding to the key point as the position information of the non-empty voxel.
[0109] Optionally, the position determination rule includes: determining a coordinate offset of a center point of the non-empty voxel relative to the key point as the position information of the non-empty voxel; and the third determination unit is further configured to:
[0110] Obtaining a first coordinate of a center point of the non-empty voxel;
[0111] Determine, according to the first coordinate and the second coordinate corresponding to the key point, a coordinate offset of the center point relative to the key point, wherein the coordinate offset includes an offset corresponding to each coordinate axis in the three-dimensional coordinate system;
[0112] The first coordinate and the coordinate offset are determined as the position information of the non-empty voxel.
[0113] Optionally, the fourth determining unit is further configured to:
[0114] Determine, according to at least one point in the non-empty voxel, a minimum circumscribed cuboid of the at least one point in the non-empty voxel;
[0115] The size information of the non-empty voxel is determined according to the length, width and height of the minimum circumscribed cuboid.
[0116] Optionally, the fourth determining unit is further configured to:
[0117] When the non-empty voxel contains a point, it is determined that the length, width and height of the minimum circumscribed cuboid are all 0.
[0118] Optionally, the fourth determining unit is further configured to:
[0119] Compare each side length of the minimum circumscribed cuboid with a preset length, wherein each side length includes the lengths corresponding to the length, width, and height of the minimum circumscribed cuboid;
[0120] When there is a side length shorter than the preset length among each side length, updating the side length shorter than the preset length to the preset length;
[0121] Based on each updated edge length, the size information of the non-empty voxel is determined.
[0122] Optionally, the conversion module 401 is further configured to:
[0123] Obtain multi-frame point cloud data collected by the laser radar for the same obstacle;
[0124] The multi-frame point cloud data are converted into the same three-dimensional coordinate system, wherein, when performing the conversion, if the same three-dimensional coordinate position corresponds to multiple points in the multi-frame point cloud data, deduplication processing is performed on the multiple points.
[0125] The device for acquiring voxel information in a three-dimensional space that can be configured on a computer device provided in the embodiments of the present disclosure can execute any method for acquiring voxel information in a three-dimensional space applied to a computer device provided in the embodiments of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method. For the contents not fully described in the embodiments of the device of the present disclosure, reference can be made to the description in any method embodiment of the present disclosure.
[0126] The embodiments of the present disclosure also provide a computer device, including a processor and a memory; the processor calls the program or instructions stored in the memory to execute the steps of each embodiment of the method for obtaining voxel information in a three-dimensional space as described in any of the aforementioned embodiments. To avoid repeated description, they will not be repeated here.
[0127] The embodiments of the present disclosure also provide a computer-readable storage medium, which is non-transitory and stores programs or instructions. The programs or instructions enable a computer to execute the steps of each embodiment of the method for acquiring voxel information in a three-dimensional space as described in any of the aforementioned embodiments. To avoid repeated description, they will not be repeated here.
[0128] The embodiments of the present disclosure further provide a computer program product, which is used to execute the steps of each embodiment of the method for acquiring voxel information in a three-dimensional space as described in any of the aforementioned embodiments.
[0129] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0130] The above description is only a specific embodiment of the present disclosure, so that those skilled in the art can understand or implement the present disclosure. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure will not be limited to the embodiments described herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for acquiring voxel information in a three-dimensional space, characterized in that: The method comprises: Convert the acquired point cloud data into a three-dimensional coordinate system; voxelize the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels; According to the point cloud data contained in each voxel of the plurality of voxels, voxel information corresponding to each voxel is generated by using key points of the point cloud in the voxel and circumscribed graphics of the point cloud, wherein the voxel information includes position information and size information of the voxel.
2. The method according to claim 1, characterized in that The step of generating voxel information corresponding to each voxel according to the point cloud data contained in each voxel of the plurality of voxels and using key points of the point cloud in the voxel and external graphics of the point cloud comprises: According to the position of each point in the point cloud data, determining a non-empty voxel containing at least one point from the plurality of voxels; According to at least one point in the non-empty voxel, determining the centroid of the point cloud in the non-empty voxel as the key point based on a centroid calculation rule; According to the key point, based on a preset position determination rule, determining the position information of the non-empty voxel; Determine the size information of the non-empty voxel by using the circumscribed figure corresponding to at least one point in the non-empty voxel; Based on the position information and the size information, voxel information corresponding to the non-empty voxel is generated.
3. The method according to claim 2, characterized in that The position determination rule includes: The position coordinates corresponding to the key points are determined as the position information of the non-empty voxels.
4. The method according to claim 2, characterized in that: The position determination rule includes: Determine the coordinate offset of the center point of the non-empty voxel relative to the key point as the position information of the non-empty voxel; The determining, according to the key point and based on a preset position determination rule, the position information of the non-empty voxel includes: Obtaining a first coordinate of a center point of the non-empty voxel; Determine, according to the first coordinate and the second coordinate corresponding to the key point, a coordinate offset of the center point relative to the key point, wherein the coordinate offset includes an offset corresponding to each coordinate axis in the three-dimensional coordinate system; The first coordinate and the coordinate offset are determined as the position information of the non-empty voxel.
5. The method according to claim 2, characterized in that: The determining the size information of the non-empty voxel by using the circumscribed graph corresponding to at least one point in the non-empty voxel comprises: Determine, according to at least one point in the non-empty voxel, a minimum circumscribed cuboid of the at least one point in the non-empty voxel; The size information of the non-empty voxel is determined according to the length, width and height of the minimum circumscribed cuboid.
6. The method according to claim 5, characterized in that The method further comprises: When the non-empty voxel contains a point, it is determined that the length, width and height of the minimum circumscribed cuboid are all 0.
7. The method according to claim 6, characterized in that The determining the size information of the non-empty voxel according to the length, width and height of the minimum circumscribed cuboid includes: Compare each side length of the minimum circumscribed cuboid with a preset length, wherein each side length includes the lengths corresponding to the length, width, and height of the minimum circumscribed cuboid; When there is a side length shorter than the preset length among each side length, updating the side length shorter than the preset length to the preset length; Based on each updated edge length, the size information of the non-empty voxel is determined.
8. The method according to any one of claims 1 to 7, characterized in that: The step of converting the acquired point cloud data into a three-dimensional coordinate system includes: Obtain multi-frame point cloud data collected by the laser radar for the same obstacle; The multi-frame point cloud data are converted into the same three-dimensional coordinate system, wherein, when performing the conversion, if the same three-dimensional coordinate position corresponds to multiple points in the multi-frame point cloud data, deduplication processing is performed on the multiple points.
9. A device for acquiring voxel information in three-dimensional space, characterized in that: The device comprises: A conversion module, used to convert the acquired point cloud data into a three-dimensional coordinate system; A segmentation module, used for voxelizing the three-dimensional space in the three-dimensional coordinate system according to a preset size to obtain a plurality of voxels; A generation module is used to generate voxel information corresponding to each voxel according to the point cloud data contained in each voxel of the multiple voxels, using the key points of the point cloud in the voxel and the external graphics of the point cloud, wherein the voxel information includes the position information and size information of the voxel.
10. A computer device, characterized in that: include: Processor and memory; The processor is used to execute the method for acquiring voxel information in a three-dimensional space as described in any one of claims 1 to 8 by calling the program or instruction stored in the memory.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program or an instruction, and the program or the instruction enables a computer to execute the method for acquiring voxel information in a three-dimensional space according to any one of claims 1 to 8.
