Point cloud storage method, device, equipment and storage medium

文档序号:1937570 发布日期:2021-12-07 浏览:30次 中文

阅读说明:本技术 点云存储方法、装置、设备及存储介质 (Point cloud storage method, device, equipment and storage medium ) 是由 王钟绪 冯乐满 韩旭 于 2021-08-27 设计创作,主要内容包括:本发明涉及图像处理领域,公开了点云存储方法、装置、设备及存储介质,用于提高点云的加载存储速率,避免卡顿。本发明方法包括:获取目标感兴趣区域的初始点云;根据预置的层级顺序和每一层级对应的要求确定每一层级的采样半径,得到采样半径序列,其中,采样半径序列包括按照从小到大顺序排列的多个采样半径,层级越低对应的采样半径越小;按照采样半径序列对初始点云进行迭代处理,并将每次迭代处理后的点云确定为对应的点云层,得到多个目标点云层;按照层级顺序将多个目标点云层进行顺序堆叠并存储。(The invention relates to the field of image processing, and discloses a point cloud storage method, a point cloud storage device, point cloud storage equipment and a point cloud storage medium, which are used for improving the point cloud loading and storage rate and avoiding blockage. The method comprises the following steps: acquiring an initial point cloud of a target region of interest; determining the sampling radius of each level according to a preset level sequence and the corresponding requirement of each level to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the level is, the smaller the corresponding sampling radius is; performing iteration processing on the initial point cloud according to the sampling radius sequence, and determining the point cloud after each iteration processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers; and sequentially stacking and storing the target point cloud layers according to the hierarchical order.)

1. A point cloud storage method, comprising:

acquiring an initial point cloud of a target region of interest;

determining a sampling radius of each level according to a preset level sequence and a requirement corresponding to each level to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the level is, the smaller the corresponding sampling radius is;

performing iteration processing on the initial point cloud according to the sampling radius sequence, and determining the point cloud after each iteration processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers;

and sequentially stacking and storing the target point cloud layers according to the hierarchical order.

2. The point cloud storage method of claim 1, wherein the iterative processing of the initial point cloud according to the sampling radius sequence and determining the point cloud after each iterative processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers comprises:

clustering the initial point cloud to obtain a first clustered point cloud;

calling a first sampling radius positioned at the head of the queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer;

performing iterative processing on the cloud layer of the first sampling point to obtain a point cloud layer corresponding to each iterative processing, wherein the iterative processing comprises clustering and sampling a clustering result by adopting other sampling radiuses, and the other sampling radiuses comprise residual sampling radiuses except the first sampling radius;

and merging the point cloud layer after each iteration processing and the first sampling point cloud layer into a plurality of target point cloud layers.

3. The point cloud storage method of claim 2, wherein the step of calling a first sampling radius at the head of a queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer comprises:

randomly selecting a category point cloud from the first clustering point cloud as a target point cloud to be sampled;

calling a first sampling radius positioned at the head of the queue in the sampling radius sequence to sample the target point cloud to be sampled, so as to obtain a target sampling point cloud;

sequentially sampling a plurality of other point clouds to be sampled according to the first sampling radius to obtain a plurality of other sampled point clouds, wherein the categories of the other point clouds to be sampled are different from the category of the target point cloud to be sampled;

combining the target sampled point cloud and the plurality of other sampled point clouds into a first sampled point cloud layer.

4. The point cloud storage method according to claim 3, wherein the step of calling a first sampling radius at the head of a queue in the sampling radius sequence to sample the target point cloud to be sampled to obtain a target sampling point cloud comprises:

determining the first sampling radius as r, and determining the dimensionality of a sampling space where data points in the target cloud to be sampled are located as n, wherein r is larger than 0, and n is a positive integer;

generating a preset number of grids in the sampling space according to a preset length L, wherein each grid at most contains one data point, the distance of the data point between any two grids which are not in contact is larger than r, wherein,

randomly generating a candidate data point, creating a processing array and a result array, and importing the data point in the target cloud of points to be sampled and the candidate data point into the processing array, wherein the processing array is used for storing the data point to be sampled, and the result array is used for storing the sampled data point;

when the processing array is not empty, randomly selecting a data point from the processing array in sequence as a candidate central point, and sampling by using the candidate central point until the processing data is empty;

and when the processing array is empty, determining the data points in the result array as the target sampling point cloud.

5. The point cloud storage method of claim 4, wherein when the processing array is non-empty, randomly selecting a data point from the processing array as a candidate center point in sequence, and sampling with the candidate center point until the processing data is empty, comprises:

when the processing array is not empty, randomly selecting a data point from the processing array as a candidate center point, and deleting the candidate center point from the processing array;

generating a sampling circular ring area by taking the candidate central point as a circle center and taking a preset minimum distance as an inner ring radius and a preset maximum distance as an outer ring radius;

carrying out primary sampling on the sampling circular ring area to obtain a primary sampling result;

sampling the sampling circular ring region for multiple times according to the residual times in the preset sampling times to obtain a residual sampling result;

if the initial sampling result and the residual sampling result are both failed, determining that the sampling result corresponding to the candidate central point is failed, storing the candidate central point into the result array, if any one of the initial sampling result and the residual sampling result is successful, determining that the sampling result corresponding to the candidate central point is successful, and storing the candidate central point and the successfully sampled data point into the processing array;

and repeatedly selecting a data point randomly from the processing array as a new candidate central point and continuing to sample until the processing array is empty.

6. The point cloud storage method of claim 2, wherein the clustering the initial point cloud to obtain a first clustered point cloud comprises:

clustering the initial point clouds to obtain a plurality of initial category point clouds;

and updating the clustering centers of the plurality of initial category point clouds, and merging the updated category point clouds into a first clustering point cloud.

7. The point cloud storage method of claim 6, wherein the clustering the initial point cloud to obtain a plurality of initial category point clouds comprises:

selecting k data points as clustering centers according to the point cloud density of the initial point cloud to obtain k initial clustering centers, wherein k is a positive integer;

calculating the distance from each data point in the initial point cloud to the k initial clustering centers;

and traversing each data point in the initial point cloud, and dividing each data point into categories corresponding to the nearest initial clustering centers to obtain a plurality of initial category point clouds, wherein each initial category point cloud comprises a plurality of divided data points.

8. A point cloud storage device, comprising:

the acquisition module is used for acquiring an initial point cloud of a target region of interest;

the radius determining module is used for determining the sampling radius of each level according to a preset level sequence and the requirement corresponding to each level to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the level is, the smaller the corresponding sampling radius is;

the iteration module is used for performing iteration processing on the initial point cloud according to the sampling radius sequence, determining the point cloud after each iteration processing as a corresponding point cloud layer, and obtaining a plurality of target point cloud layers;

and the point cloud stacking module is used for sequentially stacking and storing the target point cloud layers according to the hierarchy order.

9. A point cloud storage device, comprising: a memory having instructions stored therein and at least one processor, the memory and the at least one processor interconnected by a line;

the at least one processor invokes the instructions in the memory to cause the point cloud storage device to perform the point cloud storage method of any of claims 1-7.

10. A computer-readable storage medium, characterized in that the computer-readable storage medium stores instructions which, when executed by a processor, implement the point cloud storage method of any one of claims 1-7.

Technical Field

The invention relates to the technical field of image processing, in particular to a point cloud storage method, a point cloud storage device, point cloud storage equipment and a point cloud storage medium.

Background

With the wide application of point cloud technology in many fields such as automatic driving and robots, more and more attention has been recently drawn. In the field of automatic driving, a point cloud map is generally adopted for navigation, and a high-precision point cloud map is required to be relied on for realizing high-degree automatic driving.

At present, in an automatic driving scene, a high-precision point cloud map needs to be read in real time to achieve the purpose of automatic driving, the data volume of the point cloud map is large, and the problem of blockage can occur when a large-scale point cloud map is checked in real time.

Disclosure of Invention

The invention provides a point cloud storage method, a point cloud storage device, point cloud storage equipment and a point cloud storage medium, which are used for improving the point cloud loading and storing rate and avoiding blockage.

A first aspect of an embodiment of the present invention provides a point cloud storage method, including: acquiring an initial point cloud of a target region of interest; determining a sampling radius of each level according to a preset level sequence and a requirement corresponding to each level to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the level is, the smaller the corresponding sampling radius is; performing iteration processing on the initial point cloud according to the sampling radius sequence, and determining the point cloud after each iteration processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers; and sequentially stacking and storing the target point cloud layers according to the hierarchical order.

In a possible embodiment, the iteratively processing the initial point cloud according to the sampling radius sequence, and determining the point cloud after each iterative processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers includes: clustering the initial point cloud to obtain a first clustered point cloud; calling a first sampling radius positioned at the head of the queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer; performing iterative processing on the cloud layer of the first sampling point to obtain a point cloud layer corresponding to each iterative processing, wherein the iterative processing comprises clustering and sampling a clustering result by adopting other sampling radiuses, and the other sampling radiuses comprise residual sampling radiuses except the first sampling radius; and merging the point cloud layer after each iteration processing and the first sampling point cloud layer into a plurality of target point cloud layers.

In a possible embodiment, the invoking a first sampling radius at the head of the queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer includes: randomly selecting a category point cloud from the first clustering point cloud as a target point cloud to be sampled; calling a first sampling radius positioned at the head of the queue in the sampling radius sequence to sample the target point cloud to be sampled, so as to obtain a target sampling point cloud; sequentially sampling a plurality of other point clouds to be sampled according to the first sampling radius to obtain a plurality of other sampled point clouds, wherein the categories of the other point clouds to be sampled are different from the category of the target point cloud to be sampled; combining the target sampled point cloud and the plurality of other sampled point clouds into a first sampled point cloud layer.

In a possible embodiment, the invoking a first sampling radius at the head of the queue in the sampling radius sequence to sample the target point cloud to be sampled to obtain a target sampling point cloud includes: determining the first sampling radius as r, and determining the dimensionality of a sampling space where data points in the target cloud to be sampled are located as n, wherein r is larger than 0, and n is a positive integer; generating a preset number of grids in the sampling space according to a preset length L, wherein each grid at most contains one data point, the distance of the data point between any two grids which are not in contact is larger than r, wherein,randomly generating a candidate data point, creating a processing array and a result array, and importing the data point in the target cloud of points to be sampled and the candidate data point into the processing array, wherein the processing array is used for storing the data point to be sampled, and the result array is used for storing the sampled data point; when the processing array is not empty, a data point is randomly selected from the processing array in sequence to serve as a candidate center point, and the candidate center point is usedSampling until the processing data is empty; and when the processing array is empty, determining the data points in the result array as the target sampling point cloud.

In a possible embodiment, when the processing array is non-empty, randomly selecting a data point from the processing array in sequence as a candidate center point, and sampling with the candidate center point until the processing data is empty includes: when the processing array is not empty, randomly selecting a data point from the processing array as a candidate center point, and deleting the candidate center point from the processing array; generating a sampling circular ring area by taking the candidate central point as a circle center and taking a preset minimum distance as an inner ring radius and a preset maximum distance as an outer ring radius; carrying out primary sampling on the sampling circular ring area to obtain a primary sampling result; sampling the sampling circular ring region for multiple times according to the residual times in the preset sampling times to obtain a residual sampling result; if the initial sampling result and the residual sampling result are both failed, determining that the sampling result corresponding to the candidate central point is failed, storing the candidate central point into the result array, if any one of the initial sampling result and the residual sampling result is successful, determining that the sampling result corresponding to the candidate central point is successful, and storing the candidate central point and the successfully sampled data point into the processing array; and repeatedly selecting a data point randomly from the processing array as a new candidate central point and continuing to sample until the processing array is empty.

In a possible embodiment, the obtaining a clustered point cloud, and the clustering the initial point cloud to obtain a first clustered point cloud includes: clustering the initial point clouds to obtain a plurality of initial category point clouds; and updating the clustering centers of the plurality of initial category point clouds, and merging the updated category point clouds into a first clustering point cloud.

In a possible embodiment, the clustering the initial point cloud to obtain a plurality of initial category point clouds includes: selecting k data points as clustering centers according to the point cloud density of the initial point cloud to obtain k initial clustering centers, wherein k is a positive integer; calculating the distance from each data point in the initial point cloud to the k initial clustering centers; and traversing each data point in the initial point cloud, and dividing each data point into categories corresponding to the nearest initial clustering centers to obtain a plurality of initial category point clouds, wherein each initial category point cloud comprises a plurality of divided data points.

A second aspect of an embodiment of the present invention provides a point cloud storage apparatus, including: the acquisition module is used for acquiring an initial point cloud of a target region of interest; the radius determining module is used for determining the sampling radius of each level according to a preset level sequence and the requirement corresponding to each level to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the level is, the smaller the corresponding sampling radius is; the iteration module is used for performing iteration processing on the initial point cloud according to the sampling radius sequence, determining the point cloud after each iteration processing as a corresponding point cloud layer, and obtaining a plurality of target point cloud layers; and the point cloud stacking module is used for sequentially stacking and storing the target point cloud layers according to the hierarchy order.

In one possible embodiment, the iteration module comprises: the first clustering submodule is used for clustering the initial point cloud to obtain a first clustered point cloud; the first sampling submodule is used for calling a first sampling radius positioned at the head of a queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer; the iterative processing sub-module is used for performing iterative processing on the cloud layer of the first sampling point to obtain a point cloud layer corresponding to each iterative processing, wherein the iterative processing comprises clustering and sampling a clustering result by adopting other sampling radiuses, and the other sampling radiuses comprise residual sampling radiuses except the first sampling radius; and the merging submodule is used for merging the point cloud layer after each iteration processing and the first sampling point cloud layer into a plurality of target point cloud layers.

In one possible embodiment, the first sampling submodule includes: the selecting unit is used for randomly selecting one category point cloud from the first clustering point cloud as a target point cloud to be sampled; the first sampling unit is used for calling a first sampling radius positioned at the head of the queue in the sampling radius sequence to sample the target point cloud to be sampled so as to obtain a target sampling point cloud; the second sampling unit is used for sequentially sampling a plurality of other point clouds to be sampled according to the first sampling radius to obtain a plurality of other sampled point clouds, and the categories of the other point clouds to be sampled are different from the category of the target point cloud to be sampled; a combining unit for combining the target sampled point cloud and the plurality of other sampled point clouds into a first sampled point cloud layer.

In one possible embodiment, the first sampling unit includes: the determining subunit is configured to determine that the first sampling radius is r, and determine that a dimension of a sampling space where a data point in the target cloud to be sampled is located is n, where r is greater than 0 and n is a positive integer; a grid generating subunit, configured to generate a preset number of grids in the sampling space according to a preset length L, where each grid includes at most one data point, and a distance between any two non-contact grids is greater than r, where,the generation creating subunit is used for randomly generating a candidate data point, creating a processing array and a result array, and importing the data point in the target cloud of the point to be sampled and the candidate data point into the processing array, wherein the processing array is used for storing the data point to be sampled, and the result array is used for storing the sampled data point; the sampling subunit is used for randomly selecting a data point from the processing array in sequence as a candidate central point when the processing array is not empty, and sampling by using the candidate central point until the processing data is empty; and the determining subunit is used for determining the data points in the result array as the target sampling point cloud when the processing array is empty.

In one possible embodiment, the sampling subunit is specifically configured to: when the processing array is not empty, randomly selecting a data point from the processing array as a candidate center point, and deleting the candidate center point from the processing array; generating a sampling circular ring area by taking the candidate central point as a circle center and taking a preset minimum distance as an inner ring radius and a preset maximum distance as an outer ring radius; carrying out primary sampling on the sampling circular ring area to obtain a primary sampling result; sampling the sampling circular ring region for multiple times according to the residual times in the preset sampling times to obtain a residual sampling result; if the initial sampling result and the residual sampling result are both failed, determining that the sampling result corresponding to the candidate central point is failed, storing the candidate central point into the result array, if any one of the initial sampling result and the residual sampling result is successful, determining that the sampling result corresponding to the candidate central point is successful, and storing the candidate central point and the successfully sampled data point into the processing array; and repeatedly selecting a data point randomly from the processing array as a new candidate central point and continuing to sample until the processing array is empty.

