Point cloud plane extraction method and device and computer readable storage medium

By downsampling and searching for point cloud frames, combining covariance matrix and plane marking, the problem of low accuracy in point cloud plane extraction is solved, and efficient point cloud plane extraction is achieved.

CN120339390APending Publication Date: 2025-07-18REALSEE (BEIJING) TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510421571.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-03
Publication Date
2025-07-18

AI Technical Summary

Technical Problem

In the prior art, point cloud plane extraction methods are difficult to identify plane transition areas, noise areas and fine plane skews, resulting in low extraction accuracy.

Method used

The point cloud frame is downsampled by the preset voxel method, and the central point cloud of the point cloud voxel is determined, and the neighborhood points are traversed. The covariance matrix and plane equation are used to determine whether the neighborhood points belong to the same plane, and the point cloud plane is extracted based on the plane marking and the preset distance threshold.

Benefits of technology

Significantly reduce the amount of data processing in point clouds, maintain shape characteristics, improve the accuracy of point cloud plane extraction, and avoid the influence of noise areas and plane skeletons.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120339390A_ABST
    Figure CN120339390A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a point cloud plane extraction method and device and a computer readable storage medium, downsampling processing is performed on a point cloud frame through a voxel presetting method to obtain a plurality of point cloud voxels, the data volume of point cloud processing can be remarkably reduced, meanwhile, the shape features of point clouds are kept as much as possible, and the accuracy of point cloud plane extraction is improved. And searching a certain number of neighborhood points for the central point clouds of all the point cloud voxels to determine the point clouds to be searched and the point cloud planes to which the neighborhood points of the point clouds belong from the point cloud frames, determining the number of the point clouds to be searched and the number of the neighborhood points of the point clouds to be searched and limiting the number of the point clouds to be searched and the number of the neighborhood points of the point clouds to be searched within a certain number range, and controlling the size of the determined point cloud planes so as to improve the search efficiency. In addition, the precision of all extracted point cloud planes is improved by controlling the fitting precision of the small point cloud planes, and the influences of noise areas, plane staggered layers and the like are avoided.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to point cloud processing technology, and in particular to a method, an apparatus, and a computer-readable storage medium for extracting a point cloud plane. Background Art

[0002] A point cloud is a set of points in a three-dimensional space and is widely used in fields such as three-dimensional reconstruction, robot navigation, and virtual reality. Point cloud plane extraction refers to the process of extracting information such as the position and normal vector of a plane from point cloud data, which is of great significance in fields such as three-dimensional reconstruction. For example, it can be used to segment the object surface and improve the reconstruction accuracy.

[0003] In related technologies, the extraction of a point cloud plane mainly uses the region growing method. However, the region growing method is not easy to identify plane transition regions, noise regions, and fine plane misalignments, which may cause regions that should not be the same plane to be identified as the same plane, resulting in low accuracy of the extracted point cloud plane. Summary of the Invention

[0004] To solve some or all of the technical problems in related technologies, embodiments of the present disclosure provide a method, an apparatus, and a computer-readable storage medium for extracting a point cloud plane.

[0005] According to a first aspect of the embodiments of the present disclosure, there is provided a method for extracting a point cloud plane, the method including:

[0006] Performing downsampling processing on a point cloud frame of a target space by a preset voxel method to obtain a plurality of point cloud voxels, each point cloud voxel including a central point cloud;

[0007] Traversing the central point clouds of the plurality of point cloud voxels, using the central point cloud of any one point cloud voxel as a point cloud to be searched in a first preset search tree, and searching for neighboring points of the point cloud to be searched to obtain a preset number of target neighboring points of the point cloud to be searched, where one target neighboring point corresponds to the central point cloud of one of the point cloud voxels;

[0008] Determining whether the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane;

[0009] In the case where it is determined that the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane, extracting the point cloud plane to which the point cloud to be searched and its target neighboring points belong from the point cloud frame of the target space to obtain all point cloud planes of the target space.

[0010] As an optional embodiment, the method further includes:

[0011] When it is determined that the target neighborhood points of the preset number and the point cloud to be searched belong to the same point cloud plane, plane marking is performed on the point cloud to be searched and its target neighborhood points, and the plane marking is used to record that the point cloud to be searched and its target neighborhood points belong to the same point cloud plane.

[0012] As an alternative embodiment, extracting the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame of the target space includes:

[0013] Before performing plane marking on the point cloud to be searched and its target neighborhood points, determine whether plane marking already exists for the point cloud to be searched and its target neighborhood points;

[0014] When plane marking already exists for any point cloud among the point cloud to be searched and its target neighborhood points, determine whether the first point cloud plane currently formed by the point cloud to be searched and its target neighborhood points and the second point cloud plane corresponding to the plane marking of the any point cloud belong to coplanar planes;

[0015] If the first point cloud plane and the second point cloud plane do not belong to coplanar planes, extract the first point cloud plane from the point cloud frame of the target space, where the first point cloud plane is the point cloud plane to which the point cloud to be searched and its target neighborhood points belong;

[0016] If the first point cloud plane and the second point cloud plane belong to coplanar planes, add the point cloud forming the first point cloud plane to the second point cloud plane to obtain a third point cloud plane, and update the plane parameters of the third point cloud plane;

[0017] Extract the third point cloud plane from the point cloud frame of the target space.

[0018] As an alternative embodiment, when plane marking already exists for any point cloud among the point cloud to be searched and its target neighborhood points, determining whether the first point cloud plane currently formed by the point cloud to be searched and its target neighborhood points and the second point cloud plane corresponding to the plane marking of the any point cloud belong to coplanar planes includes:

[0019] Determine the second point cloud plane where the any point cloud is located according to the existing plane marking of the any point cloud;

[0020] Determine the geometric center point of the first point cloud plane according to the coordinates of the point cloud to be searched and its target neighborhood points;

[0021] Calculate the distance between the geometric center point of the first point cloud plane and the second point cloud plane to obtain a first distance;

[0022] Determine whether the first distance satisfies a first preset distance threshold;

[0023] When it is determined that the first distance satisfies the first preset distance threshold, it is determined that the first point cloud plane and the second point cloud plane belong to coplanar planes.

[0024] As an optional embodiment, determining whether the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane includes:

[0025] Calculating the covariance matrix of the preset number of target neighborhood points through a preset covariance matrix formula;

[0026] Performing eigenvalue decomposition on the covariance matrix of the preset number of target neighborhood points to obtain the minimum eigenvalue of the covariance matrix;

[0027] Judging whether the minimum eigenvalue of the covariance matrix is less than or equal to a preset eigenvalue threshold;

[0028] When the minimum eigenvalue of the covariance matrix of the preset number of target neighborhood points is less than the preset eigenvalue threshold, it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane.

[0029] As an optional embodiment, the method further includes:

[0030] For any extracted point cloud plane, searching and determining all neighborhood points of the point cloud plane through a second preset search tree;

[0031] Determining a first unmarked point cloud from all neighborhood points of the point cloud plane according to the plane label, where the first unmarked point cloud is a point cloud that has not been given the plane label;

[0032] For any one of the first unmarked point clouds, calculating and determining the distance from the first unmarked point cloud to the point cloud plane to obtain a second distance;

[0033] Judging whether the second distance satisfies a second preset distance threshold;

