CN113781649A - Building plane map generation method based on three-dimensional scanning point cloud - Google Patents

Building plane map generation method based on three-dimensional scanning point cloud Download PDF

Info

Publication number
CN113781649A
CN113781649A CN202111044731.2A CN202111044731A CN113781649A CN 113781649 A CN113781649 A CN 113781649A CN 202111044731 A CN202111044731 A CN 202111044731A CN 113781649 A CN113781649 A CN 113781649A
Authority
CN
China
Prior art keywords
dimensional
point
point cloud
value
coordinate system
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.)
Pending
Application number
CN202111044731.2A
Other languages
Chinese (zh)
Inventor
谢官麟
李锐剑
吕文涛
赵希亭
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Daiwu Intelligent Technology Shanghai Co ltd
Original Assignee
Daiwu Intelligent Technology Shanghai Co ltd
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Daiwu Intelligent Technology Shanghai Co ltd filed Critical Daiwu Intelligent Technology Shanghai Co ltd
Priority to CN202111044731.2A priority Critical patent/CN113781649A/en
Publication of CN113781649A publication Critical patent/CN113781649A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects
    • G06T17/10Constructive solid geometry [CSG] using solid primitives, e.g. cylinders, cubes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/213Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods
    • G06F18/2135Feature extraction, e.g. by transforming the feature space; Summarisation; Mappings, e.g. subspace methods based on approximation criteria, e.g. principal component analysis
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/24Classification techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2200/00Indexing scheme for image data processing or generation, in general
    • G06T2200/04Indexing scheme for image data processing or generation, in general involving 3D image data

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • General Physics & Mathematics (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Evolutionary Biology (AREA)
  • Evolutionary Computation (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Artificial Intelligence (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Geometry (AREA)
  • Computer Graphics (AREA)
  • Software Systems (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The invention relates to the technical field of computer vision three-dimensional perception and three-dimensional point cloud processing, in particular to a building plane map generation method based on three-dimensional scanning point cloud, which comprises the following steps: carrying out three-dimensional scanning fusion on a building to obtain three-dimensional point cloud coordinate data of the building; performing data pre-processing on the three-dimensional point cloud coordinate data, the data pre-processing including down-sampling and calculating normal magnitude values of the point cloud using principal component analysis; performing plane fitting on the three-dimensional point cloud coordinate data subjected to the data preprocessing, wherein the number of the orientations of the building is limited by the plane fitting, and an initial plane structure is obtained through the plane fitting; manually repairing the initial planar structure; and carrying out structural optimization on the initial planar structure after manual repair to generate a two-dimensional vector planar graph. The generation method can effectively avoid data loss in the generation process, and enables complete and continuous extraction of the building plan to be possible.

Description

Building plane map generation method based on three-dimensional scanning point cloud
Technical Field
The invention relates to the technical field of computer vision three-dimensional perception and three-dimensional point cloud processing, in particular to a building plane map generation method based on three-dimensional scanning point cloud.
Background
With the development and popularization of three-dimensional scanning technology, photogrammetry and depth sensors, massive three-dimensional point cloud information can be conveniently obtained. Compared with two-dimensional image information, the three-dimensional point cloud can describe the geometric attributes of the object more accurately and intuitively. In fact, the geometrical shape of the living and industrial products is composed of geometrical elements such as planes, spheres, cylinders and cones. The method is an important part in the field of three-dimensional point cloud processing, and is characterized in that the geometric elements of parts are automatically and efficiently analyzed from point cloud data containing rich information by a computer.
Planes are the most common and most characteristic class of objects as basic geometric primitives, and are present in large numbers in both domestic and industrial products. The key problem in the point cloud processing is to efficiently identify all planes in the disordered point cloud and obtain the accurate geometric attributes of the planes. The plane fitting problem is effectively solved, the operation difficulty of a computer can be reduced, the posture and the attribute of the target object are determined, and then the machine can better sense the world.
After three-dimensional reconstruction, the reconstructed point cloud has various applications, wherein mainly in the building field, there is a demand that after one floor is scanned, a two-dimensional vector plane graph of the floor can be generated efficiently. As the structures inevitably have omission and error due to shielding, secondary decoration and the like in the scanning process, the semi-automatic scheme of adding manual repair is more reliable at present. For the initial identification stage before manual identification, the current technical scheme can be mainly divided into two types: one is a plane identification scheme based on a random sampling consistency algorithm or region growing, and the other is a scheme based on line segment detection through Hough transform after two-dimensional projection.
There are a number of problems with the two schemes described above:
1. non-interactive face recognition schemes are difficult to adapt to all data situations, and data with different layer heights and different scale deposits may result in a large number of false identifications, thereby significantly increasing the workload of manual patching steps.
2. The scheme of detecting line segments based on two-dimensional projection is difficult to obtain a complete and continuous wall. The influence of impurities is difficult to eliminate in the projection process and only the wall surface is projected, so that the edge projection of the deposit seriously hinders the detection of the wall surface; when the detection line is subjected to Hough transform, if parameters such as the interval of points in the line segment are increased, two adjacent wall surfaces are connected together, and if the parameters are decreased, the two wall surfaces are affected by sparsity in the projection and scanning processes, so that the line segment is broken.
3. Both methods inevitably require secondary optimization of the wall direction, and because the detected wall directions are independent of each other, the global structure diagram shows a scattered characteristic. In this case, it is often necessary to pull the direction of all line segments to a direction parallel or perpendicular to the coordinate axes according to the assumption of manhattan world (the geometric structure in the scene only includes parallel, orthogonal and coplanar relationships), but this greatly limits the structures that can be generated.
Therefore, there is a need to provide a method for identifying a two-dimensional plane of a building based on a three-dimensional point cloud, which can effectively avoid information loss in the identification process and make extraction of a complete and continuous wall surface possible.
Disclosure of Invention
Solves the technical problem
The invention provides a building plane graph generation method based on three-dimensional scanning point cloud, which is applied to the generation of a plane graph of a building.
Technical scheme
In order to achieve the purpose, the invention is realized by the following technical scheme:
the invention provides a building plan generating method based on three-dimensional scanning point cloud, which comprises the following steps:
carrying out three-dimensional scanning fusion on a building to obtain three-dimensional point cloud coordinate data of the building;
performing data pre-processing on the three-dimensional point cloud coordinate data, the data pre-processing including down-sampling and calculating normal magnitude values of the point cloud using principal component analysis;
performing plane fitting on the three-dimensional point cloud coordinate data subjected to the data preprocessing, wherein the number of the orientations of the building is limited by the plane fitting, and an initial plane structure is obtained through the plane fitting;
manually repairing the initial planar structure;
and carrying out structural optimization on the initial planar structure after manual repair to generate a two-dimensional vector planar graph.
Further, the scan fusion of a building is based on three-dimensional sensors and corresponding slam algorithms.
Further, the down-sampling comprises:
creating a three-dimensional voxel grid through the input three-dimensional point cloud coordinate data;
within each of the three-dimensional voxel grids, approximating other points in the three-dimensional voxel grid with the centers of gravity of all points of the three-dimensional voxel grid.
Further, the calculating of the normal magnitude of the point cloud using principal component analysis specifically comprises:
performing decentralization on the three-dimensional point cloud coordinate data after the down-sampling, wherein the decentralization means that each characteristic dimension subtracts a respective average value;
calculating a covariance matrix;
and solving the eigenvalue and the eigenvector of the covariance matrix by using an eigenvalue decomposition method, and sorting the eigenvectors according to the eigenvalues from large to small, wherein the smallest eigenvector is a normal vector.
Further, the plane fitting includes an optimization of an objective function, the objective function being:
Figure BDA0003250747260000041
where N is the number of points, NiIs the neighborhood point set of the ith point, V is the optimized normal vector set, ziIs the sequence number of the normal vector of the ith point in V, I is the normal vector set obtained by calculation in the preprocessing stage,Iiis the original normal vector of the ith point, and lambda represents an outlier penalty coefficient;
the optimization of the objective function comprises the optimization of the following formulas (1) and (2);
Figure BDA0003250747260000042
Figure BDA0003250747260000043
the optimization of the formula (1) comprises the following steps:
the change deltae of the objective function when merging the two sub-fields is calculated,
Figure BDA0003250747260000044
wherein v isiAnd vjRespectively representing two sub-fields, cijIs the number of contiguous elements in two subfields, wiNumber of point sets for field i, wjNumber of point sets in field j, λ0Represents the initial value: calculating the median of the distance between each point and its adjacent points, and taking the minimum value in the median set;
if the delta E is positive, combining the two sub-domains, otherwise not combining;
the normal vectors of the new sub-domains after merging are:
Figure BDA0003250747260000045
the optimization of the formula (2) comprises the following steps:
constructing a structure satisfying F (X ^ X }) -F (X) ≧ F (Y ^ X }) -F (Y) for any
Figure BDA0003250747260000046
The submodular function of (a):
Figure BDA0003250747260000051
where φ is a set of unconnected regions,
Figure BDA0003250747260000052
is the normal vector of the ith sub-region, VφIs composed of
Figure BDA0003250747260000053
A set of normal vectors;
and (3) initializing:
Figure BDA0003250747260000054
Y←φ;
traversing all the areas with the number of points larger than the threshold value in the area, and aiming at the ith area phiiIf F (X $, { φ $, { X $, { φ }, { X @, @i})-F(X)≥F(Y\{φi}) -F (Y) then X ← X {. S {i},
Figure BDA0003250747260000055
Otherwise Y ← Y \ phi +iAnd V is the optimization result.
Further, the plane fitting further includes:
if the length of a point in the region in the direction of a normal vector is greater than 0.1m, projecting the point in the region in the direction by taking 0.01m as a width statistical point quantity histogram, taking the midpoint of two highest points as a boundary, and dividing the region into two sub-regions;
for each subregion, calculating the distribution of the inner points in the space by using a principal component analysis method to obtain a characteristic vector with the maximum corresponding characteristic value;
combining the partial normal vectors to obtain a rotation matrix from the sub-region coordinate system to the global coordinate system and a rotation matrix from the global coordinate system to the sub-region coordinate system;
rotating the points in the area into the sub-area coordinate system by using the rotation matrix from the global coordinate system to the sub-area coordinate system, sequencing to obtain the points with the Z-axis coordinate value as the median, and rotating the points back to the global coordinate system by using the rotation matrix from the sub-area coordinate system to the global coordinate system to obtain the plane on the global coordinate systemPassing point p in the linemedian
Further, the obtaining of the initial planar structure by the plane fitting includes:
for any sub-region, passing through its three-dimensional normal vector
Figure BDA0003250747260000056
The two-dimensional direction vector is obtained as:
Figure BDA0003250747260000061
wherein n is1、n2And n3Respectively representing direction components in the directions of an x axis, a y axis and a z axis;
according to
Figure BDA0003250747260000062
Calculating to obtain an angle value theta of the two-dimensional wall surface as arccos (d)1);
Rotating the x-axis and y-axis coordinates of all points according to a two-dimensional rotation matrix:
Figure BDA0003250747260000063
rotating to a local coordinate system;
according to the maximum value x in the direction of the x-axismaxAnd the minimum value xminAnd p ismedianY value y obtained after rotationmedianObtaining two end points under a global coordinate system:
Figure BDA0003250747260000064
for the wall surface line segment with theta less than or equal to 45 or theta greater than 135, taking the small value of x as a starting point and the large value of x as an end point; for the line segment with the value of 45< theta ≦ 135, taking the small value of y as a starting point and the large value of y as an end point;
obtaining the range of height according to the maximum and minimum values of the point cloud on the z axis(hmin,hmax);
Filtering all n3>0.1 plane, range for adjusting wall height, and set with threshold value (h)low,hhigh) Maintaining the range of heights (h)min,hmax) At the threshold value (h)low,hhigh) And obtaining the wall surface inside to obtain a two-dimensional image of the initial plane structure.
Further, the manual restoration includes drawing a line on the two-dimensional image, generating one line from two points, and simultaneously calculating θ,
Figure BDA0003250747260000065
and (4) data, or selecting redundant line segments, and deleting the redundant line segments to obtain the restored sketch.
Further, the structural optimization of the initial planar structure after manual repair comprises:
calculating whether each point on the restored sketch can close the image by stretching 5 pixels or not, and if so, replacing the line segment with a closed optimized line segment; if not, the original line segment is reserved.
Advantageous effects
Compared with the known public technology, the technical scheme provided by the invention has the following beneficial effects:
the invention is based on0Method of confinement, said0The constraint means the number of non-zero elements in the vector to be measured, i.e. here the number of constraint normal vectors: instead of calculating the normal vector distance, whether the two normal vectors are subtracted by all 0 s. The number of the surface directions in the environment is limited, so that association is established between the surfaces in all directions under the condition that all the surface directions are not limited, the consistency and the stability of results are ensured, and secondary optimization of the directions is avoided; in addition, the method directly acts on the three-dimensional data, avoids information loss in the projection process, and enables the extraction of complete and continuous wall surfaces to be possible.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the invention, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a schematic flow chart of a method for generating a building plan based on a three-dimensional scanning point cloud according to an embodiment of the present invention;
fig. 2 is a system architecture of a method for generating a building plan based on a three-dimensional scanning point cloud according to an embodiment of the present invention;
fig. 3 is a flowchart of a method for generating a building plan based on a three-dimensional scanning point cloud according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention. It is to be understood that the embodiments described are only a few embodiments of the present invention, and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The present invention will be further described with reference to the following examples.
Referring to fig. 1 to 3, an embodiment of the present invention provides a building plan generating method based on a three-dimensional scanning point cloud, including:
s100, three-dimensional scanning fusion is carried out on a building, and three-dimensional point cloud coordinate data of the building are obtained.
In the embodiment, the required input data is three-dimensional point cloud coordinate data obtained by scanning and fusing based on a three-dimensional sensor and a corresponding slam algorithm, and a Normal vector (Normal) value is not required to be provided in the original data, because the data needs to be down-sampled first.
S200, performing data preprocessing on the three-dimensional point cloud coordinate data, wherein the data preprocessing comprises down-sampling and calculating a normal magnitude value of the point cloud by using principal component analysis;
in this embodiment, the down-sampling method used is voxel filtering, which creates a three-dimensional voxel grid from the input point cloud data, and then, in each voxel (i.e. three-dimensional cube), approximates the center of gravity of all the points in the voxel to display other points in the voxel, so that all the points in the voxel are finally represented by a center of gravity point, and the filtered point cloud is obtained after all the voxels are processed. In the present embodiment, the length, width, height and size of the selected voxel cube may be 0.05m, which is a relatively large value, because the processing object of the present embodiment is the structure of the wall surface on the plane view, some particularly minute structures do not need to be detected, and the number and scale of the point clouds have a great influence on the speed of the subsequent surface detection step.
In this embodiment, after down-sampling, the present embodiment uses principal component analysis to calculate normal magnitude values of the point cloud, which is currently commonly applied in the calculation of data set distribution in three-dimensional space. The method mainly comprises the following steps:
(1) for the three-dimensional point cloud coordinate data set X ═ { X ═ X1,x2,…,xnPerforming decentralization, namely subtracting respective average values from each characteristic dimension;
(2) computing a covariance matrix
Figure BDA0003250747260000091
(3) Covariance matrix solving by eigenvalue decomposition method
Figure BDA0003250747260000092
The eigenvalue and the eigenvector are sorted from big to small according to the eigenvalue to obtain the eigenvalue lambda123And feature vector
Figure BDA0003250747260000093
Wherein
Figure BDA0003250747260000094
Namely the normal vector.
The reason that the normal vector can be calculated by this statistical method is that the line connecting the point and its adjacent point (a certain direction on the plane) should be perpendicular to the normal vector direction, i.e.:
Figure BDA0003250747260000095
s300, carrying out plane fitting on the three-dimensional point cloud coordinate data subjected to the data preprocessing, wherein the number of the orientations of the buildings is limited by the plane fitting, and obtaining an initial plane structure through the plane fitting.
In this embodiment, the plane fitting includes an optimization of an objective function, the objective function being:
Figure BDA0003250747260000101
where N is the number of points, NiIs the neighborhood point set of the ith point, V is the optimized normal vector set, ziIs the sequence number of the normal vector of the ith point in V, I is the normal vector set obtained by calculation in the preprocessing stage, IiIs the original normal vector of the ith point, and λ is an outlier penalty coefficient, i.e. a point and its neighborhood should have similar normal magnitude, otherwise it may be an outlier cause, the coefficient controls the proportion size, and takes a value between 1 and 10.
In the energy function, | | Vzi-Ii||2In order to guide the output normal vector to be as consistent as possible with the input,
Figure BDA0003250747260000102
then adjacent points in the bounding space are finally assigned the same normal vector, with λ preceding the formula being the proportion of the bounding in the energy function, typically adjusted between 1 and 10 depending on the data. For the convenience of optimization, the problem is divided into two sub-problems, namely, the optimization of the objective function comprises the advantages of the following formulas (1) and (2)Melting;
Figure BDA0003250747260000103
Figure BDA0003250747260000104
the optimization of the formula (1) comprises the following steps:
the optimization is performed by a method of merging adjacent planar domains, which constitutes a set of points of one plane, which calculates the change deltae of the energy function when merging the two sub-domains,
Figure BDA0003250747260000105
wherein v isiAnd vjRespectively representing two sub-fields, cijIs the number of contiguous elements in two subfields, wiNumber of point sets for field i, wjNumber of point sets in field j, λ0Represents the initial value: and calculating the median of the distance between each point and the adjacent points thereof, and taking the minimum value in the median set. Each time taking 1.2 times of the last value in the optimized iteration loop to promote the expression of the objective function and make the subdomains combined.
If the delta E is positive, combining the two sub-domains, otherwise not combining;
the normal vectors of the new sub-domains after merging are:
Figure BDA0003250747260000111
the optimization of the formula (2) comprises the following steps:
constructing a structure satisfying F (X ^ X }) -F (X) ≧ F (Y ^ X }) -F (Y) for any
Figure BDA0003250747260000112
The submodular function of (a):
Figure BDA0003250747260000113
where φ is a set of unconnected regions,
Figure BDA0003250747260000114
is the normal vector of the ith sub-region, VφIs composed of
Figure BDA0003250747260000115
A set of normal vectors;
and (3) initializing:
Figure BDA0003250747260000116
Y←φ;
traversing all the areas with the number of points larger than the threshold value in the area, and aiming at the ith area phiiIf F (X $, { φ $, { X $, { φ }, { X @, @i})-F(X)≥F(Y\{φi}) -F (Y) then X ← X {. S {i},
Figure BDA0003250747260000117
Otherwise Y ← Y \ phi +iAnd V is the optimization result.
However, the above method has a problem in that the double wall is a two-sided parallel wall which is closely spaced in the result of scanning, but since the number of normal vectors is limited in the method, they are grouped together.
Therefore, in order to solve this problem, in the present embodiment, if the length of a point in a region in the direction of a normal vector is greater than 0.1m, the point is projected in the direction, a statistical point number histogram is calculated with 0.01m as the width, and the region is divided into two sub-regions by taking the midpoint of two highest points as a boundary.
Then, in this embodiment, for each region, the distribution of its interior points in space is calculated by Principal Component Analysis (PCA), and the eigenvector with the largest corresponding eigenvalue is obtained
Figure BDA0003250747260000121
Combining the normal vector of the region
Figure BDA0003250747260000122
Then a rotation matrix R from the sub-region coordinate system to the global coordinate system can be obtainedwnAnd a rotation matrix R from the global coordinate system to the sub-region coordinate systemnw
Figure BDA0003250747260000123
Figure BDA0003250747260000124
With RnwRotating the points in the region into a sub-region coordinate system, and sequencing to obtain a median z (z) with a z value of a mediani) Using R as the point ofwnRotating the plane back to the global coordinate system to obtain the point p where the plane passes through in the global coordinate systemmedian
At this point, the normal vector and the passing point obtained by the optimization step can represent a plane.
In addition, in this embodiment, the obtaining of the initial planar structure by the plane fitting includes:
for any sub-region, passing through its three-dimensional normal vector
Figure BDA0003250747260000125
The two-dimensional direction vector is obtained as:
Figure BDA0003250747260000126
wherein n is1、n2And n3Respectively representing direction components in the directions of an x axis, a y axis and a z axis;
according to
Figure BDA0003250747260000127
Calculating to obtain an angle value theta of the two-dimensional wall surface as arccos (d)1);
Rotating the x-axis and y-axis coordinates of all points according to a two-dimensional rotation matrix:
Figure BDA0003250747260000128
rotating to a local coordinate system;
according to the maximum value x in the direction of the x-axismaxAnd the minimum value xminAnd p ismedianY value y obtained after rotationmedianObtaining two end points under a global coordinate system:
Figure BDA0003250747260000131
for the wall surface line segment with theta less than or equal to 45 or theta greater than 135, taking the small value of x as a starting point and the large value of x as an end point; for the line segment with the value of 45< theta ≦ 135, taking the small value of y as a starting point and the large value of y as an end point;
obtaining the range (h) of height according to the maximum and minimum values of the point cloud on the z axismin,hmax);
Filtering all n3>0.1 plane, range for adjusting wall height, and set with threshold value (h)low,hhigh) Maintaining the range of heights (h)min,hmax) At the threshold value (h)low,hhigh) And obtaining the wall surface inside to obtain a two-dimensional image of the initial plane structure.
S400, manually repairing the initial plane structure;
in this embodiment, after the initial structure is generated, lines are manually drawn on the two-dimensional image, one line is generated from two points, and the corresponding theta is calculated at the same time,
Figure BDA0003250747260000132
and the like; or selecting redundant line segments and deleting the redundant line segments, and the line segments are not required to be closed without errors in the process.
S500, carrying out structural optimization on the initial planar structure after manual repair to generate a two-dimensional vector planar graph.
In this embodiment, performing structural optimization on the initial planar structure after manual repair includes: calculating whether each point on the restored sketch can close the image by stretching 5 pixels, specifically:
(1) judging whether theta is less than or equal to 45 or theta is greater than 135 as a horizontal line, and judging whether theta is more than 45 and less than or equal to 135 as a vertical line;
(2) if d is 0,1,2,3,4,5, repeating steps S300 and S400, and jumping out if the d intersects other original line segments;
(3) the horizontal line is the original x value of the starting point is decreased by d, the original y value is decreased by d2/d1D, the original x value of the end point is increased by d, and the original y value is increased by d2/d1D; the vertical line is the original y value of the starting point is decreased by d, and the original x value is decreased by d1/d2D, the original y value of the end point is increased by d, and the original x value is increased by d1/d2·d。
(4) The horizontal line increases the original x value of the starting point by d and the original y value by d2/d1D, end point original x value decrease d, original y value decrease/d1D; the vertical line increases the original y value of the starting point by d and the original x value by d1/d2D, end point original y value decreases by d, original x value decreases by d1/d2·d。
(5) If not, the original line segment is retained. Therefore, the structure optimization is completed, and the final two-dimensional vector plane graph is generated.
As shown in fig. 3, the structure of all line segments drawn after plane fitting, the structure of the object on the ground such as a table after being filtered after the height threshold is interactively adjusted, the structure after removing multiple identified lines and supplementing the missing lines by manual repair, and the final structure after optimization are respectively provided.
The invention has the advantages of0The limiting method limits the number of the surface directions in the environment, so that under the condition of not forcibly limiting the directions of all the surfaces, the association is established among the surfaces in all the directions, the consistency and the stability of the result are ensured, and the secondary optimization of the directions is avoided; furthermore, the method directly acts on the three-dimensional data, avoids information loss in the projection process and enables the extraction of a complete and continuous wall surface to be possible; further, no mandatory restriction is made on the directionSo that it can adapt to some non-manhattan structures, such as building floors shaped like Chinese character 'ren'; furthermore, the semi-automatic interactive process can adapt to various scenes, for example, if a lot of sundries are stacked in the scene, the concerned upper and lower boundaries can be set to be 1.5m to 2m, so that the influence of excessive sundries is avoided; and finally, optimization is carried out by taking the closing of the structure as a target, so that convenience is provided for the next step of calculating the area and the like.
The above examples are only intended to illustrate the technical solution of the present invention, but not to limit it; although the present invention has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; and the modifications or the substitutions do not cause the essence of the corresponding technical solutions to depart from the scope of the technical solutions of the embodiments of the present invention. Furthermore, the terms "first", "second", etc. are used for descriptive purposes only and are not to be construed as indicating or implying relative importance or implicitly indicating the number of technical features indicated.

