Point cloud extraction method, device and storage medium for target surface

By performing rasterization processing on the point cloud map and determining the normal vectors of neighboring point groups, the problem of low point cloud extraction accuracy in existing technologies is solved, achieving higher accuracy and efficiency in extracting target surface point cloud data.

CN116955347BActive Publication Date: 2025-12-12DREAM INNOVATION TECH (SUZHOU) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210410553.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-04-19
Publication Date
2025-12-12
Estimated Expiration
2042-04-19

AI Technical Summary

Technical Problem

Existing technologies struggle to accurately handle slope variations when fitting a single frame of point cloud data as a whole to a surface, resulting in low point cloud extraction accuracy from the target surface.

Method used

By rasterizing the point cloud map of the target scene, graph search is performed based on the raster map to determine the neighboring point groups, and the point cloud data of the target surface is determined by using the normal vectors of the neighboring point groups to satisfy preset conditions.

Benefits of technology

It improves the accuracy and efficiency of point cloud data extraction from target surfaces, reduces the impact of extreme point cloud data, and ensures the overall accuracy of point cloud data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116955347B_ABST
    Figure CN116955347B_ABST
Patent Text Reader

Abstract

The application relates to a point cloud extraction method, device and storage medium of a target surface, and belongs to the technical field of computers; the method comprises the following steps: performing rasterization processing on a point cloud map of a target scene to obtain a raster map; performing graph searching based on a specified raster in the raster map to obtain a neighboring point group corresponding to the specified raster; in the case that a normal vector of the neighboring point group meets a preset condition, the neighboring point group is determined as point cloud data of the target surface; the method can solve the problem that, when single-frame point cloud data is taken as a whole and is fitted once to extract point cloud of the target surface, the slope with a slope change may be inaccurately identified, and the accuracy of the extracted point cloud of the target surface is low; since the rasterization processing divides the point cloud map into a plurality of rasters, whether a plane where each raster is located is the target surface is determined step by step from a specified raster in the plurality of rasters, and therefore, the accuracy of the extracted point cloud data of the target surface can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to a point cloud extraction method, device and storage medium of a target surface, and belongs to the technical field of computers. BACKGROUND

[0002] With the rapid development of 3D scanning technology, people can easily obtain point cloud data through 3D scanning devices such as laser radars and stereo cameras. Point cloud data is widely used in map surveying, power line inspection, pipeline corridor planning and maintenance, etc. How to extract the point cloud of the target surface from the point cloud data is an important step in the application of point cloud data.

[0003] Point cloud extraction methods can generally be divided into: plane grid method, point cloud normal vector, model fitting method, and facet mesh method. Among them, the commonly used model fitting method includes: plane fitting, Gaussian process, and plane parameter fitting.

[0004] Most of the current mainstream point cloud extraction algorithms fit to generate the point cloud of the target surface in the mapping process. Since the ground point cloud accounts for a high proportion of all point clouds in a single frame of point cloud, and the single frame of point cloud is treated as a whole in the fitting process, it is difficult to handle the slope with changing slope in the fitting process, resulting in the problem of low precision of the extracted point cloud of the target surface. SUMMARY

[0005] The present application provides a point cloud extraction method, device and storage medium of a target surface, which can solve the problem of low precision of the extracted point cloud of the target surface due to inaccurate identification of the slope with changing slope when fitting the single frame of point cloud data as a whole at one time to extract the point cloud of the target surface. The present application provides the following technical solutions:

[0006] In a first aspect, a point cloud extraction method of a target surface is provided, which includes:

[0007] performing grid processing on a point cloud map of a target scene to obtain a grid map; the target scene includes the target surface;

[0008] performing graph search based on a specified grid in the grid map to obtain a neighboring point group corresponding to the specified grid; the neighboring point group includes a plurality of neighboring points; the plurality of neighboring points are points with a distance less than or equal to a distance threshold from a target position of the specified grid;

[0009] in a case where the normal vector of the neighboring point group meets a preset condition, determining the neighboring point group as point cloud data of the target surface.

[0010] Optionally, in a case where the normal vector of the neighboring point group meets a preset condition, the method further includes:

[0011] determining, as the specified grid, a grid in the grid map that meets a preset position relationship with the specified grid, triggering the step of performing graph search starting from the specified grid in the grid map to obtain a neighboring point group corresponding to the specified grid; and stopping until all specified grids are traversed.

[0012] Optionally, the determining, as the specified grid, a grid in the grid map that meets a preset position relationship with the specified grid comprises:

[0013] determining, as the specified grid, a grid in the grid map that is adjacent to an edge and a vertex of the specified grid.

[0014] Optionally, the performing graph search starting from the specified grid in the grid map to obtain a neighboring point group corresponding to the specified grid comprises:

[0015] obtaining a position topology map corresponding to the point cloud map, the position topology map being used to indicate a spatial position relationship between data points in the point cloud map;

[0016] for a specified grid in the grid map, determining a neighboring point group corresponding to the specified grid based on the position topology map using a radius nearest neighbor search algorithm.

[0017] Optionally, the determining a neighboring point group corresponding to the specified grid based on the position topology map using a radius nearest neighbor search algorithm comprises:

[0018] in the position topology map, determining points having a distance less than or equal to the distance threshold value from a center position of the specified grid to obtain the neighboring point group.

[0019] Optionally, the position topology map comprises an octree map.

[0020] Optionally, the method further comprises:

[0021] calculating a three-dimensional coordinate mean value of each data point in the neighboring point group in the point cloud map;

[0022] calculating a covariance matrix of the neighboring point group based on the three-dimensional coordinate mean value;

[0023] calculating a first eigenvector, a second eigenvector and a third eigenvector of the covariance matrix, the eigenvector corresponding to the smallest eigenvalue in the first eigenvector, the second eigenvector and the third eigenvector being perpendicular to a main distribution plane of the neighboring point group;

[0024] determining the eigenvector corresponding to the smallest eigenvalue as the normal vector.

[0025] Optionally, the case that the normal vector of the adjacent point group meets a preset condition is determined as the point cloud data of the target surface.

[0026] In response to the included angle between the normal vector and the direction perpendicular to the target surface being less than a set threshold, the adjacent point group is determined as the point cloud data of the target surface.

[0027] In a second aspect, an electronic device is provided, which includes a processor and a memory; the memory stores a program, which is loaded and executed by the processor to implement the point cloud extraction method of the target surface of the first aspect.

[0028] In a third aspect, a computer readable storage medium is provided, which stores a program, which is executed by a processor to implement the point cloud extraction method of the target surface of the first aspect.

[0029] The beneficial effects of the present application at least include: a grid map is obtained by rasterizing a point cloud map of a target scene; the target scene includes a target surface; a graph search is performed based on a specified grid in the grid map to obtain an adjacent point group corresponding to the specified grid; the adjacent point group includes a plurality of adjacent points; the plurality of adjacent points are points whose distance from a target position of the specified grid is less than or equal to a distance threshold; the adjacent point group is determined as the point cloud data of the target surface in the case that a normal vector of the adjacent point group meets a preset condition; the problem of low accuracy of extracting the point cloud of the target surface when a single frame of point cloud data is used as a whole for one-time surface fitting to extract the point cloud of the target surface can be solved; since the rasterization process divides the point cloud map into a plurality of grids, and each grid is searched step by step to determine whether the plane where each grid is located is the target surface, rather than using all the point cloud data at one time to determine whether it is the target surface, the accuracy of extracting the point cloud data of the target surface can be improved.

[0030] In addition, by obtaining a position topology map corresponding to the point cloud map, the radius nearest neighbor search algorithm is used to determine the adjacent point group corresponding to the specified grid based on the position topology map; since the topology map can reflect the spatial position relationship of each point in the point cloud map, the adjacent points of a certain position can be quickly found, thereby improving the efficiency of extracting the point cloud data of the target surface.

[0031] In addition, the traditional point cloud extraction algorithm includes: judging whether the point cloud is the point cloud data of the target surface according to whether the maximum height difference and the average height difference of the point cloud data in the grid are less than a set threshold. Since the data in the point cloud may have a large difference, the judgment result is easily affected by some extreme point cloud data, so that the judgment result cannot completely reflect the overall situation of the point cloud data, and the extracted point cloud data of the target surface has a large error. Since the normal vector can better reflect the overall spatial distribution of the points in the adjacent point group, it is not easily disturbed by one or several data points, therefore, the embodiment judges whether the point cloud is the point cloud data of the target surface by judging whether the included angle between the normal vector of the adjacent point group and the direction perpendicular to the target surface is less than a set threshold, so that the accuracy of the extraction of the point cloud data of the target surface can be improved.

[0032] The above description is only a summary of the technical scheme of the present application. In order to more clearly understand the technical means of the present application, and to implement the content of the description, the following will be described in detail with the preferred embodiments of the present application and with the help of the accompanying drawings.

DRAWINGS

[0033] Figure 1 is a flowchart of a point cloud extraction method of a target surface provided by an embodiment of the present application;

[0034] Figure 2 is a schematic diagram of a point cloud extraction process of a target surface provided by an embodiment of the present application;

[0035] Figure 3 is a block diagram of a point cloud extraction device of a target surface provided by an embodiment of the present application.

[0036] Figure 4 is a block diagram of an electronic device provided by an embodiment of the present application.

DETAILED DESCRIPTION

[0037] The specific embodiments of the present application will be further described in detail below in combination with the drawings and embodiments. The following embodiments are used to illustrate the present application, but not to limit the scope of the present application.

[0038] Firstly, several terms related to the embodiments of the present application are introduced.

[0039] Principal Component Analysis (PCA): also known as principal component analysis, principal component analysis is used to convert multiple indexes into a few comprehensive indexes, and then calculate the comprehensive indexes.

[0040] Octree: A point cloud representation and storage method that divides a three-dimensional space into many small cubes. If each face of each small cube is cut into two pieces, the small cube will become eight small cubes of the same size. This step is repeated until the final cube size reaches the highest precision of the model. In this process, a node is expanded into eight child nodes. The process of subdividing the entire space from the largest space to the smallest space is an octree. In an octree, a node stores information about whether it is occupied. When all child nodes of a cube are occupied or unoccupied, there is no need to expand the node. Each small cube has a number describing whether it is occupied.

[0041] R-Nearest Neighbor (RNN): In a fixed space, find elements within a certain distance threshold from a certain location.

[0042] K-D trees: A binary tree that is a data structure used to partition multi-dimensional space, with each node being a multi-dimensional coordinate.

[0043] Bounding Volume Hierarchy Based On Tree (BVH tree): A multi-way tree used to store bounding volume shapes. Its root node represents a maximum bounding volume, and its multiple child nodes represent multiple sub-bounding volumes.

[0044] Binary Space Partitioning Tree (BSP tree): A binary tree in which each node represents a plane in 3D space, which divides the current space into two subspaces, front and back, corresponding to the left and right children. In 2D space, each node represents an edge, which can also divide 2D space into front and back parts

[0045] Optionally, the point cloud extraction method for the target surface provided in each embodiment of the present application is used in an electronic device, which can be a cleaning robot, a computer, a tablet computer, etc. The type of the electronic device is not limited in the present embodiment. In the present embodiment, the electronic device has the function of obtaining point cloud data in a target scene. The point cloud data can be collected by the electronic device itself, in which case the electronic device is provided with a sensor for collecting point cloud data of the target scene. Alternatively, the point cloud data is sent by another device, in which case the other device (such as a cleaning robot) is provided with a sensor, and the point cloud data collected by the sensor is sent to the electronic device.

[0046] Figure 1is a flowchart of a point cloud extraction method of a target surface provided by an embodiment of the present application, and the method comprises at least the following steps:

[0047] In step 101, a point cloud map of a target scene is rasterized to obtain a raster map; the target scene comprises a target surface.

[0048] In an example, if a sensor for collecting point cloud data is arranged on the electronic device, the target scene can be a scene in which the electronic device is currently located, for example, when the electronic device is a cleaning robot, the target scene can be a working scene in which the cleaning robot is currently located. Correspondingly, the target surface is a surface on which the electronic device is currently placed.

[0049] In other examples, if the electronic device receives point cloud data sent by another device, the target scene can be a scene in which the other device is currently located, and correspondingly, the target surface is a surface on which the other device is currently placed.

[0050] Optionally, the target surface is parallel to a horizontal plane or forms a certain angle with the horizontal plane; the target surface can be a ground surface or a surface of a photovoltaic cell, and the present embodiment does not limit the type of the target surface.

[0051] The point cloud map is a map formed by corresponding data points reflecting the spatial structure of the target scene to a three-dimensional coordinate system created in advance. Each data point can be obtained by collecting the target scene by a sensor.

[0052] Illustratively, the rasterization of the point cloud map comprises: uniformly dividing the point cloud map into a plurality of grid cells according to a preset size; and determining whether each grid is occupied one by one to obtain a raster map. The preset size is negatively correlated with the accuracy of the raster map, i.e., the smaller the preset size, the higher the accuracy of the raster map.

[0053] Since the rasterization divides the point cloud map into a plurality of grids, each grid comprises data of at least one data point. In this way, the electronic device can subsequently perform calculations based on the grids rather than based on each data point, thereby reducing the amount of calculation and improving the calculation efficiency.

[0054] In step 102, a graph search is performed based on a specified grid in the raster map to obtain a neighboring point group corresponding to the specified grid; the neighboring point group comprises a plurality of neighboring points; the plurality of neighboring points are points whose distance from a target position of the specified grid is less than or equal to a distance threshold.

[0055] The initialization designated grid is a grid to which the electronic device belongs when the electronic device starts running, or is any grid in the grid map including the point cloud data. Since the electronic device is usually located at a relatively flat position on the target surface when the electronic device starts running, the initialization designated grid is taken as an example in the embodiment.

[0056] In the embodiment, the designated grid further includes a first grid determined based on the initialization designated grid. Based on this, the initialization designated grid provided in the electronic device can ensure that the electronic device can determine the first grid based on the initialization designated grid.

[0057] Optionally, the designated grid can further include an (i+1)th grid determined based on the ith grid, where i is a positive integer starting from 1.

[0058] The process of determining the first grid based on the initialization designated grid and determining the (i+1)th grid based on the ith grid will be described in combination with step 103 below, and the embodiment will not be described here.

[0059] The graph search refers to a process of searching for a point satisfying an expected position relationship with the designated grid from the designated grid. In the embodiment, the expected position relationship refers to a distance between the target position of the designated grid and the point being less than or equal to a distance threshold.

[0060] The value of the distance threshold can be pre-stored in the electronic device, and the distance threshold is set based on search requirements, and the embodiment does not limit the value of the distance threshold.

[0061] Optionally, the target position of the designated grid can be a center position of the designated grid, or any position in the designated grid, such as a right lower vertex of the designated grid. Since the adjacent point group is searched from the center position, the determined adjacent point group can fall into the grid where the center position is located as much as possible, so that the determined adjacent point group can better reflect the change trend of the surface corresponding to the grid, and the accuracy of the target surface determination can be improved. Based on this, the target position is taken as an example in the embodiment.

[0062] Optionally, the graph search based on the designated grid in the grid map to obtain the adjacent point group corresponding to the designated grid includes but is not limited to one of the following two ways:

[0063] In the first way, a position topology map corresponding to the point cloud map is obtained; for the designated grid in the grid map, the radius nearest neighbor search algorithm is used to determine the adjacent point group corresponding to the designated grid based on the position topology map.

[0064] The position topology map is used to indicate the spatial position relationship between the data points in the point cloud map. Optionally, the position topology map includes, but is not limited to, a quadtree map, an octree map, a K-D tree map, a BVH tree map, or a BSP tree map.

[0065] Illustratively, since the octree structure has relatively high spatial query efficiency when the spatial data objects are evenly distributed, the embodiment is described by taking the position topology map as an octree map.

[0066] Illustratively, the position topology map is used to determine the adjacent point group corresponding to the specified grid by using the radius nearest neighbor search algorithm, including: in the position topology map, determining the points with a distance less than or equal to a distance threshold from the center position of the specified grid to obtain the adjacent point group.

[0067] In the first mode, the position topology map is used for graph search, which can determine the adjacent point group by using the position relationship between the points, thereby improving the efficiency of the graph search and the efficiency of the target surface extraction.

[0068] Optionally, in the first mode, the grid map can be a two-dimensional map, that is, a rasterized map obtained by projecting the point cloud map onto the target surface.

[0069] In the second mode, the grid map is a three-dimensional map, each grid in the three-dimensional grid map is a cube, and at least one cube includes data points. In other words, each data point in the point cloud map falls into at least one cube in the grid map. Accordingly, for any measured data point in the specified grid, the first distance of the measured data point to the six faces of the specified grid and the second distance of the measured data point to the surrounding grids of the specified grid are determined; the first distance and the second distance are sorted in ascending order; a spatial sphere is generated with the measured data point as the center and the mth distance as the radius according to the sorting order, and an interference cube generated by the spatial sphere is determined; it is determined whether K adjacent points are contained in the interference cube; if the K adjacent points are contained in the interference cube, the K adjacent points are determined as the adjacent point group corresponding to the specified grid. If the number of data points in the interference cube is less than K, m is set to m+1, and the step of generating a spatial sphere with the measured data point as the center and the mth distance as the radius according to the sorting order is executed again until the adjacent point group is determined or all distances are traversed.

[0070] In step 103, in a case where the normal vector of the adjacent point group satisfies a preset condition, the adjacent point group is determined as the point cloud data of the target surface.

[0071] Optionally, the preset condition is set based on a condition satisfied by the normal vector of the target surface. In this way, when the normal vector of the adjacent point group satisfies the preset condition, it indicates that the normal vector of the adjacent point group is the normal vector of the target surface.

[0072] Since the normal vector of the adjacent point group can reflect the surface direction determined by the adjacent point group, the size of the angle between the normal vector of the adjacent point group and the normal vector of the direction perpendicular to the target surface can reflect the consistency between the direction of the adjacent point group and the direction of the target surface. Based on this, the preset condition includes that the angle between the normal vector of the adjacent point group and the direction perpendicular to the target surface is less than a set threshold value.

[0073] The size of the set threshold value is set based on the accuracy requirement of the point cloud data extraction, for example: the higher the accuracy requirement, the smaller the set threshold value.

[0074] Optionally, the calculation formula of the angle between the normal vector and the direction perpendicular to the target surface is represented by the following formula:

[0075] theta = arccos(n · z)

[0076] Wherein, theta is the angle between the normal vector of the adjacent point group and the direction perpendicular to the target surface, n is the normal vector of the adjacent point group, and z is the vector perpendicular to the target surface.

[0077] Optionally, before this step, the electronic device needs to determine the normal vector of the adjacent point group in advance. In one example, the electronic device can use principal component analysis to determine the normal vector of the adjacent point group. Specifically, the three-dimensional coordinate mean of each data point in the adjacent point group in the point cloud map is calculated; the covariance matrix of the adjacent point group is calculated based on the three-dimensional coordinate mean; the first, second and third characteristic vectors of the covariance matrix are calculated, and the characteristic vector corresponding to the smallest eigenvalue in the first, second and third characteristic vectors is perpendicular to the main distribution plane of the adjacent point group; and the characteristic vector corresponding to the smallest eigenvalue is determined as the normal vector.

[0078] Optionally, the calculation formula of the three-dimensional coordinate mean of each data point in the adjacent point group in the point cloud map is:

[0079]

[0080] Wherein, N is the number of data points in the adjacent point group, p i is the three-dimensional coordinate p i (x i ,y i ,z i ) corresponding to each data point in the adjacent point group, i is the number corresponding to each data point in the adjacent point group, the value range of i is 0 to N-1, p ave is the coordinate mean of the adjacent point group.

[0081] Optionally, the calculation formula of the covariance matrix of the adjacent point group based on the mean value of the three-dimensional coordinates is:

[0082]

[0083] wherein N is the number of data points in the adjacent point group, p i is the three-dimensional coordinate corresponding to each data point in the adjacent point group p i (xi, yi, zi), i is the number corresponding to each data point in the adjacent point group, the value range of i is 0 to N-1, p ave is the mean value of the coordinates of the adjacent point group, and COV is the covariance matrix of the adjacent point group.

[0084] The calculation method of the first, second and third eigenvectors of the covariance matrix is: determining the direction with the largest data variance in the covariance matrix as the first eigenvector, determining the direction with the largest data variance in the direction perpendicular to the first eigenvector in the covariance matrix as the second eigenvector, and determining the direction with the largest data variance in the direction perpendicular to the first and second eigenvectors in the covariance matrix as the third eigenvector.

[0085] In other examples, the manner in which the electronic device determines the normal vector of the adjacent point group includes: using a random sample consensus (RANSAC) algorithm to perform plane fitting on the adjacent point group; and calculating the normal vector of the fitted plane. In actual implementation, the manner in which the normal vector of the adjacent point group is determined can also be other manners, which are not enumerated one by one in this embodiment.

[0086] Optionally, when the current specified grid is the initialized specified grid, in a case where the normal vector of the adjacent point group meets a preset condition, the grids in the grid map that meet a preset positional relationship with the specified grid are determined as the specified grid (i.e., the first grid), triggering the step of performing graph search starting from the specified grid in the grid map to obtain the adjacent point group corresponding to the specified grid, i.e., performing step 102; and the process stops until all the specified grids are traversed.

[0087] Alternatively, when the current specified grid is the i-th grid, in a case where the normal vector of the adjacent point group meets a preset condition, the grids in the grid map that meet a preset positional relationship with the specified grid (i.e., the i-th grid) are determined as the specified grid (i.e., the i+1-th grid), triggering the step of performing graph search starting from the specified grid in the grid map to obtain the adjacent point group corresponding to the specified grid, i.e., performing step 102; and the process stops until all the specified grids are traversed.

[0088] It should be noted that, when the current specified grid is the i-th grid, if the normal vectors of the neighboring point group corresponding to the i-th grid do not satisfy the preset condition, there is no (i+1)-th grid determined based on the i-th grid.

[0089] Illustratively, the preset position relationship includes but is not limited to: adjacent to the edge of the specified grid and adjacent to the edge vertex of the specified grid. In other embodiments, the preset position relationship can also be separated from the specified grid by x grids, and the present embodiment does not limit the setting manner of the preset position relationship.

[0090] In summary, the point cloud extraction method of the target surface provided in the embodiment, by performing grid processing on the point cloud map of the target scene, a grid map is obtained; the target scene includes a target surface; based on a specified grid in the grid map, graph searching is performed to obtain a neighboring point group corresponding to the specified grid; the neighboring point group includes a plurality of neighboring points; the plurality of neighboring points are points whose distance from the target position of the specified grid is less than or equal to a distance threshold; in the case that the normal vector of the neighboring point group satisfies a preset condition, the neighboring point group is determined as the point cloud data of the target surface; the problem of low accuracy of extracting the point cloud of the target surface when fitting the single-frame point cloud data as a whole at one time can be solved; since the grid processing divides the point cloud map into a plurality of grids, and each grid is searched step by step to determine whether the plane where each grid is located is the target surface, instead of using all point cloud data at one time to determine whether it is the target surface, the accuracy of extracting the point cloud data of the target surface can be improved.

[0091] In addition, by obtaining the position topology map corresponding to the point cloud map, the neighboring point group corresponding to the specified grid is determined based on the position topology map using the radius nearest neighbor search algorithm; since the topology map can reflect the spatial position relationship of each point in the point cloud map, the neighboring points of a certain position can be quickly found, thereby improving the efficiency of extracting the point cloud data of the target surface.

[0092] In addition, the traditional point cloud extraction algorithm includes: judging whether the point cloud is the point cloud data of the target surface according to whether the maximum height difference and the average height difference of the point cloud data in the grid are less than a set threshold. Since the data in the point cloud may have a large difference, the judgment result is easily affected by some extreme point cloud data, so that the judgment result cannot fully reflect the overall situation of the point cloud data, and the extracted point cloud data of the target surface has a large error. Since the normal vector can better reflect the overall spatial distribution of the point group, it is not easily disturbed by one or several data points, therefore, the embodiment judges whether the point cloud is the point cloud data of the target surface by judging whether the angle between the normal vector of the adjacent point group and the direction perpendicular to the target surface is less than a set threshold, which can improve the accuracy of the point cloud data extraction of the target surface.

[0093] In addition, since the principal component analysis method can extract the main data dimension from multiple data dimensions of the point cloud data, and the main data dimension can reflect the main information of the point cloud data. Therefore, by acquiring the normal vector of the adjacent point group through the principal component analysis method, the influence of the noise points in the point cloud map on the extraction result can be excluded, and the extraction accuracy of the point cloud data of the target surface can be improved. At the same time, since the main dimension data is less than the original point cloud data, the calculation amount in the extraction process can be reduced, and the extraction efficiency of the point cloud data of the target surface can be improved.

[0094] In order to more clearly understand the target surface point cloud extraction method provided by the present application, an example of the method is described below. In the method, the target position of the specified grid is taken as the center position, the specified grid initialized is taken as the grid to which the electronic device belongs when it starts running, and the position topology map is taken as an octree map. Referring to Figure 2 The method includes at least the following steps:

[0095] Step 201: acquiring a point cloud map of a target scene, performing grid processing on the point cloud map to obtain a grid map, and generating an octree map based on the point cloud map.

[0096] Step 202: starting from a specified grid that has not been traversed in the grid map, determining an adjacent point group of the specified grid in the octree map; the initialized specified grid is the grid to which the electronic device belongs when it starts running.

[0097] Step 203: calculating the normal vector of the adjacent point group using the principal component analysis method.

[0098] Step 204: judging whether the angle between the normal vector and the direction perpendicular to the target surface is greater than a set threshold; if yes, step 205 is performed; if no, step 206 is performed.

[0099] Step 205, judge whether all specified grids are traversed; if yes, the flow ends; if not, step 202 is executed.

[0100] Step 206, determine the adjacent point group as the point cloud data of the target surface.

[0101] Step 207, determine the grid in the grid map that meets the preset position relationship with the current specified grid as the specified grid, and execute step 202.

[0102] According to the above embodiment, the point cloud extraction method of the target surface provided by the application can gradually search and determine whether the plane where each grid is located is the target surface from the specified grid in the plurality of grids, rather than using all point cloud data at once to determine whether it is the target surface. Therefore, the accuracy of the point cloud data extraction of the target surface can be improved.

[0103] Figure 3 is a block diagram of a point cloud extraction device of a target surface provided by an embodiment of the application. The device includes at least the following modules: a map generation module 310, a point group searching module 320, and a point cloud determination module 330.

[0104] The map generation module 310 is configured to perform grid processing on the point cloud map of the target scene to obtain a grid map; the target scene includes the target surface.

[0105] The point group searching module 320 is configured to perform graph search based on a specified grid in the grid map to obtain an adjacent point group corresponding to the specified grid; the adjacent point group includes a plurality of adjacent points; the plurality of adjacent points are points whose distance from the target position of the specified grid is less than or equal to a distance threshold.

[0106] The point cloud determination module 330 is configured to determine the adjacent point group as the point cloud data of the target surface when the normal vector of the adjacent point group meets a preset condition.

[0107] For related details, refer to the above method embodiments.

[0108] It should be noted that: the point cloud extraction device of the target surface provided in the above embodiments is used to extract the point cloud of the target surface, and only the division of the above functional modules is used as an example for illustration. In actual application, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the vehicle attribute detection device is divided into different functional modules to complete all or part of the functions described above. In addition, the point cloud extraction device of the target surface provided in the above embodiments and the point cloud extraction method of the target surface belong to the same concept, and the specific implementation process is described in the method embodiments, which will not be repeated here.

[0109] Figure 4is a block diagram of an electronic device provided by an embodiment of the present application. The device at least includes a processor 401 and a memory 402.

[0110] The processor 401 can include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 401 can be implemented in at least one of a hardware form of a DSP (Digital Signal Processing), an FPGA (Field-Programmable Gate Array), a PLA (Programmable Logic Array). The processor 401 can also include a main processor and a coprocessor. The main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit). The coprocessor is a low-power processor for processing data in a standby state. In some embodiments, the processor 401 can be integrated with a GPU (Graphics Processing Unit) that is responsible for rendering and drawing the content required to be displayed by the display screen. In some embodiments, the processor 401 can further include an AI (Artificial Intelligence) processor for processing machine learning-related computing operations.

[0111] The memory 402 can include one or more computer-readable storage media, which can be non-transitory. The memory 402 can also include a high-speed random access memory, and a non-volatile memory such as one or more disk storage devices, flash storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 402 is used to store at least one instruction for being executed by the processor 401 to implement the vehicle attribute detection method provided by the method embodiment of the present application.

[0112] In some embodiments, the electronic device can also optionally include a peripheral device interface and at least one peripheral device. The processor 401, the memory 402, and the peripheral device interface can be connected through a bus or a signal line. Each peripheral device can be connected to the peripheral device interface through a bus, a signal line, or a circuit board. Illustratively, the peripheral device includes, but is not limited to, a radio frequency circuit, a touch display screen, an audio circuit, and a power supply, etc.

[0113] Of course, the electronic device can also include fewer or more components, which are not limited in the present embodiment.

[0114] Optionally, the present application also provides a computer readable storage medium, the computer readable storage medium stores a program, the program is loaded and executed by a processor to realize the point cloud extraction method of the target surface of the above-mentioned method embodiment.

[0115] Optionally, the present application also provides a computer product, the computer product comprises a computer readable storage medium, the computer readable storage medium stores a program, the program is loaded and executed by a processor to realize the point cloud extraction method of the target surface of the above-mentioned method embodiment.

[0116] The technical features of the above-mentioned embodiments can be combined arbitrarily, in order to make the description simple, not all possible combinations of the technical features in the above-mentioned embodiments are described, however, as long as the combination of the technical features does not exist contradictory, should be considered as the scope of the present application.

[0117] The above-mentioned embodiments only express several implementation manners of the present application, the description is more specific and detailed, but it should not be understood as the limitation of the patent scope of the present application. It should be pointed out that for ordinary skilled in the art, without departing from the concept of the present application, several modifications and improvements can be made, which all belong to the protection scope of the present application. Therefore, the patent protection scope of the present application should be subject to the appended claims.

Claims

1. A method for point cloud extraction from a target surface, characterized in that, The method comprises: performing rasterization on a point cloud map of a target scene to obtain a raster map; the target scene comprises the target surface; performing graph search based on a specified grid in the raster map to obtain a neighboring point group corresponding to the specified grid; the neighboring point group comprises a plurality of neighboring points; the plurality of neighboring points are points whose distance from a target position of the specified grid is less than or equal to a distance threshold; in a case where a normal vector of the neighboring point group satisfies a preset condition, determining the neighboring point group as point cloud data of the target surface; the preset condition comprises that an included angle between the normal vector of the neighboring point group and a direction perpendicular to the target surface is less than a set threshold; in a case where the normal vector of the neighboring point group satisfies the preset condition, further comprising: determining, as the specified grid, a grid in the raster map that satisfies a preset positional relationship with the specified grid, triggering the step of performing graph search from the specified grid in the raster map to obtain a neighboring point group corresponding to the specified grid; stopping until all specified grids are traversed.

2. The method of claim 1, wherein, The method further comprises: determining, as the specified grid, a grid in the raster map that is adjacent to an edge and a vertex of the specified grid.

3. The method of claim 1, wherein, The method further comprises: obtaining a position topology map corresponding to the point cloud map, the position topology map being used to indicate a spatial positional relationship between data points in the point cloud map; for a specified grid in the raster map, determining a neighboring point group corresponding to the specified grid based on the position topology map using a radius nearest neighbor search algorithm.

4. The method of claim 3, wherein, The method further comprises: in the position topology map, determining points whose distance from a center position of the specified grid is less than or equal to the distance threshold to obtain the neighboring point group.

5. The method of claim 3, wherein, The position topology map comprises an octree map.

6. The method of claim 1, wherein, The method further comprises: calculating a three-dimensional coordinate mean of each data point in the neighboring point group in the point cloud map; calculating a covariance matrix of the neighboring point group based on the three-dimensional coordinate mean; calculating a first eigenvector, a second eigenvector and a third eigenvector of the covariance matrix, the eigenvector corresponding to the smallest eigenvalue in the first eigenvector, the second eigenvector and the third eigenvector being perpendicular to a main distribution plane of the neighboring point group; determining the eigenvector corresponding to the smallest eigenvalue as the normal vector.

7. The method of claim 1, wherein, The method further comprises: in response to the included angle between the normal vector and the direction perpendicular to the target surface being less than the set threshold, determining the neighboring point group as the point cloud data of the target surface.

8. An electronic device, comprising: The device comprises a processor and a memory; the memory stores a program, which is loaded and executed by the processor to implement the point cloud extraction method of the target surface according to any one of claims 1 to 7.

9. A computer-readable storage medium, characterized in that, The storage medium stores a program, which is executed by the processor to implement the point cloud extraction method of the target surface according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Method for processing three-dimensional point cloud data and computing equipment

    CN110782531A