[0034] When it is determined that the second distance satisfies the second preset distance threshold, it is determined that the first unmarked point cloud belongs to the point cloud plane;

[0035] Giving a plane label to the first unmarked point cloud to obtain a first supplementary point cloud of the point cloud plane;

[0036] Adding the obtained first supplementary point cloud to the point cloud of the point cloud plane.

[0037] As an optional embodiment, the method further includes:

[0038] After performing plane marking on the first unmarked point cloud to obtain a first supplementary point cloud of the point cloud plane, write the first supplementary point cloud into a preset queue. The preset queue is a first-in-first-out queue, and multiple supplementary point clouds are stored in the order of first-in-first-out.

[0039] Traverse each supplementary point cloud in the preset queue one by one in the order of first-in-first-out, and determine all neighborhood points of the first supplementary point cloud through a third preset search tree search.

[0040] Determine a second unmarked point cloud from all neighborhood points of the first supplementary point cloud according to the plane marking. The second unmarked point cloud is a point cloud that has not undergone the plane marking.

[0041] For any one of the second unmarked point clouds, calculate and determine the distance from the second unmarked point cloud to the point cloud plane to which the first supplementary point cloud belongs, and obtain a third distance.

[0042] Judge whether the third distance meets a third preset distance threshold.

[0043] When it is determined that the third distance meets the third preset distance threshold, determine that the second unmarked point cloud belongs to the point cloud plane to which the first supplementary point cloud belongs.

[0044] Perform plane marking on the second unmarked point cloud to obtain a second supplementary point cloud of the point cloud plane, and write the second supplementary point cloud into the preset queue.

[0045] Add the obtained second supplementary point cloud to the point cloud of the point cloud plane to which the first supplementary point cloud belongs.

[0046] As an optional embodiment, the method further includes:

[0047] Perform plane parameter optimization processing on the point cloud plane with added supplementary point clouds through a preset plane parameter optimization method. The supplementary point clouds include the first supplementary point cloud and / or the second supplementary point cloud.

[0048] According to the second aspect of the embodiments of the present disclosure, there is provided an extraction device for a point cloud plane. The device includes:

[0049] A point cloud downsampling module for downsampling a point cloud frame in a target space through a preset voxel method to obtain a plurality of point cloud voxels, and each point cloud voxel includes a central point cloud.

[0050] The first neighborhood search module is used to traverse the central point clouds of the multiple point cloud voxels, use the central point cloud of any point cloud voxel as the point cloud to be searched in the first preset search tree, search for the neighborhood points of the point cloud to be searched, and obtain the preset number of target neighborhood points of the point cloud to be searched, where one target neighborhood point corresponds to the central point cloud of one of the point cloud voxels;

[0051] The first determination module is used to determine whether the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane;

[0052] The plane extraction module is used to extract the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame of the target space when it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, so as to obtain all the point cloud planes of the target space.

[0053] As an optional embodiment, the device further includes:

[0054] The first plane marking module is used to perform plane marking on the point cloud to be searched and its target neighborhood points when it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, and the plane marking is used to record that the point cloud to be searched and its target neighborhood points belong to the same point cloud plane.

[0055] As an optional embodiment, the plane extraction module includes:

[0056] The first judgment unit is used to judge whether the point cloud to be searched and its target neighborhood points already have plane markings before performing plane marking on the point cloud to be searched and its target neighborhood points;

[0057] The first determination unit is used to determine whether the first point cloud plane formed by the point cloud to be searched and its target neighborhood points and the second point cloud plane corresponding to the plane marking of any point cloud among the point cloud to be searched and its target neighborhood points belong to the same plane when any point cloud among the point cloud to be searched and its target neighborhood points already has plane markings;

[0058] The first plane extraction unit is used to extract the first point cloud plane from the point cloud frame of the target space if the first point cloud plane and the second point cloud plane do not belong to the same plane, and the first point cloud plane is the point cloud plane to which the point cloud to be searched and its target neighborhood points belong;

[0059] The plane merging unit is used to add the point clouds forming the first point cloud plane to the second point cloud plane to obtain a third point cloud plane and update the plane parameters of the third point cloud plane if the first point cloud plane and the second point cloud plane belong to the same plane;

[0060] A second plane extraction unit, configured to extract the third point cloud plane from the point cloud frame of the target space.

[0061] As an alternative embodiment, the coplanarity determination unit includes:

[0062] A first determination subunit, configured to determine the second point cloud plane where the arbitrary point cloud is located according to the existing plane label of the arbitrary point cloud;

[0063] A second determination subunit, configured to determine the geometric center point of the first point cloud plane according to the coordinates of the point cloud to be searched and its target neighborhood points;

[0064] A first distance calculation subunit, configured to calculate the distance between the geometric center point of the first point cloud plane and the second point cloud plane to obtain a first distance;

[0065] A first judgment subunit, configured to judge whether the first distance meets a first preset distance threshold;

[0066] A coplanarity determination subunit, configured to determine that the first point cloud plane and the second point cloud plane belong to coplanar planes when it is determined that the first distance meets the first preset distance threshold.

[0067] As an alternative embodiment, the first determination module includes:

[0068] A first calculation unit, configured to calculate the covariance matrix of the preset number of target neighborhood points through a preset covariance matrix formula;

[0069] An eigen decomposition unit, configured to perform eigen decomposition on the covariance matrix of the preset number of target neighborhood points to obtain the minimum eigenvalue of the covariance matrix;

[0070] A second judgment unit, configured to judge whether the minimum eigenvalue of the covariance matrix is less than or equal to a preset eigenvalue threshold;

[0071] A second determination unit, configured to determine that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane when the minimum eigenvalue of the covariance matrix of the preset number of target neighborhood points is less than the preset eigenvalue threshold.

[0072] As an alternative embodiment, the device further includes:

[0073] A second neighborhood search module, configured to search for all neighborhood points of a point cloud plane through a second preset search tree for any extracted point cloud plane;

[0074] A second determination module, configured to determine a first unmarked point cloud from all neighborhood points of the point cloud plane according to the plane mark, where the first unmarked point cloud is a point cloud that has not been marked with the plane mark;

[0075] A third determination module, configured to calculate and determine, for any one of the first unmarked point clouds, the distance from the first unmarked point cloud to the point cloud plane to obtain a second distance;

[0076] A first judgment module, configured to judge whether the second distance meets a second preset distance threshold;

[0077] A fourth determination module, configured to determine that the first unmarked point cloud belongs to the point cloud plane when it is determined that the second distance meets the second preset distance threshold;

[0078] A second plane marking module, configured to perform a plane mark on the first unmarked point cloud to obtain a first supplementary point cloud of the point cloud plane;

[0079] A first point cloud adding module, configured to add the obtained first supplementary point cloud to the point cloud of the point cloud plane.

[0080] As an optional embodiment, the apparatus further includes:

[0081] A queue writing module, configured to write the first supplementary point cloud into a preset queue after performing a plane mark on the first unmarked point cloud to obtain the first supplementary point cloud of the point cloud plane, where the preset queue is a first-in-first-out queue, and multiple supplementary point clouds are stored in the order of first-in-first-out;

[0082] A point cloud traversing module, configured to traverse each supplementary point cloud in the preset queue one by one in the order of first-in-first-out, and search and determine all neighborhood points of the first supplementary point cloud through a third preset search tree;

[0083] A fifth determination module, configured to determine a second unmarked point cloud from all neighborhood points of the first supplementary point cloud according to the plane mark, where the second unmarked point cloud is a point cloud that has not been marked with the plane mark;

[0084] A sixth determination module, configured to calculate and determine, for any one of the second unmarked point clouds, the distance from the second unmarked point cloud to the point cloud plane to which the first supplementary point cloud belongs to obtain a third distance;

[0085] A second judgment module, configured to judge whether the third distance meets a third preset distance threshold;

[0086] A seventh determination module, configured to determine that the second unmarked point cloud belongs to the point cloud plane to which the first supplementary point cloud belongs when it is determined that the third distance meets the third preset distance threshold;

[0087] A third plane marking module is used to perform plane marking on the second unmarked point cloud to obtain a second supplementary point cloud on the point cloud plane, and write the second supplementary point cloud into the preset queue;

[0088] The second point cloud adding module is used to add the obtained second supplementary point cloud to the point cloud of the point cloud plane to which the first supplementary point cloud belongs.

[0089] As an optional embodiment, the device further includes:

[0090] A plane parameter optimization module is used to perform plane parameter optimization processing on a point cloud plane to which a supplementary point cloud has been added by a preset plane parameter optimization method, wherein the supplementary point cloud includes the first supplementary point cloud and / or the second supplementary point cloud.

[0091] According to a third aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0092] a memory for storing a computer program product;

[0093] The processor is used to execute the computer program product stored in the memory, and when the computer program product is executed, the method described in the first aspect above is implemented.

[0094] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable storage medium is provided, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the method described in the first aspect above is implemented.

[0095] According to a fifth aspect of an embodiment of the present disclosure, a computer program product is provided, comprising computer program instructions, which, when executed by a processor, implement the method described in the first aspect above.

[0096] The technical solution provided by the embodiment of the present disclosure downsamples the point cloud frame by a preset voxel method to obtain multiple point cloud voxels, which can significantly reduce the amount of data for point cloud processing while maintaining the shape characteristics of the point cloud as much as possible, and then determine the point cloud plane to which the point cloud to be searched and its neighboring points belong from the point cloud frame by searching a certain number of neighborhood points on the central point cloud of all point cloud voxels. The number of the point cloud to be searched and its neighboring points is determined and limited to a certain range of numbers, so that the size of the point cloud plane can be controlled to save the computational overhead of point cloud plane fitting. In addition, by controlling the fitting accuracy of small point cloud planes, the accuracy of all extracted point cloud planes can be improved to avoid the influence of noise areas and plane misalignment.

[0097] The technical solution of the present disclosure is further described in detail below through the accompanying drawings and embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0098] The accompanying drawings, which form a part of the specification, illustrate embodiments of the present disclosure and, together with the description, serve to explain the principles of the present disclosure.

[0099] With reference to the accompanying drawings, the present disclosure can be more clearly understood from the following detailed description, wherein:

[0100] Figure 1 One of the flowcharts of the method for extracting a point cloud plane according to an embodiment of the method of the present disclosure.

[0101] Figure 2 Another flowchart of the method for extracting a point cloud plane according to an embodiment of the method of the present disclosure.

[0102] Figure 3 A schematic diagram of a point cloud voxel according to an embodiment of the method of the present disclosure.

[0103] Figure 4 A schematic diagram of coplanar plane merging according to an embodiment of the method of the present disclosure.

[0104] Figure 5 Another flowchart of the method for extracting a point cloud plane according to an embodiment of the method of the present disclosure.

[0105] Figure 6 Another flowchart of the method for extracting a point cloud plane according to an embodiment of the method of the present disclosure.

[0106] Figure 7 A schematic diagram of the structure of a point cloud plane extraction device according to an embodiment of the apparatus of the present disclosure.

[0107] Figure 8 A schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. Detailed implementation manners

[0108] Point cloud data or point cloud frames usually come from various sensors, such as laser scanners or depth cameras, which can capture the three-dimensional coordinate information of the object surface. Point cloud plane extraction generally refers to the process of identifying and extracting the points belonging to a plane from the point cloud data.

[0109] In view of the technical problems in the related art of point cloud plane extraction, the embodiments of the present disclosure provide a method, an apparatus and a computer-readable storage medium for extracting a point cloud plane. The embodiments of the present disclosure will be described in detail below with reference to the accompanying drawings.

[0110] Figure 1 One of the flowcharts of the method for extracting a point cloud plane according to an embodiment of the method of the present disclosure.

[0111] As Figure 1As shown, a method for extracting a point cloud plane according to an embodiment of the present disclosure may include the following steps:

[0112] Step 101: Downsample the point cloud frame of the target space by a preset voxel method to obtain a plurality of point cloud voxels.

[0113] In the embodiment of the present disclosure, downsampling by the preset voxel method means compressing and downsampling the point cloud data or the point cloud frame, that is, dividing the point cloud data or the point cloud frame into small voxels (three-dimensional pixels), and then only retaining one point as a representative within each voxel, so as to achieve downsampling of the point cloud data. It can be understood that the size of the voxel determines the density of the downsampled point cloud. Smaller voxels can retain details more finely, but will increase the amount of point cloud data. Larger voxels can reduce the amount of point cloud data, but will lose some details. As an alternative embodiment, the voxels (i.e., point cloud voxels) in the embodiment of the present disclosure may be a cube with a side length of 5 cm, and each point cloud voxel may include 20 points. Thus, assuming a point cloud frame includes 25,000 point clouds, 1,250 point cloud voxels can be obtained after downsampling by the voxel method, greatly reducing the amount of point cloud data and saving the computing resources for point cloud data processing.

[0114] Further, in each point cloud voxel of the embodiment of the present disclosure, a central point cloud is determined as the representative point of the point cloud voxel, so that more detailed information can be retained while reducing the amount of point cloud data. Determining the central point cloud of the point cloud voxel may, for example, sort all the point clouds included in the point cloud voxel according to the coordinate positions, and select the point cloud closest to the central position of the point cloud voxel as the central point cloud of the point cloud voxel.

[0115] As Figure 3 shown, it is an example diagram of a point cloud voxel. The outer cube is a point cloud voxel, and all the circles inside the cube are the point clouds within the point cloud voxel, where the black circle A is the central point cloud of the point cloud voxel, that is, the representative point of the point cloud voxel.

[0116] Step 102: Traverse the central point clouds of the plurality of point cloud voxels, use the central point cloud of any one point cloud voxel as the point cloud to be searched in the first preset search tree, search for the neighborhood points of the point cloud to be searched, and obtain a preset number of target neighborhood points of the point cloud to be searched.

[0117] Exemplarily, for the multiple point cloud voxels obtained after downsampling the point cloud frame, since each point cloud voxel is represented by a central point cloud, that is, each point cloud voxel can be regarded as a point cloud, then the multiple point cloud voxels are traversed one by one to search for their neighboring points. In order to control the size of the point cloud plane within a certain range to improve the accuracy of point cloud plane extraction, in the embodiments of the present disclosure, the number of neighboring points to be searched is preset in advance, that is, only a preset number of target neighboring points are searched. For example, the preset number is 5 or 8, which can not only avoid the influence of the noise area due to the too large point cloud plane, but also reduce the computational amount of point cloud processing.