In one possible embodiment, the first clustering submodule includes: the clustering unit is used for clustering the initial point clouds to obtain a plurality of initial category point clouds; and the updating unit is used for updating the clustering centers of the plurality of initial category point clouds and merging the updated category point clouds into a clustering point cloud.

In a possible embodiment, the clustering unit is specifically configured to: selecting k data points as clustering centers according to the point cloud density of the initial point cloud to obtain k initial clustering centers, wherein k is a positive integer; calculating the distance from each data point in the initial point cloud to the k initial clustering centers; and traversing each data point in the initial point cloud, and dividing each data point into categories corresponding to the nearest initial clustering centers to obtain a plurality of initial category point clouds, wherein each initial category point cloud comprises a plurality of divided data points.

A third aspect of an embodiment of the present invention provides a point cloud storage device, including: a memory and at least one processor, the memory having instructions stored therein; the at least one processor invokes the instructions in the memory to cause the point cloud storage device to perform the point cloud storage method described above.

A fourth aspect of the present invention provides a computer-readable storage medium having stored therein instructions, which when run on a computer, cause the computer to execute the above-described point cloud storage method.

According to the technical scheme provided by the embodiment of the invention, the initial point cloud of the target region of interest is obtained; determining the sampling radius of each level according to a preset level sequence and the corresponding requirement of each level to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the level is, the smaller the corresponding sampling radius is; performing iteration processing on the initial point cloud according to the sampling radius sequence, and determining the point cloud after each iteration processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers; and sequentially stacking and storing the target point cloud layers according to the hierarchical order. According to the embodiment of the invention, the loading and storing speed of the point cloud is improved, the blockage is avoided, and the high-quality point cloud visualization effect is presented to the maximum extent on the basis of ensuring the characteristic quality of the point cloud.

Drawings

FIG. 1 is a schematic diagram of an embodiment of a point cloud storage method according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of another embodiment of a point cloud storage method according to an embodiment of the present invention;

FIG. 3 is a schematic diagram of an embodiment of a sampling process in an embodiment of the invention;

FIG. 4 is a schematic diagram of an embodiment of a sampling process in an embodiment of the invention;

FIG. 5 is a schematic diagram of an embodiment of a point cloud storage device according to the present invention;

FIG. 6 is a schematic diagram of another embodiment of a point cloud storage device according to an embodiment of the present invention;

fig. 7 is a schematic diagram of an embodiment of a point cloud storage device in the embodiment of the present invention.

Detailed Description

The invention provides a point cloud storage method, a point cloud storage device, point cloud storage equipment and a point cloud storage medium, which are used for improving the point cloud loading and storing rate and avoiding blockage.

It is understood that the present invention can be applied to a point cloud storage device, by way of example and not limitation, the point cloud storage device can be a server, and the present application takes the server as an example for illustration.

Referring to fig. 1, a flow chart of a point cloud storage method according to an embodiment of the present invention specifically includes:

101. and acquiring an initial point cloud of the target region of interest.

Specifically, the server firstly processes signals received by the laser transmitter to obtain an original point cloud of a target region of interest, wherein the original point cloud is a discrete data point set with uneven density and expressing a three-dimensional form of the earth surface. For example, the server may first acquire the region of interest through a point cloud acquisition device (e.g., a laser transmitter, or other devices having functions of sending laser light and receiving laser reflection signals), to obtain an original point cloud, and then perform denoising processing on the original point cloud, to obtain an initial point cloud of the target region of interest.

By way of example and not limitation, an original point cloud of a region of interest (i.e., a target region) may be acquired using a pass-through filter, and then noise points (e.g., outliers) in the original point cloud may be removed using a statistical filter to generate an initial point cloud of the target region of interest.

It should be noted that the statistical filter performs a statistical analysis on the neighborhood of each point and eliminates points that do not meet a certain criterion. The embodiment of the invention can be used as a judgment standard based on the distance from the point to the adjacent point, and by calculating the average distance from each point to the nearest N points, wherein N is a positive integer, the points with the average distance out of the standard range can be defined as outliers and removed from the original point cloud. Other filters may be used for denoising, and are not limited herein.

102. And determining the sampling radius of each layer according to a preset layer sequence and the corresponding requirement of each layer to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the layer, the smaller the corresponding sampling radius.

Specifically, according to the display requirement, different resolutions are correspondingly set for each hierarchy, and the higher the resolution requirement is, the denser the sampled point cloud corresponding to the requirement is, the more data points corresponding to the required sampling are, that is, the smaller the sampling radius is. In this embodiment, the smallest sampling radius corresponds to a hierarchy with a high resolution requirement and corresponds to the lowest layer of the pyramid structure, the corresponding resolution requirement is reduced as the sampling radius gradually increases, the corresponding pyramid hierarchy increases, the highest hierarchy of the pyramid structure corresponds to the largest sampling radius and the lowest resolution requirement, and finally, the sampling radii of each hierarchy are sorted in the order from small to large to obtain a sampling radius sequence. It should be noted that, besides the pyramid structure, the point cloud may also be managed by using a point cloud index or a point cloud compression method, and the specific method is not limited herein.

