Downsampling Method and Device for Point Cloud Data, and Computer Readable Storage Medium
By designing a segmentation unit that conforms to the light scattering characteristics for downsampling of point cloud data, the problem of inconsistent distribution of point cloud data in the existing technology is solved and the detection accuracy is improved.
Patent Information
- Application Number
- CN202510081634.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-20
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2045-01-20
AI Technical Summary
The existing point cloud data downsampling method fails to effectively consider the light scattering characteristics of point cloud acquisition devices, resulting in the distribution of downsampled point cloud data in the space inconsistent with the original point cloud data, and even distortion occurs, affecting the detection accuracy.
The target segmentation unit is designed according to the light scattering characteristics of the point cloud acquisition device. The segmentation unit that divides the spherical space performs downsampling to ensure that the distribution of the downsampled point cloud data in the space is consistent with the original point cloud data.
It alleviates the distortion after downsampling of point cloud data and improves the detection accuracy of point cloud acquisition devices.
Smart Images

Figure CN119741314B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the technical field of point cloud data processing, and particularly to a method and apparatus for downsampling point cloud data, a computer-readable storage medium, an electronic device, and a computer program product. Background Art
[0002] Currently, point cloud acquisition devices are widely used in fields such as industrial equipment and autonomous driving, and can provide high-precision three-dimensional information of the surrounding environment. Taking lidar (Laser Radar, also known as Light Detection and Ranging, abbreviated as LIDAR) as an example, due to its high-precision ranging ability and strong environmental adaptability, lidar has become an indispensable positioning and measurement tool in various application scenarios.
[0003] The detection results of point cloud acquisition devices are usually represented in the form of point clouds. A point cloud represents the detection result obtained after the light of the point cloud acquisition device (for example, the laser emitted by lidar) acts on a spatial point in space and is reflected. These detection results can be collectively referred to as point cloud data. The larger the volume of the point cloud obtained by each detection, the more detailed the detection of the space. This leads to a linear or even exponential increase in the amount of calculation when the processor processes the point cloud data fed back by the point cloud acquisition device as the number of point clouds increases. Therefore, it is necessary to downsample the original point cloud data before subsequent processing to greatly improve the calculation efficiency.
[0004] However, existing downsampling processing schemes for point cloud data have many defects, and there is an urgent need to provide a new downsampling scheme for point cloud data. Summary of the Invention
[0005] The technical problem solved by the present disclosure is to provide an improved downsampling scheme for point cloud data, so that the distribution of the downsampled point cloud data in space is closer to the distribution of the original point cloud data in space.
[0006] To solve the above technical problem, an embodiment of the present disclosure provides a method for downsampling point cloud data, including: obtaining an original point cloud data set, the original point cloud data set being related to a point cloud acquisition device and including data of at least one spatial point; determining the regional range of a target segmentation unit, the set of target segmentation units being used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; based on the regional range of the target segmentation unit, determining the spatial points in the original point cloud data set that fall within the regional range of the target segmentation unit; performing downsampling processing on the spatial points that fall within the regional range of the target segmentation unit respectively, and summarizing the downsampling results of one or more target segmentation units to obtain a downsampled point cloud data set.
[0007] Optionally, the volume of the target segmentation unit increases as it is farther away from the point cloud acquisition device.
[0008] Optionally, the region of each target segmentation unit includes the region between a first spherical surface and a second spherical surface centered on the point cloud acquisition device, within the range defined by a first horizontal angle and a second horizontal angle, and within the range defined by a first vertical angle and a second vertical angle. Among them, the first spherical surface and the second spherical surface are respectively defined by a first radius and a second radius, and the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle are all spherical center angles. For different target segmentation units, at least one of the first radius, the second radius, the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle is different.
[0009] Optionally, each target segmentation unit has the same radius increment, or the radius increment of the target segmentation unit is positively correlated with the distance from the target segmentation unit to the point cloud acquisition device, where the radius increment is the radius increment between the first radius and the second radius.
[0010] Optionally, the horizontal angle increment between the first horizontal angle and the second horizontal angle of each target segmentation unit is associated with the horizontal scan angle of the point cloud acquisition device.
[0011] Optionally, the vertical angle increment between the first vertical angle and the second vertical angle of each target segmentation unit is associated with the vertical scan angle of the point cloud acquisition device.
[0012] Optionally, when the radius increment of the target segmentation unit is positively correlated with the distance from the target segmentation unit to the point cloud acquisition device, the radius increment is related to the product of the first radius and the horizontal angle increment.
[0013] Optionally, determining the region range of the target segmentation unit includes: obtaining the polar coordinate position information of the target space point, where the target space point is selected from the original point cloud dataset; based on the radius value, horizontal angle value, and vertical angle value of the polar coordinate position information of the target space point, determining the region range of the target segmentation unit corresponding to the target space point.
[0014] Optionally, determining the region range of the target segmentation unit includes: determining the region range of the target segmentation unit based on the information of one or more candidate segmentation units set in advance.
[0015] Optionally, after downsampling the spatial points within the regional scope of the target segmentation unit, the method further includes: removing the data of the spatial points within the regional scope of the target segmentation unit from the original point cloud dataset.
[0016] Optionally, the data of the spatial points includes the polar coordinate position information or the Cartesian coordinate position information of the spatial points. When the data of the spatial points includes the Cartesian coordinate position information of the spatial points, the method further includes: for each spatial point in the original point cloud dataset, converting the Cartesian coordinate position information of the spatial point into polar coordinate position information.
[0017] Optionally, downsampling the spatial points within the regional scope of the target segmentation unit includes: determining the centroid or the centroid of the spatial points within the regional scope of the target segmentation unit, and using the data of the centroid or the centroid as the downsampled point cloud data corresponding to the target segmentation unit.
[0018] Optionally, the method further includes: determining the total number of spatial points within the regional scope of the target segmentation unit; when the total number meets a preset condition, performing the downsampling process on the spatial points within the regional scope of the target segmentation unit; when the total number does not meet the preset condition, the downsampled point cloud dataset does not include the data of the spatial points within the regional scope of the target segmentation unit.
[0019] Optionally, the downsampled point cloud dataset includes multiple sampled points, and the method further includes: based on the polar coordinate position information of the multiple sampled points, determining target sampled points with the same horizontal angle value and vertical angle value; for the target sampled points with the same horizontal angle value and vertical angle value, retaining the target sampled point with the smallest radius value, and removing the other target sampled points from the downsampled point cloud dataset.
[0020] To solve the above technical problems, an embodiment of the present disclosure further provides a downsampling device for point cloud data, including: an acquisition module, configured to acquire an original point cloud dataset, the original point cloud dataset being related to a point cloud acquisition device and including data of at least one spatial point; a first determination module, configured to determine the regional scope of a target segmentation unit, the set of target segmentation units being used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; a second determination module, configured to determine, based on the regional scope of the target segmentation unit, the spatial points within the regional scope of the target segmentation unit in the original point cloud dataset; and a processing module, configured to perform a downsampling process on the spatial points within the regional scope of the target segmentation unit respectively, and summarize the downsampling results of one or more target segmentation units to obtain a downsampled point cloud dataset.
[0021] To solve the above technical problems, embodiments of the present disclosure further provide a computer-readable storage medium, which is a non-volatile storage medium or a non-transitory storage medium, having a computer program stored thereon, and when the computer program is run by a processor, it executes the steps of the above method.
[0022] To solve the above technical problems, embodiments of the present disclosure further provide an electronic device, including a memory and a processor, having a computer program stored on the memory that can run on the processor, and when the processor runs the computer program, it executes the steps of the above method.
[0023] To solve the above technical problems, embodiments of the present disclosure further provide a computer program product, including a computer program / instructions, and when the computer program / instructions are executed by a processor, they implement the steps of the above method.
[0024] Compared with the prior art, the technical solutions of the embodiments of the present disclosure have the following beneficial effects:
[0025] Embodiments of the present disclosure provide a method for downsampling point cloud data, including: obtaining an original point cloud data set, which is related to a point cloud acquisition device and includes data of at least one spatial point; determining the regional range of a target segmentation unit, and a set of target segmentation units is used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; based on the regional range of the target segmentation unit, determining the spatial points in the original point cloud data set that fall within the regional range of the target segmentation unit; respectively performing downsampling processing on the spatial points that fall within the regional range of the target segmentation unit, and summarizing the downsampling results of one or more target segmentation units to obtain a downsampled point cloud data set.
[0026] Existing downsampling schemes do not consider the scattering characteristics of the light of the point cloud acquisition device in space when determining the minimum spatial unit for downsampling, resulting in the distribution of the downsampled point cloud data in space being different from the distribution of the point cloud data in the original point cloud data set in space, and even being distorted, affecting the detection accuracy of the point cloud acquisition device. In contrast, the present implementation scheme designs target segmentation units according to the scattering characteristics of the light of the point cloud acquisition device in space, where the light enables the point cloud acquisition device to acquire three-dimensional point cloud data, and the set of target segmentation units forms at least a part of a spherical space that conforms to the fan-shaped scattering characteristics of the light, and the spherical space has the point cloud acquisition device as the center of the sphere. Thus, performing downsampling operations in units of target segmentation units can ensure that the distribution of the downsampled point cloud data in space is close to or even consistent with the distribution of the original point cloud data in space, thereby alleviating the distortion of the point cloud data after downsampling and improving the detection accuracy of the point cloud acquisition device. Description of the Drawings
[0027] Figure 1 It is an equivalent schematic diagram of the detection space of a point cloud acquisition device according to an embodiment of the present disclosure;
[0028] Figure 2 is Figure 1 a schematic diagram of the segmentation unit in
[0029] Figure 3 It is a flowchart of a method for downsampling point cloud data according to an embodiment of the present disclosure;
[0030] Figure 4 It is a schematic structural diagram of a device for downsampling point cloud data according to an embodiment of the present disclosure;
[0031] Figure 5 It is a schematic hardware structure diagram of an electronic device according to an embodiment of the present disclosure. Specific embodiments
[0032] As described in the background art, there are many defects in the existing downsampling processing schemes for point cloud data, resulting in serious distortion of the point cloud data after downsampling, which seriously affects the detection accuracy of the point cloud acquisition device.
[0033] Specifically, the point cloud acquisition device may include a lidar, a structured light scanner, a time-of-flight sensor, a binocular camera, etc. The point cloud acquisition device obtains point cloud data through light, which may specifically include the following two major acquisition methods:
[0034] The first type is that the point cloud acquisition device emits a light beam onto an object and reflects it back, and obtains point cloud data based on the reflected signal. For example, a lidar measures the distance between an object and the sensor by emitting laser pulses and receiving the reflected signals, calculates the time required for the laser pulse to travel from emission to return and converts it into a distance, thereby generating three-dimensional point cloud data. The point cloud data acquisition methods of time-of-flight sensors and ultrasonic sensors are similar to those of lidars. Another example is that a structured light scanner projects light rays with a known pattern onto the surface of an object, captures the change of the reflected light ray pattern through a camera, and calculates the three-dimensional shape of the object based on the change of the pattern to form three-dimensional point cloud data.
[0035] The second type is that the point cloud acquisition device receives the light rays carrying object information, and then obtains point cloud data. For example, a stereo camera (such as a binocular camera) uses two or more cameras to capture images of the same scene from different angles using the principle of pinhole imaging. The light rays used for imaging received by each camera carry relevant information about the scene. By comparing the parallax in the images, the depth information of the object is calculated to generate three-dimensional point cloud data.
[0036] The point cloud data obtained by any of the above methods needs to be downsampled. Currently, the main methods for point cloud downsampling are as follows:
[0037] Uniform downsampling: By selecting the farthest points as sampling points, it tries to preserve geometric details and reduce losses during the process of reducing the number of points. The time complexity of this method is relatively high, and it may sample extremely noisy points.
[0038] Voxel downsampling: Voxelize the three-dimensional space and select one point in each voxel as the sampling point. This method is efficient, but its uniformity is not as good as that of uniform sampling.
[0039] Curvature downsampling: Sample more points in areas with larger curvature to preserve geometric features. This method has high computational efficiency and strong stability.
[0040] Random sampling: Randomly select a part of the points in the point cloud as the sampling result. It is simple and fast, but may lead to inaccurate results.
[0041] Nearest neighbor sampling: Calculate the distance from each point to its surrounding points and select the point with the maximum or minimum distance as the sampling result. This method can preserve key features, but may ignore detailed information.
[0042] Common lidars on the market usually scan the environment through fan-shaped or area array lasers and then sample to generate point clouds. Due to the fan-shaped scattering characteristics of laser beams, that is, they diverge in a fan shape in three-dimensional space, the farther away from the laser source, the larger the interval between the rays of the laser beam, and the sparser the measured point cloud. Therefore, the point clouds measured by lidars are generally non-uniformly distributed in the detection space. Further, the vertical resolution or horizontal resolution of some lidars is not fixed, that is, the point cloud distribution in a plane at a specific distance from the laser source is also non-uniform. Similarly, the beams emitted by time-of-flight sensors and structured light scanners also have scattering characteristics, and the measured point cloud distribution is also non-uniform. Binocular cameras utilize the principle of pinhole imaging, so the beams used for imaging also have scattering characteristics. The farther away from the camera, the lower the resolution and the sparser the obtained point cloud. However, most of the existing common downsampling methods are uniform sampling or processing based on mathematical characteristics, such as implementation based on voxels. Voxels can be understood as three-dimensional grid maps with fixed resolution. These downsampling methods do not design segmentation units or voxels according to the scattering characteristics of point cloud acquisition devices. This results in the distribution of the point cloud data after downsampling using the existing technology being inconsistent with the distribution of the original point cloud data in space, and even leading to distortion, which cannot meet the application requirements in some occasions with high requirements for data distribution.
[0043] To solve the above technical problems, an embodiment of the present disclosure provides a downsampling method for point cloud data, where the point cloud data is related to a point cloud acquisition device, including: obtaining an original point cloud data set, where the original point cloud data set includes data of at least one spatial point; determining a regional range of a target segmentation unit, and a set of target segmentation units is used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; based on the regional range of the target segmentation unit, determining the spatial points in the original point cloud data set that fall within the regional range of the target segmentation unit; performing downsampling processing on the spatial points that fall within the regional range of the target segmentation unit respectively, and summarizing the downsampling results of one or more target segmentation units to obtain a downsampled point cloud data set.
[0044] In this implementation, the target segmentation unit is designed according to the scattering characteristics of the light rays of the point cloud acquisition device in space. The light rays enable the point cloud acquisition device to obtain three-dimensional point cloud data. The set of target segmentation units forms at least a part of a spherical space that conforms to the fan-shaped scattering characteristics of the light rays, and this spherical space has the point cloud acquisition device as the center of the sphere. Thus, performing the downsampling operation in units of the target segmentation unit can ensure that the distribution of the downsampled point cloud data in space is close to or even consistent with the distribution of the original point cloud data in space, thereby alleviating the distortion of the point cloud data after downsampling and improving the detection accuracy of the point cloud acquisition device.
[0045] The segmentation unit in the embodiment of the present disclosure refers to the smallest division granularity of the detection space of the point cloud acquisition device. The detection space is the area covered by the light rays of the point cloud acquisition device in space. The segmentation unit in the embodiment of the present disclosure is, to a certain extent, equivalent to the voxel in the prior art, but the differences between the two are as follows: First, the segmentation unit is the segmentation result of the detection space of the point cloud acquisition device based on the scattering characteristics of the light rays of the point cloud acquisition device, and the set of segmentation units is spherical in space with the point cloud acquisition device as the center of the sphere, while the voxel is the smallest unit that composes a virtual three-dimensional grid map (usually a cube) without considering the scattering characteristics of the light rays of the point cloud acquisition device; Second, the volume distribution of each segmentation unit in the detection space can be non-uniform, while the volumes of all voxels in the three-dimensional grid map are the same; Third, the shape of the segmentation unit can be a spherical frustum, while the shape of the voxel is a cube. That is to say, in the embodiment of the present disclosure, first, by designing a segmentation unit that conforms to the scattering characteristics of the light rays of the point cloud acquisition device, compared with the sampling method in the prior art, it can make the distribution of the downsampled point cloud data in space closer to the distribution of the original point cloud data in space; further, the volume distribution of each segmentation unit can be non-uniform according to needs, so that the downsampled point cloud data is similar to the original point cloud data and is non-uniformly distributed in space.
[0046] Reference Figure 1In the embodiment of the present disclosure, the detection space around the point cloud acquisition device is virtualized as a spherical space 100 with the point cloud acquisition device as the sphere center O and the point cloud acquisition device as the radius R, and the segmentation unit 103 is used to divide the spherical space 100, that is, the segmentation unit 103 is used to sample the point cloud data located in the spherical space 100. The point cloud acquisition device as the sphere center O can be, for example, a light element of the point cloud acquisition device as the sphere center O, and the light element can be a light emitting element, such as a laser source of a laser radar, or a light receiving element, such as an image sensor of a binocular camera; the radius R of the spherical space 100 can be, for example, the maximum detection distance of the point cloud acquisition device, or the distance between the farthest spatial point in the point cloud data and the point cloud acquisition device, or other values. Further, the area of the segmentation unit 103 includes an area between a first spherical surface 101 and a second spherical surface 102 with a point cloud acquisition device (e.g., a laser source of a laser radar) as a sphere center O, within a range defined by a first horizontal angle and a second horizontal angle (recorded as a horizontal angle increment △α=|first horizontal angle-second horizontal angle|), and within a range defined by a first vertical angle and a second vertical angle (recorded as a vertical angle increment △β=|first vertical angle-second vertical angle|). The first spherical surface 101 is defined by a first radius, the second spherical surface 102 is defined by a second radius, the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle are all sphere center angles, the horizontal angle is an azimuth in a three-dimensional polar coordinate system, that is, an angle between a line connecting the sphere center and a point and the positive direction of the X axis, and the vertical angle is a polar angle in a three-dimensional polar coordinate system, that is, an angle between a line connecting the sphere center and a point and the positive direction of the Z axis. In other words, the segmentation unit 103 is a minimum partitioning granularity obtained by segmenting the spherical space 100 according to the three dimensions of radius increment △r, horizontal angle increment △α and vertical angle increment △β, where △r=|first radius-second radius|. Figure 1 The specific structure of a segmentation unit 103 in the spherical space 100 is exemplarily shown by color filling.
[0047] For example, when Δr, Δα, and Δβ corresponding to each segmentation unit 103 are the same, in the polar coordinate system, the region range of each segmentation unit 103 can be defined as:
[0048]
[0049] Among them, r is the radius value, k is the interval division index in the radius direction, such as the first radius of the kth radius interval is The second radius is ; α is the horizontal angle, m is the interval division index corresponding to the horizontal angle, such as the first horizontal angle corresponding to the mth horizontal angle interval is The second horizontal angle is ; β is the vertical angle, n is the interval division index corresponding to the vertical angle. For example, the first vertical angle corresponding to the nth vertical angle interval is , and the second vertical angle is .
[0050] Furthermore, for different segmentation units 103, at least one of the first radius, the second radius, the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle is different. Figure 2 Exemplarily, two segmentation units 103 (denoted as the first segmentation unit 103a and the second segmentation unit 103b respectively) are shown. They have the same first horizontal angle, second horizontal angle, first vertical angle, and second vertical angle. That is, the first segmentation unit 103a and the second segmentation unit 103b have the same horizontal angle increment △α and vertical angle increment △β. Further, continue to refer to Figure 2 , the first radius and the second radius of the first segmentation unit 103a and the second segmentation unit 103b are different. For example, the first segmentation unit 103a is defined by a first radius with a length of d1 and a second radius with a length of d2 to define the front and rear boundaries along the radius r direction, and the second segmentation unit 103b is defined by a first radius with a length of d3 and a second radius with a length of d4 to define the front and rear boundaries along the radius r direction. Figure 2 In the example shown, the first segmentation unit 103a and the second segmentation unit 103b are adjacent to each other in the front and rear along the extension direction of the radius r, and correspondingly, d1 < d2 = d3 < d4.
[0051] Furthermore, the farther away from the point cloud acquisition device (i.e., the center of the sphere O), the larger the volume of the segmentation unit 103. Continue to refer to Figure 2 , the volume of the second segmentation unit 103b, which is farther away from the point cloud acquisition device, is larger than the volume of the first segmentation unit 103a, which is closer to the point cloud acquisition device. On the premise that the distance from the segmentation unit 103 to the point cloud acquisition device (i.e., the center of the sphere O) is fixed, the larger the volume of the segmentation unit 103, the more the number of spatial points in the original point cloud dataset collected by the point cloud acquisition device that fall into this segmentation unit 103, and correspondingly, the higher the downsampling rate of the original point cloud dataset. Thus, considering that the light path of the point cloud acquisition device in the detection space diverges conically outward from the point cloud acquisition device, the farther away from the point cloud acquisition device, the larger the volume of the area covered by the light in the space. Therefore, the volume of the segmentation unit also changes accordingly with the distance from the segmentation unit to the point cloud acquisition device. Compared with the prior art voxel segmentation method with a fixed volume, the segmentation unit of this implementation scheme divides the detection space more in line with the light scattering characteristics of the point cloud acquisition device, and the distribution of the point cloud data in the space after the downsampling operation with the segmentation unit as the unit is more in line with the distribution of the original point cloud data in the space.
[0052] It can be understood that, according to actual needs, the volumes of the respective segmentation units 103 located at different distances relative to the point cloud acquisition device can also be made the same.
[0053] In some embodiments, with continued reference to Figure 1 and Figure 2 , the shape of the segmentation unit 103 can be a spherical frustum. The upper and lower bases of the spherical frustum are spherical caps with the point cloud acquisition device as the center of the sphere O and different radii (i.e., a part of the first spherical surface 101 and a part of the second spherical surface 102). The lateral edges of the spherical frustum belong to a part of the ray starting from the point cloud acquisition device (i.e., the center of the sphere O). Specifically, it includes a first lateral edge whose extension line passes through the center of the sphere O, has a first horizontal angle with the X-axis, and a first vertical angle with the Z-axis and is located between the first spherical surface 101 and the second spherical surface 102, a second lateral edge whose extension line passes through the center of the sphere O, has a second horizontal angle with the X-axis, and a first vertical angle with the Z-axis and is located between the first spherical surface 101 and the second spherical surface 102, a third lateral edge whose extension line passes through the center of the sphere O, has a first horizontal angle with the X-axis, and a second vertical angle with the Z-axis and is located between the first spherical surface 101 and the second spherical surface 102, and a fourth lateral edge whose extension line passes through the center of the sphere O, has a second horizontal angle with the X-axis, and a second vertical angle with the Z-axis and is located between the first spherical surface 101 and the second spherical surface 102. The first lateral edge, the second lateral edge, the first spherical surface 101, and the second spherical surface 102 enclose the first side surface of the spherical frustum. The first lateral edge, the third lateral edge, the first spherical surface 101, and the second spherical surface 102 enclose the second side surface of the spherical frustum. The second lateral edge, the fourth lateral edge, the first spherical surface 101, and the second spherical surface 102 enclose the third side surface of the spherical frustum. The third lateral edge, the fourth lateral edge, the first spherical surface 101, and the second spherical surface 102 enclose the fourth side surface of the spherical frustum.
[0054] In some embodiments, each segmentation unit 103 can have the same radius increment Δr. That is to say, for each spherical pyramid, the spherical pyramid can be equally spaced along the radius R to obtain multiple segmentation units 103. Thus, along the radius R (for example, in the laser emission direction of the lidar), the radius increment Δr of each segmentation unit remains consistent. At this time, it can be semi-uniform downsampling.
[0055] Alternatively, the radius increment Δr of the segmentation unit 103 can be positively correlated with the distance from the segmentation unit 103 to the point cloud acquisition device (i.e., the center of the sphere O). That is, along the radial direction, the larger the distance from the segmentation unit 103 to the center of the sphere O, the larger the radius increment Δr of the segmentation unit 103. At this time, it can be adaptive downsampling. For example, the farther away from the center of the sphere O along the radius R, the larger the radius increment Δr of the segmentation unit 103, such as Figure 2(d4 - d3) > (d2 - d1). For another example, when the radius increment Δr of the segmentation unit 103 is positively correlated with the distance from the segmentation unit 103 to the point cloud acquisition device (i.e., the center of the sphere O), the radius increment Δr is related to the product of the first radius and the horizontal angle increment Δα, that is , where · represents multiplication and d represents the first radius. It can be understood that other methods can also be used to define Δr, which will not be specifically limited here.
[0056] In some embodiments, the point cloud acquisition device acquires point cloud data by emitting light beams. Specifically, it can emit light beams along the horizontal scanning direction and / or the vertical scanning direction to scan the surrounding space, where the scanning direction can be the rotation direction of the point cloud acquisition device in the horizontal plane or the vertical plane, or the arrangement direction of the light beam array in the horizontal plane or the vertical plane. For example, one of the horizontal scanning direction and the vertical scanning direction is the rotation direction of the point cloud acquisition device, and the other is the arrangement direction of the light beam array emitted by the point cloud acquisition device; or both the horizontal scanning direction and the vertical scanning direction are the rotation directions of the point cloud acquisition device. The angle between adjacent light beams emitted by the point cloud acquisition device along the horizontal scanning direction (emitted simultaneously or successively) is denoted as the horizontal scanning angle, and the angle between adjacent light beams emitted along the vertical scanning direction (emitted simultaneously or successively) is denoted as the vertical scanning angle.
[0057] Taking lidar as an example, the lidar scans to form two of the four side surfaces of the spherical frustum along the horizontal scanning direction, and scans to form the remaining two side surfaces of the four side surfaces along the vertical scanning direction. For example, the Figure 1 shown spherical space 100 can be divided into multiple spherical pyramids 104 (as shown in Figure 2 ), and the spherical pyramid 104 is further cut along the radius R to obtain the segmentation unit 103. Thus, simulating the operation mode of the lidar fan-shaped scan, the geometric body composed of two spherical caps and the scanning beams of the laser in different directions is positioned as a spherical frustum, and the original point cloud data is downsampled in units of the spherical frustum, so that the distribution of the downsampled point cloud data in the detection space conforms to the distribution of the original point cloud data in the detection space, that is, the closer to the laser source, the more sampling points (i.e., point cloud data, corresponding to spatial points) are retained; the farther from the laser source, the fewer sampling points are retained.
[0058] In some embodiments, the horizontal angle increment Δα between the first horizontal angle and the second horizontal angle of each segmentation unit is associated with the horizontal scanning angle of the point cloud acquisition device. Specifically, the horizontal scanning angle may be a preset parameter of the point cloud acquisition device, such as a factory-set parameter. For example, when the horizontal scanning angle is fixed, the horizontal angle increment Δα may be equal to the horizontal scanning angle, so that the division accuracy of the segmentation unit is consistent with the horizontal scanning resolution of the point cloud acquisition device, which is beneficial to better reflect and retain the distribution of point cloud data in the detection space; for another example, the horizontal angle increment Δα may take a value that is an integer multiple of the horizontal scanning angle, which is beneficial to reducing the number of segmentation units obtained by division, further increasing the downsampling rate, and reducing the amount of data processing during subsequent calculations.
[0059] Alternatively, each segmentation unit 103 may have the same horizontal angle increment Δα. Thus, different detection scenarios can be adapted, and the compatibility of this implementation solution can be improved.
[0060] In some embodiments, the vertical angle increment Δβ between the first vertical angle and the second vertical angle of each segmentation unit is associated with the vertical scanning angle of the point cloud acquisition device. Specifically, the vertical scanning angle may be a preset parameter of the point cloud acquisition device, such as a factory-set parameter. For example, the vertical angle increment Δβ may be equal to the vertical scanning angle to ensure that the division accuracy of the segmentation unit is consistent with the vertical scanning resolution of the point cloud acquisition device, and as much as possible retain the distribution of point cloud data in the detection space. For another example, the vertical angle increment Δβ may take a value that is an integer multiple of the vertical scanning angle, which is beneficial to reducing the number of segmentation units obtained by division, further increasing the downsampling rate, and reducing the amount of data processing during subsequent calculations.
[0061] Alternatively, each segmentation unit 103 may have the same vertical angle increment Δβ.
[0062] In practical applications, the vertical angle increment Δβ (and / or the horizontal angle increment Δα) can be flexibly set to a constant value or an adaptive value according to user needs to meet different detection scenarios and downsampling requirements.
[0063] In some embodiments, the horizontal scanning angles of the point cloud acquisition device in the horizontal scanning direction may be unevenly distributed, that is, the values of the horizontal scanning angles of the point cloud acquisition device in the horizontal scanning direction are variable. Correspondingly, the horizontal angle increment Δα changes with the change of the horizontal scanning angle. For example, a look-up table of the horizontal angle increment Δα can be pre-generated to record the specific values of the horizontal angle increment Δα corresponding to different horizontal angle regions in the spherical space 100.
[0064] Similarly, the vertical scanning angles of the point cloud acquisition device in the vertical scanning direction may be unevenly distributed, that is, the values of the vertical scanning angles of the point cloud acquisition device in the vertical scanning direction are variable. Accordingly, the vertical angle increment Δβ varies with the change of the vertical scanning angle. For example, a look-up table of the vertical angle increment Δβ may be pre-generated to record the specific values of the vertical angle increment Δβ corresponding to different vertical angle regions within the spherical space 100.
[0065] The division method of the spherical space 100 and the segmentation unit 103 and the definition of the specific region range are introduced above. It can be understood that in the actual processing process, it is not necessarily required to determine the region range information of all the segmentation units 103 within the spherical space 100. In other words, the actual processing process may only involve some of the segmentation units 103 within the spherical space 100. In one example, all the segmentation units 103 within the spherical space 100 can be traversed to determine the spatial points in the point cloud data that fall within the segmentation unit 103. In this case, the region range information of all the segmentation units 103 needs to be determined, that is, the segmentation units 103 to be processed form a complete spherical space 100. In another example, to improve efficiency, the traversal range can be reduced according to the information of the detected target object, that is, only some of the segmentation units 103 within the spherical space 100 are traversed. In other words, the segmentation units 103 to be processed form a part of the complete spherical space 100. In still another example, a spatial point can be selected first, and the corresponding segmentation unit 103 can be determined according to the information of the spatial point and the pre-stored relevant information of the segmentation unit 103, which can also improve efficiency. In other words, the segmentation units 103 to be processed form a part of the complete spherical space 100.
[0066] For ease of understanding, in the embodiments of the present disclosure, the segmentation unit whose region range needs to be determined for downsampling processing is referred to as a candidate segmentation unit. It can be understood that the set of candidate segmentation units forms at least a part of the spherical space 100. To determine the region range of each candidate segmentation unit, the relevant information of the candidate segmentation unit needs to be stored in the memory of the electronic device for later call. The relevant information of the candidate segmentation unit may include the information of the region range of the candidate segmentation unit, such as the first radius, the second radius, the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle, or the coordinate information of each vertex of the spherical crown frustum. The coordinate information may be the position coordinates in the polar coordinate system or the Cartesian coordinate system with the spherical center O as the origin; the relevant information of the candidate segmentation unit may also include the information for determining the region range of the candidate segmentation unit. For example, when the radius increment Δr, the horizontal angle increment Δα, and the vertical angle increment Δβ are fixed, only the initial values of the radius, the horizontal angle, and the vertical angle and the information of Δα, Δβ, and Δr need to be pre-stored.
[0067] Furthermore, in the embodiments of the present disclosure, the candidate segmentation unit processed each time (determining its area range and performing downsampling) is referred to as the target segmentation unit. Determining the area range of the target segmentation unit means determining the area range of the candidate segmentation unit to be processed currently. It can be understood that the set of target segmentation units also forms at least a part of the spherical space 100.
[0068] To make the above objects, features, and beneficial effects of the present disclosure more obvious and understandable, the following will describe in detail the specific embodiments of the present disclosure with reference to the accompanying drawings.
[0069] Figure 3 It is a flowchart of a method for downsampling point cloud data according to an embodiment of the present disclosure.
[0070] This implementation scheme can be applied to the application scenario of point cloud data processing, and is used to perform downsampling processing on the original point cloud data obtained by the point cloud acquisition device, so as to reduce the computational amount of subsequent data processing.
[0071] This implementation scheme can be executed by the processor of the electronic device. The electronic device can be a computer, a point cloud acquisition device, or other devices including a processor. The processor can be the central processing unit (CPU) of the electronic device, or can also be a newly added component dedicated to executing this implementation scheme in the electronic device, such as a functional module dedicated to performing downsampling processing.
[0072] Specifically, referring to Figure 3 , the method for downsampling point cloud data according to this embodiment may include the following steps (abbreviated as S):
[0073] S302, obtain the original point cloud data set, where the original point cloud data set is related to the point cloud acquisition device and includes data of at least one spatial point.
[0074] More specifically, the original point cloud data set may include one or more original point cloud data. The original point cloud data refers to the point cloud data obtained by the point cloud acquisition device and to be downsampled using the embodiments of the present disclosure. The point cloud data is used to represent the data of the spatial points detected by the light of the point cloud acquisition device in the detection space, and may specifically include position coordinates, reflection intensity, color, etc.
[0075] Further, the processor can communicate with the detection module of the point cloud acquisition device or the memory of the electronic device to obtain the original point cloud data set detected by the point cloud acquisition device. For example, the detection module can be a sensor.
[0076] In some embodiments, the data of the spatial points may include the Cartesian coordinate position information of the spatial points. For example, the position coordinates of each spatial point in the original point cloud dataset may be characterized based on the Cartesian coordinate system.
[0077] Further, after S302, the downsampling method described in this embodiment may further include the step of: for the i-th spatial point in the original point cloud dataset, converting the Cartesian coordinate position information of the i-th spatial point into polar coordinate position information . Wherein, α and β are converted to the corresponding radian intervals according to the coordinate point symbols.
[0078] (1)
[0079] By converting the coordinate information of each spatial point in the original point cloud dataset into a representation based on the polar coordinate system, it is beneficial to determine the area range of the target segmentation unit that the spatial point falls into in subsequent steps, as Figure 2 shown.
[0080] In a variant, the data of the spatial points may include the polar coordinate position information of the spatial points, that is, the coordinate position of the spatial points may be characterized based on the polar coordinate system. In this variant, the original point cloud dataset originally output by the point cloud acquisition device may directly execute the subsequent steps (such as S304 described below), without performing preprocessing such as coordinate system conversion, and the downsampling efficiency of this implementation scheme is higher.
[0081] Further, continuing to refer to Figure 3 , the downsampling method for the point cloud acquisition device described in this embodiment may include the following steps:
[0082] S304, determining the area range of the target segmentation unit, where the set of target segmentation units is used to divide the detection space of the point cloud acquisition device and form at least a part of the spherical space.
[0083] As described above, determining the area range of the target segmentation unit is to determine the area range of the candidate segmentation unit to be processed currently.
[0084] Specifically, the area range of the target segmentation unit may include the three-dimensional space enclosed by the contour of the target segmentation unit, that is, the three-dimensional space enclosed by the radius increment △r, the horizontal angle increment △α, and the vertical angle increment △β.
[0085] In some embodiments, to improve the downsampling efficiency, a target spatial point, i.e., the spatial point to be processed currently, can be given first, and then the regional range of the candidate segmentation unit to which the target spatial point belongs, i.e., the regional range of the target segmentation unit, can be determined. Specifically, S304 may include the steps of: obtaining the polar coordinate position information of the target spatial point, where the target spatial point is selected from the original point cloud dataset; and determining the regional range of the target segmentation unit corresponding to the target spatial point based on the radius value, horizontal angle value, and vertical angle value of the polar coordinate position information of the target spatial point.
[0086] Specifically, the target spatial point can be randomly selected from the original point cloud dataset. Alternatively, the target spatial point can be the outermost spatial point in the original point cloud dataset, such as the spatial point with the largest (or smallest) radius value, the largest (or smallest) horizontal angle value, and / or the largest (or smallest) vertical angle value.
[0087] Furthermore, the regional range of the target segmentation unit corresponding to the target spatial point can be determined according to the polar coordinate position information of the target spatial point and the relevant information of the pre-stored candidate segmentation unit.
[0088] For example, when the radius increment △r, horizontal angle increment △α, and vertical angle increment △β are fixed, the regional range of the target segmentation unit can be calculated in real time according to the polar coordinate position information of the target spatial point and the initial values of the radius, horizontal angle, and vertical angle, the radius increment △r, horizontal angle increment △α, and vertical angle increment △β in the relevant information of the candidate segmentation unit. For example, when the initial value of the radius is 0, the radius value of the polar coordinate position information of the target spatial point can be divided by the radius increment △r, and the integer part before and after the calculation result is taken to obtain the first radius and the second radius of the target segmentation unit, that is, the floor value of the calculation result is taken as the first radius of the target segmentation unit, and the ceiling value of the calculation result is taken as the second radius of the target segmentation unit.
[0089] For another example, the relevant information of the candidate segmentation unit may include the regional range information of multiple candidate segmentation units. The candidate segmentation unit into which the target spatial point falls can be found from these candidate segmentation units according to the polar coordinate position information of the target spatial point. The found candidate segmentation unit is the target segmentation unit, and the regional range information of this candidate segmentation unit is the regional range information of the target segmentation unit.
[0090] In this embodiment, taking the spatial points in the original point cloud dataset as indexes, the regional range of the target segmentation unit is determined based on the coordinate positions of the spatial points, which helps to avoid the situation that there are actually no spatial points in the original point cloud dataset falling within the regional range of the blindly determined target segmentation unit. Thus, the set of target segmentation units can be determined with less data calculation amount, the downsampling efficiency can be improved, and the data processing pressure on the processor can be reduced.
[0091] In a variant, S304 may specifically include the steps of: determining the regional range of the target segmentation unit based on the information of one or more candidate segmentation units preset in advance.
[0092] Specifically, the processor may access the memory of the electronic device to call the relevant information of the candidate segmentation units stored in advance, and the relevant information includes the information of one or more candidate segmentation units.
[0093] For example, a candidate segmentation unit may be selected from one or more candidate segmentation units to obtain an initial target segmentation unit, and the regional ranges of the respective target segmentation units may be determined one by one from the initial target segmentation unit according to a certain traversal rule. Among them, the regional range of a subsequent target segmentation unit is obtained, for example, by increasing a horizontal angle increment Δα in the horizontal scanning direction, increasing a vertical angle increment Δβ in the vertical scanning direction, and increasing a radius increment Δr along the ray with the point cloud acquisition device as an end point on the basis of the regional range of the previous target segmentation unit; or the regional range of the subsequent target segmentation unit is directly obtained from the pre-stored information.
[0094] For the selection of the initial target segmentation unit, a target space point may also be randomly selected from the original point cloud dataset, and the candidate segmentation unit in which the target space point falls may be determined as the initial target segmentation unit. Alternatively, a first radius, a second radius, a first horizontal angle, a second horizontal angle, a first vertical angle, and a second vertical angle of the initial target segmentation unit may be preset in advance so as to directly determine the regional range of the initial target segmentation unit when executing S304.
[0095] Also for example, the area occupied by the set of candidate segmentation units in the spherical space 100 may be determined according to the maximum scanning range of the point cloud acquisition device that needs to be downsampled this time, and all candidate segmentation units falling within the maximum scanning range in the spherical space 100 may be sequentially determined as target segmentation units.
[0096] In this variant, the target segmentation unit is determined based on the relevant information of the candidate segmentation units preset in advance. Since the regional ranges of the candidate segmentation units are known information, the real-time data processing volume of the processor is greatly reduced, which is beneficial to improving the execution efficiency of the entire downsampling scheme.
[0097] Further, continuing to refer to Figure 3 , the downsampling method for the point cloud data described in this embodiment may include the following steps:
[0098] S306, based on the regional range of the target segmentation unit, determining the space points in the original point cloud dataset that fall within the regional range of the target segmentation unit.
[0099] Specifically, according to the regional range of the target segmentation unit characterized in the polar coordinate system and the polar coordinate position information of each spatial point in the original point cloud dataset, the spatial points falling within the regional range of the target segmentation unit are determined.
[0100] For example, continuing to refer to Figure 2 , assuming that the second segmentation unit 103b is the target segmentation unit, and there is a spatial point A in the original point cloud dataset with polar coordinate position information {rA, αA, βA}, and d3 < rA < d4, αA is within the interval of the horizontal angle increment Δα of the second segmentation unit 103b, and βA is within the interval of the vertical angle increment Δβ of the second segmentation unit 103b, then it can be determined that the spatial point A falls into Figure 2 the second segmentation unit 103b shown.
[0101] Further, continuing to refer to Figure 3 , the downsampling method of the point cloud data in this embodiment may include the following steps:
[0102] S308, perform downsampling processing on the spatial points falling within the regional range of the target segmentation unit respectively, and summarize the downsampling results of one or more target segmentation units to obtain a downsampled point cloud dataset .
[0103] Specifically, the centroid or geometric center of the spatial points falling within the regional range of the target segmentation unit can be determined, and the data of the centroid or geometric center is used as the downsampled point cloud data corresponding to the target segmentation unit. Among them, the geometric center of the spatial points can be determined based on algorithms such as the bounding box algorithm, such as the AABB bounding box (Axis-aligned bounding box), Sphere, Oriented bounding box OBB (Oriented bounding box), and Fixed directions hulls or k-DOP.
[0104] For example, the centroid of all spatial points falling within the regional range of the target segmentation unit can be calculated based on formula (2) :
[0105] (2)
[0106] where J is the total number of spatial points falling within the regional range of the target segmentation unit, j is the j-th spatial point among the J spatial points, and 0 ≤ j ≤ J.
[0107] The downsampling processing is used to reduce the number of spatial points falling within the regional range of the target segmentation unit. For example, referring to Figure 2, Assume that the second segmentation unit 103b is the target segmentation unit. Before downsampling, a total of 11 spatial points fall into the second segmentation unit 103b. Through the downsampling process in S308, the number of spatial points in the second segmentation unit 103b can be reduced to 1. Thus, the volume of the point cloud data that needs to be calculated during subsequent data processing is reduced. Further, when performing the downsampling process in S308, the centroid or center of mass of the spatial points within the area range of the target segmentation unit is determined as the downsampled point cloud data corresponding to the target segmentation unit, such that the downsampled point cloud data can reflect to a certain extent the distribution of the spatial points within the area range of the target segmentation unit.
[0108] In some embodiments, S304 to S308 can be executed sequentially in a loop. Further, after each execution of S308, the data of the spatial points within the area range of the target segmentation unit can be removed from the original point cloud dataset.
[0109] For example, starting from the initial target segmentation unit, traverse the original point cloud dataset to determine the spatial points within the area range of the current target segmentation unit, calculate the centroid of the spatial points within the area range of the current target segmentation unit to obtain the downsampling result of the current target segmentation unit. Then, remove the spatial points within the area range of the current target segmentation unit from the original point cloud dataset, determine the next target segmentation unit based on the current target segmentation unit as the updated current segmentation unit, and repeat the foregoing steps until the original point cloud dataset is traversed or all target segmentation units are traversed.
[0110] For another example, select a target spatial point from the original point cloud dataset, determine the target segmentation unit into which the target spatial point falls, then traverse the original point cloud dataset to determine all spatial points that fall into the target segmentation unit, calculate the centroid of the spatial points within the area range of the target segmentation unit to obtain the downsampling result of the current target segmentation unit. Then, remove the spatial points within the area range of the target segmentation unit from the original point cloud dataset, and then select a target spatial point from the updated original point cloud dataset, and repeat the foregoing steps until the original point cloud dataset is traversed (i.e., the updated original point cloud dataset is empty).
[0111] In a specific implementation, after S306 and before S308, the downsampling method described in this implementation scheme may further include the steps of: determining the total number J of spatial points within the area range of the target segmentation unit; performing downsampling processing on the spatial points within the area range of the target segmentation unit when the total number J meets a preset condition; and when the total number J does not meet the preset condition, the downsampled point cloud dataset does not include the data of the spatial points within the area range of the target segmentation unit.
[0112] Specifically, the preset condition may be a preset point filtering threshold Q. The specific value of the point filtering threshold Q can be set as needed, such as taking values from 0 to 5. For example, Q = 3.
[0113] Furthermore, preliminary filtering can be performed based on the point filtering threshold Q before actually performing the downsampling operation. For example, the total number J of spatial points within the region range falling into the target segmentation unit can be statistically judged by setting the point filtering threshold Q. If J ≥ Q, then S308 is executed; otherwise, that is, J < Q, it is considered that there are no valid points in the target segmentation unit, and all spatial points within the region range falling into this target segmentation unit are discarded without executing S308.
[0114] Thus, a batch of spatial points can be screened out according to the total number J of spatial points falling into the target segmentation unit. Only the target segmentation units with a sufficiently large total number J of falling points will sample and retain one spatial point, which can reduce the number of executions of the downsampling operation and reduce the data processing volume of the downsampling operation. On the other hand, there will inevitably be noise points in the original point cloud dataset. If the total number J of the spatial points originally falling into the target segmentation unit is already very small (for example, only 1), then these points can be considered as noise points and need to be removed. If the only one spatial point is still retained after this target segmentation unit executes S308, it will cause the weight of this spatial point to be increased unreasonably, and instead will cause the distribution of the point cloud data in the detection space to be distorted after downsampling.
[0115] In a specific implementation, the downsampled point cloud dataset summarized in S308 may include multiple sampling points. Correspondingly, this implementation scheme may further include steps: determining target sampling points with the same horizontal angle value and vertical angle value based on the polar coordinate position information of the multiple sampling points; for the target sampling points with the same horizontal angle value and vertical angle value, retaining the target sampling point with the smallest radius value and removing other target sampling points from the downsampled point cloud dataset.
[0116] In one example, the original point cloud data may also be the ideal point cloud data of the detected target object. The ideal point cloud data of the target object is the point cloud data of the target object in the ideal state. Compared with the measured point cloud data that may only reflect partial position information of the target object, the ideal point cloud data can reflect the overall position information of the target object. The ideal point cloud data can be obtained from the three-dimensional ideal model corresponding to the target object, or by pre-scanning the whole target object with a point cloud acquisition device. The ideal point cloud data of the target object consists of multiple discretely distributed spatial points, and the ideal model corresponding to the ideal point cloud data is the same as the shape and size of the target object. Therefore, the ideal point cloud data theoretically includes the point cloud data at each discrete position of the target object. When determining the pose information of the target object, the ideal point cloud data and the measured point cloud data can be registered first to determine the transformation relationship between the two, and then based on the ideal point cloud data and this transformation relationship, the positions of each point of the target object can be determined more accurately.
[0117] To further improve the calculation efficiency or the registration accuracy, it is also necessary to perform downsampling processing on the ideal point cloud data. Specifically, based on the relative position information between the target object and the point cloud acquisition device, the representation of the ideal point cloud data in the coordinate system of the point cloud acquisition device can be determined. For example, a polar coordinate system representation with the point cloud acquisition device as the pole center, and then steps S302 - S308 are looped to obtain the downsampled point cloud data set. Among them, the relative position information between the target object and the point cloud acquisition device can be preset or obtained based on the measured point cloud data.
[0118] Furthermore, the downsampled point cloud data set obtained after downsampling the ideal point cloud data also reflects the overall spatial information of the target object, while the measured point cloud data may lack the spatial information of many unmeasured dead corners and loopholes. If the two are directly registered, it may occur that the spatial points in the dead corner part of the ideal point cloud data are matched with the spatial points in the non-dead corner part of the measured point cloud data, resulting in an inaccurate registration result. To avoid this situation and improve the accuracy of point cloud data registration, in the embodiments of the present disclosure, according to the visibility of the point cloud acquisition device, the spatial points in the downsampled point cloud data set that are blocked by other spatial points are deleted, that is, projection filtering processing is performed by simulating the actual measurement scenario.
[0119] Specifically, for the target sampling points in the downsampled point cloud data set with the same horizontal angle value and the same vertical angle value, it means that the connection lines of these target sampling points pass through the point cloud acquisition device, that is, these target sampling points are on the same radial direction. At this time, among these target sampling points, the target sampling points with non-minimum radius values are actually blocked by the target sampling points with the minimum radius value, so the target sampling points with non-minimum radius values need to be removed from the downsampled point cloud data set.
[0120] For example, it is possible to traverse the downsampled point cloud dataset obtained by executing S308 and for the point sets with the same m and n , only retain , where . Then, for the point sets with the same m and n, the downsampled point cloud dataset after removing other target sampling points can be denoted as .
[0121] Therefore, considering that the light of the point cloud acquisition device in practical applications cannot see the occluded objects during transmission, in this embodiment, the projection principle of the point cloud acquisition device is simulated to further screen the downsampled point cloud dataset, and the downsampled point cloud data located behind the occluder is discarded, further improving the authenticity of the ideal point cloud data after downsampling processing.
[0122] In a specific implementation, after S302 and before S304, this implementation scheme may further include the step of filtering the data of the spatial points in the original point cloud dataset. For example, an outlier removal algorithm such as a clustering algorithm can be used to remove the outliers in the original point cloud dataset, and then S304 to S308 are executed for downsampling processing. Thus, the interference of individual outliers on the downsampling effect can be reduced.
[0123] As described above, by adopting this implementation scheme, the target segmentation unit is designed accordingly according to the scattering characteristics of the light of the point cloud acquisition device in space, and the set of target segmentation units constitutes at least a part of the spherical space conforming to the laser fan-shaped scattering characteristics, and this spherical space takes the point cloud acquisition device as the center of the sphere. Thus, the downsampling operation is performed in units of the target segmentation unit, which can ensure that the distribution of the downsampled point cloud data in space is close to or even consistent with the distribution of the original point cloud data in space, thereby alleviating the distortion of the point cloud data after downsampling and improving the detection accuracy of the point cloud acquisition device.
[0124] Figure 4 is a schematic structural diagram of a downsampling device 4 for point cloud data according to an embodiment of the present disclosure. Those skilled in the art understand that the downsampling device 4 for point cloud data described in this embodiment can be used to implement the above Figures 1 to 3 method technical solutions described in the embodiments.
[0125] Specifically, referring to Figure 4, the downsampling device 4 for point cloud data in this embodiment may include: an acquisition module 41, configured to acquire an original point cloud data set, where the original point cloud data set is related to a point cloud acquisition device and includes data of at least one spatial point; a first determination module 42, configured to determine the regional range of a target segmentation unit, and the set of target segmentation units is used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; a second determination module 43, configured to determine, based on the regional range of the target segmentation unit, the spatial points in the original point cloud data set that fall within the regional range of the target segmentation unit; and a processing module 44, configured to perform downsampling processing on the spatial points that fall within the regional range of the target segmentation unit respectively, and summarize the downsampling results of one or more target segmentation units to obtain a downsampled point cloud data set.
[0126] For more content about the working principle and working mode of the downsampling device 4 for point cloud data, reference may be made to the relevant description in the above Figures 1 to 3 , which will not be elaborated here.
[0127] This embodiment of the present disclosure also provides a computer-readable storage medium, which is a non-volatile storage medium or a non-transitory storage medium, on which a computer program is stored. When the computer program is run by a processor, it executes the steps of the downsampling method for point cloud data provided in any of the above embodiments. Preferably, the storage medium may include computer-readable storage media such as non-volatile memory or non-transitory memory. The storage medium may include ROM, RAM, a magnetic disk, or an optical disc, etc.
[0128] This embodiment of the present disclosure also provides an electronic device, including a memory and a processor. A computer program that can run on the processor is stored on the memory. When the processor runs the computer program, it executes the steps of the downsampling method for point cloud data provided in the corresponding above Figures 1 to 3 embodiment. The electronic device may be a device with data processing capabilities such as a computer.
[0129] Figure 5 is a schematic diagram of the hardware structure of an electronic device according to an embodiment of the present disclosure.
[0130] The electronic device may include a processor 501 and a memory 502 storing computer program instructions.
[0131] Specifically, the above-mentioned processor 501 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present disclosure.
[0132] The memory 502 may include a mass storage for data or instructions. By way of example and not limitation, the memory 502 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive, or a combination of two or more of these. In a suitable case, the memory 502 may include removable or non-removable (or fixed) media. In a suitable case, the memory 502 may be internal or external to the integrated gateway disaster recovery device. In a particular embodiment, the memory 502 is a non-volatile solid-state memory.
[0133] The memory may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage media device, an optical storage media device, a flash memory device, an electrical, optical, or other physical / tangible memory storage device. Thus, generally, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., memory devices) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0134] The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement any one of the downsampling methods for point cloud data in the above embodiments.
[0135] In one example, the electronic device may further include a communication interface 503 and a bus 510. Among them, as Figure 5 shown, the processor 501, the memory 502, and the communication interface 503 are connected through the bus 510 and complete communication with each other.
[0136] The communication interface 503 is mainly used to implement communication between the various modules, devices, units, and / or devices in the embodiments of the present disclosure.
[0137] The bus 510 includes hardware, software, or both, and couples components of the online data flow metering device to each other. By way of example and not limitation, the bus may include an Accelerated Graphics Port (AGP) or other graphics bus, an Enhanced Industry Standard Architecture (EISA) bus, a Front Side Bus (FSB), a HyperTransport (HT) interconnect, an Industry Standard Architecture (ISA) bus, an InfiniBand interconnect, a Low Pin Count (LPC) bus, a memory bus, a MicroChannel Architecture (MCA) bus, a Peripheral Component Interconnect (PCI) bus, a PCI-Express (PCI-X) bus, a Serial Advanced Technology Attachment (SATA) bus, a Video Electronics Standards Association Local (VLB) bus, or other suitable buses, or a combination of two or more of these. Where appropriate, the bus 510 may include one or more buses. Although embodiments of the present disclosure describe and illustrate specific buses, the present disclosure contemplates any suitable bus or interconnect.
[0138] Embodiments of the present disclosure also provide a computer program product. When the computer program / instructions in the computer program product are executed by a processor of an electronic device, the steps of the downsampling method for point cloud data provided by the corresponding embodiment are implemented. Figures 1 to 3
[0139] It should be clear that the present disclosure is not limited to the specific configurations and processes described above and illustrated in the figures. For the sake of brevity, detailed descriptions of known methods are omitted here. In the above embodiments, several specific steps are described and illustrated as examples. However, the method process of the present disclosure is not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions, or change the order between steps after understanding the spirit of the present disclosure.
[0140] The functional blocks shown in the above-described structural block diagrams can be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application-specific integrated circuit (ASIC), appropriate firmware, a plug-in, a functional card, and so on. When implemented in software, the elements of the present disclosure are programs or code segments for performing the required tasks. The program or code segment can be stored in a machine-readable medium or transmitted via a data signal carried in a carrier wave on a transmission medium or a communication link. "Machine-readable medium" can include any medium that can store or transmit information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, radio frequency (RF) links, and so on. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc. It should also be noted that the exemplary embodiments mentioned in the present disclosure describe some methods or systems based on a series of steps or devices. However, the present disclosure is not limited to the order of the above steps, that is, the steps can be executed in the order mentioned in the embodiments, or different from the order in the embodiments, or several steps can be executed simultaneously.
[0141] As described above with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to embodiments of the present disclosure. It should be understood that each block in the flowcharts and / or block diagrams, and the combination of blocks in the flowcharts and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine such that the instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the functions / actions specified in one or more blocks of the flowcharts and / or block diagrams. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field-programmable logic circuit. It can also be understood that each block in the block diagrams and / or flowcharts, and the combination of blocks in the block diagrams and / or flowcharts, can also be implemented by dedicated hardware for performing the specified functions or actions, or can be implemented by a combination of dedicated hardware and computer instructions.
[0142] Although the present disclosure is disclosed as above, the present disclosure is not limited thereto. Any person skilled in the art can make various changes and modifications without departing from the spirit and scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the scope defined by the claims.
Claims
1. A downsampling method for point cloud data, characterized in that, Including: Obtain an original point cloud data set, the original point cloud data set being related to a point cloud acquisition device and including data of at least one spatial point; Determine the regional range of a target segmentation unit, the set of target segmentation units being used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; Based on the regional range of the target segmentation unit, determine the spatial points in the original point cloud data set that fall within the regional range of the target segmentation unit; Perform downsampling processing on the spatial points that fall within the regional range of the target segmentation unit respectively, and summarize the downsampling results of one or more target segmentation units to obtain a downsampled point cloud data set; Wherein, the region of each target segmentation unit includes a region between a first spherical surface and a second spherical surface centered on the point cloud acquisition device, within a range defined by a first horizontal angle and a second horizontal angle, and within a range defined by a first vertical angle and a second vertical angle, wherein the first spherical surface and the second spherical surface are respectively defined by a first radius and a second radius, and the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle are all spherical center angles, and for different target segmentation units, at least one of the first radius, the second radius, the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle is different.
2. The method according to claim 1, wherein The farther away from the point cloud acquisition device, the larger the volume of the target segmentation unit.
3. The method according to claim 1, wherein Each of the target segmentation units has the same radius increment, or the radius increment of the target segmentation unit is positively correlated with the distance from the target segmentation unit to the point cloud acquisition device, where the radius increment is the radius increment between the first radius and the second radius; and / or The horizontal angle increment between the first horizontal angle and the second horizontal angle of each target segmentation unit is associated with the horizontal scanning angle of the point cloud acquisition device; and / or The vertical angle increment between the first vertical angle and the second vertical angle of each target segmentation unit is associated with the vertical scanning angle of the point cloud acquisition device.
4. The method according to claim 3, characterized in that, When the radius increment of the target segmentation unit is positively correlated with the distance from the target segmentation unit to the point cloud acquisition device, the radius increment is related to the product of the first radius and the horizontal angle increment.
5. The method according to claim 1, characterized in that The determining the regional range of the target segmentation unit includes: Obtain the polar coordinate position information of a target spatial point, the target spatial point being selected from the original point cloud data set; Based on the radius value, horizontal angle value, and vertical angle value of the polar coordinate position information of the target spatial point, determine the regional range of the target segmentation unit corresponding to the target spatial point.
6. The method according to claim 1, characterized in that, The determining the regional range of the target segmentation unit includes: Based on the information of one or more candidate segmentation units set in advance, determine the regional range of the target segmentation unit.
7. The method according to claim 5 or 6, characterized in that, After performing downsampling processing on the spatial points that fall within the regional range of the target segmentation unit, the method further includes: Delete the data of the spatial points that fall within the regional range of the target segmentation unit from the original point cloud data set.
8. The method according to claim 1, wherein The data of the spatial point includes the polar coordinate position information or the Cartesian coordinate position information of the spatial point. In the case where the data of the spatial point includes the Cartesian coordinate position information of the spatial point, the method further includes: For each spatial point in the original point cloud dataset, converting the Cartesian coordinate position information of the spatial point into polar coordinate position information.
9. The method according to claim 1, wherein Performing downsampling processing on the spatial points falling within the regional range of the target segmentation unit, including: Determining the centroid or the center of gravity of the spatial points falling within the regional range of the target segmentation unit, and using the data of the centroid or the center of gravity as the downsampled point cloud data corresponding to the target segmentation unit.
10. The method according to claim 1, wherein The method further includes: Determining the total number of spatial points falling within the regional range of the target segmentation unit; In the case where the total number meets a preset condition, performing the downsampling processing on the spatial points falling within the regional range of the target segmentation unit; In the case where the total number does not meet the preset condition, the downsampled point cloud dataset does not include the data of the spatial points falling within the regional range of the target segmentation unit.
11. The method according to any one of claims 1 to 6, 8 to 10, characterized in that, The downsampled point cloud dataset includes a plurality of sampled points, and the method further includes: Based on the polar coordinate position information of the plurality of sampled points, determining target sampled points having the same horizontal angle value and vertical angle value; For the target sampled points having the same horizontal angle value and vertical angle value, retaining the target sampled point with the smallest radius value, and removing the other target sampled points from the downsampled point cloud dataset.
12. A downsampling device for point cloud data, characterized in that, Including: An acquisition module, configured to acquire an original point cloud dataset, where the original point cloud dataset is related to a point cloud acquisition device and includes data of at least one spatial point; A first determination module, configured to determine the regional range of a target segmentation unit, and a set of target segmentation units is used to divide the detection space of the point cloud acquisition device and form at least a part of a spherical space; A second determination module, configured to determine, based on the regional range of the target segmentation unit, the spatial points in the original point cloud dataset that fall within the regional range of the target segmentation unit; A processing module, configured to perform downsampling processing on the spatial points falling within the regional range of the target segmentation unit respectively, and summarizing the downsampling results of one or more target segmentation units to obtain a downsampled point cloud dataset; Wherein, the region of each target segmentation unit includes a region located between a first spherical surface and a second spherical surface centered on the point cloud acquisition device, within a range defined by a first horizontal angle and a second horizontal angle, and within a range defined by a first vertical angle and a second vertical angle. Wherein, the first spherical surface and the second spherical surface are respectively defined by a first radius and a second radius, and the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle are all spherical center angles. For different target segmentation units, at least one of the first radius, the second radius, the first horizontal angle, the second horizontal angle, the first vertical angle, and the second vertical angle is different.
13. A computer-readable storage medium, the computer-readable storage medium being a non-volatile storage medium or a non-transitory storage medium, having a computer program stored thereon, characterized in that, When the computer program is run by a processor, it executes the steps of the method according to any one of claims 1 to 11.
14. An electronic device, comprising a memory and a processor, wherein a computer program capable of running on the processor is stored on the memory, characterized in that When the processor runs the computer program, it executes the steps of the method according to any one of claims 1 to 11.
15. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, it implements the steps of the method according to any one of claims 1 to 11.
Citation Information
Patent Citations
Anti-overlapping plant point cloud single-leaf segmentation method
CN111915617A
Terrain scanning analysis method and device based on FARO scanner and point cloud
CN113295142A