[0118] Among them, the first preset search tree can be a KD tree (K-Dimensional Tree). Assuming that the central point cloud of the currently traversed point cloud voxel is used as a point cloud to be searched, a preset number of point clouds that meet the search distance range near the point cloud to be searched can be searched as its neighboring points. Exemplarily, the point clouds that meet the search distance range are further sorted by distance, and the preset number of point clouds with the closest distance are selected as the target neighboring points.

[0119] Step 103: Determine whether the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane.

[0120] In some embodiments, a plane equation can be used to determine whether the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane: for example, three point clouds among the target neighboring points and the point cloud to be searched can be selected to define a plane, and then the coordinates of these three points are used to calculate the plane equation, and then the coordinates of the other point clouds among the target neighboring points and the point cloud to be searched are substituted into this plane equation. If the plane equation is satisfied, the target neighboring points and the point cloud to be searched belong to the same point cloud plane, otherwise, they are not on the same point cloud plane.

[0121] In the embodiments of the present disclosure, a covariance matrix can also be used to determine whether the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane. Exemplarily, the covariance matrix of the preset number of target neighboring points is calculated through a preset covariance matrix formula, the covariance matrix of the preset number of target neighboring points is eigen-decomposed to obtain the minimum eigenvalue of the covariance matrix, and then it is determined whether the minimum eigenvalue of the covariance matrix is less than or equal to a preset eigenvalue threshold. When the minimum eigenvalue of the covariance matrix of the preset number of target neighboring points is less than the preset eigenvalue threshold, it is determined that the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane.

[0122] Among them, the preset covariance matrix formula can be, for example:

[0123]

[0124] where N is the total number of point clouds for which the covariance matrix is to be calculated, and p k,i and p k,j are the i-th and j-th coordinate components of the k-th point cloud, and are the i-th and j-th coordinate components of the centroid.

[0125] After calculating the covariance matrix, eigenvalue decomposition is further performed to obtain eigenvalues and eigenvectors, and the eigenvalues are sorted, for example, in descending order to obtain the minimum eigenvalue of the covariance matrix. Among them, the direction of the eigenvector corresponding to the minimum eigenvalue represents the direction in which the data changes the least, corresponding to the normal vector direction of the target neighborhood points. If the normal vector directions are the same, it can be determined that these point clouds belong to the same plane. In the present disclosure, in order to improve the accuracy of plane extraction, the minimum eigenvalue is further limited within a certain range to ensure that the deviation of the normal vector direction between the target neighborhood points and the point cloud to be searched is minimized or even completely consistent. Exemplarily, the preset feature threshold is 10 to the power of negative 4 (10 -4 ), then in the case where the minimum eigenvalue is less than or equal to 10 -4 , it is determined that the target neighborhood points and the point cloud to be searched belong to the same point cloud plane.

[0126] Step 104, in the case where it is determined that a preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, extract the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame in the target space, so as to obtain all point cloud planes in the target space.

[0127] In the embodiments of the present disclosure, plane parameters such as the normal vector, plane equation, and plane center point of the corresponding point cloud plane can be calculated and determined based on the normal vector, coordinates, etc. of the target neighborhood points and the point cloud to be searched, so as to obtain the point cloud plane.

[0128] Through the above steps, after traversing all point cloud voxels, all point cloud planes in the target space can be extracted.

[0129] On the basis of the embodiments shown in Figure 1 , the present disclosure also provides an embodiment shown in Figure 2 . Figure 2 This is the second flowchart of the method for extracting the point cloud plane according to an embodiment of the method of the present disclosure. As shown in Figure 2 , a method for extracting a point cloud plane according to an embodiment of the present disclosure includes the following steps:

[0130] Step 201, perform downsampling processing on the point cloud frame in the target space by a preset voxel method to obtain a plurality of point cloud voxels.

[0131] Step 202: Traverse the central point clouds of multiple point cloud voxels. Use the central point cloud of any point cloud voxel as the point cloud to be searched in the first preset search tree, and search for the neighboring points of the point cloud to be searched to obtain the preset number of target neighboring points of the point cloud to be searched.

[0132] Step 203: Determine whether the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane.

[0133] Step 204: When it is determined that the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane, extract the point cloud plane to which the point cloud to be searched and its target neighboring points belong from the point cloud frame in the target space to obtain all the point cloud planes in the target space.

[0134] Step 205: When it is determined that the preset number of target neighboring points and the point cloud to be searched belong to the same point cloud plane, perform plane marking on the point cloud to be searched and its target neighboring points, where the plane marking is used to record that the point cloud to be searched and its target neighboring points belong to the same point cloud plane.

[0135] In the embodiments of the present disclosure, the plane marking can, for example, mark the point clouds of the same point cloud plane through text, numbers, colors, etc. For example, the point clouds belonging to Plane A of the point cloud are all marked with the number "1", and the point clouds belonging to Plane B of the point cloud are all marked with the number "2". Or, the point clouds belonging to Plane A of the point cloud are all marked red, and the point clouds belonging to Plane B of the point cloud are all marked green. The embodiments of the present disclosure are only examples and are not limited here. As long as the point cloud and the point cloud plane can be corresponded to distinguish the point clouds of different point cloud planes.

[0136] For the specific embodiments of Steps 201 to 204, reference can be made to Figure 1 the relevant descriptions therein. In the Figure 2 illustrated embodiment, Step 203 is in Figure 1Based on the illustrated embodiments, it can also be implemented as follows: Before performing plane marking on the point cloud to be searched and its target neighborhood points, it can be first determined whether plane marking already exists for the point cloud to be searched and its target neighborhood points. In the case where plane marking already exists for any point cloud among the point cloud to be searched and its target neighborhood points, it is determined whether the first point cloud plane formed by the point cloud to be searched and its target neighborhood points and the second point cloud plane corresponding to the plane marking of this arbitrary point cloud belong to coplanar planes. As an embodiment, if the first point cloud plane and the second point cloud plane do not belong to coplanar planes, the first point cloud plane is extracted from the point cloud frame of the target space, where the first point cloud plane is the point cloud plane to which the point cloud to be searched and its target neighborhood points belong; as another embodiment, if the first point cloud plane and the second point cloud plane belong to coplanar planes, the point cloud constituting the first point cloud plane is added to the second point cloud plane to obtain a third point cloud plane, and the plane parameters of the third point cloud plane are updated, and the third point cloud plane is extracted from the point cloud frame of the target space, where the third point cloud plane is the point cloud plane to which the point cloud to be searched and its target neighborhood points currently belong. Through this embodiment, it is determined whether two point cloud planes are coplanar by judging whether there is an intersection between the points of the two point cloud planes, and the coplanar point cloud planes are connected into the same point cloud plane. In this way, by controlling the fitting accuracy of the small planes and the parameters of the plane coplanarity judgment, the accuracy of the extracted point cloud plane is improved, and the influence of noise regions and misaligned planes is avoided.