It should be noted that the requirement corresponding to each layer may be set according to actual situations, for example, the requirement may be set according to a resolution requirement, or may be set according to an image size requirement, or other requirements.

103. And performing iteration processing on the initial point cloud according to the sampling radius sequence, and determining the point cloud after each iteration processing as a corresponding point cloud layer to obtain a plurality of target point cloud layers.

Specifically, the server clusters the initial point cloud to obtain a first clustered point cloud; then according to the sequence of the sampling radius sequence, firstly, based on the minimum sampling radius at the head of the queue, sampling each category point cloud in the first clustering point cloud respectively to generate a point cloud layer (namely a first sampling point cloud layer) based on the minimum sampling radius, wherein the point cloud layer based on the minimum sampling radius contains the sampling point cloud of each category point cloud, then, carrying out iterative processing, namely, sequentially clustering and increasing the sampling radius to respectively sample each category point cloud, and generating a point cloud layer based on a larger sampling radius, wherein the point cloud layer based on the larger sampling radius contains the sampling point cloud of each category point cloud; and taking the sampling point cloud layer corresponding to each sampling radius as a target point cloud layer.

It should be noted that, the number of layers of the cloud layer of the point based on the larger sampling radius is determined by the number of the radii, for example, if the sampling radius sequence includes 3 sampling radii, which are the first sampling radius, the second sampling radius and the third sampling radius in sequence, and the first sampling radius is the smallest, and the third sampling radius is the largest, then after the sampling at the first sampling radius is completed to obtain the cloud layer of the sampling point at the first sampling radius, there are 2 cloud layers of the larger sampling radius, which correspond to the cloud layer of the sampling point at the second sampling radius and the cloud layer of the sampling point at the third sampling radius, respectively. And the cloud layer of the sampling point corresponding to each sampling radius comprises the sampling point cloud obtained by clustering and then sampling each category of point cloud.

104. And sequentially stacking and storing the target point cloud layers according to the hierarchical order.

Specifically, the target point cloud layers corresponding to each sampling radius are sequentially overlapped and stored according to a preset hierarchical sequence, wherein before storage, the overlapped target point cloud layers can be compressed according to a Draco format. Therefore, the whole pyramid structure can be directly obtained at a user end (terminal) and corresponding level point clouds are selected and read according to the moving condition of the lens, and the method can ensure that each reading occupies a small amount of overhead and can achieve the effect of finally and smoothly checking the point clouds by matching with the characteristics of human eyes.

According to the embodiment of the invention, the loading and storing speed of the point cloud is improved, the blockage is avoided, and the high-quality point cloud visualization effect is presented to the maximum extent on the basis of ensuring the characteristic quality of the point cloud.

Referring to fig. 2, another flow chart of the point cloud storage method according to the embodiment of the present invention includes:

201. and acquiring an initial point cloud of the target region of interest.

Step 201 is similar to step 101 and will not be described herein again.

202. And determining the sampling radius of each layer according to a preset layer sequence and the corresponding requirement of each layer to obtain a sampling radius sequence, wherein the sampling radius sequence comprises a plurality of sampling radii which are arranged from small to large, and the lower the layer, the smaller the corresponding sampling radius.

Step 202 is similar to step 102, and detailed description thereof is omitted.

203. And clustering the initial point clouds to obtain a plurality of initial category point clouds.

Specifically, the server selects k data points as clustering centers from the initial point cloud according to the point cloud density of the initial point cloud to obtain k initial clustering centers, wherein a is a1,a2,a3…,akK is a positive integer; the server calculates an initial point cloud (in x)iRepresenting each data point, i being a positive integer) to k initial cluster centers; and traversing each data point in the initial point cloud by the server, and dividing each data point into a category corresponding to the nearest initial clustering center to obtain a plurality of initial category point clouds, wherein each initial category point cloud comprises a plurality of divided data points.

It should be noted that, the distribution of the data points in the initial point cloud of the target region of interest is obtained according to the scanned object or environment, so that the point clouds in some regions are dense, and the point clouds in some regions are sparse, the point cloud of the target region can be divided into different regions according to the density degree, then each region is adjusted to obtain a plurality of category point clouds, one category point cloud is a point cloud region, different category point clouds represent point cloud regions with different density degrees, and all the category point clouds are collectively called as a clustered point cloud. The point cloud density (density) is divided into different k regions, and the size of k is determined by the fineness (e.g., resolution) of the current level.

204. And updating the clustering centers of the plurality of initial category point clouds, and merging the updated category point clouds into a first clustering point cloud.

Specifically, the server recalculates the clustering center of each initial category point cloud to obtain k candidate clustering centers; the server judges whether the k candidate clustering centers are completely consistent with the k initial clustering centers; if it isIf the point clouds are completely consistent, the server combines k category point clouds corresponding to the k initial clustering centers into a first clustering point cloud; if not completely consistent, the server calculates the actual distance from each data point to k candidate clustering centers respectively, divides each data point into the category to which the candidate clustering center with the minimum actual distance belongs, and updates each category (with a)jA cluster center representing a cluster center of each category, j being a positive integer) (the calculation formula is:with ciRepresenting any one updated category point cloud) until each category updated clustering center is completely consistent with the last updated clustering center, and combining a plurality of updated category point clouds corresponding to a plurality of last updated clustering centers into a first clustering point cloud.

205. And calling a first sampling radius positioned at the head of the queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer.