Claims (9)

1. A building plan generating method based on three-dimensional scanning point cloud is characterized by comprising the following steps:
carrying out three-dimensional scanning fusion on a building to obtain three-dimensional point cloud coordinate data of the building;
performing data pre-processing on the three-dimensional point cloud coordinate data, the data pre-processing including down-sampling and calculating normal magnitude values of the point cloud using principal component analysis;
performing plane fitting on the three-dimensional point cloud coordinate data subjected to the data preprocessing, wherein the number of the orientations of the building is limited by the plane fitting, and an initial plane structure is obtained through the plane fitting;
manually repairing the initial planar structure;
and carrying out structural optimization on the initial planar structure after manual repair to generate a two-dimensional vector planar graph.
2. The method of claim 1, wherein the scan fusion of a building is based on a three-dimensional sensor and a corresponding slam algorithm.
3. The method of claim 1, wherein the down-sampling comprises:
creating a three-dimensional voxel grid through the input three-dimensional point cloud coordinate data;
within each of the three-dimensional voxel grids, approximating other points in the three-dimensional voxel grid with the centers of gravity of all points of the three-dimensional voxel grid.
4. The method of claim 3, wherein the calculating normal magnitude of the point cloud using principal component analysis comprises:
performing decentralization on the three-dimensional point cloud coordinate data after the down-sampling, wherein the decentralization means that each characteristic dimension subtracts a respective average value;
calculating a covariance matrix;
and solving the eigenvalue and the eigenvector of the covariance matrix by using an eigenvalue decomposition method, and sorting the eigenvectors according to the eigenvalues from large to small, wherein the smallest eigenvector is a normal vector.
5. The method of claim 1, wherein the plane fitting comprises an optimization of an objective function, the objective function being:
Figure FDA0003250747250000021
where N is the number of points, NiIs the neighborhood point set of the ith point, V is the optimized normal vector set, ziIs the sequence number of the normal vector of the ith point in V, I is the normal vector set obtained by calculation in the preprocessing stage, IiIs the original normal vector of the ith point, and lambda is an outlier penalty coefficient;
the optimization of the objective function comprises the optimization of the following formulas (1) and (2);
Figure FDA0003250747250000022
Figure FDA0003250747250000023
the optimization of the formula (1) comprises the following steps:
the change deltae of the objective function when merging the two sub-fields is calculated,
Figure FDA0003250747250000024
wherein v isiAnd vjRespectively representing two sub-fields, cijIs the number of contiguous elements in two subfields, wiNumber of point sets for field i, wjNumber of point sets in field j, λ0Expressing an initial value, namely calculating the median of the distance between each point and the adjacent point, and taking the minimum value in the median set;
if the delta E is positive, combining the two sub-domains, otherwise not combining;
the normal vectors of the new sub-domains after merging are:
Figure FDA0003250747250000025
the optimization of the formula (2) comprises the following steps:
constructing a structure satisfying F (X ^ X }) -F (X) ≧ F (Yu { X }) -F (Y) for any
Figure FDA0003250747250000031
The submodular function of (a):
Figure FDA0003250747250000032
where φ is a set of unconnected regions,
Figure FDA0003250747250000033
is the normal vector of the ith sub-region, VφIs composed of
Figure FDA0003250747250000034
A set of normal vectors;
and (3) initializing:
Figure FDA0003250747250000035
Y←φ;
traversing all the areas with the number of points larger than the threshold value in the area, and aiming at the ith area phiiIf F (X $, { φ $, { X $, { φ }, { X @, @i})-F(X)≥F(Y\{φi}) -F (Y) then X ← X {. S {i},
Figure FDA0003250747250000036
Otherwise Y ← Y \ phi +iAnd V is the optimization result.
6. The method of claim 5, wherein the plane fitting further comprises:
if the length of a point in the region in the direction of a normal vector is greater than 0.1m, projecting the point in the region in the direction by taking 0.01m as a width statistical point quantity histogram, taking the midpoint of two highest points as a boundary, and dividing the region into two sub-regions;
for each subregion, calculating the distribution of the inner points in the space by using a principal component analysis method to obtain a characteristic vector with the maximum corresponding characteristic value;
combining the partial normal vectors to obtain a rotation matrix from the sub-region coordinate system to the global coordinate system and a rotation matrix from the global coordinate system to the sub-region coordinate system;
rotating the points in the region into the sub-region coordinate system by using the rotation matrix from the global coordinate system to the sub-region coordinate system, sequencing to obtain the points with the Z-axis coordinate value as the median, rotating the points back to the global coordinate system by using the rotation matrix from the sub-region coordinate system to the global coordinate system to obtain the point p where the plane passes through in the global coordinate systemmedian
7. The method of claim 6, wherein the obtaining an initial planar structure by the plane fitting comprises:
for any sub-region, passing through its three-dimensional normal vector
Figure FDA0003250747250000041
The two-dimensional direction vector is obtained as:
Figure FDA0003250747250000042
wherein n is1、n2And n3Respectively representing direction components in the directions of an x axis, a y axis and a z axis;
according to
Figure FDA0003250747250000043
Calculating an angle value theta of the two-dimensional wall surface as arccos (d 1);
rotating the x-axis and y-axis coordinates of all points according to a two-dimensional rotation matrix:
Figure FDA0003250747250000044
rotating to a local coordinate system;
according to the maximum value x in the direction of the x-axismaxAnd the minimum value xminAnd p ismedianY value y obtained after rotationmedianTo obtain a totalTwo end points under the local coordinate system:
Figure FDA0003250747250000045
for the wall surface line segment with theta less than or equal to 45 or theta more than 135, taking the small value of x as a starting point and the large value of x as an end point; for the line segment with the value of theta more than 45 and less than or equal to 135, taking the small value of y as a starting point and the large value of y as an end point;
obtaining the range (h) of height according to the maximum and minimum values of the point cloud on the z axismin,hmax);
Filtering all n3The range of adjusting the height of the wall surface is set with a threshold value (h) when the height of the wall surface is larger than 0.1low,hhigh) Maintaining the range of heights (h)min,hmax) At the threshold value (h)low,hhigh) And obtaining the wall surface inside to obtain a two-dimensional image of the initial plane structure.
8. The method of claim 7, wherein the manual inpainting comprises drawing a line on the two-dimensional image, generating a line from two points, and calculating θ at the same time,
Figure FDA0003250747250000051
and (4) data, or selecting redundant line segments, and deleting the redundant line segments to obtain the restored sketch.
9. The method of claim 8, wherein the performing structural optimization on the manually repaired initial planar structure comprises:
calculating whether each point on the restored sketch can close the image by stretching 5 pixels; if so, replacing the line segment with a closed optimized line segment; if not, the original line segment is reserved.
CN202111044731.2A 2021-09-07 2021-09-07 Building plane map generation method based on three-dimensional scanning point cloud Pending CN113781649A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111044731.2A CN113781649A (en) 2021-09-07 2021-09-07 Building plane map generation method based on three-dimensional scanning point cloud

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111044731.2A CN113781649A (en) 2021-09-07 2021-09-07 Building plane map generation method based on three-dimensional scanning point cloud