[0137] Furthermore, determining whether the first point cloud plane and the second point cloud plane belong to coplanar planes can be implemented as follows: According to the existing plane marking of this arbitrary point cloud, the second point cloud plane where this arbitrary point cloud is located is determined. According to the coordinates of the point cloud to be searched and its target neighborhood points, the geometric center point of the first point cloud plane is determined, and then the distance between the geometric center point of the first point cloud plane and the second point cloud plane is calculated to obtain a first distance. Then, it is determined whether the first distance satisfies a first preset distance threshold. In the case where it is determined that the first distance satisfies the first preset distance threshold, it is determined that the first point cloud plane and the second point cloud plane belong to coplanar planes.

[0138] As Figure 4 shown, the point cloud in the figure marked as "1" forms a point cloud plane, and the point cloud in the figure marked as "2" forms another point cloud plane. The point clouds in the two different point cloud planes can be marked with different colors. For example, the points in the point cloud plane marked as "1" are colored with a darker black, assumed to be the first point cloud plane, and the points in the point cloud plane marked as "2" are colored with a lighter gray, assumed to be the second point cloud plane. There is a point A in these two point cloud planes that belongs to both the first point cloud plane and there is a plane marking of the second point cloud plane, that is, it also belongs to the second point cloud plane. Then, these two point cloud planes may be coplanar. If it is determined that they are coplanar, the points in the point cloud plane marked as "1" are added to the point cloud plane marked as "2", that is,Figure 4 The point cloud plane marked as "1" and the point cloud plane marked as "2" in Figure 4 are merged into one plane.

[0139] Based on the Figure 2 embodiment shown in Figure 2 , an embodiment of the present disclosure further provides an embodiment as shown in Figure 5 Figure 5 . Figure 5 This is the third flowchart of the method for extracting the point cloud plane of an embodiment of the method of the present disclosure. Based on the Figure 2 embodiment shown in Figure 2 , as shown in Figure 5 Figure 5 , a method for extracting a point cloud plane according to an embodiment of the present disclosure may further include the following steps:

[0140] Step 501: For any extracted point cloud plane, search and determine all neighborhood points of the point cloud plane through a second preset search tree.

[0141] Step 502: Determine a first unmarked point cloud from all neighborhood points of the point cloud plane according to the plane label. The first unmarked point cloud is a point cloud that has not been marked with the plane label.

[0142] Step 503: For any first unmarked point cloud, calculate and determine the distance from the first unmarked point cloud to the point cloud plane to obtain a second distance.

[0143] Step 504: Determine whether the second distance satisfies a second preset distance threshold.

[0144] Step 505: When it is determined that the second distance satisfies the second preset distance threshold, determine that the first unmarked point cloud belongs to the point cloud plane.

[0145] Step 506: Mark the first unmarked point cloud with a plane label to obtain a first supplementary point cloud of the point cloud plane.

[0146] Step 507: Add the obtained first supplementary point cloud to the point cloud of the point cloud plane.

[0147] Step 508: Perform plane parameter optimization processing on the point cloud plane to which the supplementary point cloud has been added through a preset plane parameter optimization method.

[0148] Exemplarily, when the extraction of the point cloud plane is completed, there may still be some point clouds that have not been determined as point cloud planes, so that these point clouds have not been marked with plane labels. Through Figure 5In the illustrated embodiment, the neighborhood points are continuously searched for with the point cloud plane as the unit, that is, all the neighborhood points of the point cloud plane are determined by searching through the second preset search tree. The second preset search tree can be, for example, a KD tree. It can be understood that these point clouds not marked by the plane may be searched by multiple point cloud planes (for example, the point cloud at the corner may belong to multiple point cloud planes, such as the wall surface or the floor plane). In the embodiments of the present disclosure, for these point clouds not marked by the plane that are searched, by calculating the distances from these point clouds to each of the point cloud planes that search for this point cloud, to determine which point cloud plane it belongs to, that is, calculating the second distance, and then determining which or which of the second distances to each point cloud plane satisfy the second preset distance threshold to determine which point cloud plane it belongs to. If only one second distance satisfies the second preset distance threshold, then this point cloud belongs to the point cloud plane corresponding to this second distance. If there are multiple second distances that satisfy the second preset distance threshold, then the second distances that satisfy the second preset distance threshold can be sorted, and the point cloud plane corresponding to the smallest second distance is determined as the point cloud plane to which this point cloud belongs, and then the corresponding point cloud is added to the point cloud plane corresponding to this second distance.

[0149] Since new point clouds are added to the point cloud plane, in order to improve the accuracy of the point cloud plane, the plane parameter optimization method such as RANSAC or the least squares method can be used to perform plane parameter optimization processing on the point cloud plane with the added supplementary point clouds, so as to recalculate the normal vector, plane equation, plane center point, etc. of the point cloud plane. Through this embodiment, the point clouds of the point cloud plane can be more comprehensive, avoiding the omission of unmarked point clouds, resulting in poor data quality, and accurately determining the plane to which the unmarked point cloud belongs through the distance, avoiding the point cloud being wrongly divided into other point clouds, and further improving the accuracy of point cloud plane extraction.

[0150] In Figure 5 Based on the illustrated embodiment, the embodiments of the present disclosure also provide an embodiment as Figure 6 shown. Figure 6 It is the fourth flowchart of the extraction method of the point cloud plane of an embodiment of the method of the present disclosure. Based on the illustrated embodiment in Figure 5 As shown in Figure 6 An extraction method of a point cloud plane according to an embodiment of the present disclosure may further include the following steps:

[0151] Step 601, after performing plane marking on the first unmarked point cloud to obtain the first supplementary point cloud of the point cloud plane, write the first supplementary point cloud into a preset queue, where the preset queue is a first-in-first-out queue, and multiple supplementary point clouds are stored in the order of first-in-first-out.

[0152] Step 602: Traverse each supplementary point cloud in the preset queue one by one in the first-in-first-out order, and search and determine all neighborhood points of the first supplementary point cloud through the third preset search tree.

[0153] Step 603: Determine the second unlabeled point cloud from all the neighborhood points of the first supplementary point cloud according to the plane label, where the second unlabeled point cloud is the point cloud without plane label.

[0154] Step 604: For any second unlabeled point cloud, calculate and determine the distance from the second unlabeled point cloud to the point cloud plane to which the first supplementary point cloud belongs, and obtain the third distance.

[0155] Step 605: Determine whether the third distance meets the third preset distance threshold.

[0156] Step 606: When it is determined that the third distance meets the third preset distance threshold, determine that the second unlabeled point cloud belongs to the point cloud plane to which the first supplementary point cloud belongs.

[0157] Step 607: Perform plane labeling on the second unlabeled point cloud to obtain the second supplementary point cloud of the point cloud plane, and write the second supplementary point cloud to which it belongs into the preset queue.

[0158] Step 608: Add the obtained second supplementary point cloud to the point cloud of the point cloud plane to which the first supplementary point cloud belongs.

[0159] Step 609: Perform plane parameter optimization processing on the point cloud plane with added supplementary point cloud through the preset plane parameter optimization method.

[0160] Since when searching for neighborhood points of the point cloud plane through the embodiments as Figure 5 shown, some point clouds without plane labels are not within the search range, and these point clouds cannot be found. Subsequently, in this embodiment, the first supplementary point cloud obtained in the embodiment as Figure 5 shown can be written into a first-in-first-out queue, taken out from the queue in the first-in-first-out order, and then search for unlabeled point clouds within the neighborhood range through, for example, KD tree search to determine the corresponding neighborhood points. Further, calculate and determine the distance from these neighborhood points (i.e., the second unlabeled point cloud) to the point cloud plane to which the first supplementary point cloud belongs, that is, the third distance, and then determine whether the third distance meets the third preset distance threshold. If it meets, add it to the point cloud plane to which the first supplementary point cloud belongs. It can be understood that after adding the point cloud to the plane, the point cloud can be further plane-labeled so as not to perform secondary search on it, reducing the point cloud calculation overhead.

