A method and device for field endpoint cloud segmentation
By determining the probability of movement and static in the voxel map based on the number of laser points mapped to the point cloud frame, the problem of large amount of calculation and low accuracy of point cloud dynamic and static segmentation in the prior art is solved, and efficient and accurate dynamic and static segmentation is achieved.
Patent Information
- Application Number
- CN202211315649.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-26
- Publication Date
- 2025-06-24
- Estimated Expiration
- 2042-10-26
AI Technical Summary
The prior art has a large amount of calculation and low accuracy when point cloud dynamic and static segmentation, and it is necessary to model static scenes in advance to build a map.
By determining the dynamic and static probability based on the target point cloud frame and the number of laser points mapped to each voxel in the voxel map, the dynamic and static probability of the voxel is determined based on the dynamic and static probability of the multi-frame point cloud.
The calculation amount of point cloud dynamic and static segmentation is reduced, the accuracy of segmentation is improved, and the pre-modeling of static scenes is avoided, and real-time dynamic and static segmentation is realized.
Smart Images

Figure CN116091507B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of lidar, and in particular, to a method and device for segmenting field endpoint clouds. Background Art
[0002] The three-dimensional point cloud collected by lidar can capture the geometric information of the surrounding complex environment. Therefore, lidar is widely used in vehicle driving fields such as autonomous driving, assisted driving, and driverless driving, and can achieve perception tasks such as target detection and automatic obstacle avoidance. According to different targets of the reflected laser, the three-dimensional point cloud collected by lidar usually includes static point clouds and dynamic point clouds. Among them, the static point cloud can be the point cloud obtained by scanning stationary objects such as the ground and curbs, and the dynamic point cloud can be the point cloud obtained by scanning dynamic objects such as vehicles in motion and pedestrians walking. When performing perception tasks, it is necessary to segment the static point cloud and the dynamic point cloud from the three-dimensional point cloud.
[0003] Currently, when performing static and dynamic segmentation of point clouds, it is necessary to pre-model the scene where the lidar is located to obtain a map that only contains the static scene. So that when performing static and dynamic segmentation subsequently, the collected point cloud can be compared with the map, so as to segment the static point cloud mapped on the static scene, and the remaining point cloud is used as the dynamic point cloud. However, this method requires pre-modeling the static scene to establish a map that only contains the static scene, resulting in a large amount of calculation and low accuracy for this method. Summary of the Invention
[0004] The purpose of the embodiments of the present application is to provide a method and device for segmenting field endpoint clouds to reduce the calculation amount of static and dynamic segmentation of point clouds and improve the accuracy of static and dynamic segmentation of point clouds. The specific technical solutions are as follows:
[0005] In the first aspect of the embodiments of the present application, a method for segmenting field endpoint clouds is provided. The method includes:
[0006] For each voxel included in the voxel map, according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to the voxel, and the number of laser points mapped from each laser point in the comparison point cloud frame to the voxel, determine the static and dynamic probability of the voxel corresponding to the target point cloud frame. The comparison point cloud frame is any point cloud frame other than the target point cloud frame in the point cloud pool;
[0007] According to the static and dynamic probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool, determine the static and dynamic state of the voxel;
[0008] Wherein, the point cloud pool includes multiple frames of point clouds collected by a lidar installed on the roadside; the voxel map includes multiple voxels.
[0009] Optionally, determining the static or dynamic state of the voxel according to the static or dynamic probability of the voxel corresponding to all target point cloud frames in the point cloud pool includes:
[0010] For each voxel included in the voxel map, determining the static probability of the voxel according to the static or dynamic probability of the voxel corresponding to all point cloud frames in the point cloud pool;
[0011] If the static probability of the voxel is greater than a preset threshold, determining that the voxel is in a static state;
[0012] If the static probability of the voxel is less than or equal to the preset threshold, determining that the voxel is in a dynamic state.
[0013] Optionally, for each voxel included in the voxel map, determining the static or dynamic probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the voxel and the number of laser points mapped from each laser point in the comparison point cloud frame in the voxel includes:
[0014] For each voxel included in the voxel map, determining the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the voxel and a preset hyperparameter; wherein, the first saturation probability represents the possibility that the voxel is in a static state at the target point cloud acquisition moment;
[0015] Determining the second saturation probability of the voxel corresponding to the comparison point cloud frame according to the number of laser points mapped from each laser point in the comparison point cloud frame in the voxel and the preset hyperparameter; wherein, the second saturation probability represents the possibility that the voxel is in a static state at the comparison point cloud acquisition moment;
[0016] Determining the static or dynamic probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability.
[0017] Optionally, for each voxel included in the voxel map, determining the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the voxel and a preset hyperparameter includes:
[0018] If the number of laser points mapped from each laser point in the target point cloud frame in the voxel is less than or equal to the preset hyperparameter, taking the ratio of the number of laser points mapped from each laser point in the target point cloud frame in the voxel to the preset hyperparameter as the first saturation probability;
[0019] If the number of laser points mapped from each laser point in the target point cloud frame in the voxel is greater than the preset hyperparameter, determining that the first saturation probability is 1.
[0020] Optionally, determining the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability includes:
[0021] Determining the dynamic and static probability of the voxel corresponding to the target point cloud frame based on the first saturation probability, the second saturation probability, and a preset corresponding relationship.
[0022] Optionally, wherein the preset corresponding relationship is at least obtained by fitting based on the following four specified corresponding relationships:
[0023] When the first saturation probability is 0 and the second saturation probability is 0, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0;
[0024] When the first saturation probability is 0 and the second saturation probability is 1, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0;
[0025] When the first saturation probability is 1 and the second saturation probability is 0, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0;
[0026] When the first saturation probability is 1 and the second saturation probability is 1, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 1.
[0027] Optionally, before determining the dynamic and static probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped to the voxel within the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel within the comparison point cloud frame, the method further includes:
[0028] Obtaining the point cloud frame collected by the lidar;
[0029] Judging whether there is a corresponding dynamic and static state for the voxel within the voxel map;
[0030] If not, adding the point cloud frame to the point cloud pool, and when the number of point cloud frames included in the point cloud pool reaches a preset number, performing the step of determining the dynamic and static probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped to the voxel within the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel within the comparison point cloud frame;
[0031] If so, using the point cloud frame as a point cloud frame to be segmented, and performing point cloud segmentation on the point cloud frame to be segmented based on the dynamic and static states of the voxels included in the voxel map.
[0032] Optionally, before performing point cloud segmentation on the to-be-segmented point cloud frame based on the dynamic and static states of each voxel included in the voxel map, the method further includes:
[0033] In the case of determining that the point cloud pool needs to be updated, adding the to-be-segmented point cloud frame to the point cloud pool, and updating the dynamic and static states of each voxel included in the voxel map based on the updated point cloud pool.
[0034] Optionally, the updating the dynamic and static states of each voxel included in the voxel map based on the updated point cloud pool includes:
[0035] For each voxel included in the voxel map, determine the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to the voxel in the target point cloud frame in the updated point cloud pool and the number of laser points mapped to the voxel in the comparison point cloud frame, where the comparison point cloud frame is any point cloud frame other than the target point cloud frame in the point cloud pool;
[0036] Determine the dynamic and static state of the voxel as the candidate dynamic and static state of the voxel according to the dynamic and static probabilities of the voxel corresponding to all target point cloud frames in the updated point cloud pool;
[0037] If the candidate dynamic and static state of the voxel is the same as the dynamic and static state of the voxel before the update of the voxel map, keep the dynamic and static state of the voxel as the dynamic and static state of the voxel before the update of the voxel map;
[0038] If the dynamic and static states of the voxel are inconsistent before and after the update of the voxel map, update the dynamic and static state of the voxel to the moving state with a preset probability, where the preset probability is greater than 0.5 and less than 1.
[0039] In a second aspect of the embodiments of the present application, a field end point cloud segmentation device is provided, and the device includes:
[0040] A first determination module, configured to determine the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to the voxel in the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel in the comparison point cloud frame for each voxel included in the voxel map, where the comparison point cloud frame is any point cloud frame other than the target point cloud frame in the point cloud pool;
[0041] A second determination module, configured to determine the dynamic and static state of the voxel according to the dynamic and static probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool;
[0042] Wherein, the point cloud pool includes multiple frames of point clouds collected by a lidar installed on the roadside; the voxel map includes multiple voxels.
[0043] Optionally, the second determination module is specifically configured to:
[0044] For each voxel included in the voxel map, determine the stationary probability of the voxel according to the stationary and moving probabilities of the voxel corresponding to all point cloud frames in the point cloud pool.
[0045] If the stationary probability of the voxel is greater than a preset threshold, determine that the voxel is in a stationary state.
[0046] If the stationary probability of the voxel is less than or equal to the preset threshold, determine that the voxel is in a moving state.
[0047] Optionally, the first determination module is specifically configured to:
[0048] For each voxel included in the voxel map, determine the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame to the voxel and a preset hyperparameter; wherein, the first saturation probability represents the possibility that the voxel is in a stationary state at the target point cloud acquisition moment.
[0049] According to the number of laser points mapped from each laser point in the comparison point cloud frame to the voxel and the preset hyperparameter, determine the second saturation probability of the voxel corresponding to the comparison point cloud frame; wherein, the second saturation probability represents the possibility that the voxel is in a stationary state at the comparison point cloud acquisition moment.
[0050] Determine the stationary and moving probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability.
[0051] Optionally, the first determination module is specifically configured to:
[0052] If the number of laser points mapped from each laser point in the target point cloud frame to the voxel is less than or equal to the preset hyperparameter, use the ratio of the number of laser points mapped from each laser point in the target point cloud frame to the voxel to the preset hyperparameter as the first saturation probability.
[0053] If the number of laser points mapped from each laser point in the target point cloud frame to the voxel is greater than the preset hyperparameter, determine that the first saturation probability is 1.
[0054] Optionally, the first determination module is specifically configured to:
[0055] Based on the first saturation probability, the second saturation probability and a preset correspondence, determine the stationary and moving probability of the voxel corresponding to the target point cloud frame.
[0056] Optionally, wherein the preset correspondence is at least obtained by fitting based on the following four specified correspondences:
[0057] When the first saturation probability is 0 and the second saturation probability is 0, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0;
[0058] When the first saturation probability is 0 and the second saturation probability is 1, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0;
[0059] When the first saturation probability is 1 and the second saturation probability is 0, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0;
[0060] When the first saturation probability is 1 and the second saturation probability is 1, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 1.
[0061] Optionally, the device further includes:
[0062] An acquisition module, configured to acquire the point cloud frame collected by the lidar before determining the dynamic and static probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped to the voxel in the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel in the comparison point cloud frame;
[0063] A judgment module, configured to judge whether there is a corresponding dynamic and static state for the voxel in the voxel map;
[0064] An addition module, configured to, if the judgment result of the judgment module is non-existence, add the point cloud frame to the point cloud pool, and when the number of point cloud frames included in the point cloud pool reaches a preset number, execute the step of determining the dynamic and static probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped to the voxel in the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel in the comparison point cloud frame;
[0065] A segmentation module, configured to, if the judgment result of the judgment module is existence, use the point cloud frame as a point cloud frame to be segmented, and perform point cloud segmentation on the point cloud frame to be segmented based on the dynamic and static states of the voxels included in the voxel map.
[0066] Optionally, the device further includes:
[0067] An update module, configured to, before performing point cloud segmentation on the point cloud frame to be segmented based on the dynamic and static states of the voxels included in the voxel map, add the point cloud frame to be segmented to the point cloud pool in the case of determining that the point cloud pool needs to be updated, and update the dynamic and static states of the voxels included in the voxel map based on the updated point cloud pool.
[0068] Optionally, the update module is specifically configured to:
[0069] For each voxel included in the voxel map, determine the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the updated point cloud pool to this voxel, and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel;
[0070] Determine the dynamic and static state of this voxel according to the dynamic and static probabilities of this voxel corresponding to all target point cloud frames in the updated point cloud pool, as the candidate dynamic and static state of this voxel;
[0071] If the candidate dynamic and static state of this voxel is the same as the dynamic and static state of this voxel before the update of the voxel map, then keep the dynamic and static state of this voxel as the dynamic and static state of this voxel before the update of the voxel map;
[0072] If the dynamic and static states of this voxel are inconsistent before and after the update of the voxel map, then update the dynamic and static state of this voxel to the moving state with a preset probability, and the preset probability is greater than 0.5 and less than 1.
[0073] In a third aspect of the embodiments of the present application, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus. Among them, the processor, the communication interface, and the memory complete communication with each other through the communication bus;
[0074] The memory is used to store a computer program;
[0075] The processor is configured to implement the steps of the field endpoint cloud segmentation method described in any item of the first aspect when executing the program stored on the memory.
[0076] In a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the field endpoint cloud segmentation method described in any item of the first aspect are implemented.
[0077] In a fifth aspect of the embodiments of the present application, a computer program product including instructions is provided. When it runs on a computer, it causes the computer to execute the field endpoint cloud segmentation method described in any of the above.
[0078] Advantages of the embodiments of the present application:
[0079] The method, device, electronic device and medium for field endpoint cloud segmentation provided by the embodiments of the present application can determine the dynamic and static probability of a voxel corresponding to a target point cloud frame according to the number of laser points mapped to each voxel of the voxel map by the target point cloud frame and the comparison point cloud frame in the point cloud pool. Then, according to the dynamic and static probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool, the dynamic and static state of the voxel is determined. Since the embodiments of the present application determine the dynamic and static state of the voxel, during dynamic and static segmentation, the dynamic and static state of the voxel where each laser point in the point cloud frame is located can be used as the dynamic and static state of the laser point, thereby realizing the dynamic and static segmentation of the point cloud frame. Therefore, when determining the dynamic and static state of the voxel, the embodiments of the present application can be determined according to the change in the number of laser points projected into the voxel by the target point cloud and the comparison point cloud. This method does not require modeling of the static scene and does not require pre-establishing a map containing only the static scene. Therefore, the computational complexity of point cloud dynamic and static segmentation is reduced, and the accuracy of point cloud dynamic and static segmentation is improved.
[0080] Of course, implementing any product or method of the present application does not necessarily require achieving all the above advantages simultaneously. BRIEF DESCRIPTION OF THE DRAWINGS
[0081] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the following will briefly introduce the drawings required for use in the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present application. For those of ordinary skill in the art, other embodiments can also be obtained based on these drawings.
[0082] Figure 1 It is the first flowchart of the method for field endpoint cloud segmentation provided by the embodiments of the present application;
[0083] Figure 2 It is the second flowchart of the method for field endpoint cloud segmentation provided by the embodiments of the present application;
[0084] Figure 3 It is the third flowchart of the method for field endpoint cloud segmentation provided by the embodiments of the present application;
[0085] Figure 4 It is the fourth flowchart of the method for field endpoint cloud segmentation provided by the embodiments of the present application;
[0086] Figure 5 It is the fifth flowchart of the method for field endpoint cloud segmentation provided by the embodiments of the present application;
[0087] Figure 6 It is the structural schematic diagram of a field endpoint cloud segmentation device provided by the embodiments of the present application;
[0088] Figure 7 It is the structural schematic diagram of an electronic device provided by the embodiments of the present application. Detailed implementation manners
[0089] Next, the technical solutions in the embodiments of the present application will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art based on the present application belong to the scope of protection of the present application.
[0090] To reduce the computational complexity of point cloud dynamic and static segmentation, an embodiment of the present application provides a field endpoint cloud segmentation method, which is applied to a processor. Among them, the processor can be integrated into the controller of a lidar installed on the roadside, or integrated into other control devices installed on the roadside. For example, the processor can be integrated into the controller of a lidar fixed on the lamp post of a traffic light. As Figure 1 shown, the field endpoint cloud segmentation method provided by the embodiment of the present application includes the following steps:
[0091] S101. For each voxel included in the voxel map, determine the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to the voxel in the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel in the comparison point cloud frame. Among them, the comparison point cloud frame is any point cloud frame in the point cloud pool other than the target point cloud frame. For example, the comparison point cloud frame is the previous point cloud frame of the target point cloud frame. The point cloud pool includes multiple frames of point clouds collected by a lidar installed on the roadside.
[0092] Before S101, each point cloud frame in the point cloud pool can be used as the target point cloud frame, and each laser point in the target point cloud frame is mapped to the voxel map respectively, so as to obtain the voxel where each laser point is located.
[0093] Among them, the voxel map includes multiple voxels. For example, the voxel map includes voxels within a specified range in the scene where the lidar is located. The specified range can also be called a preset region of interest (ROI). The specified range can be the visible range of the radar. For example, the range within 60 meters centered on the lidar.
[0094] Similar to pixels in an image, a predetermined spatial range can be divided into multiple grids, and each three-dimensional grid in the three-dimensional space is called a voxel. The point cloud frame collected by the lidar is a three-dimensional point cloud frame, and each laser point included in the point cloud frame has three-dimensional coordinates, which respectively represent the horizontal distance, height distance, and depth distance between the physical position corresponding to the laser point and the lidar. Therefore, the voxel map coordinate system can be set to be the same as the lidar coordinate system, so that according to the three-dimensional coordinates of each laser point, the voxel mapped by the laser point can be obtained.
[0095] Optionally, the size of a single voxel can be set according to actual requirements. For example, when a high precision requirement for point cloud static and dynamic segmentation is needed, the size of a single voxel can be set to be small; on the contrary, when a low precision requirement for point cloud static and dynamic segmentation is needed, the size of a single voxel can be set to be large.
[0096] It can be understood that for the same voxel, the change in the number of laser points mapped by each laser point in different point cloud frames within this voxel can reflect the object motion situation of the scene corresponding to this voxel at different times. For example, assuming that the difference in the number of laser points mapped by each laser point in different point cloud frames within this voxel is smaller, it indicates that within a period of time, the target in the space corresponding to this voxel basically remains stationary, and the greater the possibility that this voxel is in a stationary state; on the contrary, the greater the difference in the number of laser points mapped by each laser point in different point cloud frames within this voxel, the smaller the possibility that this voxel is in a stationary state.
[0097] Therefore, the greater the difference between the number of laser points mapped by each laser point in the target point cloud frame to a voxel and the number of laser points mapped by each laser point in the comparison point cloud frame to this voxel, the greater the possibility that the obstacle in the scene corresponding to this voxel has changed, and the smaller the possibility that this voxel is in a stationary state. Therefore, it can be determined that the static and dynamic probability of this voxel corresponding to the target point cloud frame is closer to the probability of the motion state.
[0098] On the contrary, the smaller the difference between the number of laser points mapped by each laser point in the target point cloud frame to a voxel and the number of laser points mapped by each laser point in the comparison point cloud frame to this voxel, the smaller the possibility that the obstacle in the scene corresponding to this voxel has changed, and the greater the possibility that this voxel is in a stationary state. Therefore, it can be determined that the static and dynamic probability of this voxel corresponding to the target point cloud frame is closer to the probability of the stationary state.
[0099] For example, the static and dynamic probability is within the range of [0, 1], and a static and dynamic probability of 0 represents the motion state, while a static and dynamic probability of 1 represents the stationary state. The greater the difference between the number of laser points mapped by each laser point in the target point cloud frame to this voxel and the number of laser points mapped by each laser point in the comparison point cloud frame to this voxel, it can be determined that the static and dynamic probability of this voxel corresponding to the target point cloud frame is closer to 0; the smaller the difference between the number of laser points mapped by each laser point in the target point cloud frame to this voxel and the number of laser points mapped by each laser point in the comparison point cloud frame to this voxel, it can be determined that the static and dynamic probability of this voxel corresponding to the target point cloud frame is closer to 1.
[0100] S102. Determine the static and dynamic state of this voxel according to the static and dynamic probabilities of this voxel corresponding to all target point cloud frames in the point cloud pool.
[0101] Among them, the target point cloud frame may include each point cloud frame in the point cloud pool, or may be a selected part of the point cloud frames with relatively high data quality in the point cloud pool.
[0102] It can be understood that for each voxel, among the static and dynamic probabilities of this voxel corresponding to all target point cloud frames, if most of the static and dynamic probabilities are in the static state, it can be determined that this voxel is in the static state, indicating that there is a static object at the position where this voxel is located, such as a mailbox or a telephone booth that is fixed for a long time on the roadside. On the contrary, if most of the static and dynamic probabilities indicate the moving state, it can be determined that this voxel is in the moving state, indicating that there is no object at the position where this voxel is located, such as a road space where vehicles can pass.
[0103] The point cloud segmentation method provided by the embodiments of the present application can determine the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to each voxel of the voxel map by the target point cloud frame and the comparison point cloud frame respectively, and then determine the static and dynamic state of this voxel according to the static and dynamic probabilities of this voxel corresponding to all target point cloud frames in the point cloud pool. Since the embodiments of the present application determine the static and dynamic state of the voxel, when performing static and dynamic segmentation, the static and dynamic state of the voxel where each laser point in the point cloud frame is located can be used as the static and dynamic state of this laser point, thereby realizing the static and dynamic segmentation of the point cloud frame. Therefore, when the embodiments of the present application determine the static and dynamic state of the voxel, it can be determined according to the change situation of the number of laser points projected into this voxel by the target point cloud and the comparison point cloud. This method does not require modeling of the static scene and does not require pre-establishing a map that only contains the static scene, so the calculation amount of point cloud static and dynamic segmentation is reduced, and the accuracy of point cloud static and dynamic segmentation is improved.
[0104] Moreover, when performing static and dynamic segmentation in the embodiments of the present application, the static and dynamic state of the voxel where each laser point in the point cloud frame is located can be used as the static and dynamic state of this laser point, without the need to determine the specific object that each laser point projects to, so the calculation amount is smaller and the static and dynamic segmentation efficiency is higher.
[0105] The following specifically describes Figure 1 the method for determining the static and dynamic state of the voxel:
[0106] In some embodiments of the present application, referring to Figure 2 , the method for determining the static and dynamic probability of the voxel corresponding to the target point cloud frame in S101 above includes the following steps:
[0107] S1011. For each voxel included in the voxel map, determine the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to this voxel by each laser point in the target point cloud frame and the preset hyperparameters.
[0108] In the embodiments of the present application, a single voxel is represented by (x, y, z, s), where (x, y, z) represents the index of the voxel, and the data types of x, y, and z are all integer types, that is, (x, y, z) represents the distances from the voxel to the coordinate origin in the three coordinate axis directions of the preset global coordinate system.
[0109] s is the saturation probability of a single voxel corresponding to a single point cloud frame, which represents the distribution density of the laser points mapped by a point cloud frame in a voxel and can reflect the distribution of obstacles in the voxel at the moment of point cloud frame acquisition. For example, the larger the value of s, the more laser points are mapped in the voxel by a single point cloud frame, indicating that there are more obstacles in the voxel at the moment of point cloud frame acquisition; conversely, the smaller the value of s, the fewer laser points are mapped in the voxel by a single point cloud frame, indicating that there are fewer obstacles in the voxel at the moment of point cloud frame acquisition.
[0110] Therefore, the first saturation probability represents the possibility that the voxel is in a static state at the moment of target point cloud acquisition.
[0111] The number of laser points in a voxel cannot fully reflect the probability that the voxel is static or dynamic, because the number of laser points is not only related to the reflection target but also related to the point cloud output ability of the radar itself. Due to different point cloud output abilities of different types of radars, for the same target object, the number of laser points generated is not exactly the same. Based on this, in the embodiments of the present application, a preset hyperparameter is introduced as a reference. If the number of laser points mapped from each laser point in the target point cloud frame to the voxel is less than or equal to the preset hyperparameter, then the ratio of the number of laser points mapped from each laser point in the target point cloud frame to the voxel to the preset hyperparameter can be used as the first saturation probability. That is, s can be calculated by formula (1):
[0112]
[0113] Where n represents the number of laser points mapped from each laser point in a single point cloud frame to a single voxel, and M is the preset hyperparameter. It can be seen that 0.0 ≤ s ≤ 1.0, and the data type of s is floating point. The preset hyperparameter M is related to the parameter characterizing the point cloud output ability of the lidar. For example, when the lidar is a mechanical scanning type, M is positively correlated with the number of beams of the lidar, because under the same detection conditions, in each voxel, a 128-line lidar generates more laser points in a single voxel than a 32-line lidar; similarly, it can be known that when the radar is a Flash radar, M can be related to the number of photons emitted / received in each detection cycle.
[0114] In addition, the preset hyperparameter M is also related to the distance between the lidar and the voxel during detection: Since the detection capabilities of the lidar are different at close and far distances, when the distance between the target and the lidar is smaller, the generated point cloud is denser, making the number of lidar points reaching saturation in this voxel larger. Conversely, when the distance between the target and the lidar is larger, the generated point cloud is sparser, making the number of lidar points reaching saturation in this voxel smaller. Therefore, the preset hyperparameter M is directly proportional to the point cloud output ability of the lidar and inversely proportional to the distance between the voxel and the lidar. That is to say, the preset hyperparameters corresponding to voxels at different positions are not exactly the same.
[0115] The above preset hyperparameter M can be determined in advance through a calibration experiment.
[0116] Conversely, if the number of lidar points mapped from each lidar point in the target point cloud frame to the lidar points in this voxel is greater than the preset hyperparameter, the first saturation probability can be determined to be 1. During calculation, if the number of lidar points mapped from each lidar point in the target point cloud frame to the lidar points in this voxel is greater than the preset hyperparameter, n = M can be set, and n can be substituted into formula (1) to obtain s = 1.
[0117] S1012. Determine the second saturation probability of the voxel corresponding to the comparison point cloud frame according to the number of lidar points mapped from each lidar point in the comparison point cloud frame to the lidar points in this voxel and the preset hyperparameter.
[0118] It should be noted that each time S1012 is executed, the comparison point cloud frame targeted is any point cloud frame in the point cloud pool other than the target point cloud frame targeted by S1011.
[0119] Among them, the second saturation probability represents the possibility that this voxel is in a stationary state at the acquisition moment of the comparison point cloud frame. The determination method of the second saturation probability is the same as that of the first saturation probability, and reference can be made to the description of S1011, which will not be elaborated here.
[0120] S1013. Determine the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability.
[0121] In the embodiment of the present application, the dynamic and static probability of the voxel corresponding to the target point cloud frame can be determined based on the first saturation probability, the second saturation probability, and the preset corresponding relationship. Among them, the preset corresponding relationship is the corresponding relationship among the first saturation probability, the second saturation probability, and the dynamic and static probability of the voxel corresponding to the target point cloud frame.
[0122] Through the above method, embodiments of the present application can compare the different saturation probabilities of the target point cloud and the comparison point cloud projected onto the same voxel, so as to compare the obstacle distribution of the scene corresponding to the voxel at different times. If the distribution difference is large, it indicates that the static probability of the voxel is small. On the contrary, if the distribution difference is small, it indicates that the static probability of the voxel is large. Therefore, by comparing the number of laser points of different point cloud frames projected onto the same voxel, the dynamic and static conditions of the voxel can be obtained, avoiding modeling of static scenes and reducing the computational complexity of determining static scenes.
[0123] Before determining the dynamic and static probability of the voxel corresponding to the target point cloud frame, the preset correspondence in S1013 above can also be determined in advance.
[0124] In embodiments of the present application, multiple specified correspondences can be obtained, and then based on a preset neural network, the preset correspondence represented by the multiple specified correspondences is fitted.
[0125] Among them, the preset correspondence is at least fitted based on the following four specified correspondences: when the first saturation probability is 0 and the second saturation probability is 0, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0; when the first saturation probability is 0 and the second saturation probability is 1, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0; when the first saturation probability is 1 and the second saturation probability is 0, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 0; when the first saturation probability is 1 and the second saturation probability is 1, the dynamic and static probability of the voxel corresponding to the target point cloud frame is 1.
[0126] For convenience of description, the first saturation probability is denoted as s t , and the second saturation probability is denoted as s r . When s t or s r is 0, it indicates that the number of laser points mapped by each laser point in a point cloud frame into a voxel is 0. Denote the dynamic and static probability of the voxel corresponding to the target point cloud frame as p t . The preset correspondence can be denoted as p t = f(s r , s t ).
[0127] Each specified correspondence is shown in Table 1:
[0128] Table 1
[0129] Specify the corresponding relationship <![CDATA[s r > <![CDATA[s t > <![CDATA[p t > Specify the corresponding relationship 1 0 0 0 Specify the corresponding relationship 2 0 1 0 Specify the corresponding relationship 3 1 0 0 Specify the corresponding relationship 4 1 1 1
[0130] Since s t , s r and p t are all floating-point numbers, and s t , sr and p t The relationship between them can be expressed as a non - linear function. Therefore, a neural network can be constructed to fit s t , s r and p t The preset corresponding relationship between them.
[0131] When fitting, s t and s r in each specified corresponding relationship can be used as a training sample, and p t and s r corresponding to s t is used as the label of the training sample, so as to train the neural network using the training sample and the label. The neural network obtained after training is the preset corresponding relationship between s t , s r and p t The preset corresponding relationship between them.
[0132] Through the above method, the embodiments of the present application can fit the preset corresponding relationship between s t , s r and p t by using a neural network, so that the preset corresponding relationship can be used subsequently to predict the static - dynamic probability of a single voxel corresponding to the target point - cloud frame. That is, s t and s r calculated when determining the static - dynamic state of the voxel are input into the neural network, and p t output by the neural network is obtained.
[0133] In the embodiments of the present application, after determining the static - dynamic probability of each voxel corresponding to the target point - cloud frame in S101, referring to Figure 3 , the method for determining the static - dynamic state of each voxel in S102 above includes the following steps:
[0134] S1021. For each voxel included in the voxel map, determine the stationary probability of the voxel according to the static - dynamic probability of the voxel corresponding to all target point - cloud frames in the point - cloud pool.
[0135] Optionally, the average value of the static - dynamic probabilities of the voxel corresponding to all point - cloud frames in the point - cloud pool can be used as the stationary probability of the voxel. That is, the stationary probability of each voxel is determined by formula (2):
[0136]
[0137] where P represents the stationary probability of a single voxel, p i represents the static - dynamic probability of the single voxel corresponding to the i - th point - cloud frame, and N is the number of point - cloud frames included in the point - cloud pool.
[0138] Alternatively, the weighted average of the static and dynamic probabilities of the voxels corresponding to all point cloud frames in the point cloud pool can also be used as the static probability of the voxels. Among them, the weight of each static and dynamic probability can be set according to the actual situation. For example, it can be set that the closer the acquisition time of the point cloud frame corresponding to the static and dynamic probability is to the current time, the greater the weight; on the contrary, the farther the acquisition time of the point cloud frame corresponding to the static and dynamic probability is from the current time, the smaller the weight.
[0139] Alternatively, the static probability of the voxel can also be determined by other means, and the embodiments of the present application do not make specific limitations in this regard.
[0140] S1022. Determine whether the static probability of the voxel is greater than a preset threshold. If the static probability of the voxel is greater than the preset threshold, execute S1023; if the static probability of the voxel is less than or equal to the preset threshold, execute S1024.
[0141] The preset threshold can be denoted as P 临界 , P 临界 The value range of is (0, 1), and P 临界 can be set according to the actual situation. For example, P 临界 can be set according to the environment where the lidar is located.
[0142] S1023. Determine that the voxel is in a static state.
[0143] When the static probability P of the voxel calculated in S1021 > P 临界 , it indicates that the scene corresponding to the voxel is probably in a static state.
[0144] S1024. Determine that the voxel is in a moving state.
[0145] When the static probability P of the scene corresponding to the voxel calculated in S1021 ≤ P 临界 , it indicates that the voxel is probably in a moving state.
[0146] Since laser points can be generated when the lidar scans both static and moving objects, it is not sufficient to determine the static and dynamic states of each voxel only by the number of laser points mapped to each voxel within a single point cloud frame. In the embodiments of the present application, the static and dynamic probabilities of each voxel corresponding to all target point cloud frames are determined, and the static probability of the voxel is determined according to the static and dynamic probabilities of each voxel, so as to realize determining the static and dynamic states of the voxel by combining multiple point cloud frames, reduce the influence of temporarily static objects in the scene corresponding to the voxel map on determining the static and dynamic states of the voxel, such as the influence of a temporarily parked vehicle on determining the static and dynamic states of the voxel, thereby improving the accuracy of determining the static and dynamic states of the voxel.
[0147] In the embodiments of the present application, a certain number of point cloud frames are required to determine the static and dynamic states of each voxel in the voxel map. After generating the static and dynamic states of each voxel, the static and dynamic states of the voxel map can be used to perform static and dynamic segmentation on the point cloud frames.
[0148] Therefore, referring to Figure 4 , before determining the static and dynamic probabilities of the voxels corresponding to each point cloud frame in the above S101, the following steps may also be performed:
[0149] S401. Obtain the point cloud frames collected by the lidar.
[0150] S402. Determine whether there is a corresponding static and dynamic state for the voxels in the voxel map. If not, execute S403; if so, execute S404.
[0151] Among them, if there is a corresponding static and dynamic state division for the voxels in the voxel map, it indicates that the initialization of the voxel map has been completed. Otherwise, it indicates that the initialization of the voxel map has not been completed. The point cloud frames in the point cloud pool still need to be supplemented.
[0152] S403. Add the point cloud frame to the point cloud pool, and when the number of point cloud frames included in the point cloud pool reaches the preset number, execute the above S101 - S102 to determine the static and dynamic states of the voxels in the voxel map, thereby completing the initialization of the voxel map.
[0153] The method for S403 to determine the static and dynamic states of each voxel is the same as the method shown in Figure 1 , which can be referred to the above description and will not be elaborated here.
[0154] S404. Use the point cloud frame as the point cloud frame to be segmented, and perform point cloud segmentation on the point cloud frame to be segmented based on the static and dynamic states of the voxels included in the voxel map.
[0155] In this way, in the embodiments of the present application, every time a point cloud frame collected by the lidar is obtained, it can be determined whether the point cloud frame can be segmented statically and dynamically, thereby ensuring the efficiency of point cloud static and dynamic segmentation.
[0156] In the embodiments of the present application, before performing point cloud segmentation on the point cloud to be segmented in the above S404, it can also be determined whether the voxel map needs to be updated currently. That is, in the case of determining that the point cloud pool needs to be updated, add the point cloud frame to be segmented to the point cloud pool, and update the static and dynamic states of the voxels included in the voxel map based on the updated point cloud pool.
[0157] Optionally, it can be determined whether the current conditions for updating the point cloud pool are met, and if the conditions for updating the point cloud pool are met, it is determined that the point cloud pool needs to be updated. For example, the conditions for updating the point cloud pool include: whether the current time reaches the preset point cloud pool update time, whether the number of valid point cloud frames included in the point cloud pool reaches the preset number of frames, and / or whether a user instruction is received, etc. The embodiments of the present application do not specifically limit the conditions for updating the point cloud pool.
[0158] Among them, a valid point cloud is a point cloud frame whose life cycle has not ended. Each point cloud frame has a life cycle of a preset duration. The start time of the life cycle is the acquisition time of the point cloud frame or the time when it is added to the point cloud pool. After the preset duration, the life cycle ends and the point cloud frame becomes invalid.
[0159] After that, the dynamic and static states of each voxel included in the voxel map can be directly updated based on the updated point cloud pool; or, it can also be determined whether the voxel map needs to be updated currently, and when it is determined that the voxel map needs to be updated, the dynamic and static states of each voxel included in the voxel map are updated based on the updated point cloud pool. For example, it can be determined whether the current conditions for updating the voxel map are met, and if the conditions for updating the voxel map are met, it is determined that the voxel map needs to be updated. Among them, the conditions for updating the voxel map can include: whether the current time reaches the preset map update time, whether the number of valid point cloud frames included in the point cloud pool reaches the preset number of frames, and / or whether a user instruction is received, etc. The embodiments of the present application do not specifically limit the conditions for updating the voxel map.
[0160] In the embodiments of the present application, when updating the dynamic and static states of each voxel included in the voxel map, for each voxel included in the voxel map, according to the number of laser points mapped from the target point cloud frame in the updated point cloud pool to the laser points within the voxel, and the number of laser points mapped from the comparison point cloud frame to the laser points within the voxel, the dynamic and static probability of the voxel corresponding to the target point cloud frame is determined. Then, according to the dynamic and static probabilities of all target point cloud frames corresponding to the voxel in the updated point cloud pool, the dynamic and static state of the voxel is determined as the candidate dynamic and static state of the voxel. Among them, the method for determining the candidate dynamic and static state of the voxel is the same as the above voxel map initialization method, which can be referred to the above description and will not be elaborated here.
[0161] If the candidate dynamic and static state of the voxel is the same as the dynamic and static state of the voxel before the voxel map is updated, the dynamic and static state of the voxel is maintained as the dynamic and static state of the voxel before the voxel map is updated.
[0162] If the dynamic and static states of the voxel are inconsistent before and after the voxel map is updated, the dynamic and static state of the voxel is updated to the moving state with a preset probability, where the preset probability is greater than 0.5 and less than 1.
[0163] That is, if the candidate static / dynamic state of the voxel is the static state, and the static / dynamic state of the voxel before the voxel map is updated is the dynamic state, then with a first preset probability, update the static / dynamic state of the voxel to the dynamic state. Among them, the first preset probability P1 is greater than 0.5 and less than 1. For example, the random number generation rule can be set as follows: generate 1 with a probability of P1 and generate 0 with a probability of (1 - P1). When updating the static / dynamic state of the voxel to the dynamic state with P1, the random number can be generated according to this random number generation rule. When the generated random number is 1, determine that the static / dynamic state of the voxel is the dynamic state; when the generated random number is 0, determine that the static / dynamic state of the voxel is the static state.
[0164] If the candidate static / dynamic state of the voxel is the dynamic state, and the static / dynamic state of the voxel before the voxel map is updated is the static state, then with a second preset probability, update the static / dynamic state of the voxel to the dynamic state. Among them, the second preset probability P2 is greater than 0.5 and less than 1. For example, the random number generation rule can be set as follows: generate 1 with a probability of P2 and generate 0 with a probability of (1 - P2). When updating the static / dynamic state of the voxel to the dynamic state with P2, the random number can be generated according to this random number generation rule. When the generated random number is 1, determine that the static / dynamic state of the voxel is the dynamic state; when the generated random number is 0, determine that the static / dynamic state of the voxel is the static state.
[0165] Among them, the first preset probability and the second preset probability can be the same or different, and the specific values can be set according to the actual situation. For example, the first preset probability and the second preset probability can be set according to the environment where the lidar is located.
[0166] Through the above method, the embodiments of the present application can update the point cloud pool and the voxel map in real time, reduce the influence of environmental factors such as road condition changes on the voxel map and the static / dynamic segmentation of the point cloud, and improve the real-time performance and accuracy of the voxel map and the static / dynamic segmentation of the point cloud.
[0167] Moreover, when updating the voxel map in the embodiments of the present application, not only the current point cloud pool is utilized, but also the static / dynamic states of the voxels included in the voxel map before the update are considered, reducing the errors caused by calculation or environmental changes and improving the accuracy of updating the voxel map.
[0168] See Figure 5 , the overall process including the initialization of the voxel map and the static / dynamic segmentation of the point cloud in the embodiments of the present application will be described below in combination with an actual scenario:
[0169] S501. Obtain the point cloud frame collected by the lidar.
[0170] S502. Determine whether there is a corresponding static / dynamic state for the voxels in the voxel map. If not, execute S503; if so, execute S504.
[0171] S503. Add the point cloud frame to the point cloud pool. When the number of point cloud frames included in the point cloud pool reaches a preset number, initialize the voxel map to obtain the dynamic and static states of each voxel included in the voxel map.
[0172] The method of initializing the voxel map can refer to the above description and will not be elaborated here.
[0173] S504. Use the point cloud frame as the point cloud frame to be segmented, and determine whether it is necessary to update the point cloud pool. If it is determined that the point cloud pool needs to be updated, execute S505. If it is determined that the point cloud pool does not need to be updated, execute S506.
[0174] S505. Add the point cloud frame to be segmented to the point cloud pool, and delete the point cloud frames with the end of the life cycle in the point cloud pool. After S505, execute S506.
[0175] Add the new point cloud frame to the point cloud pool and delete the point cloud frames with the end of the life cycle, so as to ensure the real-time nature of the point cloud frames in the point cloud pool, so as to ensure the real-time nature of the voxel map updated based on the updated point cloud pool subsequently.
[0176] S506. Determine whether it is necessary to update the voxel map. If it is determined that the voxel map needs to be updated, execute S507; if it is determined that the voxel map does not need to be updated, execute S508.
[0177] S507. Create a thread, and use the thread to update the dynamic and static states of each voxel included in the voxel map based on the updated point cloud pool. After S507, execute S508.
[0178] The method of updating the dynamic and static states of each voxel included in the voxel map can refer to the above description and will not be elaborated here.
[0179] Since updating the voxel map takes a certain amount of time, when updating the voxel map, the embodiments of the present application use a new thread to update, so that during the update process of the voxel map, the point cloud dynamic and static segmentation does not need to be interrupted, that is, it can run normally, reducing the impact of updating the voxel map on the point cloud dynamic and static segmentation.
[0180] S508. Map each laser point in the point cloud frame to be segmented to the voxel map respectively to obtain the voxel where each laser point is located, use the dynamic and static state of the voxel where each laser point is located as the dynamic and static state of the laser point, and segment the point cloud frame to be segmented into a moving laser point cloud composed of laser points in the moving state and a static laser point cloud composed of laser points in the static state.
[0181] Figure 5 The implementation methods of the steps included are the same as the above process, and can refer to the above description and will not be elaborated here.
[0182] In the embodiments of the present application, real-time dynamic and static segmentation of point clouds is realized at the field end for the first time, which is of great significance for subsequent processing of perception tasks such as target detection and automatic obstacle avoidance using the dynamically and statically segmented point clouds in the fields of vehicle driving such as autonomous driving, assisted driving, and driverless driving.
[0183] Based on the same inventive concept, corresponding to the above method embodiments, the embodiments of the present application provide a field end point cloud segmentation device, as Figure 6 shown. The device includes: a first determination module 601 and a second determination module 602;
[0184] The first determination module 601 is configured to, for each voxel included in the voxel map, determine the dynamic and static probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to the voxel within the target point cloud frame in the point cloud pool and the number of laser points mapped to the voxel within the comparison point cloud frame, where the comparison point cloud frame is any point cloud frame other than the target point cloud frame in the point cloud pool;
[0185] The second determination module 602 is configured to determine the dynamic and static state of the voxel according to the dynamic and static probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool;
[0186] Wherein, the point cloud pool includes multiple frames of point clouds collected by a lidar installed on the roadside; the voxel map includes multiple voxels.
[0187] Optionally, the second determination module 602 is specifically configured to:
[0188] For each voxel included in the voxel map, determine the stationary probability of the voxel according to the dynamic and static probabilities of the voxel corresponding to all point cloud frames in the point cloud pool;
[0189] If the stationary probability of the voxel is greater than a preset threshold, determine that the voxel is in a stationary state;
[0190] If the stationary probability of the voxel is less than or equal to the preset threshold, determine that the voxel is in a moving state.
[0191] Optionally, the first determination module 601 is specifically configured to:
[0192] For each voxel included in the voxel map, determine the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped to the voxel within the target point cloud frame and a preset hyperparameter; wherein, the first saturation probability represents the possibility that the voxel is in a stationary state at the target point cloud acquisition moment;
[0193] Determine the second saturation probability of the voxel corresponding to the comparison point cloud frame according to the number of laser points mapped from each laser point in the comparison point cloud frame to the laser points within the voxel and a preset hyperparameter; wherein, the second saturation probability represents the possibility that the voxel is in a stationary state at the acquisition moment of the comparison point cloud frame;
[0194] Determine the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability.
[0195] Optionally, the first determination module 601 is specifically configured to:
[0196] If the number of laser points mapped from each laser point in the target point cloud frame to the laser points within the voxel is less than or equal to the preset hyperparameter, then use the ratio of the number of laser points mapped from each laser point in the target point cloud frame to the laser points within the voxel to the preset hyperparameter as the first saturation probability;
[0197] If the number of laser points mapped from each laser point in the target point cloud frame to the laser points within the voxel is greater than the preset hyperparameter, then determine that the first saturation probability is 1.
[0198] Optionally, the first determination module 601 is specifically configured to:
[0199] Determine the static and dynamic probability of the voxel corresponding to the target point cloud frame based on the first saturation probability, the second saturation probability, and a preset correspondence.
[0200] Optionally, wherein the preset correspondence is at least obtained by fitting based on the following four specified correspondences:
[0201] In the case where the first saturation probability is 0 and the second saturation probability is 0, the static and dynamic probability of the voxel corresponding to the target point cloud frame is 0;
[0202] In the case where the first saturation probability is 0 and the second saturation probability is 1, the static and dynamic probability of the voxel corresponding to the target point cloud frame is 0;
[0203] In the case where the first saturation probability is 1 and the second saturation probability is 0, the static and dynamic probability of the voxel corresponding to the target point cloud frame is 0;
[0204] In the case where the first saturation probability is 1 and the second saturation probability is 1, the static and dynamic probability of the voxel corresponding to the target point cloud frame is 1.
[0205] Optionally, the device may further include:
[0206] An acquisition module, configured to acquire the point cloud frame collected by the lidar before determining the static and dynamic probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped from each laser point in the target point cloud frame within the voxel and the number of laser points mapped from each laser point in the comparison point cloud frame within the voxel;
[0207] A judgment module, configured to judge whether there is a corresponding static or dynamic state for the voxels in the voxel map;
[0208] An adding module, configured to, if the judgment result of the judgment module is non-existence, add the point cloud frame to the point cloud pool, and when the number of point cloud frames included in the point cloud pool reaches a preset number, execute for each voxel included in the voxel map, according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to this voxel, and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel, determine the static or dynamic probability of this voxel corresponding to the target point cloud frame;
[0209] A segmentation module, configured to, if the judgment result of the judgment module is existence, use the point cloud frame as a point cloud frame to be segmented, and perform point cloud segmentation on the point cloud frame to be segmented based on the static or dynamic states of the voxels included in the voxel map.
[0210] Optionally, the device may further include:
[0211] An updating module, configured to, before performing point cloud segmentation on the point cloud frame to be segmented based on the static or dynamic states of the voxels included in the voxel map, in the case of determining that the point cloud pool needs to be updated, add the point cloud frame to be segmented to the point cloud pool, and update the static or dynamic states of the voxels included in the voxel map based on the updated point cloud pool.
[0212] Optionally, the updating module is specifically configured to:
[0213] For each voxel included in the voxel map, according to the number of laser points mapped from each laser point in the target point cloud frame in the updated point cloud pool to this voxel, and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel, determine the static or dynamic probability of this voxel corresponding to the target point cloud frame;
[0214] According to the static or dynamic probabilities of this voxel corresponding to all target point cloud frames in the updated point cloud pool, determine the static or dynamic state of this voxel as the candidate static or dynamic state of this voxel;
[0215] If the candidate static or dynamic state of this voxel is the same as the static or dynamic state of this voxel before the voxel map is updated, keep the static or dynamic state of this voxel as the static or dynamic state of this voxel before the voxel map is updated;
[0216] If the static or dynamic states of this voxel before and after the voxel map is updated are inconsistent, update the static or dynamic state of this voxel to a moving state with a preset probability, and the preset probability is greater than 0.5 and less than 1.
[0217] An embodiment of the present application further provides an electronic device, such as Figure 7As shown in the figure, it includes a processor 701, a communication interface 702, a memory 703, and a communication bus 704. Among them, the processor 701, the communication interface 702, and the memory 703 complete mutual communication through the communication bus 704.
[0218] The memory 703 is used to store computer programs.
[0219] When the processor 701 is used to execute the program stored in the memory 703, it implements the method steps in the above method embodiments.
[0220] The communication bus mentioned in the above electronic device may be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into an address bus, a data bus, a control bus, etc. For the sake of simplicity of representation, only a thick line is used in the figure, but it does not mean that there is only one bus or one type of bus.
[0221] The communication interface is used for communication between the above electronic device and other devices.
[0222] The memory may include a Random Access Memory (RAM), or may also include a Non-Volatile Memory (NVM), such as at least one disk memory. Optionally, the memory may also be at least one storage device located far from the aforementioned processor.
[0223] The above-mentioned processor may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
[0224] In another embodiment provided by the present application, there is also provided a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, it implements the steps of any of the above-mentioned end-point cloud segmentation methods.
[0225] In another embodiment provided by the present application, a computer program product containing instructions is further provided. When it runs on a computer, it causes the computer to execute any one of the above-mentioned end-point cloud segmentation methods in the embodiments.
[0226] In the above embodiments, it can be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the processes or functions described in the embodiments of the present application are generated in whole or in part. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices. The computer instructions can be stored in a computer-readable storage medium, or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (such as coaxial cable, optical fiber, digital subscriber line (DSL)) or wireless (such as infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that the computer can access, or a data storage device such as a server or data center that includes one or more integrated available media. The available medium can be a magnetic medium (such as a floppy disk, hard disk, magnetic tape), an optical medium (such as a DVD), or a semiconductor medium (such as a solid-state drive (SSD)).
[0227] It should be noted that in this document, 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 actual relationship or order between these entities or operations. Moreover, the term "comprising", "including", or any other variant thereof is intended to cover non-exclusive inclusion, such that a process, method, article, or device including a series of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or device. Without further limitation, an element defined by the phrase "including one..." does not exclude the existence of additional identical elements in the process, method, article, or device including the element.
[0228] Each embodiment in this specification is described in a related manner. For the same or similar parts among the embodiments, reference can be made to each other. Each embodiment focuses on the differences from other embodiments. In particular, for the apparatus embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, reference can be made to the corresponding descriptions in the method embodiments.
[0229] The above are only the preferred embodiments of the present application and are not intended to limit the protection scope of the present application. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present application are all included in the protection scope of the present application.
Claims
1. A method for field endpoint cloud segmentation, characterized in that, The method includes: For each voxel included in the voxel map, determine the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to the voxel, and the number of laser points mapped from each laser point in the comparison point cloud frame to the voxel. The comparison point cloud frame is any point cloud frame in the point cloud pool other than the target point cloud frame; Determine the static and dynamic state of the voxel according to the static and dynamic probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool; Wherein, the point cloud pool includes multiple frames of point clouds collected by a lidar installed on the roadside; the voxel map includes multiple voxels.
2. The method according to claim 1, characterized in that, The determining the static and dynamic state of the voxel according to the static and dynamic probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool includes: For each voxel included in the voxel map, determine the static probability of the voxel according to the static and dynamic probabilities of the voxel corresponding to all target point cloud frames in the point cloud pool; If the static probability of the voxel is greater than a preset threshold, determine that the voxel is in a static state; If the static probability of the voxel is less than or equal to the preset threshold, determine that the voxel is in a moving state.
3. The method according to claim 1, characterized in that, The determining the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to the voxel, and the number of laser points mapped from each laser point in the comparison point cloud frame to the voxel for each voxel included in the voxel map includes: For each voxel included in the voxel map, determine the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame to the voxel and a preset hyperparameter; Determine the second saturation probability of the voxel corresponding to the comparison point cloud frame according to the number of laser points mapped from each laser point in the comparison point cloud frame to the voxel and the preset hyperparameter; Determine the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability.
4. The method according to claim 3, characterized in that, The determining the first saturation probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame to the voxel and a preset hyperparameter for each voxel included in the voxel map includes: If the number of laser points mapped from each laser point in the target point cloud frame to the voxel is less than or equal to the preset hyperparameter, use the ratio of the number of laser points mapped from each laser point in the target point cloud frame to the voxel to the preset hyperparameter as the first saturation probability; If the number of laser points mapped from each laser point in the target point cloud frame to the voxel is greater than the preset hyperparameter, determine that the first saturation probability is 1.
5. The method according to claim 3 or 4, characterized in that, The determining the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the first saturation probability and the second saturation probability includes: Determine the static and dynamic probability of the voxel corresponding to the target point cloud frame based on the first saturation probability, the second saturation probability and a preset correspondence.
6. The method according to any one of claims 1-4, characterized in that, Before determining the static and dynamic probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to this voxel and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel, the method further includes: Obtain the point cloud frame collected by the lidar; Determine whether there is a corresponding static and dynamic state for the voxel in the voxel map; If not, add this point cloud frame to the point cloud pool, and when the number of point cloud frames included in the point cloud pool reaches a preset number, execute the step of determining the static and dynamic probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to this voxel and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel; If so, use this point cloud frame as the point cloud frame to be segmented, and perform point cloud segmentation on the point cloud frame to be segmented based on the static and dynamic states of the voxels included in the voxel map.
7. The method according to claim 6, wherein Before performing point cloud segmentation on the point cloud frame to be segmented based on the static and dynamic states of the voxels included in the voxel map, the method further includes: In the case of determining that the point cloud pool needs to be updated, add the point cloud frame to be segmented to the point cloud pool, and update the static and dynamic states of the voxels included in the voxel map based on the updated point cloud pool.
8. The method according to claim 7, wherein The updating the static and dynamic states of the voxels included in the voxel map based on the updated point cloud pool includes: For each voxel included in the voxel map, determine the static and dynamic probability of the voxel corresponding to the target point cloud frame according to the number of laser points mapped from each laser point in the target point cloud frame in the updated point cloud pool to this voxel and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel; Determine the static and dynamic state of this voxel according to the static and dynamic probabilities of this voxel corresponding to all target point cloud frames in the updated point cloud pool as the candidate static and dynamic state of this voxel; If the candidate static and dynamic state of this voxel is the same as the static and dynamic state of this voxel before the voxel map is updated, keep the static and dynamic state of this voxel as the static and dynamic state of this voxel before the voxel map is updated; If the static and dynamic states of this voxel are inconsistent before and after the voxel map is updated, update the static and dynamic state of this voxel to the moving state with a preset probability, and the preset probability is greater than 0.5 and less than 1.
9. A field endpoint cloud segmentation device, characterized in that, The device includes: A first determination module, configured to determine the static and dynamic probability of the voxel corresponding to the target point cloud frame for each voxel included in the voxel map according to the number of laser points mapped from each laser point in the target point cloud frame in the point cloud pool to this voxel and the number of laser points mapped from each laser point in the comparison point cloud frame to this voxel, and the comparison point cloud frame is any point cloud frame other than the target point cloud frame in the point cloud pool; A second determination module, configured to determine the static and dynamic state of this voxel according to the static and dynamic probabilities of this voxel corresponding to all target point cloud frames in the point cloud pool; Wherein, the point cloud pool includes multiple frames of point clouds collected by a lidar installed on the roadside; the voxel map includes multiple voxels.
10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the method steps described in any one of claims 1-8 are implemented.
Citation Information
Patent Citations
Static obstacle detection method, device and equipment and storage medium
CN111339996A
Method for generating point cloud normal vector, apparatus, computer device, and storage medium
WO2022133770A1