Publications (1)

Publication Number Publication Date
CN113781649A true CN113781649A (en) 2021-12-10

Family

ID=78841503

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111044731.2A Pending CN113781649A (en) 2021-09-07 2021-09-07 Building plane map generation method based on three-dimensional scanning point cloud

Country Status (1)

Country Link
CN (1) CN113781649A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131459A (en) * 2022-05-24 2022-09-30 中国科学院自动化研究所 Floor plan reconstruction method and device

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228539A (en) * 2016-07-12 2016-12-14 北京工业大学 Multiple geometric primitive automatic identifying method in a kind of three-dimensional point cloud
CN108090960A (en) * 2017-12-25 2018-05-29 北京航空航天大学 A kind of Object reconstruction method based on geometrical constraint
CN109147038A (en) * 2018-08-21 2019-01-04 北京工业大学 Pipeline three-dimensional modeling method based on three-dimensional point cloud processing
CN109993783A (en) * 2019-03-25 2019-07-09 北京航空航天大学 A kind of roof and side optimized reconstruction method towards complex three-dimensional building object point cloud
CN110782531A (en) * 2019-09-16 2020-02-11 华为技术有限公司 Method and computing device for processing three-dimensional point cloud data

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106228539A (en) * 2016-07-12 2016-12-14 北京工业大学 Multiple geometric primitive automatic identifying method in a kind of three-dimensional point cloud
CN108090960A (en) * 2017-12-25 2018-05-29 北京航空航天大学 A kind of Object reconstruction method based on geometrical constraint
CN109147038A (en) * 2018-08-21 2019-01-04 北京工业大学 Pipeline three-dimensional modeling method based on three-dimensional point cloud processing
CN109993783A (en) * 2019-03-25 2019-07-09 北京航空航天大学 A kind of roof and side optimized reconstruction method towards complex three-dimensional building object point cloud
CN110782531A (en) * 2019-09-16 2020-02-11 华为技术有限公司 Method and computing device for processing three-dimensional point cloud data

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
庞正雅;周志峰;王立端;叶珏磊;: "改进的点云数据三维重建算法", 激光与光电子学进展, no. 02, 31 December 2020 (2020-12-31), pages 199 - 205 *
胡燕威;王建军;范媛媛;卢云鹏;白崇岳;张荠匀;: "基于激光雷达的空间物体三维建模与体积计算", 中国激光, no. 05, 31 December 2020 (2020-12-31), pages 496 - 505 *
董伟;: "利用邻近点几何特征实现建筑物点云特征提取", 激光与光电子学进展, no. 07, 16 January 2018 (2018-01-16), pages 181 - 188 *

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115131459A (en) * 2022-05-24 2022-09-30 中国科学院自动化研究所 Floor plan reconstruction method and device
CN115131459B (en) * 2022-05-24 2024-05-28 中国科学院自动化研究所 Reconstruction method and device for floor plan

Similar Documents

Publication Publication Date Title
CN107123164B (en) Three-dimensional reconstruction method and system for keeping sharp features
Xu et al. Reconstruction of scaffolds from a photogrammetric point cloud of construction sites using a novel 3D local feature descriptor
Zhang et al. Online structure analysis for real-time indoor scene reconstruction
Lee et al. Mesh scissoring with minima rule and part salience
Pottmann et al. Geometry and convergence analysis of algorithms for registration of 3D shapes
Fua et al. Taking advantage of image-based and geometry-based constraints to recover 3-D surfaces
CN112927353A (en) Three-dimensional scene reconstruction method based on two-dimensional target detection and model alignment, storage medium and terminal
CN109886124A (en) One kind describing the matched texture-free metal parts grasping means of subgraph based on harness
Savarese et al. Shadow carving
US10937236B1 (en) Mesh smoothing for visual quality and analysis improvement
CN115222884A (en) Space object analysis and modeling optimization method based on artificial intelligence
CN116805356A (en) Building model construction method, building model construction equipment and computer readable storage medium
CN113781649A (en) Building plane map generation method based on three-dimensional scanning point cloud
Sam et al. A robust and centered curve skeleton extraction from 3D point cloud
Thiemann et al. 3D-symbolization using adaptive templates
Zhu et al. Variational building modeling from urban MVS meshes
CN115861547B (en) Model surface spline generating method based on projection
Rashidi et al. Point cloud data cleaning and refining for 3D as-built modeling of built infrastructure
Jisen A study on target recognition algorithm based on 3D point cloud and feature fusion
Novacheva Building roof reconstruction from LiDAR data and aerial images through plane extraction and colour edge detection
Jin et al. High precision indoor model contour extraction algorithm based on geometric information
Sahebdivani et al. Deep learning based classification of color point cloud for 3D reconstruction of interior elements of buildings
CN115375847A (en) Material recovery method, three-dimensional model generation method and model training method
CN115131459A (en) Floor plan reconstruction method and device
CN114708382A (en) Three-dimensional modeling method, device, storage medium and equipment based on augmented reality

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