[0161] At the same time, write it into the preset queue as well, so as to continuously find unlabeled points in the way of continuing to search for neighborhood points, and traverse the point clouds in the queue one by one until the preset queue is empty.

[0162] Through this embodiment, based on Figure 5 The first supplementary point cloud in the point cloud continues to search for point clouds that may not have been searched during the point cloud plane search, further supplements the point cloud of the point cloud plane, improves the point cloud of the point cloud plane, and improves the accuracy of the point cloud plane. At the same time, the search range is relatively small compared to searching a large number of point clouds in the point cloud frame, and the computational overhead of point cloud processing is also reduced, thereby improving the efficiency of point cloud processing.

[0163] In summary, the technical solution provided by the embodiment of the present disclosure downsamples the point cloud frame by a preset voxel method to obtain multiple point cloud voxels, which can significantly reduce the amount of data processed by the point cloud while maintaining the shape characteristics of the point cloud as much as possible, and then determine the point cloud plane to which the point cloud to be searched and its neighboring points belong from the point cloud frame by searching a certain number of neighborhood points on the central point cloud of all point cloud voxels. The number of point clouds to be searched and their neighboring points is determined and limited to a certain range of numbers, and the size of the point cloud plane can be controlled to save the computational overhead of point cloud plane fitting. In addition, by controlling the fitting accuracy of small point cloud planes, the accuracy of all extracted point cloud planes can be improved to avoid the influence of noise areas and plane staggered layers.

[0164] Correspondingly, the embodiments of the present disclosure also provide device embodiments corresponding to the aforementioned method embodiments. The device embodiments of the present disclosure are described in detail below in conjunction with the accompanying drawings.

[0165] Figure 7 FIG. 1 is a schematic diagram of a structure of a point cloud plane extraction device according to an embodiment of the present invention. Figure 7 As shown, a point cloud plane extraction device according to an embodiment of the present disclosure may include: a point cloud downsampling module 701, a first neighborhood search module 702, a first determination module 703 and a plane extraction module 704, wherein:

[0166] The point cloud downsampling module 701 is used to downsample the point cloud frame of the target space by a preset voxel method to obtain a plurality of point cloud voxels, each of which includes a central point cloud;

[0167] A first neighborhood search module 702 is configured to traverse the center point clouds of the plurality of point cloud voxels, take the center point cloud of any point cloud voxel as the point cloud to be searched of the first preset search tree, search the neighborhood points of the point cloud to be searched, and obtain a preset number of target neighborhood points of the point cloud to be searched, wherein one target neighborhood point corresponds to a center point cloud of one point cloud voxel;

[0168] A first determination module 703 is used to determine whether the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane;

[0169] The plane extraction module 704 is used to extract the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame of the target space when it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, so as to obtain all the point cloud planes of the target space.

[0170] The technical solution provided by the embodiment of the present disclosure downsamples the point cloud frame by a preset voxel method to obtain multiple point cloud voxels, which can significantly reduce the amount of data for point cloud processing while maintaining the shape characteristics of the point cloud as much as possible, and then determine the point cloud plane to which the point cloud to be searched and its neighboring points belong from the point cloud frame by searching a certain number of neighborhood points on the central point cloud of all point cloud voxels. The number of the point cloud to be searched and its neighboring points is determined and limited to a certain range of numbers, so that the size of the point cloud plane can be controlled to save the computational overhead of point cloud plane fitting. In addition, by controlling the fitting accuracy of small point cloud planes, the accuracy of all extracted point cloud planes can be improved to avoid the influence of noise areas and plane misalignment.

[0171] exist Figure 7 Based on the embodiments shown, the embodiments of the present disclosure also provide the following embodiments. Further, as an optional embodiment, the device also includes:

[0172] The first plane marking module is used to plane mark the point cloud to be searched and its target neighborhood points when it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane. The plane mark is used to record and characterize that the point cloud to be searched and its target neighborhood points belong to the same point cloud plane.

[0173] As an optional embodiment, the plane extraction module includes:

[0174] A first judgment unit is used to judge whether the point cloud to be searched and its target neighborhood points already have plane marks before plane marking the point cloud to be searched and its target neighborhood points;

[0175] A first determining unit is used to determine whether a first point cloud plane currently formed by the point cloud to be searched and its target neighborhood points and a second point cloud plane corresponding to the plane mark of the arbitrary point cloud are coplanar planes when a plane mark already exists in any point cloud in the point cloud to be searched and its target neighborhood points;

[0176] A first plane extraction unit is used to extract the first point cloud plane from the point cloud frame of the target space if the first point cloud plane and the second point cloud plane are not coplanar planes, wherein the first point cloud plane is the point cloud plane to which the point cloud to be searched and its target neighborhood point belong;

[0177] A planar merging unit, configured to add the point cloud constituting the first point cloud plane to the second point cloud plane to obtain a third point cloud plane and update the plane parameters of the third point cloud plane if the first point cloud plane and the second point cloud plane belong to coplanar planes;

[0178] A second plane extraction unit, configured to extract the third point cloud plane from the point cloud frame of the target space.

[0179] As an optional embodiment, the coplanarity determination unit includes:

[0180] A first determination subunit, configured to determine the second point cloud plane where the arbitrary point cloud is located according to the existing plane label of the arbitrary point cloud;

[0181] A second determination subunit, configured to determine the geometric center point of the first point cloud plane according to the coordinates of the point cloud to be searched and its target neighborhood points;

[0182] A first distance calculation subunit, configured to calculate the distance between the geometric center point of the first point cloud plane and the second point cloud plane to obtain a first distance;

[0183] A first judgment subunit, configured to judge whether the first distance meets a first preset distance threshold;

[0184] A coplanarity determination subunit, configured to determine that the first point cloud plane and the second point cloud plane belong to coplanar planes when it is determined that the first distance meets the first preset distance threshold.

[0185] As an optional embodiment, the first determination module includes:

[0186] A first calculation unit, configured to calculate the covariance matrix of the preset number of target neighborhood points through a preset covariance matrix formula;

[0187] An eigen-decomposition unit, configured to perform eigen-decomposition on the covariance matrix of the preset number of target neighborhood points to obtain the minimum eigenvalue of the covariance matrix;

[0188] A second judgment unit, configured to judge whether the minimum eigenvalue of the covariance matrix is less than or equal to a preset eigenvalue threshold;

[0189] A second determination unit, configured to determine that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane when the minimum eigenvalue of the covariance matrix of the preset number of target neighborhood points is less than the preset eigenvalue threshold.

[0190] As an optional embodiment, the apparatus further includes:

[0191] The second neighborhood search module is used to search for all neighborhood points of any extracted point cloud plane through a second preset search tree;

[0192] The second determination module is used to determine a first unlabeled point cloud from all neighborhood points of the point cloud plane according to the plane label, and the first unlabeled point cloud is a point cloud without the plane label;

