CN112215951A - Out-of-core multi-resolution point cloud representation method and point cloud display method - Google Patents

Out-of-core multi-resolution point cloud representation method and point cloud display method Download PDF

Info

Publication number
CN112215951A
CN112215951A CN202011149300.8A CN202011149300A CN112215951A CN 112215951 A CN112215951 A CN 112215951A CN 202011149300 A CN202011149300 A CN 202011149300A CN 112215951 A CN112215951 A CN 112215951A
Authority
CN
China
Prior art keywords
point cloud
point
processed
display
sampling
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011149300.8A
Other languages
Chinese (zh)
Other versions
CN112215951B (en
Inventor
孙志刚
邓世恒
肖力
王卓
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huazhong University of Science and Technology
Original Assignee
Huazhong University of Science and Technology
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huazhong University of Science and Technology filed Critical Huazhong University of Science and Technology
Priority to CN202011149300.8A priority Critical patent/CN112215951B/en
Publication of CN112215951A publication Critical patent/CN112215951A/en
Application granted granted Critical
Publication of CN112215951B publication Critical patent/CN112215951B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T19/00Manipulating 3D models or images for computer graphics
    • G06T19/20Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts

Landscapes

  • Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Geometry (AREA)
  • Architecture (AREA)
  • Computer Hardware Design (AREA)
  • General Engineering & Computer Science (AREA)
  • Image Generation (AREA)

Abstract

The invention discloses an out-of-core multi-resolution point cloud representation method and a point cloud display method, which belong to the technical field of data processing and comprise the following steps: (S1) turning in (S2) the point cloud to be represented as a point cloud to be processed; (S2) solving local characteristic points F of point cloud to be processediAnd density rhoi(ii) a If the number of the feature points is zero, the process proceeds to (S6); otherwise, according to calculation
Figure DDA0002740673090000011
(S3) according to TiSampling point clouds to be processed to obtain sampled point clouds serving as root nodes of the tree; (S4) equally dividing the remaining point cloud into N regions according to the minimum bounding cube, each region being used to construct a sub-tree; (S5) if the preset division depth is reached, proceeding to (S6); otherwise, respectively taking the point cloud in each area as a point cloud to be processed, and turning in (S2); (S6) at all nodes to be processedAt the end of the process, the complete tree structure is stored as a representation model. The method can solve the problem that rendering is blocked due to long point cloud loading time and high memory occupation.

Description

Out-of-core multi-resolution point cloud representation method and point cloud display method
Technical Field
The invention belongs to the technical field of data processing, and particularly relates to an extranuclear multi-resolution point cloud representation method and a point cloud display method.
Background
In recent years, three-dimensional laser technology is rapidly developed and widely applied in many fields, and the three-dimensional laser technology has strong application value in reverse engineering, autopilot, cultural relic protection, geological exploration and movie game special effects. A greater number of point clouds is required to represent finer details and more complex geometric features. The three-dimensional point cloud is a set of massive point space coordinates expressing space distribution and surface characteristics obtained by a measuring instrument under the same space reference system, and for the acquisition and display of large-scale point cloud, due to the limitation of computer storage, the rendering time is prolonged, the memory occupancy rate is high, and the user perception effect is poor. Based on the plane characteristic of a display window and the perception of objects with different distances observed by human eyes, the complexity of the model is simplified and reduced by some technical means, the data volume loaded at one time is reduced, and the method has great significance for the display of large-scale point cloud.
An out-of-core (out-of-core) is an internal and external memory loading technology, and when the data volume is too large and can not be completely put into a main memory, a strategy of multiple loading is adopted, namely, according to the display requirement, the loading speed is increased and the memory use is reduced at the cost of increasing the external memory space.
Based on the extranuclear processing technology, aiming at the problem of overhigh consumption of point cloud loading resources, the existing solution mainly comprises a method for establishing a point cloud octree structure, and the method solves the problem of overhigh consumption of point cloud resources and simultaneously has other problems. Some octree methods only iteratively divide a point cloud into a plurality of local point clouds, so that only a part of the point clouds is conveniently loaded, but sampling processing is not performed between layers, as shown in fig. 1; some octree methods adopt uniform sampling, but in actual conditions, some point clouds have higher density near characteristic points, obvious characteristics and smaller density of flat areas, and if uniform sampling is used, the main characteristics of the point clouds cannot be highlighted during loading, so that the display effect is influenced.
Generally, the existing point cloud representation and display method cannot well cope with the limitation of computer storage, and the user perception effect is poor.
Disclosure of Invention
Aiming at the defects and the improvement requirements of the prior art, the invention provides an extranuclear multi-resolution point cloud representation method and a point cloud display method, and aims to solve the problem that rendering is blocked due to long time for loading large-scale point cloud and high memory occupation.
To achieve the above object, according to one aspect of the present invention, there is provided an out-of-core multi-resolution point cloud representation method, including the steps of:
(S1) taking the point cloud to be represented as a point cloud to be processed, and proceeding to step (S2);
(S2) solving local characteristic points F of point cloud to be processediAnd density ρ around each local feature pointi(ii) a If the number of the local feature points of the point cloud to be processed is zero, ending the processing of the point cloud to be processed, and turning to the step (S6); otherwise, according to
Figure BDA0002740673070000021
Calculating a distance threshold Ti(ii) a L represents the side length of a minimum external cube of the point cloud to be processed, and r represents a preset scale factor;
(S3) according to the distance threshold TiSampling the point cloud to be processed to obtain a sampled point cloud, and taking the sampled point cloud as a root node of a tree for representing the point cloud to be processed;
(S4) removing the sampled point cloud from the point cloud to be processed to obtain residual point cloud, equally dividing the residual point cloud into N areas according to a minimum circumscribed cube, wherein the point cloud in each area is used for constructing a subtree of a root node;
(S5) if the segmentation depth reaches the preset depth threshold, ending the processing of the point cloud to be processed, and turning to the step (S6); otherwise, respectively taking the point clouds in each divided region as point clouds to be processed, and turning to the step (S2);
(S6) when all the point clouds to be processed are processed, taking the constructed complete tree structure as a representation model of the point clouds to be represented and storing the tree structure;
wherein, i is 1,2,3 … … M, and M represents the number of local feature points in the point cloud to be processed; the scale factor is a preset constant and is used for controlling the sparsity of sampling the point cloud; n ═ N3N is a positive integer; the segmentation depth is the height of the constructed complete tree structure.
The method comprises the steps of carrying out layered sampling on point clouds, determining a distance threshold value for sampling the point clouds based on the density of the point clouds, and constructing a multi-resolution point cloud model; under the condition that the size of the minimum circumscribed cube of the point cloud is the same as the scale factor, the point cloud with higher density is smaller in sampling distance threshold value, and the point smaller than the distance threshold value is removed and stored in the next layer, so that more points can be reserved, the originally denser layer can still be denser after sampling, therefore, the multi-resolution point cloud representation model constructed by the method can reserve the original characteristics of the point cloud, and the point clouds with different detail levels can be selected according to the observation distance when the point cloud is displayed. In addition, the invention divides the point cloud into a plurality of local point clouds, can concentrate on the point cloud details, concentrates the main rendering resources on a small part, improves the resource utilization rate and effectively solves the problem of rendering blockage.
Further, in step (S3), the distance threshold T is setiSampling point clouds to be processed, comprising:
sampling each local feature point and its surrounding points as follows:
(S31) taking the current local feature point F as a target point;
(S32) acquiring a sphere which takes the target point as the center of sphere and the distance threshold T corresponding to the local characteristic point F as the radius, taking the sphere as a target sphere, and eliminating all points except the local characteristic point F in the target sphere;
(S33) selecting an unprocessed point around the target sphere as a target point, and executing the step (S32) to expand the sampling area corresponding to the current local feature point;
(S34) repeating the step (S33) until the sampling region corresponding to the current local characteristic point is intersected with the sampling regions corresponding to other local characteristic points, or all the points are processed.
Further, the method for representing the out-of-core multi-resolution point cloud further comprises the following steps:
establishing a retrieval file for storing information of cloud node files of each point;
the point cloud node files correspond to the nodes in the representation model one by one and are used for storing the position coordinates of the corresponding point clouds
Retrieving information of point cloud node files stored in a file includes: depth of corresponding node, storage path of point cloud node file, and orientation bounding box (orientdounding box) vertex coordinate of corresponding point cloud.
According to the invention, by establishing the retrieval file, the size and the path of the loaded point cloud can be rapidly retrieved, and the subsequent point cloud display is accelerated.
Further, the information of the cloud node files of each point is sequentially stored in the retrieval file according to the sequence of the depth from small to large.
According to the invention, the information of the cloud node files of each point is sequentially stored in the retrieval file according to the sequence of the depth from small to large, so that the information of the point cloud of the same layer can be conveniently and rapidly retrieved.
Further, before the step (S1), the method further includes: and rejecting outliers in the point cloud to be represented.
Outliers are mainly points that are far away from the main point cloud and are scattered, and these points are generally noise generated by errors during scanning; according to the invention, before representing and storing the point cloud, outliers in the point cloud are removed, so that the model can be accurately represented, and the resource consumption is reduced.
According to another aspect of the present invention, there is provided a point cloud display method, the point cloud having been represented and stored by the extranuclear multi-resolution point cloud representation method provided by the present invention, the display method comprising the steps of:
(T1) initializing a loading depth of 1 and loading a root node representing the model into a display form of the display tool;
(T2) calculating the point cloud gravity center of the root node and calculating the point cloud weight of the root node in the world coordinate systemDistance d between heart and display window0And initializing a lower bound R of the target range RLAnd an upper bound RURespectively as follows: rL=t*d0,RU=d0
(T3) calculating the barycenter of the point cloud by using all the loaded point clouds, calculating the distance d between the barycenter of the point cloud in the world coordinate system and the display window, and if d belongs to R, turning to the step (T6); if d is<RLThen add 1 to the loading depth, according to RL=t*RL、RU=t*RUUpdating the lower bound R of the target Range RLAnd an upper bound RUAnd go to step (T4); if d is>RUThen subtract 1 from the loading depth, according to RL=RL/t、RU=RULower bound R of target Range RLAnd an upper bound RUAnd go to step (T5);
(T4) traversing the point cloud corresponding to the node of the layer corresponding to the loading depth in the representation model, loading the point cloud into the display window if the traversed point cloud is visible in the display window, and not loading the point cloud if the traversed point cloud is not visible in the display window; after the traversal is finished, the step (T3) is carried out;
(T5) unloading the point cloud which has been loaded into the display tool and has a depth greater than the loading depth, and releasing the corresponding memory, and then proceeding to step (T3);
(T6) point cloud display is complete;
wherein 0< t < 1.
According to the invention, only part of the point cloud is loaded based on the observation distance, so that the memory occupancy rate in the point cloud display process can be effectively reduced while a better display effect is ensured, and the problem of rendering blockage is effectively solved, thereby effectively improving the user perception effect.
Further, in step (T4), it is determined whether the point cloud is visible in the display window by:
acquiring coordinates of the vertex of a directional bounding box of the point cloud, and transforming the coordinates into coordinates under a screen coordinate system through projection;
if the coordinates (x, y) of any vertex after the coordinate transformation satisfy the display condition: determining that the point cloud is visible in the display window if x is more than or equal to 0 and less than or equal to window. If the coordinates of all the vertexes do not meet the display condition after the coordinate transformation, judging that the point cloud is invisible in the display window;
wherein window.
Further, the step (T4) further includes:
and if the traversed point cloud is invisible in the display window and the point cloud is loaded into the display tool, unloading the point cloud and releasing the corresponding memory.
Due to the change of the visual angle, the situation that some loaded point clouds are not in the display window body can occur, and the point clouds are unloaded and corresponding memories are released, so that the memory occupancy rate can be reduced under the condition that the display effect is not influenced.
Further, the point cloud display method provided by the invention further comprises the following steps:
when the viewing angle is changed, steps (T3) to (T5) are performed to perform the point cloud display again.
According to the invention, when the visual angle changes, the point cloud is loaded or unloaded again, so that the point cloud display effect can be ensured in real time.
According to yet another aspect of the present invention, there is provided a computer readable storage medium comprising a stored computer program;
when the computer program is processed and executed, the computer readable storage medium is controlled to execute the method for representing the out-of-core multi-resolution point cloud provided by the invention and/or the method for displaying the point cloud provided by the invention.
Generally, by the above technical solution conceived by the present invention, the following beneficial effects can be obtained:
(1) according to the out-of-core multi-resolution point cloud representation method, point clouds are subjected to layered sampling, a distance threshold value for sampling the point clouds is determined based on the density of the point clouds, and a multi-resolution point cloud model is constructed; under the condition that the size and the resolution ratio of the minimum circumscribed cube of the point cloud are the same, the point cloud with higher density is smaller in the distance threshold value for sampling the point cloud, and the point smaller than the distance threshold value is removed and stored in the next layer, so that more points can be reserved, the originally denser layer can still be denser after sampling, therefore, the multi-resolution point cloud representation model constructed by the method can reserve the original characteristics of the point cloud, and the point clouds with different detail levels can be selected according to the observation distance when the point cloud is displayed. In addition, the invention divides the point cloud into a plurality of local point clouds, can concentrate on the point cloud details, concentrates the main rendering resources on a small part, improves the resource utilization rate and effectively solves the problem of rendering blockage.
(2) According to the point cloud display method provided by the invention, only part of the point cloud is loaded based on the observation distance, so that the better display effect is ensured, the memory occupancy rate in the point cloud display process can be effectively reduced, the problem of render blockage is effectively solved, and the user perception effect is effectively improved.
Drawings
FIG. 1 is a schematic diagram of a conventional octree point cloud representation method;
FIG. 2 is a flowchart of a method for representing a multi-resolution point cloud outside a core according to an embodiment of the present invention;
FIG. 3 is a schematic diagram of a point cloud to be represented and its minimum bounding cube according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of a sampling process provided by an embodiment of the present invention;
FIG. 5 is a schematic diagram of a first layer of point clouds sampled and segmented minimum circumscribed cube in accordance with the present invention; wherein, (a) is the first layer point cloud obtained by sampling, and (b) is the minimum circumscribed cube of the point cloud;
FIG. 6 is a schematic diagram of a residual point cloud obtained by removing a first layer of sampling point clouds from point clouds to be represented and a minimum circumscribed cube after segmentation in the embodiment of the invention; wherein, (a) is a schematic diagram of the residual point cloud, and (b) is a minimum circumscribed cube of the residual point cloud;
FIG. 7 is a schematic diagram of a point cloud display method according to an embodiment of the present invention;
fig. 8 is a schematic view illustrating a visualization range determination provided in an embodiment of the present invention;
fig. 9 is a display effect diagram of only loading a part of scenes in the point cloud display process according to the embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention. In addition, the technical features involved in the embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
In the present application, the terms "first," "second," and the like (if any) in the description and the drawings are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order.
In order to solve the technical problems that the existing point cloud representation and display method can not well deal with the limitation of computer storage and has poor user perception effect, the invention provides an extranuclear multi-resolution point cloud representation method and a point cloud display method, and the overall thought is as follows: generating a multi-resolution point cloud representation model, and reserving original characteristics of point cloud in the point cloud representation model generation process based on a special sampling mode, so that point cloud with different detail levels can be selected according to observation distance; the point cloud is divided into a plurality of local point clouds, so that the point cloud details can be concentrated, main rendering resources are concentrated in a small part, and the resource utilization rate is improved. The following are examples.
Example 1:
a method for representing an out-of-core multi-resolution point cloud, as shown in fig. 2, includes the following steps:
(S1) taking the point cloud to be represented as a point cloud to be processed, and proceeding to step (S2);
the point cloud to be represented can be the point cloud of any observation object such as an indoor scene, a sculpture, a building, a chair, a stool, a human body and the like; in this embodiment, the point cloud to be represented and the minimum circumscribed cube thereof are shown in fig. 3;
(S2) solving local characteristic points F of point cloud to be processediAnd density ρ around each local feature pointi(ii) a If the number of the local feature points of the point cloud to be processed is zero, ending the processing of the point cloud to be processed, and turning to the step (S6); otherwise, according to
Figure BDA0002740673070000081
Calculating a distance threshold Ti(ii) a L represents the side length of a minimum external cube of the point cloud to be processed, and r represents a preset scale factor;
(S3) according to the distance threshold TiSampling the point cloud to be processed to obtain a sampled point cloud, and taking the sampled point cloud as a root node of a tree for representing the point cloud to be processed;
(S4) removing the sampled point cloud from the point cloud to be processed to obtain residual point cloud, equally dividing the residual point cloud into N areas according to a minimum circumscribed cube, wherein the point cloud in each area is used for constructing a subtree of a root node;
(S5) if the segmentation depth reaches the preset depth threshold, ending the processing of the point cloud to be processed, and turning to the step (S6); otherwise, respectively taking the point clouds in each divided region as point clouds to be processed, and turning to the step (S2);
(S6) when all the point clouds to be processed are processed, taking the constructed complete tree structure as a representation model of the point clouds to be represented and storing the tree structure;
wherein, i is 1,2,3 … … M, and M represents the number of local feature points in the point cloud to be processed; n ═ N3N is a positive integer, optionally, in this embodiment, the value of n is specifically 2, accordingly, after each sampling is completed, the minimum circumscribed cube of the remaining point cloud is equally divided into 8 regions, as shown in fig. 4, and the finally constructed point cloud representation model is an octree; the segmentation depth is the height of the constructed complete tree structure;
in this embodiment, the scaling factor r is a preset constant and is used for controlling the sparseness of the sampling points, and under the condition that other parameters are not changed, the larger the scaling factor r is, the larger the distance between the middle point and the point of the sampled point cloud is, and the more sparse the sampled point cloud is; conversely, the larger the scale factor r is, the denser the point cloud obtained by sampling is; the specific value of the scaling factor r can be determined according to the actual system resource condition, the display requirement and the like, the initial value of r is more than or equal to 1 for point clouds distributed in a relatively centralized manner, the value of r is generally less than 1 for relatively dispersed point clouds, and the subsequent adjustment is required according to the effect after the specific point cloud processing;
in practical application, the depth threshold can be set according to the data volume and detail richness degree of point clouds to be represented, and for point clouds with huge data volume, a larger depth threshold can be set to obtain data with larger difference of multilayer data volume, so that resources required in a single-layer point cloud loading process are reduced; conversely, for point clouds with small data volume, a smaller depth threshold value can be set; generally, the depth threshold of point cloud segmentation is less than ten layers, so that the depth threshold is too small to improve the loading efficiency, too large to result in excessive consumption of storage space, slow loading process and no contribution to the improvement of the overall efficiency; optionally, in this embodiment, the depth threshold is set to 6-8;
the local feature points of the point cloud represent detail features with severe local change, are generally geometric and textural feature primitives with obvious gradient change, and do not change along with the change of a coordinate system, when the number of the local feature points of the point cloud is 0, the point cloud does not have more details which are worth further mining, and no further sampling is carried out on the point cloud; optionally, in this embodiment, Harris feature points, FPFH feature points, or ISS feature points of the point cloud may be extracted as local feature points;
calculating the point cloud density, namely calculating the number of points around a local characteristic point, particularly taking the local characteristic point as a center and calculating the number of points in a certain radius space around the local characteristic point, wherein the radius is a constant related to the curvature radius; near the characteristic points, the density gradually becomes smaller as the expression information is richer and the density is larger and the distance is increased, and the point cloud density is basically consistent and the change is smaller in some flat areas;
in the embodiment, point clouds are sampled in a layered mode, a distance threshold value for sampling each point cloud is determined based on the density of the point clouds, and a multi-resolution point cloud model is constructed; under the condition that the size of the minimum external cube of the point cloud is the same as the scale factor, the point cloud with higher density is smaller in sampling distance threshold value, the point smaller than the distance threshold value is removed and stored to the next layer, so that more points can be reserved, the originally denser layer can be still denser after sampling, therefore, the original characteristics of the point cloud can be reserved by the multi-resolution point cloud representation model constructed by the embodiment, and the point clouds with different detail levels can be selected according to the observation distance when the point cloud is displayed. In addition, the embodiment divides the point cloud into a plurality of local point clouds, can concentrate on the point cloud details, concentrates main rendering resources on a small part, improves the resource utilization rate, and effectively solves the problem of rendering blockage;
as can be seen from comparison with fig. 1, in the existing octree model, the sum of each layer of point cloud is the whole point cloud; in the octree model established in this embodiment, the sum of the point clouds of the whole tree is the whole point cloud, and the sum of the point clouds of each layer is the outline of the whole point cloud containing different details.
As an alternative embodiment, in the step (S3), the distance threshold T is setiSampling point clouds to be processed, comprising:
sampling each local feature point and its surrounding points as follows:
(S31) taking the current local feature point as a target point;
(S32) acquiring a sphere which takes the target point as the center of sphere and the distance threshold T corresponding to the local characteristic point F as the radius, taking the sphere as a target sphere, and eliminating all points except the local characteristic point F in the target sphere;
(S33) selecting an unprocessed point around the target sphere as a target point, and executing the step (S32) to expand the sampling area corresponding to the current local feature point;
(S34) repeating the step (S33) until the sampling area corresponding to the current local characteristic point is intersected with the sampling areas corresponding to other local characteristic points, or all the points are processed;
based on the sampling mode, after the point cloud to be represented shown in fig. 3 is sampled, the obtained sampling point cloud and the minimum external cube thereof are respectively shown in (a) and (b) in fig. 5, wherein the sampling point cloud is used as a first-layer node, namely a root node, of the octree; after the sampling point clouds are removed from the point clouds shown in fig. 3, the obtained residual point clouds and the minimum circumscribed cube thereof are respectively shown as (a) and (b) in fig. 6.
In order to quickly retrieve the size and path of the loaded point cloud in the display process, the embodiment further includes:
establishing a retrieval file for storing information of cloud node files of each point;
the point cloud node files correspond to nodes in the representation model one by one and are used for storing the position information of corresponding point clouds; optionally, in this embodiment, specifically, the position coordinates of each point in the point cloud are stored as a row, and the x coordinates, the y coordinates, and the z coordinates of all the points are stored in the same column respectively;
retrieving information of point cloud node files stored in a file includes: the depth of the corresponding node, the storage path of the point cloud node file and the direction of the corresponding point cloud surround the coordinates of the box vertex; in the embodiment, each item of information of each point cloud node file is independently used as an item to be stored in a retrieval file;
in order to facilitate quick retrieval of information of a point cloud of the same layer, as a further preferred embodiment, in this embodiment, information of cloud node files of each point is sequentially stored in a retrieval file according to a depth sequence from small to large;
specifically, in the embodiment, the information of one point cloud node file is placed in one row of the retrieval file, in each row of data, the first item represents the depth of the corresponding point cloud node, the number of characters represents the depth level of the point cloud node, and the subsequent retrieval speed is improved; the second item represents the path; subsequently, sequentially arranging vertex coordinates of the directional bounding boxes, and segmenting through special characters; for example, in this embodiment, in the created search file, one line of data is as follows:
d01:../../dapt/pcl_data/05fg5-68dr8-fsd9d.pcd;{3.689,13.256,-45.64}%{57.801,98.656,6.450}%...
the line of data indicates that the local point cloud is in a second layer, specifically 1 region below the first layer; the storage path is named 05fg5-68dr 8-fsdd9d.pcd; the directional bounding box vertex data are {3.689, 13.256, -45.64}, {57.801, 98.656, 6.450}.
In order to accurately represent the point cloud, in this embodiment, before the step (S1), the method further includes: and rejecting outliers in the point cloud to be represented.
Outliers are mainly points that are far away from the main point cloud and are scattered, and these points are generally noise generated by errors during scanning; according to the method and the device, before representing and storing the point cloud, the outliers in the point cloud are removed, the model can be accurately represented, and the resource consumption is reduced.
Example 2:
a point cloud display method, wherein the point cloud is represented and stored by using the extranuclear multi-resolution point cloud representation method provided in the above embodiment 1, and the display method is as shown in fig. 7, and the method comprises the following steps:
(T1) initializing a loading depth of 1 and loading a root node representing the model into a display form of the display tool;
in order to quickly retrieve point cloud information, the retrieval file is read before the point cloud is loaded, and related information is directly obtained from the retrieval file;
vtk (visualization toolkit) is an open source, free software system, mainly used for three-dimensional computer graphics, image processing and visualization. The Vtk is designed and realized on the basis of an object-oriented principle, the inner core of the Vtk is constructed by C + +, and user interaction can be realized by adding point cloud to the Actor; in the embodiment, the selected point cloud display tool is Vtk, and when the point cloud is loaded into the Vtk for display, a corresponding Actor is also added to obtain an interaction effect;
in other embodiments of the present invention, other display tools such as OpenGL, OSG, Direct3D, etc. may be used to perform point cloud display;
(T2) calculating the point cloud gravity center of the root node, and calculating the distance d between the point cloud gravity center of the root node and the display window in the world coordinate system0And initializing a lower bound R of the target range RLAnd an upper bound RURespectively as follows: rL=t*d0,RU=d0
(T3) calculating the barycenter of the point cloud by using all the loaded point clouds, calculating the distance d between the barycenter of the point cloud in the world coordinate system and the display window, and if d belongs to R, turning to the step (T6); if d is<RLIf the loading depth is more than 1, the loading depth is increased by RL=t*RL、RU=t*RUUpdating the lower bound R of the target Range RLAnd an upper bound RUAnd go to step (T4); if d is>RUIf the loading depth is reduced by 1, the loading depth is reduced by RL=RL/t、RU=RULower bound R of target Range RLAnd an upper bound RUAnd go to step (T5);
when the center of gravity of the point cloud is calculated, adding the coordinates (x, y, z) of the midpoints of all the loaded point clouds, and dividing the sum by the total number of the points to obtain the center of gravity of the point cloud;
(T4) traversing the point cloud corresponding to the node of the layer corresponding to the loading depth in the representation model, loading the point cloud into the display window if the traversed point cloud is visible in the display window, and not loading the point cloud if the traversed point cloud is not visible in the display window; after the traversal is finished, the step (T3) is carried out;
(T5) unloading the point cloud which has been loaded into the display tool and has a depth greater than the loading depth, and releasing the corresponding memory, and then proceeding to step (T3);
when point cloud is unloaded, a corresponding Actor object needs to be unloaded;
(T6) point cloud display is complete;
where 0< t <1, optionally, in this embodiment, t is 0.6.
According to the method and the device, only part of the point cloud is loaded based on the observation distance, so that the better display effect is ensured, the memory occupancy rate in the point cloud display process can be effectively reduced, the problem of render blockage is effectively solved, and the user perception effect is effectively improved.
In the step (T4) of this embodiment, determining whether the point cloud is visible in the display window, as shown in fig. 8, includes:
acquiring coordinates of the vertex of a directional bounding box of the point cloud, and transforming the coordinates into coordinates under a screen coordinate system through projection;
if the coordinates (x, y) of any vertex after the coordinate transformation satisfy the display condition: determining that the point cloud is visible in the display window if x is more than or equal to 0 and less than or equal to window. If the coordinates of all the vertexes do not meet the display condition after the coordinate transformation, judging that the point cloud is invisible in the display window;
wherein window.
As a preferred implementation, the step (T4) of this embodiment further includes:
and if the traversed point cloud is invisible in the display window and the point cloud is loaded into the display tool, unloading the point cloud and releasing the corresponding memory.
Due to the change of the visual angle, the situation that some recorded point clouds are not in the display window body can occur, and the point clouds are unloaded and corresponding memories are released, so that the memory occupancy rate can be reduced under the condition that the display effect is not influenced.
In the display tool, the mouse drags the point cloud view or causes translation, rotation or zoom transformation, and for the problem of view transformation, the embodiment further includes:
when the viewing angle is changed, steps (T3) to (T5) are performed to perform the point cloud display again.
According to the embodiment, when the visual angle changes, the point cloud is loaded or unloaded again, and the point cloud display effect can be guaranteed in real time.
Fig. 9 shows an actual display effect obtained based on the above example 2, where the experimental conditions include that the whole point cloud is displayed first, and then the whole point cloud is dragged to sequentially enlarge the point clouds at the upper left corner without considering reloading caused by view angle change or zooming. As can be seen in the debugging process, the point clouds are locally loaded, the upper left corner of the large point cloud is loaded first, then the small point cloud in the upper left corner point cloud is loaded, and the point clouds have obvious density change.
Example 3:
a computer readable storage medium comprising a stored computer program;
when the computer program is processed and executed, the apparatus on which the computer readable storage medium is located is controlled to execute the extranuclear multi-resolution point cloud representation method provided in the above embodiment 1 and/or the point cloud display method provided in the above embodiment 2.
It will be understood by those skilled in the art that the foregoing is only a preferred embodiment of the present invention, and is not intended to limit the invention, and that any modification, equivalent replacement, or improvement made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for representing a multi-resolution point cloud outside a core is characterized by comprising the following steps:
(S1) taking the point cloud to be represented as a point cloud to be processed, and proceeding to step (S2);
(S2) solving the local characteristic point F of the point cloud to be processediAnd density ρ around each local feature pointi(ii) a If the number of the local feature points of the point cloud to be processed is zero, ending the processing of the point cloud to be processed, and turning to the step (S6); otherwise, according to
Figure FDA0002740673060000011
Calculating a distance threshold Ti(ii) a L represents the side length of a minimum external cube of the point cloud to be processed, and r represents a preset scale factor;
(S3) according to the distance threshold TiSampling the point cloud to be processed to obtain a sampled point cloud, and taking the sampled point cloud as a root node of a tree for representing the point cloud to be processed;
(S4) removing the sampling point cloud from the point cloud to be processed to obtain residual point cloud, equally dividing the residual point cloud into N areas according to a minimum circumscribed cube, wherein the point cloud in each area is used for constructing a subtree of the root node;
(S5) if the segmentation depth reaches a preset depth threshold, finishing the processing of the point cloud to be processed, and turning to the step (S6); otherwise, respectively taking the point clouds in each divided region as point clouds to be processed, and turning to the step (S2);
(S6) when all the point clouds to be processed are processed, taking the constructed complete tree structure as a representation model of the point clouds to be represented and storing the tree structure;
wherein, i is 1,2,3 … … M, and M represents the number of local feature points in the point cloud to be processed; the scale factor is a preset constant and is used for controlling the sparsity of sampling the point cloud; n ═ N3N is a positive integer; the segmentation depth is the height of the constructed complete tree structure.
2. The method of claim 1, wherein in the step (S3), the distance threshold T is usediSampling the point cloud to be processed, comprising:
sampling each local feature point and its surrounding points as follows:
(S31) taking the current local feature point F as a target point;
(S32) acquiring a sphere which takes the target point as the center of sphere and the distance threshold T corresponding to the local characteristic point F as the radius, taking the sphere as a target sphere, and eliminating all points except the local characteristic point F in the target sphere;
(S33) selecting an unprocessed point around the target sphere as a target point, and performing the step (S32) to expand the sampling area corresponding to the current local feature point;
(S34) the step (S33) is repeated until the sampling region corresponding to the current local feature point intersects with the sampling regions corresponding to the other local feature points, or all the points are processed.
3. The method of extranuclear multi-resolution point cloud representation of claim 1, further comprising:
establishing a retrieval file for storing information of cloud node files of each point;
the point cloud node files correspond to nodes in the representation model one by one and are used for storing position coordinates of corresponding point clouds;
the information of the point cloud node file stored in the retrieval file comprises: the depth of the corresponding node, the storage path of the point cloud node file, and the direction of the corresponding point cloud enclose the box vertex coordinates.
4. The method of claim 3, wherein the information of each point cloud node file is sequentially stored in the search file in order of depth from small to large.
5. The method of representing an extranuclear multi-resolution point cloud of any one of claims 1-4, further comprising, prior to said step (S1): and rejecting outliers in the point cloud to be represented.
6. A point cloud display method, wherein the point cloud has been represented and stored by the extranuclear multi-resolution point cloud representation method according to any one of claims 1 to 5, the display method comprising the steps of:
(T1) initializing a loading depth of 1 and loading the root node of the representation model into a display form of a display tool;
(T2) calculating the point cloud gravity center of the root node, and calculating the distance d between the point cloud gravity center of the root node and the display window in the world coordinate system0And initializing a lower bound R of the target range RLAnd an upper bound RURespectively as follows: rL=t*d0,RU=d0
(T3) calculating the barycenter of the point cloud by using all the loaded point clouds, calculating the distance d between the barycenter of the point cloud and the display window in the world coordinate system, and if d belongs to R, turning to the step (T6); if d is<RLAdding 1 to the loading depth according to RL=t*RL、RU=t*RUUpdating a lower bound R of the target range RLAnd an upper bound RUAnd go to step (T4); if d is>RUThen subtract 1 from the loading depth, according to RL=RL/t、RU=RUT updating the lower bound R of the target range RLAnd an upper bound RUAnd go to step (T5);
(T4) traversing the point cloud corresponding to the node of the layer corresponding to the loading depth in the representation model, loading the point cloud into the display window if the traversed point cloud is visible in the display window, and not loading the point cloud if the traversed point cloud is not visible in the display window; after the traversal is finished, the step (T3) is carried out;
(T5) unloading the point cloud currently loaded into the display tool and having a depth greater than the loading depth, and releasing the corresponding memory, and then proceeding to step (T3);
(T6) point cloud display is complete;
wherein 0< t < 1.
7. The point cloud display method of claim 6, wherein said step (T4) of determining whether the point cloud is visible within the display window comprises:
acquiring coordinates of the vertex of a directional bounding box of the point cloud, and transforming the coordinates into coordinates under a screen coordinate system through projection;
if the coordinates (x, y) of any vertex after the coordinate transformation satisfy the display condition: determining that the point cloud is visible in the display window if x is greater than or equal to 0 and less than or equal to window. If the coordinates of all the vertexes do not meet the display condition after the coordinate transformation, judging that the point cloud is invisible in the display window;
wherein window.
8. The point cloud display method of claim 6, said step (T4) further comprising:
and if the traversed point cloud is invisible in the display window and the point cloud is loaded into the display tool, unloading the point cloud and releasing a corresponding memory.
9. The point cloud display method of claim 6, further comprising:
when the viewing angle is changed, steps (T3) to (T5) are performed to perform the point cloud display again.
10. A computer-readable storage medium comprising a stored computer program;
the computer program, when executed, controls an apparatus on which the computer readable storage medium is located to perform the out-of-core multi-resolution point cloud representation method of any one of claims 1-5 and/or the point cloud display method of claims 6-9.
CN202011149300.8A 2020-10-23 2020-10-23 Out-of-core multi-resolution point cloud representation method and point cloud display method Active CN112215951B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011149300.8A CN112215951B (en) 2020-10-23 2020-10-23 Out-of-core multi-resolution point cloud representation method and point cloud display method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011149300.8A CN112215951B (en) 2020-10-23 2020-10-23 Out-of-core multi-resolution point cloud representation method and point cloud display method

Publications (2)

Publication Number Publication Date
CN112215951A true CN112215951A (en) 2021-01-12
CN112215951B CN112215951B (en) 2022-04-29

Family

ID=74055035

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011149300.8A Active CN112215951B (en) 2020-10-23 2020-10-23 Out-of-core multi-resolution point cloud representation method and point cloud display method

Country Status (1)

Country Link
CN (1) CN112215951B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615191A (en) * 2009-07-28 2009-12-30 武汉大学 The storage of magnanimity cloud data and real time visualized method
CN105808672A (en) * 2016-03-01 2016-07-27 重庆市勘测院 Browser based mass three-dimensional point cloud data release method
US20190080503A1 (en) * 2017-09-13 2019-03-14 Tata Consultancy Services Limited Methods and systems for surface fitting based change detection in 3d point-cloud
CN110070613A (en) * 2019-04-26 2019-07-30 东北大学 Large-scale three dimensional scene web page display method based on model compression and asynchronous load
US20200126208A1 (en) * 2018-10-18 2020-04-23 Wisconsin Alumni Research Foundation Systems, methods, and media for detecting manipulations of point cloud data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101615191A (en) * 2009-07-28 2009-12-30 武汉大学 The storage of magnanimity cloud data and real time visualized method
CN105808672A (en) * 2016-03-01 2016-07-27 重庆市勘测院 Browser based mass three-dimensional point cloud data release method
US20190080503A1 (en) * 2017-09-13 2019-03-14 Tata Consultancy Services Limited Methods and systems for surface fitting based change detection in 3d point-cloud
US20200126208A1 (en) * 2018-10-18 2020-04-23 Wisconsin Alumni Research Foundation Systems, methods, and media for detecting manipulations of point cloud data
CN110070613A (en) * 2019-04-26 2019-07-30 东北大学 Large-scale three dimensional scene web page display method based on model compression and asynchronous load

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
付忠敏: "基于激光扫描的井下点云数据采集与预处理系统研究", 《中国优秀硕士学位论文全文数据库 工程科技I辑》 *
孟放等: "基于LOD控制与内外存调度的大型三维点云数据绘制", 《计算机辅助设计与图形学学报》 *
李彩林: "采用八叉树和OSG分页结点的海量点云三维可视化", 《计算机工程与应用》 *
杨振发: "多分辨率LOD的海量点云显示技术研究", 《地理空间信息》 *

Also Published As

Publication number Publication date
CN112215951B (en) 2022-04-29

Similar Documents

Publication Publication Date Title
CN109145366B (en) Web 3D-based lightweight visualization method for building information model
Mehra et al. Abstraction of man-made shapes
US7561156B2 (en) Adaptive quadtree-based scalable surface rendering
CN104616345B (en) Octree forest compression based three-dimensional voxel access method
CN104361632B (en) A kind of triangle gridding filling-up hole method based on Hermite RBFs
JP7029283B2 (en) Image complement
JPH05266212A (en) Method for generating object
CN112308974B (en) Large-scale point cloud visualization method for improving octree and adaptive reading
CN112785710B (en) Rapid unitization method, system, memory and equipment for OSGB three-dimensional model building
Scheiblauer Interactions with gigantic point clouds
CN111784840B (en) LOD (line-of-sight) level three-dimensional data singulation method and system based on vector data automatic segmentation
CN111028335B (en) Point cloud data block surface patch reconstruction method based on deep learning
CN104504760B (en) The method and system of real-time update 3-D view
CN109118588B (en) Automatic color LOD model generation method based on block decomposition
CN106023297A (en) Texture dynamic organization method for fine three-dimensional model
CN110717967A (en) Large-scene-model-oriented web-side dynamic rendering LOD processing method
Krs et al. Skippy: Single view 3D curve interactive modeling
CN114708382A (en) Three-dimensional modeling method, device, storage medium and equipment based on augmented reality
Kang et al. Efficient randomized hierarchy construction for interactive visualization of large scale point clouds
Zhang et al. A geometry and texture coupled flexible generalization of urban building models
CN112215951B (en) Out-of-core multi-resolution point cloud representation method and point cloud display method
Hu et al. Parallel BVH construction using locally density clustering
CN117315192A (en) Three-dimensional grid model simplification method for Chinese space station
Huang Detecting color boundaries on 3D surfaces by applying edge‐detection image filters on a quad‐remeshing
Sahebdivani et al. Deep learning based classification of color point cloud for 3D reconstruction of interior elements of buildings

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant