CN111932688B - Indoor plane element extraction method, system and equipment based on three-dimensional point cloud - Google Patents
Indoor plane element extraction method, system and equipment based on three-dimensional point cloud Download PDFInfo
- Publication number
- CN111932688B CN111932688B CN202010949662.9A CN202010949662A CN111932688B CN 111932688 B CN111932688 B CN 111932688B CN 202010949662 A CN202010949662 A CN 202010949662A CN 111932688 B CN111932688 B CN 111932688B
- Authority
- CN
- China
- Prior art keywords
- point cloud
- plane
- data
- dimensional
- planes
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T19/00—Manipulating 3D models or images for computer graphics
- G06T19/20—Editing of 3D images, e.g. changing shapes or colours, aligning objects or positioning parts
Abstract
The invention provides a method, a system and equipment for extracting indoor plane elements based on three-dimensional point cloud, which are used for extracting the three-dimensional point cloud data of a target indoor area; determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data; and obtaining the parameter information of each point cloud plane according to the point cloud plane data, and segmenting plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane. Aiming at the problem that the densities of all areas of indoor complex point cloud data are inconsistent, the method of the embodiment firstly calculates the average density of the point cloud, then performs two times of segmentation on the point cloud, and then realizes accurate segmentation and extraction of the indoor plane elements by using bounding box information and parametric information of the indoor plane elements, thereby effectively enhancing the robustness of extraction of the multi-type three-dimensional point cloud plane elements and improving the accuracy of extraction of the plane elements, and providing an important data basis for later indoor three-dimensional semantic reconstruction.
Description
Technical Field
The invention relates to the technical field of indoor three-dimensional semantic reconstruction, in particular to a method, a system and equipment for extracting indoor plane elements based on three-dimensional point cloud.
Background
The indoor three-dimensional semantic model is an important data base for robots and various indoor applications, and with the continuous development of an indoor three-dimensional point cloud data acquisition technology, the related research of indoor space information extraction based on three-dimensional point clouds is increasing day by day, wherein the extraction and the optimized modeling of indoor space plane elements are the structural bases for establishing the indoor semantic model and comprise floor, ceiling, wall surface elements, door elements, window elements and the like.
In the prior art, indoor plane elements are extracted in a complex indoor scene, data of three-dimensional data obtained by scanning of a portable distance sensor is easy to lose due to the shielding problem, or the data precision of the three-dimensional data is low, so that accurate plane elements cannot be extracted, and the requirement for building an indoor semantic model cannot be met.
Therefore, the prior art is subject to further improvement.
Disclosure of Invention
In view of the defects in the prior art, the invention aims to provide a method, a system and equipment for extracting indoor plane elements based on three-dimensional point cloud, which overcome the defect that the accuracy of extracted plane elements is low due to data loss or low data precision caused by occlusion of acquired three-dimensional data in the prior art.
The embodiment of the invention discloses the following scheme:
in a first aspect, the present embodiment provides a method for extracting an indoor plane element based on a three-dimensional point cloud, where the method includes:
acquiring three-dimensional point cloud data of a target indoor area;
determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data;
and obtaining parameter information of each point cloud plane according to the point cloud plane data, and segmenting plane elements by using the parameter information of each point cloud plane and bounding box information of each point cloud plane.
Optionally, after the step of segmenting the plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane, the method further includes:
and recovering the association relation between the divided plane elements by using the distance, the coordinate relation and the plane parameter information among the point cloud planes.
Optionally, the step of obtaining three-dimensional point cloud data of the target indoor area includes:
acquiring original three-dimensional point cloud data of a target indoor area;
and eliminating the noise point cloud in the original three-dimensional point cloud data, and performing down-sampling processing on the original three-dimensional point cloud data after the noise point cloud is eliminated to obtain preprocessed three-dimensional point cloud data.
Optionally, the step of determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud by using the distance threshold to obtain point cloud plane data includes:
calculating the point cloud density of the three-dimensional point cloud data, and determining a distance threshold according to the point cloud density;
according to the distance threshold value, a region growing algorithm is used for segmenting the three-dimensional point cloud to obtain a plurality of segmented point cloud clusters;
and (3) segmenting each point cloud cluster by utilizing a plane model segmentation algorithm to obtain a plurality of point cloud plane data containing single plane elements.
Optionally, the step of obtaining parameter information of each point cloud plane according to the point cloud plane data, and segmenting plane elements by using the parameter information of each point cloud plane and bounding box information of each point cloud plane includes:
acquiring a normal vector of each point cloud plane, and preliminarily segmenting a preliminary element plane corresponding to different types of plane elements;
and calculating bounding box information of each element point cloud, and segmenting the preliminary element plane again according to the bounding box information to obtain each segmented element plane.
Optionally, the step of recovering the association relationship between the divided plane elements by using the distance between the point cloud planes, the coordinate relationship and the plane parameter information includes:
judging whether a shared element plane or an associated element plane exists according to the distance between the point cloud planes, the coordinate relation and the plane parameter information, if so, combining the shared element planes and establishing the associated relation between the point clouds of the shared element planes; wherein, the shared element plane is a shared wall plane; the associated element planes are associated door planes and wall planes.
Optionally, the step of determining whether there is a shared element plane according to the distance between the point cloud planes, the coordinate relationship, and the plane parameter information includes:
classifying point cloud planes with the same normal vector direction into a class by using parameter information of the point cloud planes, and projecting each point cloud on the point cloud planes to a preset plane under a three-dimensional coordinate system to obtain two-dimensional point cloud data;
performing linear fitting on the two-dimensional point cloud data projected to a preset plane by using a least square method to obtain a fitting linear line corresponding to each projection point cloud;
according to the linear equation, calculating the minimum distance between the center point of each projection point cloud and the corresponding fitting straight line of other projection point clouds, and calculating the distance average value of each minimum distance;
if the end point coordinates or the center point coordinates of the point cloud plane where the first point cloud is located are in the end point coordinate range of the point cloud plane where the second point cloud is located, and the first point cloud and the second point cloud both belong to the point clouds of the shared element plane, the point cloud planes where the first point cloud and the second point cloud are located belong to the shared element plane;
and if the distance between the two point clouds in the same direction is smaller than the average distance value, the two point clouds belong to the point clouds sharing the element plane, otherwise, the two point clouds do not belong to the sharing element plane.
Optionally, the step of determining whether there is an associated element plane according to the distance between the point cloud planes, the coordinate relationship, and the plane parameter information includes:
respectively projecting a door plane and a wall plane onto a preset plane, and acquiring projected point cloud data;
performing linear fitting on the two-dimensional point cloud data projected to the preset plane by using a least square method to obtain a fitting linear line;
respectively calculating the minimum distance from the point cloud of each door plane to the corresponding fitting straight line of each wall plane, and calculating the average value of the minimum distances;
and judging whether the distance between the point cloud center point coordinate of the door plane and the corresponding fitting straight line of each wall plane is smaller than the average value of the minimum distance, judging whether the point cloud center point coordinate of the door plane is in the end point coordinate range of the point cloud of the wall plane, and if so, judging that the door plane and the wall plane belong to the associated element plane.
In a second aspect, the present embodiment provides a terminal device, including a processor, and a storage medium communicatively connected to the processor, the storage medium being adapted to store a plurality of instructions; the processor is suitable for calling instructions in the storage medium to execute the steps of implementing the three-dimensional point cloud-based indoor plane element extraction method.
In a third aspect, the present embodiment provides a computer-readable storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the steps of the method for extracting an indoor plane element based on a three-dimensional point cloud.
The invention has the beneficial effects that the invention provides a method, a system and equipment for extracting indoor plane elements based on three-dimensional point cloud, which are used for extracting the three-dimensional point cloud data of a target indoor area; determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data; and obtaining parameter information of each point cloud plane according to the point cloud plane data, and segmenting plane elements by using the parameter information of each point cloud plane and bounding box information of each point cloud plane. The method provided by the embodiment is used for solving the problem that the densities of all regions of indoor complex point cloud data are inconsistent, the point cloud average density is calculated, the point cloud is divided twice, the point cloud data is divided twice, the bounding box information and the parameterization information of an indoor semantic component are used for accurately dividing and extracting the indoor plane elements, the robustness of extraction of the multi-type three-dimensional point cloud plane elements is effectively enhanced, the extraction accuracy of the point cloud plane elements is improved, and an important data basis is provided for later indoor three-dimensional semantic reconstruction.
Drawings
Fig. 1 is a flowchart illustrating steps of a method for extracting an indoor plane element according to the present embodiment;
fig. 2a to fig. 2d are schematic diagrams illustrating four steps of an embodiment of the method according to the present embodiment;
fig. 3a and 3b are schematic diagrams of plane parameter information and plane projection in the plane semantic segmentation principle in the present embodiment;
fig. 4a to 4c are schematic diagrams illustrating a method for identifying and merging optimization of a shared wall in the present embodiment;
fig. 5 is a schematic diagram of a method for recovering a door-wall association relationship by door-wall relationship determination according to the present embodiment;
fig. 6 is a schematic block diagram of an indoor plane element extraction system according to the present embodiment;
fig. 7 is a schematic structural diagram of the terminal device according to this embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer and clearer, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As used herein, the singular forms "a", "an", "the" and "the" include plural referents unless the context clearly dictates otherwise. It will be further understood that the terms "comprises" and/or "comprising," when used in this specification, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof. It will be understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements may also be present. Further, "connected" or "coupled" as used herein may include wirelessly connected or wirelessly coupled. As used herein, the term "and/or" includes all or any element and all combinations of one or more of the associated listed items.
It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It will be further understood that terms, such as those defined in commonly used dictionaries, should be interpreted as having a meaning that is consistent with their meaning in the context of the prior art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
When the indoor three-dimensional point cloud data is acquired, due to the difference of acquisition equipment, the acquired data integrity and data precision have certain difference, for example, if the portable distance sensor is adopted to acquire the indoor three-dimensional point cloud data, the indoor scene is complex, the sensor is greatly interfered, the data integrity acquired by scanning is poor, the data precision is low, and if the laser is adopted to acquire the indoor three-dimensional point cloud data, the indoor three-dimensional point cloud data with better data integrity and data precision compared with the point cloud data acquired by the portable distance sensor can be acquired.
Aiming at point cloud data acquired by a portable distance sensor, due to poor data integrity and low data precision, accurate plane elements are difficult to extract, the embodiment provides an indoor plane element extraction method based on three-dimensional point cloud, algorithm optimization is performed aiming at poor data integrity and low data precision of the point cloud data, and meanwhile, accurate recovery is performed aiming at the plane element relation in an indoor complex space, so that the robustness of plane element extraction is enhanced, and the precision of point cloud plane element extraction is improved.
Specifically, in the method of this embodiment, three-dimensional point cloud data of a target indoor area is collected first, and a distance threshold for point cloud segmentation is determined according to the three-dimensional point cloud data; secondly, segmenting the three-dimensional point cloud data according to the determined distance threshold value to obtain point cloud plane data; and thirdly, obtaining parameter information of each point cloud plane according to the point cloud plane data, and finally, segmenting the plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane. In the method, the plane elements are segmented from the point cloud data for multiple times by using the average density of the point cloud data and the bounding box information of the point cloud, so that the accuracy of the obtained plane elements is high, and the problem that the accurate plane elements cannot be extracted from the indoor point cloud data acquired by the portable distance sensor is solved.
The method disclosed by the invention is explained in more detail below with reference to the drawings.
Exemplary method
The embodiment provides an indoor plane element extraction method based on three-dimensional point cloud, as shown in fig. 1, including:
and step S1, acquiring three-dimensional point cloud data of the target indoor area.
In the step, three-dimensional point cloud data of a target indoor area is firstly acquired, and in specific implementation, the three-dimensional point cloud data can be acquired by using a distance sensor, can also be acquired by scanning the target indoor area by using a three-dimensional laser scanner, and can also be acquired from other terminal equipment, and the three-dimensional point cloud data of the target indoor area is stored in a memory of the other terminal equipment.
Further, the step of acquiring the three-dimensional point cloud data of the target indoor area includes:
and step S11, acquiring original three-dimensional point cloud data of the target indoor area.
The method comprises the steps of utilizing a distance sensor to collect three-dimensional point cloud data of a target indoor area, or utilizing a three-dimensional laser scanner to scan the target indoor area, scanning each area of the target indoor area in the step in order to collect the three-dimensional point cloud data with more complete data, and in one implementation mode, taking a middle point of the target indoor area as a rotation original point, rotating the distance sensor or the three-dimensional laser scanner in an all-around mode, and obtaining the three-dimensional point cloud data of each area of the target indoor area.
And step S12, eliminating noise point clouds in the original three-dimensional point cloud data, and performing down-sampling processing on the original three-dimensional point cloud data with the noise point clouds eliminated to obtain preprocessed three-dimensional point cloud data.
The obtained three-dimensional point cloud data generally has the problems of inconsistent density of each area, overlarge point cloud data amount, noise and the like, and data preprocessing needs to be carried out on the three-dimensional point cloud data by adopting a data down-sampling and point cloud filtering algorithm. In one embodiment, as shown in fig. 2a, the preprocessing of the three-dimensional point cloud data comprises: and removing noise point clouds in the original point clouds and performing down-sampling processing on the three-dimensional point cloud data. And eliminating noise point clouds in the original point clouds by adopting a filtering algorithm for removing discrete points, and performing down-sampling processing on the three-dimensional point cloud data by adopting a voxelization grid method.
Further, as shown in fig. 2a, a filtering algorithm for removing discrete points is used to remove noise point clouds contained in the original three-dimensional point cloud data, and the method utilizes a distance median value between the point cloud and the nearest neighboring point cloudAnd standard deviation ofTo eliminate noise point clouds. Under the premise of taking the number k of adjacent points as a scale standard, for each point in the original three-dimensional point cloud, the average distance d of all the adjacent points can be calculated, and assuming that the distance is Gaussian distribution, the average distance d is inThe outliers are rejected. Determined by experimentIs 1 and k is set to 50, this method rejects about 1% of the noise points.
The point cloud is downsampled by adopting a voxelized grid method, the basic principle is that the point cloud is divided into space grids, independent small cubes are divided, the centers of points falling in the area of each small cube represent all points in the grids, and therefore the side length of each voxel grid is controlled to reduce the density of the point cloud and improve the efficiency of point cloud processingThe down-sampling effect can be controlled.
And step S2, determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data.
Because the densities of all areas of the three-dimensional point cloud data are inconsistent, the average distance between a point in the point cloud and the nearest point is confirmed by calculating the average density of the three-dimensional point cloud, the average distance is used as a distance threshold value during point cloud segmentation, and the three-dimensional point cloud data is segmented for the first time by using the distance threshold value to obtain point cloud plane data segmented for the first time.
Specifically, as shown in fig. 2b, the step of determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud by using the distance threshold to obtain point cloud plane data includes:
and step S21, calculating the point cloud density of the three-dimensional point cloud data, and determining a distance threshold according to the point cloud density.
Because the distribution of the indoor three-dimensional point cloud is complex and the precision is inconsistent, the distance threshold value during plane segmentation is determined by calculating the density of the point cloud in the stepThe specific method comprises the following steps: firstly, point cloud density calculation is realized by using a kdtree algorithm, the principle is that k adjacent points are searched by kdtree, the square of the distance from a point to the k adjacent points is calculated, all points in the point cloud are traversed, and the total point cloud average distance is calculated, namely the point cloud density. In the experimental process, two vectors are firstly created to store the searched k neighbors, one of the two vectors stores the index of the neighbor point, and the other stores the square distance of the corresponding neighbor, wherein the k value is set to be 2.
And step S22, segmenting the three-dimensional point cloud by using a region growing algorithm according to the distance threshold value to obtain a plurality of segmented point cloud clusters.
And according to the distance threshold value obtained in the step, utilizing a region growing algorithm to segment the three-dimensional point cloud to obtain segmented point cloud clusters.
Specifically, the three-point cloud data is segmented for the first time under the condition that the indoor three-dimensional point cloud distribution is complex. The first segmentation uses a region growing algorithm, the working principle of which is based on the comparison of angles between point normals, ordering the curvature values, merging points that are close enough in terms of smoothness constraints, outputting the result as a cluster, each cluster being considered as a set of points of a portion of the same smooth surface. The specific implementation process is that firstly, a point with the minimum curvature value is created as an original seed set, then the adjacent point of each seed point is tested, and the angle between the normal lines of the seed point and the adjacent point is calculatedWhen is coming into contact withLess than an angle thresholdThen, the adjacent point is added to the current area, and the curvature value of the adjacent point is calculatedWhen is coming into contact withLess than the curvature thresholdThen the adjacent point is added into the seed, and finally the original seed is deleted from the seed, and the growth is continued by using the new seed. If the seed set is empty, the region is said to have been expanded to a maximum, and the process is repeated from scratch. The most important parameter is the curvature thresholdAnd angle thresholdThe two parameters determine the smoothness of the segmentation plane and are determined according to experimentsThe number of the carbon atoms is 1,is composed of。
And step S23, segmenting each point cloud cluster by using a plane model segmentation algorithm to obtain a plurality of point cloud plane data containing single plane elements.
Although the segmented planes obtained by using the region growing algorithm are smooth enough, the problem that planes are not segmented due to too close distances among planes in the segmented point cloud cluster still exists, the clusters obtained by the region growing algorithm are regarded as a whole plane, the planes with close distances are actually the clusters, and the clusters comprise two or more plane elements, so that the plane elements cannot be completely segmented only by using the region growing algorithm.
Therefore, on the basis of obtaining clustering by a region growing algorithm, in order to improve the accuracy of point cloud plane segmentation, secondary segmentation is required, the secondary segmentation utilizes a plane model segmentation algorithm, and the method calculates the minimum distance between the point cloud and the point cloud based on random sampling consistency RANSACWhen is coming into contact withOut of range thresholdWithin the range, the point clouds are considered to be discrete, the principle is utilized to divide the point cloud planes with similar distances in each point cloud cluster into single plane elements, the planes obtained by division can be parameterized by adopting a plane model division algorithm, and the plane parameters represent the shapesIs of the formulaWherein a, b and c represent normal vector information of the plane, and d represents the distance from the plane to the coordinate origin.
And step S3, obtaining parameter information of each point cloud plane according to the point cloud plane data, and dividing plane elements by using the parameter information of each point cloud plane and bounding box information of each point cloud plane.
And acquiring parameter information corresponding to each point cloud plane, wherein the parameter information comprises a normal vector of the plane, and the point cloud plane comprises point cloud planes of various plane elements, such as a door surface normal vector, a wall surface normal vector and a ground surface normal vector, as shown in fig. 2c and fig. 3 a.
The steps of obtaining the parameter information of each point cloud plane according to the point cloud plane data, and segmenting plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane comprise:
and step S31, acquiring normal vectors of the point cloud planes, and preliminarily segmenting to obtain preliminary element planes corresponding to different types of plane elements.
And (3) extracting target plane elements, wherein the plane parameter information of the plane point clouds of all indoor parts is not consistent with the bounding box information, so that the two characteristics can be utilized to accurately extract the wall surface, the ground surface, the ceiling, the door plane and the like, and the reference is made to fig. 3 b. The specific implementation procedure is to use the plane parameter information obtained by plane division, namelyThe wall surface, the ground surface and the ceiling plane are distinguished, referring to fig. 3a and fig. 3b, because the parametric plane parameter information of the wall surface, the ground surface and the door plane has obvious difference, the parameterized plane parameter information is embodied that the normal vectors of point cloud planes (a, b and c) which are parallel on the space are similar and have similar numerical values, and when the point cloud planes are mutually vertical or have included angles, the difference of the plane parameters (a, b and c) is larger, so that part of the wall surface, the ground surface and the door plane can be divided by utilizing the characteristic.
And step S32, calculating bounding box information of each element point cloud, and segmenting the preliminary element plane again according to the bounding box information to obtain each segmented element plane.
Because the divided point cloud plane has the phenomenon that part of the door plane is parallel to the wall and has some noise planes, the planes with special relation cannot be accurately divided only by using normal vector information, and therefore, the accurate division and separation of the point cloud plane are further realized by using the bounding box on the basis of the extraction of the plane parameter normal vector.
Specifically, the principle of using bounding boxes to realize the segmentation of the point cloud plane is as follows: the wall point cloud, the door plane point cloud and other noise point cloud planes can calculate the bounding box information.
As shown in fig. 3b, the point cloud plane includes a door bounding box 110 and a wall bounding box 120.
If the wall enclosure is denoted as,(ii) a The door plane bounding box is shown as,Since the wall plane and the door plane are significantly different in height in actual indoor space distribution, the size between the wall bounding box and the door plane bounding box is expressed in the form of,,So that the wall surface can be accurately divided by using the bounding boxA gate plane and a noise plane.
According to the method disclosed by the embodiment, aiming at different density of each area of indoor complex point cloud data, the point cloud density is used for carrying out two times of segmentation, and the bounding box information and the parameterization information of an indoor semantic component are used for carrying out segmentation extraction on an indoor semantic point cloud plane, so that accurate extraction of indoor plane elements is realized.
On the basis of the method, in order to achieve a better effect of extracting the indoor plane elements and solve the problem of data redundancy caused by indoor shared wall point cloud data, after the step of extracting the plane elements, the method further comprises the processes of combining the shared planes and recovering the incidence relation between the planes, so that the better effect of extracting the plane elements is achieved.
Specifically, after the step of segmenting the plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane, the method further includes:
and step S4, restoring the association relation between the divided plane elements by using the distance, coordinate relation and plane parameter information between the point cloud planes.
In the step, the distance between the point cloud contained in each point cloud plane and other point cloud planes, the normal vector direction of each point cloud plane and other information are calculated, the shared point cloud planes are combined, the association relation between the divided point cloud planes is recovered, and the accuracy of the extracted plane elements is improved.
Specifically, whether a shared element plane or an associated element plane exists is judged according to the distance between the point cloud planes, the coordinate relation and the plane parameter information, and if yes, the shared element plane is merged and the associated relation between the point clouds of the shared element plane is established; wherein, the shared element plane is a shared wall plane; the associated element planes are associated door planes and wall planes.
Further, the step of judging whether a shared element plane exists according to the distance between the point cloud planes, the coordinate relationship and the plane parameter information includes:
classifying point cloud planes with the same normal vector direction into a class by using parameter information of the point cloud planes, and projecting each point cloud on the point cloud planes to a preset plane under a three-dimensional coordinate system to obtain two-dimensional point cloud data;
performing linear fitting on the two-dimensional point cloud data projected to a preset plane by using a least square method to obtain a fitting linear line corresponding to each projection point cloud;
according to the linear equation, calculating the minimum distance between the center point of each projection point cloud and the corresponding fitting straight line of other projection point clouds, and calculating the distance average value of each minimum distance;
if the end point coordinates or the center point coordinates of the point cloud plane where the first point cloud is located are in the end point coordinate range of the point cloud plane where the second point cloud is located, and the first point cloud and the second point cloud both belong to the point clouds of the shared element plane, the point cloud planes where the first point cloud and the second point cloud are located belong to the shared element plane;
and if the distance between the two point clouds in the same direction is smaller than the average distance value, the two point clouds belong to the point clouds sharing the element plane, otherwise, the two point clouds do not belong to the sharing element plane.
The specific implementation method of the step of judging whether the shared element plane exists is as follows:
the wall surface point cloud is classified, point cloud planes in the same direction are classified into one type by utilizing plane parameter information, and under a three-dimensional coordinate system, the point cloud planes in the same direction as the X-axis direction are defined as an X-direction wall surface, and the point cloud planes in the same direction as the Y-axis direction are defined as a Y-direction wall surface.
Secondly, projecting the wall surface point clouds on an XY plane with Z =0 to obtain two-dimensional point cloud data in a three-dimensional space, then performing linear fitting by using a least square algorithm to obtain a linear equation after fitting, namely a great face}。
Thirdly, judging a point cloud plane to be merged, wherein the point cloud to be merged needs to meet three conditions, and the first condition is that the direction of the wall surface is consistent; secondly, the distance between the wall surfaces is close enough; thirdly, at least one of the two end point coordinates and the center point coordinate of one wall is in the end point coordinate range of the other wall. The first condition is already realized when the wall surface direction is classified, and the important point is how to meet the other two conditions.
With reference to fig. 2c and fig. 4a to 4c, the method of the present invention is to assume that the cloud planes of the points in the same direction are respectivelyAndthe point clouds after projection are respectivelyAndthe fitted linear equations are respectivelyAndget itCoordinate of center point ofAnd calculating the distance between the central coordinate and each point cloud fitting straight line in the same direction, wherein the formula is as follows:
obtaining a minimum distanceRepeating the steps to obtain the point clouds on each point cloud plane to the other point cloud planesSet of minimum distancesCalculating the minimum distance meanThen, thenTo judge the distance threshold of the point clouds to be merged, when the distance is less thanThen, the point cloud is the shared wall surface point cloud to be merged; satisfying a distance thresholdThen, judge againWhether the end point coordinates or the center point coordinates of (1) are inThe endpoint coordinate is within the range, and if the endpoint coordinate is within the range, the endpoint coordinate is considered to be within the rangeAndcorresponding toAndthe wall surface is a shared wall surface and needs to be merged and optimized. Suppose a shared wallAndthe parameterized planes are respectivelyAndcalculating the center fitting plane thereofIts plane parameterisation isPlane surfaceAre equal toAndaverage of the respective parameters:
handleThe fitting plane is used as a projection plane to share the wall surfaceAndare respectively projected toAnd the projection plane wP obtained at this time is the wall point cloud data after the shared wall is merged.
Further, as shown in fig. 5, the step of determining whether there is a related element plane according to the distance between the point cloud planes, the coordinate relationship, and the plane parameter information includes:
respectively projecting a door plane and a wall plane onto a preset plane, and acquiring projected point cloud data;
performing linear fitting on the two-dimensional point cloud data projected to the preset plane by using a least square method to obtain a fitting linear line;
respectively calculating the minimum distance from the point cloud of each door plane to the corresponding fitting straight line of each wall plane, and calculating the average value of the minimum distances;
and judging whether the distance between the point cloud center point coordinate of the door plane and the corresponding fitting straight line of each wall plane is smaller than the average value of the minimum distance, judging whether the point cloud center point coordinate of the door plane is in the end point coordinate range of the point cloud of the wall plane, and if so, judging that the door plane and the wall plane belong to the associated element plane.
The invention recovers the association relationship between the door and the wall surface by judging the wall surface to which the door surface belongs, the specific method is similar to the judgment of the shared wall surface, and two conditions are satisfied, wherein the first condition is that the distance from the center coordinate of the door plane to the wall surface is small enough, and the second condition is that the center coordinate of the door plane is in the front end point coordinate range, and the reference is made to figure 5. The specific process is that firstly, a door plane and a wall surface are projected on an XY plane with Z =0, and point cloud data after projection are obtained respectivelyAndcalculating a linear equation by using linear fitting and calculating coordinates of the center point of the door planeAnd coordinates of two end points of the wall surfaceAndwhen the distance threshold d from the center coordinates of the plane of the door to the wall surface is small enough, d =1m in the practical experiment,
at this time, the door plane may belong to the current wall surface; and then, judging which wall surface the door belongs to specifically by utilizing the central coordinates of the door and the coordinates of the two ends of the wall surface, wherein the specific judgment method is different according to the direction of the wall, and when the wall surface is an X-direction wall, judgingAndandin a relation ofOrIf so, the door and the wall are considered to have an association relationship; similarly, when the wall surface is a Y-direction wall, the judgment is madeAndandin a relation ofOrAnd then, the door and the wall are considered to have an association relationship. By using the method, the incidence relation between the door plane and the wall surface can be recovered。
Aiming at the problem of inconsistent density of each area of indoor complex point cloud data, the embodiment realizes parameter self-adaptive segmentation of the point cloud data by calculating the average density of the point cloud and carrying out two times of segmentation on the point cloud; accurately segmenting and extracting an indoor semantic point cloud plane by utilizing bounding box information and parametric information of the indoor semantic component; and realizing point cloud plane merging optimization and plane association relationship recovery by using the distance, angle, plane parameter information, plane projection information and a straight line fitting method among planes.
Exemplary device
The embodiment also discloses an indoor plane element extraction system based on three-dimensional point cloud, as shown in fig. 6, including:
a data acquisition module 100, configured to acquire three-dimensional point cloud data of a target indoor area; the function of which is as described in step S1.
The point cloud segmentation module 200 is configured to determine a distance threshold according to the three-dimensional point cloud data, and segment the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data, where the function of the point cloud plane data is as described in step S2.
The element extracting module 300 is configured to obtain parameter information of each point cloud plane according to the point cloud plane data, and segment a plane element by using the parameter information of each point cloud plane and bounding box information of each point cloud plane, where the function is as described in step S3.
On the basis of the method, the embodiment also discloses a terminal device, which comprises a processor and a storage medium in communication connection with the processor, wherein the storage medium is suitable for storing a plurality of instructions; the processor is adapted to invoke instructions in the storage medium to perform the steps of implementing the method. In one embodiment, the terminal device may be a mobile phone, a tablet computer or a smart television.
Specifically, as shown in fig. 7, the terminal device includes at least one processor (processor) 20 and a memory (memory) 22, and may further include a display 21, a communication Interface (Communications Interface) 23 and a bus 24. The processor 20, the display 21, the memory 22 and the communication interface 23 can communicate with each other through the bus 24. The display screen 21 is configured to display a user guidance interface preset in the initial setting mode. The communication interface 23 may transmit information. The processor 20 may call logic instructions in the memory 22 to perform the steps of the method in the above-described embodiment.
Furthermore, the logic instructions in the memory 22 may be implemented in software functional units and stored in a computer readable storage medium when sold or used as a stand-alone product.
The memory 22, which is a computer-readable storage medium, may be configured to store a software program, a computer-executable program, such as program instructions or modules corresponding to the methods in the embodiments of the present disclosure. The processor 30 executes the functional application and data processing by running the software program, instructions or modules stored in the memory 22, that is, implements the cellular automata-based urban mass space simulation method in the above-described embodiment.
The memory 22 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function; the storage data area may store data created according to the use of the terminal device, and the like. Further, the memory 22 may include a high speed random access memory and may also include a non-volatile memory. For example, a variety of media that can store program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk, may also be transient storage media.
In another aspect, the present embodiments provide a computer readable storage medium having one or more programs stored thereon which are executable by one or more processors to perform the steps of the method.
The invention provides a method, a system and equipment for extracting indoor plane elements based on three-dimensional point cloud, which are used for extracting the three-dimensional point cloud data of a target indoor area; determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data; and obtaining parameter information of each point cloud plane according to the point cloud plane data, and segmenting plane elements by using the parameter information of each point cloud plane and bounding box information of each point cloud plane. The method provided by the embodiment is used for solving the problem that the densities of all regions of indoor complex point cloud data are inconsistent, the point cloud average density is calculated, the point cloud is divided twice, the point cloud data is divided twice, the bounding box information and the parameterization information of an indoor semantic component are used for accurately dividing and extracting the indoor plane elements, the robustness of extraction of the multi-type three-dimensional point cloud plane elements is effectively enhanced, the extraction accuracy of the point cloud plane elements is improved, and an important data basis is provided for later indoor three-dimensional semantic reconstruction.
It should be understood that equivalents and modifications of the present invention and its inventive concept may occur to those skilled in the art, and all such modifications and alterations are intended to fall within the scope of the appended claims.
Claims (9)
1. An indoor plane element extraction method based on three-dimensional point cloud is characterized by comprising the following steps:
acquiring three-dimensional point cloud data of a target indoor area;
determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud data by using the distance threshold to obtain point cloud plane data;
obtaining parameter information of each point cloud plane according to the point cloud plane data, and dividing plane elements by using the parameter information of each point cloud plane and bounding box information of each point cloud plane;
the step of determining a distance threshold according to the three-dimensional point cloud data, and segmenting the three-dimensional point cloud by using the distance threshold to obtain point cloud plane data comprises the following steps:
calculating the point cloud density of the three-dimensional point cloud data, and determining a distance threshold according to the point cloud density;
dividing the three-dimensional point cloud by using a region growing algorithm to obtain a plurality of divided point cloud clusters; wherein the region growing algorithm determines a smoothness of a segmentation plane using a curvature threshold and an angle threshold;
and partitioning each point cloud cluster according to the distance threshold value by using a plane model partitioning algorithm to obtain a plurality of point cloud plane data containing single plane elements.
2. The method as claimed in claim 1, further comprising, after the step of dividing the plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane, the step of:
and recovering the association relation between the divided plane elements by using the distance, the coordinate relation and the plane parameter information among the point cloud planes.
3. The method for extracting indoor plane elements based on three-dimensional point cloud according to claim 1, wherein the step of obtaining the three-dimensional point cloud data of the target indoor area comprises:
acquiring original three-dimensional point cloud data of a target indoor area;
and eliminating the noise point cloud in the original three-dimensional point cloud data, and performing down-sampling processing on the original three-dimensional point cloud data after the noise point cloud is eliminated to obtain preprocessed three-dimensional point cloud data.
4. The method as claimed in claim 3, wherein the step of obtaining parameter information of each point cloud plane from the point cloud plane data, and dividing the plane elements by using the parameter information of each point cloud plane and the bounding box information of each point cloud plane comprises:
acquiring normal vectors of the point cloud planes, and preliminarily segmenting preliminary element planes corresponding to the point cloud planes of different types;
and calculating bounding box information of each point cloud plane, and segmenting the preliminary element plane again according to the bounding box information to obtain each segmented plane element.
5. The method as claimed in claim 2, wherein the step of recovering the relationship between the plane elements by using the distance between the point cloud planes, the coordinate relationship, and the plane parameter information comprises:
judging whether a shared element plane and an associated element plane exist simultaneously according to the distance between the point cloud planes, the coordinate relation and the plane parameter information, and if so, combining the shared element plane and establishing the associated relation between the point clouds of the shared element plane; wherein, the shared element plane is a shared wall plane; the associated element planes are associated door planes and wall planes.
6. The method as claimed in claim 5, wherein the step of determining whether there is a shared element plane according to the distance between the point cloud planes, the coordinate relationship, and the plane parameter information comprises:
classifying point cloud planes with the same normal vector direction into a class by using parameter information of the point cloud planes, and projecting each point cloud on the point cloud planes to a preset plane under a three-dimensional coordinate system to obtain two-dimensional point cloud data;
performing linear fitting on the two-dimensional point cloud data projected to a preset plane by using a least square method to obtain a fitting linear line corresponding to each projection point cloud;
according to the fitting straight line, calculating the minimum distance between the center point of each projection point cloud and the corresponding fitting straight line of other projection point clouds, and calculating the average distance value of each minimum distance;
if the end point coordinates or the center point coordinates of the point cloud plane where the first point cloud is located are in the end point coordinate range of the point cloud plane where the second point cloud is located, and the first point cloud and the second point cloud both belong to the point clouds of the shared element plane, the point cloud planes where the first point cloud and the second point cloud are located belong to the shared element plane;
and if the distance between the two point clouds in the same direction is smaller than the average distance value, the two point clouds belong to the point clouds sharing the element plane, otherwise, the two point clouds do not belong to the sharing element plane.
7. The method as claimed in claim 5, wherein the step of determining whether there is an associated element plane according to the distance between the point cloud planes, the coordinate relationship, and the plane parameter information comprises:
respectively projecting a door plane and a wall plane onto a preset plane, and acquiring projected point cloud data;
performing linear fitting on the two-dimensional point cloud data projected to the preset plane by using a least square method to obtain a fitting linear line;
respectively calculating the minimum distance from the point cloud of each door plane to the corresponding fitting straight line of each wall plane, and calculating the average value of the minimum distances;
and judging whether the distance between the point cloud center point coordinate of the door plane and the corresponding fitting straight line of each wall plane is smaller than the average value of the minimum distance, judging whether the point cloud center point coordinate of the door plane is in the end point coordinate range of the point cloud of the wall plane, and if so, judging that the door plane and the wall plane belong to the associated element plane.
8. A terminal device comprising a processor, a storage medium communicatively coupled to the processor, the storage medium adapted to store a plurality of instructions; the processor is adapted to call instructions in the storage medium to execute the steps of implementing the method for extracting indoor plane elements based on three-dimensional point cloud according to any one of the above claims 1-7.
9. A computer-readable storage medium, wherein the computer-readable storage medium stores one or more programs which are executable by one or more processors to implement the steps of the method for extracting indoor plane elements based on three-dimensional point cloud according to any one of claims 1 to 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010949662.9A CN111932688B (en) | 2020-09-10 | 2020-09-10 | Indoor plane element extraction method, system and equipment based on three-dimensional point cloud |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202010949662.9A CN111932688B (en) | 2020-09-10 | 2020-09-10 | Indoor plane element extraction method, system and equipment based on three-dimensional point cloud |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111932688A CN111932688A (en) | 2020-11-13 |
CN111932688B true CN111932688B (en) | 2021-02-09 |
Family
ID=73309640
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202010949662.9A Active CN111932688B (en) | 2020-09-10 | 2020-09-10 | Indoor plane element extraction method, system and equipment based on three-dimensional point cloud |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111932688B (en) |
Families Citing this family (25)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112630793A (en) * | 2020-11-30 | 2021-04-09 | 深圳集智数字科技有限公司 | Method and related device for determining plane abnormal point |
CN112700465B (en) * | 2021-01-08 | 2024-02-09 | 上海建工四建集团有限公司 | Actually measured real quantity-oriented room main body point cloud extraction and part segmentation method and equipment |
CN112767551B (en) * | 2021-01-18 | 2022-08-09 | 贝壳找房(北京)科技有限公司 | Three-dimensional model construction method and device, electronic equipment and storage medium |
CN112396133B (en) * | 2021-01-20 | 2021-05-25 | 深圳大学 | Multi-scale space-based urban area air-ground integrated fusion point cloud classification method |
CN112489207B (en) * | 2021-02-07 | 2021-07-13 | 深圳大学 | Space-constrained dense matching point cloud plane element extraction method |
CN113139982B (en) * | 2021-04-21 | 2023-03-14 | 香港理工大学深圳研究院 | Automatic segmentation method for indoor room point cloud |
CN113324473B (en) * | 2021-04-30 | 2023-09-15 | 螳螂慧视科技有限公司 | House measuring method and measuring equipment |
US11741621B2 (en) | 2021-05-10 | 2023-08-29 | Qingdao Pico Technology Co., Ltd. | Method and system for detecting plane information |
CN113240678B (en) * | 2021-05-10 | 2023-05-30 | 青岛小鸟看看科技有限公司 | Plane information detection method and system |
CN113591168B (en) * | 2021-06-28 | 2024-04-12 | 山东大学 | Three-dimensional tensile body analysis and generation method and system based on inter-point distance |
CN113569856A (en) * | 2021-07-13 | 2021-10-29 | 盎锐(上海)信息科技有限公司 | Model semantic segmentation method for actual measurement actual quantity and laser radar |
CN113538562B (en) * | 2021-07-16 | 2022-05-13 | 贝壳找房(北京)科技有限公司 | Indoor area determination method and device, electronic equipment and storage medium |
CN113723468B (en) * | 2021-08-06 | 2023-08-04 | 西南科技大学 | Object detection method of three-dimensional point cloud |
CN115222799B (en) * | 2021-08-12 | 2023-04-11 | 达闼机器人股份有限公司 | Method and device for acquiring image gravity direction, electronic equipment and storage medium |
CN113469887B (en) * | 2021-09-02 | 2022-01-07 | 深圳市信润富联数字科技有限公司 | Object digital-to-analog conversion method, device, equipment and storage medium |
CN113744516B (en) * | 2021-09-10 | 2023-12-22 | 广东朝歌智慧互联科技有限公司 | Remote controller infrared learning method and device, remote controller and storage medium |
CN113970295B (en) * | 2021-09-28 | 2024-04-16 | 湖南三一中益机械有限公司 | Spreading thickness measuring method and device and spreading machine |
CN114862884B (en) * | 2022-05-13 | 2024-02-27 | 苏州大学 | Three-dimensional contour information extraction method and device, electronic equipment and storage medium |
CN115239951B (en) * | 2022-06-08 | 2023-09-15 | 广东领慧数字空间科技有限公司 | Wall surface segmentation recognition method and system based on point cloud data processing |
CN115423835B (en) * | 2022-11-02 | 2023-03-24 | 中汽创智科技有限公司 | Rod-shaped object point cloud data processing method and device, electronic equipment and storage medium |
CN115761045B (en) * | 2022-11-21 | 2023-08-18 | 北京城市网邻信息技术有限公司 | House pattern generation method, device, equipment and storage medium |
CN115546205B (en) * | 2022-11-23 | 2023-04-07 | 南京航空航天大学 | Planar point cloud contour line generation method based on density field sensing |
CN115984489B (en) * | 2023-03-21 | 2023-09-19 | 广东数字生态科技有限责任公司 | Three-dimensional reconstruction method, device and processing equipment of power transmission line |
CN116128886A (en) * | 2023-04-18 | 2023-05-16 | 深圳市其域创新科技有限公司 | Point cloud data segmentation method and device, electronic equipment and storage medium |
CN117649495A (en) * | 2024-01-30 | 2024-03-05 | 山东大学 | Indoor three-dimensional point cloud map generation method and system based on point cloud descriptor matching |
Family Cites Families (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101877128B (en) * | 2009-12-23 | 2012-09-05 | 中国科学院自动化研究所 | Method for segmenting different objects in three-dimensional scene |
CN107369161B (en) * | 2017-07-19 | 2020-09-11 | 无锡信捷电气股份有限公司 | Scattered workpiece point cloud segmentation method based on improved Euclidean clustering |
CN109102535B (en) * | 2018-07-27 | 2021-11-16 | 西安理工大学 | Indoor scene reconstruction method based on component extraction |
-
2020
- 2020-09-10 CN CN202010949662.9A patent/CN111932688B/en active Active
Also Published As
Publication number | Publication date |
---|---|
CN111932688A (en) | 2020-11-13 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111932688B (en) | Indoor plane element extraction method, system and equipment based on three-dimensional point cloud | |
WO2024077812A1 (en) | Single building three-dimensional reconstruction method based on point cloud semantic segmentation and structure fitting | |
CN107292276B (en) | Vehicle-mounted point cloud clustering method and system | |
CN107123164B (en) | Three-dimensional reconstruction method and system for keeping sharp features | |
CN109685080B (en) | Multi-scale plane extraction method based on Hough transformation and region growth | |
CN107767453B (en) | Building LIDAR point cloud reconstruction optimization method based on rule constraint | |
CN111986115A (en) | Accurate elimination method for laser point cloud noise and redundant data | |
CN111915730A (en) | Method and system for automatically generating indoor three-dimensional model from point cloud in consideration of semantics | |
CN111508074A (en) | Three-dimensional building model simplification method based on roof contour line | |
CN111598916A (en) | Preparation method of indoor occupancy grid map based on RGB-D information | |
CN112784403B (en) | Numerical simulation method for establishing discrete element model of jointed rock mass based on point cloud data | |
CN109816664B (en) | Three-dimensional point cloud segmentation method and device | |
CN111311650A (en) | Point cloud data registration method and device and storage medium | |
CN111581776B (en) | Iso-geometric analysis method based on geometric reconstruction model | |
CN112164145B (en) | Method for rapidly extracting indoor three-dimensional line segment structure based on point cloud data | |
CN109344750B (en) | Complex structure three-dimensional object identification method based on structure descriptor | |
CN113409332A (en) | Building plane segmentation method based on three-dimensional point cloud | |
Sun et al. | Automated segmentation of LiDAR point clouds for building rooftop extraction | |
CN115600307B (en) | Method for generating single building from Mesh model of urban scene | |
CN111028349A (en) | Hierarchical construction method suitable for rapid visualization of massive three-dimensional live-action data | |
Jin et al. | High precision indoor model contour extraction algorithm based on geometric information | |
CN111583098B (en) | Line segment clustering and fitting method and system based on sequence image | |
CN113129348B (en) | Monocular vision-based three-dimensional reconstruction method for vehicle target in road scene | |
CN115661398A (en) | Building extraction method, device and equipment for live-action three-dimensional model | |
CN114677505A (en) | Automatic room segmentation method based on wall constraint |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |