Frustum-based point cloud processing method and device, electronic equipment and storage medium
By preprocessing 3D laser point cloud data and removing invalid scenes using frustum projection, combined with thinning, the problem of memory and performance waste in massive point cloud rendering is solved, achieving efficient real-time rendering and smooth dynamic scenes.
Patent Information
- Application Number
- CN202210179554.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-25
- Publication Date
- 2025-12-12
- Estimated Expiration
- 2042-02-25
AI Technical Summary
Existing point cloud rendering methods cannot effectively handle massive amounts of data, resulting in a waste of computer memory and GPU performance, and cannot achieve real-time rendering. In particular, when the position of objects changes in dynamic scenes, the index structure needs to be updated frequently, which affects the rendering speed.
By preprocessing the original 3D laser point cloud data, calculating the minimum directed bounding box, and removing invalid scene point cloud data based on the projection of the view frustum on the bottom surface, the rendering process is optimized by combining the thinning process of viewpoint coordinates and laser point distance.
It effectively reduces the amount of point cloud data that needs to be rendered, lowers GPU load and memory consumption, improves rendering efficiency, and ensures the smoothness of dynamic scenes and the fidelity of object semantic features.
Smart Images

Figure CN114565706B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present disclosure relates to the field of point cloud rendering and three-dimensional modeling, and in particular to a view frustum based point cloud processing method, a view frustum based point cloud processing device, an electronic device and a storage medium. BACKGROUND
[0002] With the rise of three-dimensional laser radar scanning technology, three-dimensional laser radar point clouds are increasingly used in applications such as digital cities, the Internet of Things, 3D videos, and immersive games.
[0003] Three-dimensional laser radar point clouds can accurately describe the semantic information of an object and more vividly display the information of the object than traditional 2D images. However, due to the massive amount of data of three-dimensional laser radar point clouds, the real-time rendering of the massive amount of data is a formidable challenge due to the constraints of computer memory size and graphics card performance. Therefore, it is very important to study a method for real-time rendering of massive point cloud data.
[0004] Chinese patent CN104376590A proposes a massive data circle index space display method. This method combines the characteristics of laser radar scanning and storage, and reorganizes the data format of three-dimensional laser radar point cloud data according to the scanning circle. The direction vector from the center of each scanning circle POS to the center of the next scanning circle POS is used as the main axis vector of the oriented bounding box of the point cloud obtained by scanning the scanning circle. Then, according to the obtained main axis vector and the point cloud range value of the scanning circle, the vertex coordinates of the oriented bounding box of the point cloud surrounding the scanning circle are calculated. Finally, the oriented bounding box of the view frustum displayed under the viewing angle is calculated and compared with the oriented bounding box calculated according to the scanning circle point cloud to determine whether the two oriented bounding boxes intersect. If the two oriented bounding boxes intersect, the circle point cloud is rendered and displayed. Otherwise, the circle point cloud is not displayed. However, this method is only applicable to point cloud data obtained by scanning in circles and is not suitable for MEMS (Micro Electro Mechanical Systems) laser radars. Moreover, this method only eliminates the point clouds that are not within the oriented bounding box of the viewing angle, and does not process the massive point clouds within the viewing angle bounding box.
[0005] Chinese patent CN111127610A proposes a point cloud data three-dimensional visualization rendering method. This method first normalizes the point cloud data, then divides the three-dimensional space, binds each point cloud with a unique key value, and uses multi-threading to improve the loading speed of point cloud data. This method proposes several point cloud rendering methods, including vertex rendering, mapping rendering based on a three-dimensional network, mesh reconstruction rendering based on a triangulation algorithm, point cloud motion animation rendering, and point cloud particle animation rendering. However, this method does not propose any scheme for real-time rendering of point clouds.
[0006] A point cloud rendering method based on tree structure network vector quantization is proposed in Chinese patent CN108615254A. According to the method, the vector space composed of point cloud data is divided into several network vectors, and the obtained network vectors are packed into bounding boxes. Then, the bounding boxes are subjected to multi-layer quantization processing by using an octree division method to obtain sub-bounding boxes of different depths. Finally, the sub-bounding boxes are used to replace the points in the point cloud data within the sub-bounding boxes. However, this method uses bounding boxes to replace points for rendering, which may blur the semantic features of objects, cause object distortion, and affect the audience experience.
[0007] A Web-based massive point cloud rendering method is proposed in Chinese patent CN107943961A. This method reorganizes massive point cloud data by using a quadtree, and then renders the point cloud data onto a Web browser by using the Potree technology. However, the Potree has poor scalability and can only support specific data formats, and cannot handle flattened point clouds with small height differences. Moreover, this method does not process point clouds, but renders all point clouds. Since massive point cloud data is redundant, rendering all point clouds without processing the point cloud data will result in very large performance consumption and waste of computer memory.
[0008] A laser point cloud rendering method and device are provided in Chinese patent CN106846498A. First, point cloud data in different formats is converted into PCG format point cloud in the standard format of AutoCAD. Then, according to the range of the view window and the point cloud display threshold, the number of points to be rendered in the point cloud displayed in the three-dimensional view window is counted. The obtained points to be rendered are added to the AutoCAD point cloud object, and the point cloud is rendered. This method only provides a way to process and render point cloud data in different formats, and does not provide a feasible solution for real-time rendering of point clouds.
[0009] A massive laser scanning point cloud real-time rendering method based on quadtree index is proposed in Chinese patent CN101908068A. First, a quadtree index is established for the original three-dimensional laser point cloud data, and the quadtree index is serialized. Then, the quadtree index is used to quickly crop the field of view of massive laser point cloud data, and through drawing detail control and drawing time control, the real-time rendering of massive point cloud data is realized. This method limits the point cloud data to be rendered to achieve fast rendering of point cloud data. However, this method uses a traditional quadtree to establish an index. When this method is applied to a dynamic scene, the positions of objects are constantly changing, and the objects are switched between nodes in the tree at any time, thereby requiring constant updating of the quadtree. Another problem with this method is that it only limits the number of point clouds to be rendered by cropping the field of view, and does not process the rendered point clouds. Once the number of point clouds within the field of view is too large, the rendering speed will be affected.
[0010] By analyzing the existing technical solutions, it is found that the current point cloud rendering cannot meet the demand of real-time rendering of massive point cloud data. Some methods use powerful data index such as Potree to realize fast rendering of point cloud, but these methods will bring very huge performance consumption, waste computer memory and consume GPU performance, because they do not process the point cloud data. In addition, some methods limit the rendering of point cloud data, for example, clipping the field of view, rendering the bounding box surrounding the point cloud instead of the point cloud itself, to improve the speed of rendering point cloud data. However, these methods have some problems. Some methods only exclude the point cloud outside the field of view, without processing the point cloud inside the field of view. Some methods use directional bounding box instead of point cloud data in the bounding box, which will blur the semantic information of the object and cause distortion of the object. SUMMARY
[0011] To solve at least one of the above technical problems, the present disclosure provides a view frustum based point cloud processing method, device, electronic equipment and storage medium.
[0012] According to one aspect of the present disclosure, a view frustum based point cloud processing method is provided, comprising:
[0013] S102, preprocessing the obtained original three-dimensional laser point cloud data to obtain preprocessed three-dimensional laser point cloud data, the preprocessing at least including obtaining the minimum directional bounding box of the original three-dimensional laser point cloud data;
[0014] S104, removing the point cloud data of invalid scene in the preprocessed three-dimensional laser point cloud data based on the projection of the view frustum on the bottom surface of the minimum directional bounding box, to obtain the three-dimensional laser point cloud data inside the view frustum;
[0015] S106, performing the thinning processing based on the distance between the view point coordinates and the laser points on the three-dimensional laser point cloud data inside the view frustum, and performing the rendering processing on the three-dimensional laser point cloud data inside the view frustum after the thinning processing.
[0016] According to the view frustum based point cloud processing method of at least one embodiment of the present disclosure, S102, preprocessing the obtained original three-dimensional laser point cloud data to obtain preprocessed three-dimensional laser point cloud data, comprises:
[0017] S1021, calculating the feature vector and feature value of the point data in the original three-dimensional laser point cloud data, and taking the feature vector corresponding to the maximum feature value as the directional vector of the original three-dimensional laser point cloud;
[0018] S1022, obtaining the minimum directional bounding box of the original three-dimensional laser point cloud data based on the directional vector of the original three-dimensional laser point cloud data and the coordinate value of the original three-dimensional laser point cloud data in the space rectangular coordinate system.
[0019] S1023, taking the left lower corner vertex of the minimum oriented bounding box as the origin, dividing the original three-dimensional laser point cloud data into each unit square grid of a preset square plane grid to generate a point cloud data occupied grid region;
[0020] S1024, for each unit square grid, establishing a mapping relationship between each point data in the unit square grid and the unit square grid coordinates.
[0021] According to the point cloud processing method based on a view frustum according to at least one embodiment of the present disclosure, in step S102, S1025, the three-dimensional laser point cloud data in each unit square grid is randomly sorted to realize the uniform distribution of the point data in each unit square grid.
[0022] According to the point cloud processing method based on a view frustum according to at least one embodiment of the present disclosure, S104, based on the projection of the view frustum on the bottom face of the minimum oriented bounding box, the point cloud data of the invalid scene in the preprocessed three-dimensional laser point cloud data is removed, and the three-dimensional laser point cloud data in the view frustum is obtained, including:
[0023] S1041, obtaining the intersection points of each side of the view frustum and the plane on which the bottom face of the minimum oriented bounding box is located, and obtaining a projection polygon;
[0024] S1042, intersecting the projection polygon with the point cloud data occupied grid region to obtain an intersection region;
[0025] S1043, rasterizing the intersection region to obtain the unit square grid occupied by the intersection region;
[0026] S1044, based on the coordinates of each unit square grid of the unit square grid occupied by the intersection region, obtaining the three-dimensional laser point cloud data in the view frustum.
[0027] According to the point cloud processing method based on a view frustum according to at least one embodiment of the present disclosure, S1043, the intersection region is rasterized to obtain the unit square grid occupied by the intersection region, and the unit square grid occupied by the intersection region includes the edge unit square grid intersecting with the projection polygon.
[0028] According to the point cloud processing method based on a view frustum according to at least one embodiment of the present disclosure, S1044, based on the coordinates of each unit square grid of the unit square grid occupied by the intersection region, obtaining the three-dimensional laser point cloud data in the view frustum, including:
[0029] Asynchronously load each unit square grid of the intersection region;
[0030] Based on the mapping relationship between the coordinates of each unit square grid of the intersection region and each point data in the unit square grid, locate the three-dimensional laser point cloud data block contained in each unit square grid.
[0031] The view frustum-based point cloud processing method according to at least one embodiment of the present disclosure further comprises: S1045, loading three-dimensional laser point cloud data of the unit square grid for point cloud rendering processing.
[0032] The view frustum-based point cloud processing method according to at least one embodiment of the present disclosure, S1045, loading three-dimensional laser point cloud data of the unit square grid for point cloud rendering processing, comprises:
[0033] Real-time update the geometric features of the view frustum to obtain an updated view frustum;
[0034] Determine whether the three-dimensional laser point cloud data of the unit square grid loaded is three-dimensional laser point cloud data outside the updated view frustum;
[0035] Unload the point cloud data outside the updated view frustum to update the three-dimensional laser point cloud data for point cloud rendering processing.
[0036] The view frustum-based point cloud processing method according to at least one embodiment of the present disclosure, S106, performing a thinning processing on the three-dimensional laser point cloud data in the view frustum based on the distance between the view point coordinates and the laser points, and performing a rendering processing on the three-dimensional laser point cloud data in the view frustum after the thinning processing, comprises:
[0037] S1061, calculate the distance between the unit square grid corresponding to the three-dimensional laser point cloud data to be rendered and the view point;
[0038] S1062, dynamically obtain a thinning ratio coefficient based on the distance between the center of each unit square grid and the view point and the angle between the vector from the center of the unit square grid to the view point and the normal vector of the unit square grid;
[0039] S1063, perform a thinning processing on the three-dimensional point cloud data corresponding to each unit square grid based on the thinning ratio coefficient of each unit square grid to perform a rendering processing.
[0040] According to another aspect of the present disclosure, the present disclosure further provides a view frustum-based point cloud processing device, comprising:
[0041] a preprocessing module, configured to preprocess the acquired original three-dimensional laser point cloud data to obtain preprocessed three-dimensional laser point cloud data, the preprocessing at least including obtaining a minimum oriented bounding box of the original three-dimensional laser point cloud data;
[0042] a point cloud screening module, configured to remove point cloud data of invalid scenes in the preprocessed three-dimensional laser point cloud data based on a projection of a view frustum on a bottom surface of the minimum oriented bounding box to obtain three-dimensional laser point cloud data within the view frustum;
[0043] a data processing module, configured to at least perform a thinning processing on the three-dimensional laser point cloud data within the view frustum based on a distance between a viewpoint coordinate and a laser point, and perform a rendering processing on the three-dimensional laser point cloud data within the view frustum after the thinning processing.
[0044] The point cloud processing device according to at least one embodiment of the present disclosure, the preprocessing module comprises:
[0045] a direction vector acquisition module, configured to calculate a feature vector and a feature value of point data in the original three-dimensional laser point cloud data, and take a feature vector corresponding to a maximum feature value as a direction vector of the original three-dimensional laser point cloud;
[0046] a minimum oriented bounding box acquisition module, configured to obtain a minimum oriented bounding box of the original three-dimensional laser point cloud data based on the direction vector of the original three-dimensional laser point cloud data and coordinate values of the original three-dimensional laser point cloud data in a space rectangular coordinate system;
[0047] a point cloud data division module, configured to divide the original three-dimensional laser point cloud data into each unit square grid of a preset square plane grid with a lower left corner vertex of the minimum oriented bounding box as an origin to generate a point cloud data occupied grid region;
[0048] a mapping relationship establishment module, configured to, for each unit square grid, establish a mapping relationship between each point data in the unit square grid and a coordinate of the unit square grid;
[0049] a random sorting module, configured to perform a random sorting on the three-dimensional laser point cloud data in each unit square grid to realize a uniform distribution of the point data in each unit square grid.
[0050] The point cloud processing device according to at least one embodiment of the present disclosure, the point cloud screening module comprises:
[0051] The projection polygon acquisition module acquires intersection points of each side of the view frustum and a plane on which the bottom surface of the minimum oriented bounding box lies, and acquires a projection polygon;
[0052] The intersection region acquisition module acquires an intersection region of the projection polygon and the point cloud data occupancy grid region;
[0053] The unit square grid extraction module performs a rasterization operation on the intersection region to acquire a unit square grid occupied by the intersection region;
[0054] The three-dimensional laser point cloud data extraction module acquires three-dimensional laser point cloud data in the view frustum based on coordinates of each unit square grid of the unit square grid occupied by the intersection region;
[0055] The update module updates the geometric features of the view frustum in real time to acquire an updated view frustum, and judges whether the three-dimensional laser point cloud data of the loaded unit square grid becomes three-dimensional laser point cloud data outside the updated view frustum;
[0056] The data loading and unloading module loads three-dimensional laser point cloud data in the view frustum corresponding to each unit square grid sent by the three-dimensional laser point cloud data extraction module, and unloads three-dimensional laser point cloud data outside the updated view frustum.
[0057] The point cloud processing device according to at least one embodiment of the present disclosure, the data processing module comprises:
[0058] The distance calculation module calculates the distance between the unit square grid corresponding to the three-dimensional laser point cloud data to be rendered and the viewpoint;
[0059] The thinning-out proportion coefficient acquisition module dynamically acquires a thinning-out proportion coefficient based on the distance between the center of each unit square grid and the viewpoint and the angle between the vector from the center of the unit square grid to the viewpoint and the normal vector of the unit square grid;
[0060] The thinning-out processing module performs thinning-out processing on the three-dimensional point cloud data corresponding to each unit square grid based on the thinning-out proportion coefficient of each unit square grid;
[0061] The rendering processing module performs rendering processing on the three-dimensional point cloud data after the thinning-out processing.
[0062] According to still another aspect of the present disclosure, there is provided an electronic device comprising: a memory storing execution instructions; and a processor executing the execution instructions stored by the memory, so that the processor executes the point cloud processing method according to any one of the preceding aspects.
[0063] According to still another aspect of the present disclosure, there is provided a readable storage medium having stored therein execution instructions for implementing the point cloud processing method according to any one of the preceding aspects when executed by a processor. BRIEF DESCRIPTION OF DRAWINGS
[0064] The accompanying drawings, which are included to provide a further understanding of the present disclosure and are incorporated in and constitute a part of this specification, illustrate exemplary embodiments of the present disclosure and together with the description serve to explain the principles of the present disclosure.
[0065] Figure 1 is a flowchart of a frustum-based point cloud processing method according to an embodiment of the present disclosure.
[0066] Figure 2 is a schematic diagram of the principle of an invalid scene culling algorithm according to an embodiment of the present disclosure.
[0067] Figure 3 is a flowchart of step S102 of a frustum-based point cloud processing method according to an embodiment of the present disclosure.
[0068] Figure 4 is a flowchart of step S102 of a frustum-based point cloud processing method according to an embodiment of the present disclosure.
[0069] Figure 5 is a flowchart of step S104 of a frustum-based point cloud processing method according to an embodiment of the present disclosure.
[0070] Figure 6 is a flowchart of step S104 of a frustum-based point cloud processing method according to an embodiment of the present disclosure.
[0071] Figure 7 is a structural schematic block diagram of a point cloud processing apparatus according to an embodiment of the present disclosure, which is a hardware implementation of a processing system. DETAILED DESCRIPTION
[0072] The present disclosure will be described in further detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related content, and not to limit the present disclosure. In addition, it should be noted that, for the sake of description, only parts related to the present disclosure are shown in the drawings.
[0073] It should be noted that the embodiments and features of the embodiments in the present disclosure can be combined with each other in the case of no conflict. The technical solutions of the present disclosure will be described in detail below with reference to the drawings and in combination with the embodiments.
[0074] Unless otherwise specified, the example embodiments / instances shown will be understood as providing exemplary features of various details that can implement the technical concepts of the present disclosure in practice. Therefore, unless otherwise specified, the features of various embodiments / instances can be additionally combined, separated, interchanged and / or rearranged without departing from the technical concepts of the present disclosure.
[0075] In the drawings, cross-hatching and / or shading are generally used to indicate that a portion of one feature can overlap with another feature. As such, unless specified, the presence of cross-hatching or shading is not meant to indicate or imply any particular material, material property, dimension, ratio, commonality between illustrated components, or any other characteristic, attribute, property, or the like of the components, unless specified. Moreover, in the drawings, the size and relative sizes of components can be exaggerated for clarity and / or descriptive purposes. When example embodiments can be carried out differently, a specific process sequence can be performed in a different order than described. For example, two consecutively described processes can be performed substantially simultaneously or in an order opposite to that described. Furthermore, like reference numerals indicate like components.
[0076] When a component is referred to as being “on” or “over” another component, “connected to” or “coupled to” another component, it can be directly on, directly connected to, or directly coupled to the other component, or intervening components can be present. However, when a component is referred to as being “directly on”, “directly connected to”, or “directly coupled to” another component, there are no intervening components present. For this reason, the term “connected” can refer to a physical connection, an electrical connection, etc., with or without intervening components.
[0077] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting. As used herein, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise. Furthermore, to the extent that the terms "including," "includes," "having," "has," "with," or variants thereof are used in either the detailed description or the claims, such terms are intended to be inclusive in a manner similar to the term "comprising." It is also to be noted that the term "or" as used herein is intended to mean "and / or," unless explicitly stated otherwise. Further, it is to be noted that the use of "a" or "an" in the detailed description and claims includes both singular and plural unless otherwise indicated.
[0078] The following detailed description is presented in connection with Figures 1 to 7 The frustum-based point cloud processing method, the point cloud processing device, the electronic device, and the readable storage medium of the present disclosure are described in detail.
[0079] Figure 1 is a flowchart of a frustum-based point cloud processing method S100 according to an embodiment of the present disclosure, referring to Figure 1 The frustum-based point cloud processing method S100 of the present disclosure includes:
[0080] S102, preprocessing the obtained original three-dimensional laser point cloud data to obtain preprocessed three-dimensional laser point cloud data, the preprocessing at least including obtaining the minimum oriented bounding box of the original three-dimensional laser point cloud data;
[0081] S104, removing the point cloud data of invalid scenes in the preprocessed three-dimensional laser point cloud data based on the projection of the frustum on the bottom surface of the minimum oriented bounding box, and obtaining the three-dimensional laser point cloud data within the frustum;
[0082] S106, performing a thinning process based on the distance between the viewpoint coordinates and the laser points on the three-dimensional laser point cloud data within the frustum, and performing a rendering process on the three-dimensional laser point cloud data within the frustum after the thinning process.
[0083] In the present disclosure, the original three-dimensional laser point cloud data is preferably three-dimensional laser point cloud data obtained in real time based on a vehicle-mounted laser radar. The acquisition of three-dimensional laser point cloud data belongs to the prior art, and will not be described in detail in the present disclosure.
[0084] Due to the field of view angle, only a part of the three-dimensional laser point cloud may exist in the frustum. If the laser point cloud outside the frustum is not removed, and the GPU (Graphics Processing Unit) is directly used for rendering, great consumption of the GPU and waste of the computer memory will be caused. Therefore, invalid scene removal needs to be performed on the CPU side to remove the three-dimensional laser point cloud data that is not in the frustum.
[0085] The method in the prior art is to establish an octree for the three-dimensional laser point cloud, traverse the octree nodes, perform visibility analysis on each octree node and the frustum, thereby cutting the octree, and realize removal of invalid scene data. However, this method needs to traverse each octree node, and if the depth value of the octree constructed by the three-dimensional laser point cloud is high, the time consumption will be very high.
[0086] In order to realize fast removal of invalid scenes, the disclosure proposes an algorithm for removing invalid scenes based on the projection of the frustum on the bottom surface (square plane grid) of the minimum oriented bounding box of the three-dimensional laser point cloud. Figure 2 FIG. 1 is a schematic diagram of the principle of the invalid scene removal algorithm of the disclosure.
[0087] The frustum described in the disclosure is the prior art, which is the space visible to the vehicle-mounted camera, and the shape is similar to a pyramid with the top cut off. The frustum is surrounded by 6 clipping planes, and the 4 side faces constituting the frustum are respectively the upper face, the left face, the lower face, and the right face, which correspond to the four boundaries of the camera screen respectively.
[0088] In order to prevent the object from being too close to the camera, a near clipping plane is set, and in order to prevent the object from being too far away from the camera and invisible, a far clipping plane is set. The four side edges of the frustum are the edges constituting the frustum and not on the near clipping plane or the far clipping plane.
[0089] After the invalid scene removal in the point cloud processing method of the disclosure, the range of the scene to be rendered and the number of three-dimensional laser point cloud data are reduced. However, due to the large number of three-dimensional laser point cloud data, if the point cloud data is not thinned out, direct rendering will consume a large amount of GPU performance, and compared with the details of the distant objects, the human eye (i.e. the viewpoint) is more sensitive to the details of the nearby objects. If all the details of the distant objects are rendered, the rendering calculation will be increased, and the fluency will be reduced. Therefore, in the point cloud processing method of the disclosure, after the invalid scene removal, the three-dimensional laser point cloud data in the frustum is thinned out, and the number of three-dimensional laser point cloud to be rendered is further reduced.
[0090] According to the point cloud processing method S100 based on the frustum according to one preferred embodiment of the disclosure, the S102 described above, the preprocessing of the obtained original three-dimensional laser point cloud data is performed to obtain the preprocessed three-dimensional laser point cloud data, which includes:
[0091] S1021, calculate the eigenvector and eigenvalue of the point data in the original three-dimensional laser point cloud data, and take the eigenvector corresponding to the maximum eigenvalue as the direction vector of the original three-dimensional laser point cloud;
[0092] S1022, based on the direction vector of the original three-dimensional laser point cloud data and the coordinate value of the original three-dimensional laser point cloud data in the space rectangular coordinate system, obtain the minimum oriented bounding box (i.e. minimum OBB (Oriented Bounding Box)) of the original three-dimensional laser point cloud data;
[0093] S1023, taking the left lower corner vertex of the minimum oriented bounding box as the origin, dividing the original three-dimensional laser point cloud data into each unit square grid of the preset square plane grid, and generating a point cloud data occupied grid region;
[0094] S1024, for each unit square grid, establishing a mapping relationship between each point data in the unit square grid and the unit square grid coordinate.
[0095] In the present disclosure, considering that the three-dimensional laser point cloud data is discrete points, in order to facilitate data management, the point cloud is indexed for real-time searching and editing.
[0096] In the present disclosure, the eigenvector and eigenvalue of the point data in the original three-dimensional laser point cloud data can be based on the PCA (Principle Component Analysis) algorithm; the space rectangular coordinate system is preferably the WGS84 space rectangular coordinate system, which is a right-handed coordinate system with the center of the earth as the coordinate origin, the direction from the center of the earth to the protocol earth pole (Conventional Terrestrial Pole, CTP) defined by the international time service organization in 1984.0 as the Z-axis direction, the X-axis direction pointing to the intersection of the zero meridian plane of BIH 1984.0 and the CTP equator, and the Y-axis being perpendicular to the Z-axis and the X-axis.
[0097] In the present disclosure, the preset square plane grid described above can be a square plane grid with a length and a width of 1m, which includes a plurality of unit square grids, and a person skilled in the art can adjust the size of the preset square plane grid, the size of the unit square grid, the number of unit square grids and other parameters, which all fall within the protection scope of the present disclosure.
[0098] The generated point cloud data occupied grid region described above can be M rows and N columns of unit square grids.
[0099] Step S1023 can be preferably expressed by the following formula:
[0100]
[0101] In formula (1), (X i ,Y i ) T represents the X / Y coordinates of the laser point i in the spatial rectangular coordinate system, (X LB ,Y LB ) T represents the X / Y coordinates of the left lower corner vertex of the minimum oriented bounding box in the spatial rectangular coordinate system, INT represents the rounding operation, and (R i ,C i ) represents the row and column numbers of the unit square grid corresponding to the laser point i.
[0102] Through the processing of the original three-dimensional laser point cloud data in step S1023, in step S1024, a mapping relationship between the laser points and the unit square grid coordinates (i.e., (R i ,C i )) is established, so that the original three-dimensional laser point cloud data block contained in the unit square grid can be directly located according to a certain unit square grid coordinate.
[0103] Figure 3 A flowchart of step S102 of the embodiment is shown.
[0104] For the above-mentioned point cloud processing method S100 based on a view frustum of the embodiment, preferably, in step S102, the following step is further included:
[0105] S1025, randomly sorting the three-dimensional laser point cloud data in each unit square grid to realize the uniform distribution of the point data in each unit square grid.
[0106] In the embodiment, by uniformly distributing the point data in each unit square grid, the effect of the smoothing and thinning described below can be improved.
[0107] According to the preferred embodiment of the present disclosure, the three-dimensional laser point cloud data after the preprocessing described above is stored in a target file in units of unit square grids.
[0108] In the subsequent point cloud processing process, the three-dimensional laser point cloud data corresponding to the unit square grid can be extracted through the unit square grid coordinates.
[0109] Figure 4 A flowchart of step S102 of the point cloud processing method S100 based on a view frustum of the embodiment is shown.
[0110] For the point cloud processing method S100 based on the frustum of each of the above embodiments, preferably, the S104 described above removes the point cloud data of the invalid scene in the preprocessed three-dimensional laser point cloud data based on the projection of the frustum on the bottom surface of the minimum oriented bounding box, obtains the three-dimensional laser point cloud data in the frustum, including:
[0111] S1041, obtaining the intersection points of each side of the frustum and the plane on which the bottom surface of the minimum oriented bounding box is located, and obtaining the projection polygon;
[0112] S1042, intersecting the projection polygon and the point cloud data occupied grid region to obtain the intersection region;
[0113] S1043, rasterizing the intersection region to obtain the unit square grid occupied by the intersection region;
[0114] S1044, obtaining the three-dimensional laser point cloud data in the frustum based on the coordinates of each unit square grid of the unit square grid occupied by the intersection region.
[0115] In the present disclosure, taking the frustum with four sides as an example, sequentially connecting the four intersection points generates a quadrilateral, and the area outside the quadrilateral is the invalid scene that needs to be culled.
[0116] Since the frustum may be projected to an area outside the point cloud data occupied grid region, it is necessary to intersect the projection polygon and the point cloud data occupied grid region, and the polygon region formed by the intersection of the two (i.e. the intersection region) is the valid scene that needs to be loaded and rendered.
[0117] Among them, the polygon intersection algorithm can use various algorithms in the prior art, such as the minimum loop algorithm and the double-linked list algorithm. Those skilled in the art can use various polygon intersection algorithms to obtain the intersection under the inspiration of the technical solutions of the present disclosure, which all fall within the protection scope of the present disclosure.
[0118] Since the projection polygon obtained in step S1041 is composed of multiple vector line segments, in order to obtain the unit square grid occupied by the projection polygon and further obtain the three-dimensional laser point cloud data in the frustum through the unit square grid coordinates, it is necessary to perform rasterization operation on the projection polygon. The present disclosure preferably uses the following rasterization operation method: the edges of the projection polygon use the bresenham algorithm and the internal area of the projection polygon uses the line-by-line scanning algorithm for rasterization operation.
[0119] Figure 5 The flowchart of step S104 of the point cloud processing method S100 based on the frustum of one embodiment of the present disclosure is shown.
[0120] For the above-mentioned point cloud processing method S100 based on the frustum of the embodiment, preferably, the intersection region is rasterized to obtain the unit square grid occupied by the intersection region, wherein the unit square grid occupied by the intersection region includes the edge unit square grid intersecting with the projection polygon.
[0121] In the present disclosure, since the point cloud is stored in a square grid, the projection polygon obtained in S1041 may have a partial intersection with a certain unit square grid. In order to avoid removing important features, according to the preferred embodiment of the present disclosure, all point clouds in the unit square grid (i.e. the edge unit square grid) intersecting with the projection polygon are retained.
[0122] For the above-mentioned point cloud processing method S100 based on the frustum of each embodiment, preferably, S1044 described above, based on the coordinates of each unit square grid of the unit square grid occupied by the intersection region, the three-dimensional laser point cloud data in the frustum is obtained, including:
[0123] Asynchronous loading is performed on each unit square grid of the unit square grid occupied by the intersection region; and based on the mapping relationship between the coordinates of each unit square grid of the unit square grid occupied by the intersection region and each point data in the unit square grid, the three-dimensional laser point cloud data block contained in each unit square grid is located.
[0124] In the present embodiment, the plurality of unit square grids obtained are sent to a data loading and unloading module, the data loading and unloading module starts a data loading thread in an asynchronous loading mode, and directly locates the three-dimensional laser point cloud data block in the corresponding region through the unit square grid coordinates, so as to screen the three-dimensional laser point cloud data block to be loaded. Asynchronous loading is a non-blocking loading method, which can still execute other programs while loading data. The present disclosure uses asynchronous loading to reduce the program response time.
[0125] For the above-mentioned point cloud processing method S100 based on the frustum of each embodiment, preferably, step S104 further comprises: S1045, loading the three-dimensional laser point cloud data of the unit square grid for point cloud rendering processing.
[0126] For the three-dimensional laser point cloud data in the frustum obtained in step S1044, if the three-dimensional laser point cloud data of a certain unit square grid is loaded, it is sent to the point cloud rendering module.
[0127] Figure 6 A flowchart of step S104 of the point cloud processing method S100 based on the frustum of one embodiment of the present disclosure is shown.
[0128] According to the preferred embodiment of the present disclosure, the three-dimensional laser point cloud data of the unit square grid described above in S1045 is loaded for point cloud rendering processing, including:
[0129] The geometric features of the frustum are updated in real time to obtain an updated frustum; it is determined whether the three-dimensional laser point cloud data of the unit square grid completed loading becomes three-dimensional laser point cloud data outside the updated frustum; and the point cloud data that becomes outside the updated frustum is unloaded to update the three-dimensional laser point cloud data for point cloud rendering processing.
[0130] The three-dimensional laser point cloud data obtained in step S1044 of the present disclosure is sent to the point cloud rendering module if the three-dimensional laser point cloud data of a unit square grid is completed loading. However, due to the transformation of the field of view position or angle, the plurality of unit square grids obtained in step S1043 are constantly changing, so some three-dimensional laser point cloud data that has been loaded may have become invalid and become invalid scenes outside the frustum. If these data are not processed, it will cause waste of memory and consumption of computer performance. Therefore, preferably, the data loading and unloading module of the present disclosure comprises one or more unloading threads. Once the three-dimensional laser point cloud data becomes invalid scenes outside the frustum, it is sent to the unloading thread and performs unloading.
[0131] For the above-mentioned various embodiments of the frustum-based point cloud processing method S100, preferably, the above-mentioned S106, the three-dimensional laser point cloud data in the frustum is subjected to a thinning processing based on the distance between the viewpoint coordinates and the laser points, and the three-dimensional laser point cloud data in the frustum after the thinning processing is subjected to rendering processing, including:
[0132] S1061, calculating the distance between the unit square grid corresponding to the three-dimensional laser point cloud data to be rendered and the viewpoint;
[0133] S1062, dynamically obtaining a thinning proportionality coefficient based on the distance between the center of each unit square grid and the viewpoint and the angle between the vector from the center of the unit square grid to the viewpoint and the normal vector of the unit square grid;
[0134] S1063, performing thinning processing on the three-dimensional point cloud data corresponding to each unit square grid based on the thinning proportionality coefficient of each unit square grid to perform rendering processing.
[0135] If the same decimation factor is used for all the three-dimensional laser point cloud data that needs to be rendered, the details of objects close to the viewpoint will be blurred and distorted, and the details of objects far from the viewpoint will be excessive, increasing unnecessary rendering calculations. Therefore, the point cloud processing method of the present disclosure provides a distance-based dynamic decimation algorithm to calculate the decimation factor of the unit square grid corresponding to the three-dimensional laser point cloud data to be rendered. The distance between the unit square grid corresponding to the three-dimensional laser point cloud data to be rendered and the viewpoint needs to be calculated first. The viewpoint is the position of the observer, and its three-dimensional coordinates can be obtained in advance as known parameters. Mathematically, it is expressed as:
[0136]
[0137] In formula (2), (X G ,Y G ) T represents the coordinates of the center of the unit square grid in the spatial rectangular coordinate system, (X V ,Y V ) T represents the coordinates of the viewpoint in the spatial rectangular coordinate system, (X G ,Y G ) T which can be calculated according to the row and column numbers of the unit square grid and the coordinates of the lower left corner of the minimum oriented bounding box in the spatial rectangular coordinate system.
[0138] The present disclosure preferably sets the decimation ratio coefficient dynamically to realize the display of point clouds according to the level of detail, which is mathematically expressed as:
[0139]
[0140] In formula (3), p i is the decimation ratio coefficient, s i represents the distance from the center of the i-th unit square grid to the viewpoint, w i is the ratio coefficient, whose value is equal to the absolute value of the cosine value of the angle between the vector from the center of the unit square grid to the viewpoint and the normal vector of the square grid, s max , s min represent the maximum and minimum distances from the center of the unit square grid to the viewpoint, respectively, Max is the maximum value operation, and Min is the minimum value operation.
[0141] Since the three-dimensional laser point cloud data in each unit square grid is randomly sorted in step S1025 of the present disclosure, when loading the point cloud data in each unit square grid, the offset address is set according to the thinning ratio coefficient calculated in step S1062 to achieve uniform and smooth thinning processing; the three-dimensional laser point cloud data after thinning processing is connected to the main rendering thread for rendering processing.
[0142] As can be known from the foregoing description of the technical solutions of the present disclosure, the point cloud processing method of the present disclosure can ensure that the point cloud can be rendered in real time and can eliminate redundant data while preserving the main features of the object, thereby reducing the consumption of computer memory, by eliminating the point cloud outside the view frustum and dynamically thinning the point cloud within the view frustum.
[0143] The point cloud data processing method of the present disclosure is particularly suitable for real-time rendering processing of massive point cloud data. First, the massive point cloud data is preprocessed to generate a directed bounding box of the entire point cloud data and serialize the point cloud data; further, the point cloud outside the view frustum is eliminated according to the view frustum, and the point cloud within the view frustum is dynamically thinned to reduce redundant data and ensure the speed of real-time rendering.
[0144] Compared with the field of view clipping method of the prior art, which needs to establish an octree for the three-dimensional laser point cloud, intersect each node with the view frustum, and prune the octree. The point cloud processing method of the present disclosure fully utilizes the prior information of the view frustum, quickly obtains the three-dimensional laser point cloud within the view frustum according to the projection of the view frustum on the bottom surface of the minimum directed bounding box of the three-dimensional laser point cloud, and realizes the quick elimination of invalid scenes. The point cloud processing method of the present disclosure can not only be applied to point cloud data with large height differences, such as buildings and sculptures, but also be applied to "flattened" point cloud data with small height differences, such as roads. The point cloud processing method of the present disclosure utilizes the view frustum clipping to obtain the point cloud within the view frustum, and adopts an asynchronous loading mode to load and unload the point cloud data, which is more rapid than the traditional synchronous loading mode. The point cloud processing method of the present disclosure limits the point cloud to be rendered within the field of view of the view frustum, dynamically thins the point cloud within the view frustum according to the angle and distance of the point cloud to the viewpoint, which can accelerate the rendering speed and reduce the consumption of computer memory.
[0145] According to another aspect of the present disclosure, a point cloud processing device 1000 based on a view frustum is provided, comprising:
[0146] A preprocessing module 1002, which pre-processes the obtained original three-dimensional laser point cloud data to obtain pre-processed three-dimensional laser point cloud data, and the preprocessing at least includes obtaining a minimum directed bounding box of the original three-dimensional laser point cloud data;
[0147] The point cloud screening module 1004 removes the point cloud data of invalid scenes in the preprocessed three-dimensional laser point cloud data based on the projection of the frustum on the bottom surface of the minimum oriented bounding box, and obtains the three-dimensional laser point cloud data in the frustum;
[0148] The data processing module 1006 at least performs the thinning processing based on the distance between the viewpoint coordinates and the laser points on the three-dimensional laser point cloud data in the frustum, and performs the rendering processing on the three-dimensional laser point cloud data in the frustum after the thinning processing.
[0149] The point cloud processing device 1000 of the present disclosure can be realized in the form of a computer software architecture.
[0150] Preferably, the preprocessing module 1002 of the present disclosure comprises:
[0151] The direction vector acquisition module calculates the feature vectors and feature values of the point data in the original three-dimensional laser point cloud data, and takes the feature vector corresponding to the maximum feature value as the direction vector of the original three-dimensional laser point cloud;
[0152] The minimum oriented bounding box acquisition module obtains the minimum oriented bounding box of the original three-dimensional laser point cloud data based on the direction vector of the original three-dimensional laser point cloud data and the coordinate values of the original three-dimensional laser point cloud data in the space rectangular coordinate system;
[0153] The point cloud data division module divides the original three-dimensional laser point cloud data into each unit square grid of the preset square plane grid with the left lower corner vertex of the minimum oriented bounding box as the origin, and generates the point cloud data occupied grid area;
[0154] The mapping relationship establishment module establishes the mapping relationship between each point data in the unit square grid and the unit square grid coordinates for each unit square grid;
[0155] The random sorting module randomly sorts the three-dimensional laser point cloud data in each unit square grid to realize the uniform distribution of the point data in each unit square grid.
[0156] For the point cloud processing device 1000 of each of the above embodiments, the point cloud screening module 1004 comprises:
[0157] The projection polygon acquisition module obtains the intersection points of each side of the frustum and the plane on which the bottom surface of the minimum oriented bounding box lies, and obtains the projection polygon;
[0158] The intersection region acquisition module acquires an intersection region by performing an intersection operation on the projection polygon and the occupancy grid region of the point cloud data.
[0159] The unit square grid extraction module rasterizes the intersection region to obtain a unit square grid occupied by the intersection region.
[0160] The three-dimensional laser point cloud data extraction module acquires three-dimensional laser point cloud data in the frustum based on the coordinates of each unit square grid of the unit square grid occupied by the intersection region.
[0161] The update module updates the geometric features of the frustum in real time to obtain an updated frustum, and determines whether the three-dimensional laser point cloud data of the unit square grid loaded completely becomes three-dimensional laser point cloud data outside the updated frustum.
[0162] The data loading and unloading module loads the three-dimensional laser point cloud data in the frustum corresponding to each unit square grid sent by the three-dimensional laser point cloud data extraction module, and unloads the three-dimensional laser point cloud data outside the updated frustum.
[0163] For the point cloud processing device 1000 of each of the above embodiments, preferably, the data processing module 1006 comprises:
[0164] The distance calculation module calculates the distance between the unit square grid corresponding to the three-dimensional laser point cloud data to be rendered and the viewpoint.
[0165] The sparsification ratio coefficient acquisition module dynamically acquires a sparsification ratio coefficient based on the distance between the center of each unit square grid and the viewpoint and the angle between the vector from the center of the unit square grid to the viewpoint and the normal vector of the unit square grid.
[0166] The sparsification processing module performs sparsification processing on the three-dimensional point cloud data corresponding to each unit square grid based on the sparsification ratio coefficient of each unit square grid.
[0167] The rendering processing module performs rendering processing on the three-dimensional point cloud data after the sparsification processing.
[0168] Figure 7 is a structural schematic block diagram of a point cloud processing device 1000 of an embodiment of the disclosure employing a hardware implementation of a processing system.
[0169] The point cloud processing apparatus can comprise respective modules to perform the various or several steps of the above-described flowcharts. Thus, each or several steps of the above-described flowcharts can be performed by a respective module and the apparatus can comprise one or more of these modules. The modules can be one or more hardware modules specifically configured to perform the respective steps, or implemented by a processor configured to perform the respective steps, or stored within a computer-readable medium for implementation by a processor, or implemented by some combination.
[0170] The hardware structure can be implemented using a bus architecture. The bus architecture can include any number of interconnecting buses and bridges, depending on the specific application of the hardware and the overall design constraints. The bus 1100 connects various circuits including one or more processors 1200, memory 1300, and / or hardware modules together. The bus 1100 can also connect various other circuits 1400 such as peripheral devices, voltage regulators, power management circuits, external antennas, etc.
[0171] The bus 1100 can be an Industry Standard Architecture (ISA) bus, a Peripheral Component (PCI) bus, or an Extended Industry Standard Architecture (EISA) bus, etc. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, only one connection line is shown in the figure, but it does not mean that there is only one bus or one type of bus.
[0172] Any process or method descriptions or any other descriptions herein can be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logic functions or steps, and alternate implementations are possible and contemplated. The various processes and methods described herein can be understood as including various steps that are performed in a specific order, and alternate implementations are possible and contemplated. The various processes and methods described herein can be performed by a processor executing executable instructions stored in a memory, and alternate implementations are possible and contemplated. For example, the processor can be specially configured to perform one or more of the methods described herein, or the processor can be configured to execute software that performs one or more of the methods described herein. The software can be tangibly embodied in a machine-readable medium, such as a memory. In some implementations, portions of the software can be loaded and / or installed via a memory and / or a communication interface. When the software is loaded into the memory and executed by the processor, one or more of the steps of the methods described above can be performed. Alternatively, in other implementations, the processor can be configured to perform one of the methods described above by any other suitable means, such as by means of firmware.
[0173] The logic and / or steps represented in the flowcharts and / or otherwise described herein can be embodied in any computer-readable medium for use by or in connection with an instruction execution system, apparatus, or device, such as a computer-based system, processor- containing system, or other system that can fetch the instructions from the instruction execution system, apparatus, or device and execute the instructions.
[0174] For purposes of this specification, a "computer-readable medium" can be any apparatus that can contain, store, communicate, propagate, or transport the program for use by or in connection with the instruction execution system, apparatus, or device. The computer-readable medium can specifically include the following, which are non- exhaustive list: an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system or apparatus; a portable computer diskette (magnetic); a random access memory (RAM); a read-only memory (ROM); an erasable programmable read-only memory (EPROM or Flash memory); optical fiber; and a portable compact disc read-only memory (CDROM). Additionally, the computer-readable medium can even be paper or other suitable medium upon which the program is printed, as the program can be electronically captured, for example via an optical scanner, then compiled, interpreted, or otherwise processed in the electronic manner into a useable form.
[0175] It should be understood that aspects of the present disclosure can be implemented in hardware, software, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software stored in and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, any of the following technologies, known in the art, or their combinations, can be used: discrete logic circuitry having logic gates for implementing logic functions upon an application of data signals, application-specific integrated circuits having appropriate combinational logic gates, programmable gate arrays (PGA), field-programmable gate arrays (FPGA), and the like.
[0176] Those of ordinary skill in the art can understand that all or part of the steps of the above-mentioned embodiment methods can be completed by programs instructing relevant hardware, and the programs can be stored in a readable storage medium. When the programs are executed, they include one or a combination of the steps of the method embodiments.
[0177] In addition, each of the functional units in the various embodiments of the present disclosure can be integrated in one processing module, or each unit can be physically present separately, or two or more units can be integrated in one module. The integrated module can be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a readable storage medium. The storage medium can be a read-only memory, a magnetic disk or an optical disk, etc.
[0178] The present disclosure also provides an electronic device, comprising: a memory storing execution instructions; and a processor or other hardware module executing the execution instructions stored by the memory, so that the processor or other hardware module executes the point cloud processing method described above.
[0179] The present disclosure also provides a readable storage medium, which stores execution instructions, and the execution instructions are executed by a processor to implement the point cloud processing method described above.
[0180] In the description of the present specification, the description of the terms "one embodiment / way", "some embodiments / ways", "an example", "a specific example", or "some examples" and the like means that the specific features, structures, materials or characteristics described in connection with the embodiment / way or example are included in at least one embodiment / way or example of the present application. In the present specification, the illustrative description of the above terms is not necessarily the same embodiment / way or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any appropriate manner in any one or more embodiments / ways or examples. In addition, the person skilled in the art can combine and combine the different embodiments / ways or examples described in the present specification and the features of the different embodiments / ways or examples without contradiction.
[0181] In addition, the terms "first", "second" are only for descriptive purposes and cannot be understood as indicating or implying relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined with "first", "second" can explicitly or implicitly include at least one of the features. In the description of the present application, the meaning of "a plurality of" is at least two, for example, two, three, etc., unless otherwise specifically limited.
[0182] Those skilled in the art should understand that the above embodiments are only for the purpose of clearly illustrating the present disclosure, and are not intended to limit the scope of the present disclosure. Based on the above disclosure, other changes or modifications can also be made by those skilled in the art, and these changes or modifications are still within the scope of the present disclosure.
Claims
1. A frustum-based point cloud processing method, characterized in that, include: The acquired raw 3D laser point cloud data is preprocessed to obtain preprocessed 3D laser point cloud data. The preprocessing includes at least obtaining the minimum directed bounding box of the raw 3D laser point cloud data. The point cloud data of invalid scenes in the preprocessed 3D laser point cloud data is removed based on the projection of the view frustum onto the bottom surface of the minimum directed bounding box, and the 3D laser point cloud data within the view frustum is obtained. This includes: obtaining the intersection points of each side of the view frustum with the plane containing the bottom surface of the minimum directed bounding box, and obtaining the projection polygon; finding the intersection of the projection polygon with the grid area occupied by the point cloud data, and obtaining the intersection region; performing a rasterization operation on the intersection region to obtain the unit square grid occupied by the intersection region; and obtaining the 3D laser point cloud data within the view frustum based on the coordinates of each unit square grid of the unit square grid occupied by the intersection region; and The 3D laser point cloud data within the view frustum is thinned based on the distance between the viewpoint coordinates and the laser points. The thinned 3D laser point cloud data within the view frustum is then rendered, including: calculating the distance between the unit square grid corresponding to the 3D laser point cloud data to be rendered and the viewpoint; dynamically obtaining the thinning ratio coefficient based on the distance between the center of each unit square grid and the viewpoint, and the angle between the vector from the center of each unit square grid to the viewpoint and the normal vector of the unit square grid; and thinning the 3D point cloud data corresponding to each unit square grid based on the thinning ratio coefficient for rendering. The point cloud processing method further includes: loading three-dimensional laser point cloud data of a unit square grid for point cloud rendering processing; The loading of 3D laser point cloud data of a unit square grid for point cloud rendering processing includes: The geometric features of the view frustum are updated in real time to obtain an updated view frustum; Determine whether the 3D laser point cloud data of the completed loading unit square mesh becomes the 3D laser point cloud data outside the updated view frustum; This will unload the point cloud data outside the updated view frustum to update the 3D laser point cloud data for point cloud rendering processing.
2. The frustum-based point cloud processing method of claim 1, wherein, The acquired raw 3D laser point cloud data is preprocessed to obtain preprocessed 3D laser point cloud data, including: Calculate the feature vectors and feature values of the point data in the original 3D laser point cloud data, and use the feature vector corresponding to the largest feature value as the direction vector of the original 3D laser point cloud. Based on the direction vector of the original three-dimensional laser point cloud data and the coordinate values of the original three-dimensional laser point cloud data in the spatial rectangular coordinate system, the minimum directed bounding box of the original three-dimensional laser point cloud data is obtained. Using the lower left corner vertex of the minimum directed bounding box as the origin, the original 3D laser point cloud data is divided into unit square grids of a preset square planar grid, generating the grid area occupied by the point cloud data; and For each unit square grid, establish a mapping relationship between the data of each point in the unit square grid and the coordinates of the unit square grid.
3. The frustum-based point cloud processing method of claim 2, wherein, The acquired raw 3D laser point cloud data is preprocessed to obtain preprocessed 3D laser point cloud data, which also includes: The 3D laser point cloud data in each unit square grid is randomly sorted to achieve a uniform distribution of point data in each unit square grid.
4. The frustum-based point cloud processing method of claim 1, wherein, The intersection region is rasterized to obtain the unit square grid occupied by the intersection region, wherein the unit square grid occupied by the intersection region includes the edge unit square grids that intersect with the projected polygon.
5. The frustum-based point cloud processing method of claim 1, wherein, Based on the coordinates of each unit square grid within the intersection region, the 3D laser point cloud data within the view frustum is obtained, including: Asynchronously load each unit square grid of the unit square grid occupied by the intersection region; and Based on the mapping relationship between the coordinates of each unit square grid in the intersection region and the point data in each unit square grid, the three-dimensional laser point cloud data blocks contained in each unit square grid are located.
6. An electronic device, characterized in that, include: The memory stores execution instructions; as well as A processor that executes execution instructions stored in the memory, causing the processor to perform the method of any one of claims 1 to 5.
7. A readable storage medium, characterized in that, The readable storage medium stores execution instructions, which, when executed by a processor, are used to implement the method of any one of claims 1 to 5.
Citation Information
Patent Citations
Quadtree-based massive laser scanning point cloud real-time drawing method
CN101908068A
Mass data circle-based indexing and space displaying method
CN104376590A
Laser point cloud rendering method and device
CN106846498A
Mass point cloud rendering method based on Web
CN107943961A
Point cloud rendering method, system and device based on tree-structured grid vector quantization
CN108615254A