Specifically, the server randomly selects a category point cloud from the first clustering point cloud as a target point cloud to be sampled; the server calls a first sampling radius (namely the minimum sampling radius) positioned at the head of the queue in the sampling radius sequence to sample the target point cloud to be sampled, so as to obtain the target sampling point cloud; the server sequentially samples a plurality of other point clouds to be sampled according to the first sampling radius to obtain a plurality of other sampled point clouds, wherein the categories of the other point clouds to be sampled are different from the category of the target point cloud to be sampled; the server combines the target sampled point cloud and a plurality of other sampled point clouds into a first sampled point cloud layer.

The point cloud layer with the first sampling radius comprises a plurality of sampling point clouds which are obtained by sampling based on the first sampling radius and are used for sampling each category of point clouds in the clustered point clouds according to the first sampling radius.

In a feasible implementation manner, the server calls a first sampling radius located at the head of a queue in the sampling radius sequence to sample the target point cloud to be sampled, and obtaining the target sampling point cloud specifically includes:

the server determines that the first sampling radius is r, and determines that the dimensionality of a sampling space where data points in the target cloud to be sampled are located is n, wherein r is larger than 0, and n is a positive integer; the server generates a preset number of grids in the sampling space according to a preset length L, wherein each grid at most comprises one data point, the distance between any two non-contact grids is larger than r, and the data points in the sampling space are not in contact with each other,the server randomly generates a candidate data point, creates a processing array and a result array, and introduces the data point in the target cloud of points to be sampled and the candidate data point into the processing array, wherein the processing array is used for storing the data point to be sampled, and the result array is used for storing the sampled data point; when the processing array is not empty, the server randomly selects a data point from the processing array in sequence as a candidate central point, and samples the data by using the candidate central point until the processing data is empty; when the processing array is empty, the server determines the data points in the result array as the target sampling point cloud.

In a possible embodiment, when the processing array is not empty, the server sequentially randomly selects a data point from the processing array as a candidate center point, and performs sampling with the candidate center point until the processing data is empty, including:

when the processing array is not empty, the server randomly selects a data point from the processing array as a candidate central point, and deletes the candidate central point from the processing array; the server generates a sampling circular ring area by taking the candidate central point as a circle center and taking a preset minimum distance as an inner ring radius and a preset maximum distance as an outer ring radius; the server carries out primary sampling on the sampling circular ring area to obtain a primary sampling result; the server samples the sampling ring area for multiple times according to the residual times in the preset sampling times to obtain a residual sampling result; if the initial sampling result and the residual sampling result are both failed, the server determines that the sampling result corresponding to the candidate central point is failed, stores the candidate central point into a result array, if any one of the initial sampling result and the residual sampling result is successful, determines that the sampling result corresponding to the candidate central point is successful, and stores the candidate central point and the successfully sampled data point into a processing array; and the server repeatedly selects a data point randomly from the processing array as a new candidate central point and continues sampling until the processing array is empty.

In a feasible implementation manner, the server performs initial sampling on the sampling circular ring area to obtain an initial sampling result, which may specifically include:

as shown in fig. 3, the server randomly generates a point to be confirmed (i.e., point D1 in fig. 3) in the sampling circle region, and determines a candidate mesh where the point to be confirmed (i.e., point D2 in fig. 3) is located; the server judges whether adjacent data points exist in the candidate grid and eight grids adjacent to the candidate grid, wherein the adjacent data points are data points with the distance to the point to be confirmed being smaller than a first sampling radius; if the sampling result does not exist, the server determines that the initial sampling is successful, and if the sampling result exists, the server determines that the initial sampling is failed. It can be understood that when the point D2 to be confirmed is taken from the circle of the preset maximum distance (the maximum distance is 2r in fig. 3) centered on the point D1, it is only necessary to determine whether there are data points in eight grids around the grid where the point D2 is located, as can be seen from fig. 3, there is one data point D4, and therefore, the data point D2 cannot be sampled, and the sampling fails. It should be noted that fig. 3 is only a schematic diagram of an embodiment of each data point, and does not strictly follow the optimal proportional relationship between L and rFig. 3 is not shown as a limitation on the size of L, r and the data point location and scale. For example, when n is 2,the proportional relationship is shown in fig. 4.

206. And performing iteration processing on the cloud layer of the first sampling point to obtain a point cloud layer corresponding to each iteration processing, wherein the iteration processing comprises clustering and sampling the clustering result by adopting other sampling radiuses, and the other sampling radiuses comprise residual sampling radiuses except the first sampling radius.

For example, the server firstly clusters the cloud layer of the first sampling point to obtain a second cluster point cloud, then samples each category point cloud in the second cluster point cloud based on a second sampling radius located at the second position of the sampling radius sequence, and generates a point cloud layer based on the second sampling radius, namely a second sampling point cloud layer; and continuously clustering the cloud layers of the second sampling points to obtain a third cluster point cloud, then respectively sampling each category point cloud in the third cluster point cloud based on a third sampling radius positioned at the third position of the sampling radius sequence, and generating a point cloud layer based on the third sampling radius, namely a third sampling point cloud layer. And by analogy, sequentially increasing the sampling radius to sample the point cloud after the last clustering, and generating a sampling point cloud layer corresponding to each sampling radius.

It should be noted that the number of layers of the point cloud layer based on the larger sampling radius is determined by the number of radii. For example, after sampling is completed by using the first sampling radius, if 5 sampling radii remain, then sampling is performed on 4 sampling radii other than the first sampling radius, so as to obtain 4 sampling point clouds, where each sampling point cloud corresponds to a different sampling radius. For example, if the sampling radius sequence includes 10 sampling radii, which are the first sampling radius, the second sampling radius, and the tenth sampling radius in sequence, and the first sampling radius is the smallest, and the tenth sampling radius is the largest, then after the sampling at the first sampling radius is completed to obtain the cloud layer of the sampling point at the first sampling radius, there are 9 point cloud layers with larger sampling radii, which correspond to the cloud layer of the sampling point at the second sampling radius and the cloud layer of the sampling point at the tenth sampling radius, respectively. And the cloud layer of the sampling point corresponding to each sampling radius also comprises the sampling point cloud obtained by sampling each category point cloud.

It can be understood that, as the sampling radius increases, clustering is performed again on the basis of the cloud layer of the sampling point of the previous level, and the number of the types of the obtained point clouds is reduced, that is, the point clouds of different types are gradually gathered until only one clustering center exists. Supposing that 10 clustering centers exist in the first clustering point cloud obtained in the first clustering, the first sampling point cloud layer is obtained after the first sampling, and 7 clustering centers possibly exist in the second clustering point cloud obtained when the first sampling point cloud layer is clustered for the second time, so that the number of the clustering centers can be reduced. The number of clustering centers may be set according to the actual density degree each time clustering is performed, and is not limited herein.

207. And merging the point cloud layer subjected to each iteration processing and the first sampling point cloud layer into a plurality of target point cloud layers.

Specifically, the cloud layer of the first sampling point corresponding to the first sampling radius, and the cloud layers of the other sampling points after the iterative processing are combined into a plurality of target point cloud layers. When the number of the sampling radii is 3, the other sampling point cloud layers are a second sampling point cloud layer corresponding to the second sampling radius and a third sampling point cloud layer corresponding to the third sampling radius; when the number of the sampling radii is 5, the other sampling point cloud layers are a second sampling point cloud layer corresponding to the second sampling radius, a third sampling point cloud layer corresponding to the third sampling radius, a fourth sampling point cloud layer corresponding to the fourth sampling radius and a fifth sampling point cloud layer corresponding to the fifth sampling radius.

It should be noted that the sampled multiple cloud layers have good effect, and can meet the requirements of uniform data points, better condition of retaining details, and better blue noise characteristic.

208. And sequentially stacking and storing the target point cloud layers according to the hierarchical order.

Step 208 is similar to step 104, and detailed description thereof is omitted here.

According to the embodiment of the invention, the loading and storing speed of the point cloud is improved, the blockage is avoided, and the high-quality point cloud visualization effect is presented to the maximum extent on the basis of ensuring the characteristic quality of the point cloud.

In the above description of the point cloud storage method in the embodiment of the present invention, referring to fig. 5, the point cloud storage device in the embodiment of the present invention is described below, and an embodiment of the point cloud storage device in the embodiment of the present invention includes:

an obtaining module 501, configured to obtain an initial point cloud of a target region of interest;

a radius determining module 502, configured to determine a sampling radius of each level according to a preset level sequence and a requirement corresponding to each level, to obtain a sampling radius sequence, where the sampling radius sequence includes a plurality of sampling radii arranged in a descending order, and the lower the level, the smaller the corresponding sampling radius is;

an iteration module 503, configured to perform iteration processing on the initial point cloud according to the sampling radius sequence, and determine the point cloud after each iteration processing as a corresponding point cloud layer, so as to obtain multiple target point cloud layers;

a point cloud stacking module 504, configured to sequentially stack and store the target point cloud layers according to the hierarchical order.

According to the embodiment of the invention, the loading and storing speed of the point cloud is improved, the blockage is avoided, and the high-quality point cloud visualization effect is presented to the maximum extent on the basis of ensuring the characteristic quality of the point cloud.

Referring to fig. 6, another embodiment of the point cloud storage device according to the embodiment of the present invention includes:

an obtaining module 501, configured to obtain an initial point cloud of a target region of interest;

a radius determining module 502, configured to determine a sampling radius of each level according to a preset level sequence and a requirement corresponding to each level, to obtain a sampling radius sequence, where the sampling radius sequence includes a plurality of sampling radii arranged in a descending order, and the lower the level, the smaller the corresponding sampling radius is;

an iteration module 503, configured to perform iteration processing on the initial point cloud according to the sampling radius sequence, and determine the point cloud after each iteration processing as a corresponding point cloud layer, so as to obtain multiple target point cloud layers;

a point cloud stacking module 504, configured to sequentially stack and store the target point cloud layers according to the hierarchical order.

Optionally, the iteration module 503 includes:

a first clustering submodule 5031, configured to cluster the initial point cloud to obtain a first clustered point cloud;

the first sampling submodule 5032 is configured to call a first sampling radius at the head of a queue in the sampling radius sequence to sample the first clustered point cloud to obtain a first sampling point cloud layer;

the iterative processing submodule 5033 is configured to perform iterative processing on the cloud layer of the first sampling point to obtain a point cloud layer corresponding to each iterative processing, where the iterative processing includes clustering and sampling a clustering result by using other sampling radii, and the other sampling radii include remaining sampling radii except the first sampling radius;

the merging submodule 5034 is configured to merge the point cloud layer after each iteration processing and the first sampling point cloud layer into a plurality of target point cloud layers.

Optionally, the first sampling sub-module 5032 includes:

a selecting unit 50321, configured to arbitrarily select a category point cloud from the first clustered point cloud as a target point cloud to be sampled;

the first sampling unit 50322 is configured to invoke a first sampling radius located at the head of the queue in the sampling radius sequence to sample the target point cloud to be sampled, so as to obtain a target sampling point cloud;

a second sampling unit 50323, configured to sample, according to the first sampling radius, a plurality of other point clouds to be sampled in sequence to obtain a plurality of other sampled point clouds, where categories of the other point clouds to be sampled are different from that of the target point cloud to be sampled;

a combining unit 50324 for combining the target sampled point cloud and the plurality of other sampled point clouds into a first sampled point cloud layer.

Optionally, the first sampling unit 50322 comprises:

a determining subunit 503221, configured to determine that the first sampling radius is r, and determine that a dimension of a sampling space where a data point in the target cloud to be sampled is located is n, where r is greater than 0, and n is a positive integer;

a grid generating subunit 503222, configured to generate a preset number of grids in the sampling space according to a preset length L, where each grid includes at most one data point, and a distance between any two non-contact grids is greater than a distance between any two non-contact gridsr, wherein,

a generation creating subunit 503223, configured to randomly generate a candidate data point, create a processing array and a result array, and import the data point in the target cloud of points to be sampled and the candidate data point into the processing array, where the processing array is used to store the data point to be sampled, and the result array is used to store the sampled data point;

a sampling subunit 503224, configured to, when the processing array is non-empty, randomly select a data point from the processing array in sequence as a candidate center point, and sample with the candidate center point until the processing data is empty;

a determining subunit 503225, configured to determine the data points in the result array as the target sample point cloud when the processing array is empty.

In one possible implementation, the sampling sub-unit 503224 is specifically configured to:

when the processing array is not empty, randomly selecting a data point from the processing array as a candidate center point, and deleting the candidate center point from the processing array;

generating a sampling circular ring area by taking the candidate central point as a circle center and taking a preset minimum distance as an inner ring radius and a preset maximum distance as an outer ring radius;

carrying out primary sampling on the sampling circular ring area to obtain a primary sampling result;

sampling the sampling circular ring region for multiple times according to the residual times in the preset sampling times to obtain a residual sampling result;

if the initial sampling result and the residual sampling result are both failed, determining that the sampling result corresponding to the candidate central point is failed, storing the candidate central point into the result array, if any one of the initial sampling result and the residual sampling result is successful, determining that the sampling result corresponding to the candidate central point is successful, and storing the candidate central point and the successfully sampled data point into the processing array;

and repeatedly selecting a data point randomly from the processing array as a new candidate central point and continuing to sample until the processing array is empty.

Optionally, the first clustering submodule 5031 includes:

a clustering unit 50311, configured to cluster the initialized point cloud samples to obtain multiple initial category point clouds;

an updating unit 50312, configured to update the clustering centers of the multiple initial category point clouds and merge the updated category point clouds into a clustered point cloud.

Optionally, the clustering unit 50311 includes:

a center selecting subunit 503111, configured to select k data points as clustering centers according to the point cloud density of the initial point cloud, to obtain k initial clustering centers, where k is a positive integer;

a computing subunit 503112 for computing the distance from each data point in the initial point cloud to the k initial cluster centers;

a traversing sub-unit 503113, configured to traverse each data point in the initial point cloud, and divide each data point into categories to which the corresponding closest initial clustering center belongs to obtain multiple initial category point clouds, where each initial category point cloud includes multiple divided data points.

According to the embodiment of the invention, the loading and storing speed of the point cloud is improved, the blockage is avoided, and the high-quality point cloud visualization effect is presented to the maximum extent on the basis of ensuring the characteristic quality of the point cloud.

Fig. 7 is a schematic structural diagram of a point cloud storage device 700 according to an embodiment of the present invention, where the point cloud storage device 700 may have a relatively large difference due to different configurations or performances, and may include one or more processors (CPUs) 710 (e.g., one or more processors) and a memory 720, one or more storage media 730 (e.g., one or more mass storage devices) storing an application 733 or data 732. Memory 720 and storage medium 730 may be, among other things, transient storage or persistent storage. The program stored on the storage medium 730 may include one or more modules (not shown), each of which may include a series of instructions operating on the point cloud storage device 700. Still further, processor 710 may be configured to communicate with storage medium 730 to execute a series of instruction operations in storage medium 730 on point cloud storage device 700.

The point cloud storage 700 may also include one or more power supplies 740, one or more wired or wireless network interfaces 750, one or more input-output interfaces 760, and/or one or more operating systems 731, such as Windows Server, Mac OS X, Unix, Linux, FreeBSD, and so forth. Those skilled in the art will appreciate that the point cloud storage arrangement shown in fig. 7 does not constitute a limitation on point cloud storage, and may include more or fewer components than those shown, or some components in combination, or a different arrangement of components.

The present invention also provides a computer-readable storage medium, which may be a non-volatile computer-readable storage medium, and which may also be a volatile computer-readable storage medium, having stored therein instructions, which, when run on a computer, cause the computer to perform the steps of the point cloud storage method.

It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.

The above-mentioned embodiments are only used for illustrating the technical solutions of the present invention, and not for limiting the same; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and such modifications or substitutions do not depart from the spirit and scope of the corresponding technical solutions of the embodiments of the present invention.

22页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:基于海量地理位置信息的索引库建立及检索方法

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!