[0193] The third determination module is used to calculate and determine the distance from any first unlabeled point cloud to the point cloud plane to obtain a second distance;

[0194] The first judgment module is used to judge whether the second distance meets a second preset distance threshold;

[0195] The fourth determination module is used to determine that the first unlabeled point cloud belongs to the point cloud plane when it is determined that the second distance meets the second preset distance threshold;

[0196] The second plane labeling module is used to perform a plane label on the first unlabeled point cloud to obtain a first supplementary point cloud of the point cloud plane;

[0197] The first point cloud adding module is used to add the obtained first supplementary point cloud to the point cloud of the point cloud plane.

[0198] As an optional embodiment, the device further includes:

[0199] The queue writing module is used to write the first supplementary point cloud into a preset queue after performing a plane label on the first unlabeled point cloud to obtain the first supplementary point cloud of the point cloud plane. The preset queue is a first-in-first-out queue, and multiple supplementary point clouds are stored in the order of first-in-first-out;

[0200] The point cloud traversal module is used to sequentially traverse each supplementary point cloud in the preset queue in the order of first-in-first-out, and search for all neighborhood points of the first supplementary point cloud through a third preset search tree;

[0201] The fifth determination module is used to determine a second unlabeled point cloud from all neighborhood points of the first supplementary point cloud according to the plane label, and the second unlabeled point cloud is a point cloud without the plane label;

[0202] The sixth determination module is used to calculate and determine the distance from any second unlabeled point cloud to the point cloud plane to which the first supplementary point cloud belongs to obtain a third distance;

[0203] The second judgment module is used to judge whether the third distance meets a third preset distance threshold;

[0204] A seventh determination module, configured to determine that the second unlabeled point cloud belongs to the point cloud plane to which the first supplementary point cloud belongs when it is determined that the third distance satisfies a third preset distance threshold;

[0205] A third plane marking module, configured to perform plane marking on the second unlabeled point cloud to obtain a second supplementary point cloud of the point cloud plane, and write the second supplementary point cloud to which it belongs into the preset queue;

[0206] A second point cloud adding module, configured to add the obtained second supplementary point cloud to the point cloud of the point cloud plane to which the first supplementary point cloud belongs.

[0207] As an optional embodiment, the device further includes:

[0208] A plane parameter optimization module, configured to perform plane parameter optimization processing on the point cloud plane with supplementary point clouds added by a preset plane parameter optimization method, where the supplementary point clouds include the first supplementary point cloud and / or the second supplementary point cloud.

[0209] Those skilled in the art can clearly understand that, for the convenience and simplicity of description, only the above division of each functional unit and module is used as an example. In actual applications, the above functions can be allocated to different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated unit can be implemented in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for the convenience of mutual distinction and do not limit the protection scope of this application. The specific working processes of the units and modules in the above system can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated here.

[0210] Next, refer to Figure 8 to describe an electronic device according to an embodiment of the present disclosure. The electronic device can be any one or both of the first device and the second device, or a stand-alone device independent of them. The stand-alone device can communicate with the first device and the second device to receive the input signals collected from them.

[0211] Figure 8 The block diagram of an electronic device according to an embodiment of the present disclosure is illustrated.

[0212] As Figure 8 shown, the electronic device includes one or more processors and a memory.

[0213] The processor can be a central processing unit (CPU) or other forms of processing units with data processing capabilities and / or instruction execution capabilities, and can control other components in the electronic device to perform desired functions.

[0214] The memory can store one or more computer program products. The memory can include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. The volatile memory can include, for example, random access memory (RAM) and / or cache memory, etc. The non-volatile memory can include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program products can be stored on the computer-readable storage media, and the processor can run the computer program products to implement the point cloud plane extraction method of various embodiments of the present disclosure described above and / or other desired functions.

[0215] In one example, the electronic device may further include: an input device and an output device, and these components are interconnected through a bus system and / or other forms of connection mechanisms (not shown).

[0216] In addition, the input device may further include, for example, a keyboard, a mouse, and so on.

[0217] The output device can output various information to the outside, including the determined distance information, direction information, etc. The output device can include, for example, a display, a speaker, a printer, and a communication network and its connected remote output devices, and so on.

[0218] Of course, for simplicity, Figure 8 only some of the components related to the present disclosure in the electronic device are shown, and components such as buses, input / output interfaces, etc. are omitted. In addition, according to specific application scenarios, the electronic device may further include any other appropriate components.

[0219] In addition to the above methods and devices, embodiments of the present disclosure may also be computer program products, which include computer program instructions that, when run by a processor, cause the processor to execute the steps in the point cloud plane extraction method according to various embodiments of the present disclosure described in the above part of this specification.

[0220] The computer program product may be written in any combination of one or more programming languages for executing the program code of the operations of the embodiments of the present disclosure. The programming languages include object-oriented programming languages such as Java, C++, etc., and also include conventional procedural programming languages such as the "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, executed as a stand-alone software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0221] In addition, an embodiment of the present disclosure may also be a computer-readable storage medium having computer program instructions stored thereon, and when the computer program instructions are run by a processor, the processor is caused to execute the steps in the method for extracting a point cloud plane according to various embodiments of the present disclosure described in the foregoing part of this specification.

[0222] The computer-readable storage medium may adopt any combination of one or more readable media. The readable media may be a readable signal medium or a readable storage medium. The readable storage medium may, for example, include but is not limited to an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the above. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0223] The basic principles of the present disclosure have been described above in conjunction with specific embodiments. However, it should be noted that the advantages, benefits, effects, etc. mentioned in the present disclosure are only examples and not limitations, and it cannot be considered that these advantages, benefits, effects, etc. are essential for each embodiment of the present disclosure. In addition, the above-mentioned specific details are only for the purposes of illustration and facilitating understanding, and are not limitations. The above details do not limit the present disclosure to necessarily adopt the above specific details for implementation.

[0224] Each embodiment in this specification is described in a progressive manner. The key point of each embodiment is to illustrate the differences from other embodiments. For the same or similar parts among the embodiments, reference may be made to each other. For the system embodiments, since they basically correspond to the method embodiments, the description is relatively simple, and reference may be made to the partial description of the method embodiments for the relevant parts.

[0225] The block diagrams of the devices, apparatuses, equipment, and systems involved in this disclosure are merely illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagrams. As those skilled in the art will recognize, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including," "comprising," "having," etc. are open-ended terms, meaning "including but not limited to," and can be used interchangeably with each other. The words "or" and "and" used herein refer to the word "and / or" and can be used interchangeably with it, unless the context clearly indicates otherwise. The word "such as" used herein refers to the phrase "such as but not limited to" and can be used interchangeably with it.

[0226] The methods and apparatuses of this disclosure can be implemented in many ways. For example, the methods and apparatuses of this disclosure can be implemented by software, hardware, firmware, or any combination of software, hardware, and firmware. The above order of the steps for the methods is for illustration purposes only, and the steps of the methods of this disclosure are not limited to the specific order described above, unless otherwise specifically stated. In addition, in some embodiments, this disclosure can also be implemented as a program recorded in a recording medium, and these programs include machine-readable instructions for implementing the methods according to this disclosure. Therefore, this disclosure also covers the recording medium storing the programs for executing the methods according to this disclosure.

