Search

CN-120147336-B - Point cloud plane segmentation method and device, electronic equipment and storage medium

CN120147336BCN 120147336 BCN120147336 BCN 120147336BCN-120147336-B

Abstract

The embodiment of the disclosure discloses a method, a device, electronic equipment and a storage medium for dividing a point cloud plane, wherein the method comprises the steps of dividing a three-dimensional space corresponding to point cloud data into a plurality of grids by adopting a grid division mode based on phase distribution, performing plane fitting on points in each grid in the plurality of grids by adopting a parallel processing mode to obtain a plurality of plane seeds, and performing neighborhood plane growth on the plurality of plane seeds by adopting a parallel processing mode to obtain a plurality of planes corresponding to the point cloud data. The embodiment of the disclosure can rapidly and accurately determine the multiple planes corresponding to the point cloud data, thereby improving the efficiency of point cloud plane segmentation.

Inventors

  • WANG LONGKE
  • PAN CIHUI
  • LI WEI
  • MIAO ZEHUA

Assignees

  • 如你所视(北京)科技有限公司

Dates

Publication Date
20260512
Application Date
20250225

Claims (10)

  1. 1. The method for dividing the point cloud plane is characterized by comprising the following steps of: The three-dimensional space corresponding to the point cloud data is subjected to grid division by adopting a grid division mode based on phase distribution, so that a plurality of grids are obtained, wherein the grid division mode based on the phase distribution is to arrange a preset number of grids with given side lengths according to a preset distribution mode to obtain unit grids, the three-dimensional space is subjected to grid division through the unit grids, phases corresponding to different grids in the unit grids are different, and the phases are used for representing grid distribution positions in the unit grids; performing plane fitting on points in each grid in the grids in a parallel processing mode aiming at the grids with the same phase in the grids to obtain a plurality of plane seeds, wherein the plane seeds are initial planes which are generated aiming at point cloud data in each grid and are not expanded; And carrying out neighborhood plane growth on the plurality of plane seeds in a parallel processing mode to obtain a plurality of planes corresponding to the point cloud data.
  2. 2. The method of claim 1, wherein the step of meshing the three-dimensional space corresponding to the point cloud data by using a meshing method based on phase distribution to obtain a plurality of meshes includes: determining an anchor point based on the position of each point in the point cloud data; based on the anchor points, performing multi-scale meshing on the three-dimensional space corresponding to the point cloud data in the meshing mode to obtain a plurality of grids; The multi-scale meshing of the three-dimensional space corresponding to the point cloud data based on the anchor points in the meshing mode is performed to obtain a plurality of grids, and the method at least comprises the following steps: Based on the anchor point and the second grid side length, the three-dimensional space corresponding to the point cloud data is subjected to grid division by adopting the grid division mode based on the phase distribution, so as to obtain a first grid set, and based on the anchor point and the second grid side length, the three-dimensional space corresponding to the point cloud data is subjected to grid division by adopting the grid division mode based on the phase distribution, so as to obtain a second grid set, wherein the first grid side length and the second grid side length are different, and the grids for carrying out plane fitting by adopting a parallel processing mode comprise the first grid set and the second grid set.
  3. 3. The method according to claim 2, wherein after the multi-scale meshing of the three-dimensional space corresponding to the point cloud data based on the anchor points by using the meshing method, obtaining the plurality of meshes, further includes: Determining grid indexes of each point in the point cloud data based on the space coordinates of the anchor point and the space coordinates of each point in the point cloud data; Performing hash calculation based on grid indexes of each point in the point cloud data to obtain hash values of each point in the point cloud data; Determining the phase numbers of each point in the point cloud data based on the grid indexes of each point in the point cloud data; And storing hash values of each point in the point cloud data and phase numbers of each point in the point cloud data by using a hash list.
  4. 4. A method according to any one of claims 1-3, wherein said performing a plane fit on points within each of said plurality of grids to obtain a planar seed for each of said grids comprises: The following steps are performed for each of the plurality of grids: randomly selecting a point from the current grid, performing plane fitting on the currently selected point and a point in a spherical neighborhood to obtain a plane fitting result and adding one to the number of plane fitting times, wherein the radius of the spherical neighborhood is equal to the side length of a preset grid, and the plane fitting result comprises a plane seed generated when the plane fitting is successful; And circularly executing the steps of randomly selecting a point from the current grid, performing plane fitting on the currently selected point and the point in the spherical neighborhood to obtain a plane fitting result and adding one to the plane fitting times until the plane fitting times of the current grid reach a preset time threshold value to obtain all plane seeds of the current grid.
  5. 5. A method according to any one of claims 1 to 3, wherein the performing neighborhood plane growth on the plurality of plane seeds to obtain a plurality of planes corresponding to the point cloud data includes: The following steps are circularly executed for each plane seed of the plurality of plane seeds until a plurality of planes corresponding to the point cloud data are obtained: selecting a first target point from the current plane seeds, and acquiring points in the neighborhood of the first target point, wherein the first target point and the points in the neighborhood of the first target point belong to points in the point cloud data; Determining whether each point in the first target point neighborhood is added to the current plane seed or not based on the normal vector included angle and distance between each point in the first target point neighborhood and the current plane seed and the number of points in the first target point neighborhood; and updating the current plane seed in response to the at least one point being added in the current plane seed.
  6. 6. The method of claim 5, wherein determining whether points in the first target point neighborhood join the current plane seed based on normal vector angles and distances between points in the first target point neighborhood and the current plane seed, and a number of points in the first target point neighborhood, comprises: selecting a second target point from within the first target point neighborhood; and adding the second target point into the current plane seed in response to the normal vector included angle between the second target point and the current plane seed being smaller than a preset normal vector included angle threshold, the distance between the second target point and the current plane seed being smaller than a preset distance threshold, and the number of points in the spherical neighborhood of the first target point being larger than a preset number threshold.
  7. 7. A method according to any one of claims 1-3, further comprising, during neighborhood plane growing of the plurality of planar seeds: Estimating plane equations based on positions of points in each plane seed in the neighborhood plane growth process to obtain plane equations of each plane seed; and removing outliers from the plane seeds based on the plane equation of the plane seeds to obtain at least one outlier.
  8. 8. A point cloud plane splitting device, comprising: The grid division module is used for carrying out grid division on the three-dimensional space corresponding to the point cloud data by adopting a grid division mode based on phase distribution, so as to obtain a plurality of grids, wherein the grid division mode based on phase distribution is to arrange a preset number of grids with given side length according to a preset distribution mode to obtain unit grids, and carry out grid division on the three-dimensional space through the unit grids, phases corresponding to different grids in the unit grids are different, and the phases are used for representing grid distribution positions in the unit grids; the plane fitting module is used for performing plane fitting on points in each grid in the plurality of grids in a parallel processing mode aiming at the grids with the same phase in the plurality of grids to obtain a plurality of plane seeds, wherein the plane seeds are initial planes which are generated aiming at point cloud data in each grid and are not expanded; And the neighborhood plane growth module is used for carrying out neighborhood plane growth on the plurality of plane seeds in a parallel processing mode to obtain a plurality of planes corresponding to the point cloud data.
  9. 9. An electronic device, comprising: a memory for storing a computer program product; A processor for executing a computer program product stored in said memory, which, when executed, implements the method of any of the preceding claims 1-7.
  10. 10. A computer readable storage medium having stored thereon computer program instructions, which when executed by a processor, implement the method of any of the preceding claims 1-7.

Description

Point cloud plane segmentation method and device, electronic equipment and storage medium Technical Field The disclosure relates to digital signal processing technology, in particular to a method and a device for dividing a point cloud plane, electronic equipment and a storage medium. Background The point cloud planar segmentation method can be applied to Virtual Reality (VR), so that VR acquired data can be processed more attractive. In the related art, a neighborhood growing method is used to segment a point cloud plane. When the point cloud plane is segmented by the neighborhood growing method, any vertex of the point cloud is taken as an initial plane center, the normal vector of the vertex is taken as an initial plane normal vector, the plane range is gradually expanded from the vertex until the expansion cannot be performed, then one vertex is selected, and the process is repeated until the segmentation of the point cloud plane is completed. The point cloud plane segmentation method assumes that point clouds are distributed on a smooth surface, but an actual VR acquisition scene is complex and changeable, the assumption of the smooth surface is not in accordance with a real environment, and degradation of actual data can occur to different degrees. For a non-smooth surface scene, the selection of an initial vertex can bring uncertainty of a segmentation method, disturbance and noise can exist in the normal vector of the initial vertex, and for an incremental and greedy algorithm, the initial state can influence the final planar segmentation result to a certain extent, so that an error result is generated. Disclosure of Invention The embodiment of the disclosure provides a method, a device, electronic equipment and a storage medium for partitioning a point cloud plane, so as to solve the problems. In a first aspect of an embodiment of the present disclosure, a method for partitioning a point cloud plane is provided, including: Performing grid division on the three-dimensional space corresponding to the point cloud data by adopting a grid division mode based on phase distribution to obtain a plurality of grids; performing plane fitting on points in each grid in the grids in a parallel processing mode aiming at the grids with the same phase in the grids to obtain a plurality of plane seeds; And carrying out neighborhood plane growth on the plurality of plane seeds in a parallel processing mode to obtain a plurality of planes corresponding to the point cloud data. In some embodiments of the present disclosure, the performing grid division on the three-dimensional space corresponding to the point cloud data by using a grid division manner based on phase distribution to obtain a plurality of grids includes: determining an anchor point based on the position of each point in the point cloud data; and based on the anchor points, carrying out multi-scale meshing on the three-dimensional space corresponding to the point cloud data by adopting the meshing mode to obtain the grids. In some embodiments of the present disclosure, after the performing multi-scale meshing on the three-dimensional space corresponding to the point cloud data by using the meshing method based on the anchor points, obtaining the plurality of meshes, the method further includes: Determining grid indexes of each point in the point cloud data based on the space coordinates of the anchor point and the space coordinates of each point in the point cloud data; Performing hash calculation based on grid indexes of each point in the point cloud data to obtain hash values of each point in the point cloud data; Determining the phase numbers of each point in the point cloud data based on the grid indexes of each point in the point cloud data; And storing hash values of each point in the point cloud data and phase numbers of each point in the point cloud data by using a hash list. In some embodiments of the present disclosure, the performing plane fitting on points in each grid of the plurality of grids to obtain a plane seed of each grid includes: The following steps are performed for each of the plurality of grids: randomly selecting a point from the current grid, performing plane fitting on the currently selected point and a point in a spherical neighborhood to obtain a plane fitting result and adding one to the number of plane fitting times, wherein the radius of the spherical neighborhood is equal to the side length of a preset grid, and the plane fitting result comprises a plane seed generated when the plane fitting is successful; And circularly executing the steps of randomly selecting a point from the current grid, performing plane fitting on the currently selected point and the point in the spherical neighborhood to obtain a plane fitting result and adding one to the plane fitting times until the plane fitting times of the current grid reach a preset time threshold value to obtain all plane seeds of the current grid. In some embodiments of the