[0227] It should also be noted that in the apparatuses, equipment, and methods of this disclosure, each component or each step can be decomposed and / or recombined. These decompositions and / or recombinations should be regarded as equivalent solutions of this disclosure.

[0228] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use this disclosure. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein can be applied to other aspects without departing from the scope of this disclosure. Therefore, this disclosure is not intended to be limited to the aspects shown herein, but rather to the broadest scope consistent with the principles and novel features disclosed herein.

[0229] The above description has been given for purposes of illustration and description. In addition, this description is not intended to limit the embodiments of this disclosure to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions, and sub-combinations thereof.

Claims

1. A method for extracting a point cloud plane, characterized in that, The method includes: Downsampling the point cloud frame of the target space by a preset voxel method to obtain a plurality of point cloud voxels, and each point cloud voxel includes a central point cloud; Traverse the central point clouds of the plurality of point cloud voxels, use the central point cloud of any point cloud voxel as the point cloud to be searched in the first preset search tree, search for the neighborhood points of the point cloud to be searched, and obtain a preset number of target neighborhood points of the point cloud to be searched, where one target neighborhood point corresponds to the central point cloud of one of the point cloud voxels; Determine whether the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane; When it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, extract the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame of the target space, so as to obtain all point cloud planes of the target space.

2. The method according to claim 1, characterized in that The method further includes: When it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, perform plane marking on the point cloud to be searched and its target neighborhood points, and the plane marking is used to record that the point cloud to be searched and its target neighborhood points belong to the same point cloud plane.

3. The method according to claim 2, wherein The extracting the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame of the target space includes: Before performing plane marking on the point cloud to be searched and its target neighborhood points, determine whether the point cloud to be searched and its target neighborhood points already have plane markings; When any point cloud among the point cloud to be searched and its target neighborhood points already has a plane marking, determine whether the first point cloud plane formed by the point cloud to be searched and its target neighborhood points and the second point cloud plane corresponding to the plane marking of the any point cloud belong to coplanar planes; If the first point cloud plane and the second point cloud plane do not belong to coplanar planes, extract the first point cloud plane from the point cloud frame of the target space, and the first point cloud plane is the point cloud plane to which the point cloud to be searched and its target neighborhood points belong; If the first point cloud plane and the second point cloud plane belong to coplanar planes, add the point clouds forming the first point cloud plane to the second point cloud plane to obtain a third point cloud plane, and update the plane parameters of the third point cloud plane; Extract the third point cloud plane from the point cloud frame of the target space.

4. The method according to claim 3, wherein The determining whether the first point cloud plane formed by the point cloud to be searched and its target neighborhood points and the second point cloud plane corresponding to the plane marking of the any point cloud belong to coplanar planes when any point cloud among the point cloud to be searched and its target neighborhood points already has a plane marking includes: Determine the second point cloud plane where the any point cloud is located according to the existing plane marking of the any point cloud; Determine the geometric center point of the first point cloud plane according to the coordinates of the point cloud to be searched and its target neighborhood points; Calculate the distance between the geometric center point of the first point cloud plane and the second point cloud plane to obtain a first distance; Determine whether the first distance meets a first preset distance threshold; When it is determined that the first distance satisfies the first preset distance threshold, it is determined that the first point cloud plane and the second point cloud plane belong to the coplanar plane.

5. The method according to any one of claims 1 to 4, characterized in that, The determination of whether the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane includes: Calculating the covariance matrix of the preset number of target neighborhood points through a preset covariance matrix formula; Performing eigenvalue decomposition on the covariance matrix of the preset number of target neighborhood points to obtain the minimum eigenvalue of the covariance matrix; Judging whether the minimum eigenvalue of the covariance matrix is less than or equal to a preset eigenvalue threshold; When the minimum eigenvalue of the covariance matrix of the preset number of target neighborhood points is less than the preset eigenvalue threshold, it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane.

6. The method according to claim 2, wherein The method further includes: For any extracted point cloud plane, determining all neighborhood points of the point cloud plane through a second preset search tree; Determining a first unmarked point cloud from all neighborhood points of the point cloud plane according to the plane label, where the first unmarked point cloud is a point cloud that has not been given the plane label; For any one of the first unmarked point clouds, calculating and determining the distance from the first unmarked point cloud to the point cloud plane to obtain a second distance; Judging whether the second distance satisfies a second preset distance threshold; When it is determined that the second distance satisfies the second preset distance threshold, it is determined that the first unmarked point cloud belongs to the point cloud plane; Giving a plane label to the first unmarked point cloud to obtain a first supplementary point cloud of the point cloud plane; Adding the obtained first supplementary point cloud to the point cloud of the point cloud plane.

7. The method according to claim 6, characterized in that The method further includes: After giving a plane label to the first unmarked point cloud to obtain a first supplementary point cloud of the point cloud plane, writing the first supplementary point cloud into a preset queue, where the preset queue is a first-in-first-out queue, and storing multiple supplementary point clouds in the order of first-in-first-out; Traversing each supplementary point cloud in the preset queue in the order of first-in-first-out, and determining all neighborhood points of the first supplementary point cloud through a third preset search tree; Determining a second unmarked point cloud from all neighborhood points of the first supplementary point cloud according to the plane label, where the second unmarked point cloud is a point cloud that has not been given the plane label; For any one of the second unmarked point clouds, calculating and determining the distance from the second unmarked point cloud to the point cloud plane to which the first supplementary point cloud belongs to obtain a third distance; Judging whether the third distance satisfies a third preset distance threshold; When it is determined that the third distance satisfies the third preset distance threshold, it is determined that the second unmarked point cloud belongs to the point cloud plane to which the first supplementary point cloud belongs; Giving a plane label to the second unmarked point cloud to obtain a second supplementary point cloud of the point cloud plane, and writing the second supplementary point cloud into the preset queue; Adding the obtained second supplementary point cloud to the point cloud of the point cloud plane to which the first supplementary point cloud belongs.

8. The method according to claim 6 or 7, characterized in that, The method further includes: The plane parameter optimization process is performed on the point cloud plane with supplementary point cloud added through a preset plane parameter optimization method, where the supplementary point cloud includes the first supplementary point cloud and / or the second supplementary point cloud.

9. An extraction device for a point cloud plane, characterized in that, The device includes: A point cloud downsampling module, configured to perform downsampling on the point cloud frame of the target space through a preset voxel method to obtain a plurality of point cloud voxels, and each point cloud voxel includes a central point cloud; A first neighborhood search module, configured to traverse the central point clouds of the plurality of point cloud voxels, use the central point cloud of any one point cloud voxel as the point cloud to be searched in the first preset search tree, search for the neighborhood points of the point cloud to be searched, and obtain a preset number of target neighborhood points of the point cloud to be searched, where one target neighborhood point corresponds to the central point cloud of one point cloud voxel; A first determination module, configured to determine whether the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane; A plane extraction module, configured to extract the point cloud plane to which the point cloud to be searched and its target neighborhood points belong from the point cloud frame of the target space when it is determined that the preset number of target neighborhood points and the point cloud to be searched belong to the same point cloud plane, so as to obtain all point cloud planes of the target space.

10. A computer-readable storage medium having computer program instructions stored thereon, characterized in that, When the computer program instructions are executed by a processor, the method described in any one of claims 1-8 above is implemented.