Automatic extraction method and equipment of facade lines based on airborne building LiDAR point cloud
Through the automatic extraction method of facade line based on LiDAR point cloud of airborne buildings, the problems of building facade position extraction deviation and low efficiency in traditional methods are solved by using technologies such as monomerization segmentation, normal constraints and minimum ring search. , realizes efficient and precise extraction of facade lines of multi-story buildings.
Patent Information
- Application Number
- CN202210379641.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-12
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2042-04-12
AI Technical Summary
When using airborne LiDAR point clouds, there is a deviation in the extraction of the facade position of the building, especially the eave correction processing is complicated and inefficient, and the acquisition of the complete building point cloud is expensive, so it is impossible to effectively extract the multi-story building. Facade line.
The automatic extraction method of facade line based on LiDAR point cloud in airborne buildings includes monomerization segmentation, plane segmentation of normal constraints, minimum ring search and facade grid extraction. Point clouds and principal component analysis are organized through kd tree With Ransac plane segmentation algorithm, combined with the characteristics of point cloud distribution, it realizes automatic extraction of facade lines.
The automatic extraction of facade lines of multi-story buildings is achieved, which improves work efficiency and measurement accuracy, avoids field measurement, and overcomes the problems of long cycles of traditional methods and high cost of manpower and material resources.
Smart Images

Figure CN114742843B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of photogrammetry and remote sensing technology, and in particular to a method and device for automatically extracting facade lines based on airborne building LiDAR point clouds. Background Art
[0002] Buildings are important components and basic elements of cities. Their spatial location characteristics can reflect the spatial distribution pattern and development trend of cities. Building facade mapping is the basis for the design and construction of building reconstruction and expansion projects. Traditional building facade mapping is usually carried out by manual measurement or with the help of surveying instruments and close-range photogrammetry. The advantages of these surveying methods are relatively simple operation, but the information collected is small, the cycle is long, and the cost of manpower and material resources is high. The emergence of LiDAR (Light Detection And Ranging) technology, which has the ability to quickly obtain the three-dimensional coordinates of the surface of the object, makes it possible to automatically extract the building facade position. Due to the limitation of LiDAR scanning angle, early research on building position extraction from airborne LiDAR point clouds was mostly conducted on roof point clouds. There was a deviation between the extracted roof contour and the wall facade position, and eaves correction processing was usually required, which was cumbersome and inefficient. Although the related technologies can use the building facade point cloud to extract the facade line position, the extraction results are mostly partial facade positions, and the corner position is easily affected by the segmentation threshold. Compared with the airborne platform, the scanning field of the ground platform is limited, and it is costly to obtain a complete building point cloud. Therefore, the development of an automatic facade line extraction method and equipment based on airborne building LiDAR point cloud can effectively overcome the defects in the above-mentioned related technologies, which has become a technical problem that needs to be solved urgently in the industry. Summary of the invention
[0003] In view of the above problems existing in the prior art, an embodiment of the present invention provides a method and device for automatically extracting facade lines based on airborne building LiDAR point cloud.
[0004] In a first aspect, an embodiment of the present invention provides a method for automatically extracting facade lines based on airborne building LiDAR point clouds, comprising: step 1, performing monomer segmentation on the building LiDAR point cloud to obtain a point cloud for each building; step 2, extracting building facade points based on the point cloud for each building obtained in step 1 using a normal-constrained plane segmentation method; step 3, performing horizontal projection and straight-line fitting on the building facade points obtained in step 2 to obtain facade lines, performing pairwise intersection processing on the facade lines, and extracting facade meshes using a minimum ring search method; step 4, extracting effective facade line segments for the facade mesh obtained in step 3 in combination with the distribution characteristics of the building point cloud.
[0005] Based on the content of the above method embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the building LiDAR point cloud in step 1 is subjected to monomer segmentation, including: step 1.1, using kd tree to organize the building point cloud, constructing the adjacency relationship between the point clouds, and estimating the average point spacing avgd of the point cloud; step 1.2, selecting an unprocessed point from the building point cloud as a seed point, and putting it into a queue; step 1.3, checking all the neighborhood points around the seed point, if there is a point whose two-dimensional distance to the seed point is less than the threshold, it is put into the queue; otherwise, it is not processed; step 1.4, popping out the first element in the queue and adding it to the set, taking the current element as the seed point, and repeating step 1.3; checking whether the queue is empty, if it is empty, go to step 1.2, otherwise, repeating step 1.4, and the process from step 1.1 to step 1.4 is iteratively performed until all building points are processed.
[0006] Based on the content of the above method embodiment, the method for automatically extracting facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the plane segmentation method using normal constraints in step 2 extracts building facade points, including: according to the neighborhood relationship of the point cloud, the local neighborhood points of each point are used, and the principal component analysis method is used to transform and estimate the normal vector of the point; for the current point p, its neighborhood point is p i , i=1,2,...,k, k is the number of domain points, the centroid of the neighborhood point is p', the neighborhood covariance matrix R of the centroid p' is constructed, and the neighborhood covariance matrix R is decomposed by eigenvalue, where the eigenvector corresponding to the minimum eigenvalue is the normal vector of point p,
[0007]
[0008] Where T is the transpose. If the angle between the normal vector of a point and the XOY plane is less than the threshold δ, the point is a candidate facade point, otherwise it is a roof point cloud. The azimuth pointed by the normal vectors of all facade points is estimated with the positive direction of the X-axis as the starting direction, and the Ransac plane segmentation algorithm with azimuth constraint is used to extract facade points.
[0009] On the basis of the content of the above-mentioned method embodiment, the method for automatic extraction of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention adopts the Ransac plane segmentation algorithm with azimuth constraint to extract facade points, including: step 2.1, randomly selecting three non-collinear point clouds with consistent azimuth from the facade point cloud as seed points, and estimating the initial hypothesized plane according to the seed points; based on the initial hypothesized plane, filtering points in the point set whose distance from the plane is less than a threshold as inliers, and counting the number of inliers; iteratively processing the above process, taking the plane with the largest number of inliers among all hypothesized planes as the optimal plane, and completing the facade point segmentation; step 2.2, for the remaining facade points, repeating step 2.1 until all candidate facade points are segmented, and stopping the segmentation.
[0010] Based on the content of the above method embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the use of the minimum ring search method to extract the facade grid in step 3 includes: projecting each facade point cloud of the building obtained according to step 2 to the XOY plane, and using the least squares straight line fitting method to obtain the facade line, intersecting the facade line with the minimum circumscribed rectangle of the wall point, and calculating the initial endpoint position of the facade line; further optimizing the endpoint position of the facade line according to the number of facade lines of the building, if the number of facade lines is greater than 3, intersecting the facade fitting lines in pairs to form a facade line grid, and using the minimum ring search method to extract each closed facade grid.
[0011] Based on the content of the above method embodiment, the method for automatic extraction of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the method for extracting each closed facade mesh using the minimum loop search method includes: step 3.1, using the intersecting facade segment vertices and segment adjacency relationships to construct a facade segment vertex array V and an adjacency matrix M; step 3.2, taking any unprocessed point from the array V as the starting point and the end point, and searching its adjacent points according to the adjacency matrix M; step 3.3 traversing the adjacent points, and taking the adjacent point as the current point and the end point as the target point, using the shortest path algorithm to search for the minimum closed loop, and setting the distance between the current point and the starting point to infinity during the search; step 3.4 determining whether the current closed loop exists, if so, deleting the current loop; if it is a new loop, adding it to the closed loop stack; go to step 3.2; steps 3.1 to 3.4 are iterated, and the search is stopped after all points in V are processed.
[0012] On the basis of the content of the above-mentioned method embodiment, the method for automatic extraction of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the extraction of effective facade line segments in step 4 includes: forming a closed facade line grid for each closed loop obtained in step 3, and further judging the effective grid by analyzing the density and height difference of the building point cloud falling into the grid according to the building LiDAR point cloud, and completing the extraction of facade line segments, specifically including: step 4.1, constructing a grid adjacency matrix Mc according to the number of closed grids, and initializing all elements to false; step 4.2, for any closed grid, searching and judging the adjacency relationship between its boundary and the boundary of other closed grids, if the two have a common boundary, marking the adjacency matrix element as true; step 4.3, traversing each closed grid, combining the building roof point cloud, and counting the roof point cloud falling into the current closed grid; counting the number of points, and initializing the roof point cloud falling into the closed grid The vertices are segmented using the Ransac plane algorithm to extract the largest plane, and the height average of the plane point cloud is used as the minimum ring height zi. The minimum ring point density di is calculated using the number of points and the area of the closed grid; Step 4.4, traverse each closed grid, if the point density of the grid is less than the threshold th_d, the grid is considered to be a pseudo-invalid grid and marked for removal; otherwise, it is marked as a valid grid; Step 4.5, take any candidate valid grid as the current grid, search its adjacent grids according to the grid adjacency matrix Mc, if the height difference dz between the adjacent grid and the current grid is less than the threshold th_z, it is marked for merging; otherwise, no processing is performed; Step 4.6, starting from any closed grid to be merged, find the adjacent candidate grid to be merged according to the adjacency matrix, and mark the common edge of the two as an invalid boundary; after all grids are processed, store the valid boundaries and vertices of all candidate grids, and use the minimum ring search method again to complete the extraction of the facade line.
[0013] In a second aspect, an embodiment of the present invention provides an automatic extraction device for facade lines based on airborne building LiDAR point clouds, comprising: a first main module, used to implement step 1, to perform monomer segmentation on the building LiDAR point cloud to obtain a point cloud for each building; a second main module, used to implement step 2, to extract building facade points based on the point cloud of each building obtained in step 1, using a normal-constrained plane segmentation method; a third main module, used to implement step 3, to perform horizontal projection and straight-line fitting on the building facade points obtained in step 2 to obtain facade lines, to perform pairwise intersection processing on the facade lines, and to extract facade meshes using a minimum ring search method; a fourth main module, used to implement step 4, to extract effective facade line segments for the facade mesh obtained in step 3, in combination with the distribution characteristics of the building point cloud.
[0014] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0015] at least one processor; and
[0016] at least one memory in communication with the processor, wherein:
[0017] The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided by any one of the various implementations of the first aspect.
[0018] In a fourth aspect, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided by any one of the various implementation methods of the first aspect.
[0019] The embodiment of the present invention provides a method and device for automatically extracting facade lines based on airborne building LiDAR point clouds. The facade point detection of building LiDAR point clouds, facade extraction to facade straight line fitting, minimum ring search and facade line segment extraction are all automatically completed by a computer. The facade lines of multi-story buildings can be automatically extracted without field measurement work, which effectively improves work efficiency and improves measurement accuracy compared with manual measurement methods. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, a brief introduction is given below to the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0021] Figure 1 A flow chart of a method for automatically extracting facade lines based on airborne building LiDAR point clouds provided by an embodiment of the present invention;
[0022] Figure 2 A schematic diagram of the structure of an automatic elevation line extraction device based on airborne building LiDAR point cloud provided by an embodiment of the present invention;
[0023] Figure 3 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention;
[0024] Figure 4 A schematic diagram of the point cloud segmentation results of each building provided in an embodiment of the present invention;
[0025] Figure 5 A schematic diagram of a point cloud result of any building in the segmented building point cloud provided by an embodiment of the present invention;
[0026] Figure 6 A schematic diagram of point cloud results for each facade of a building provided by an embodiment of the present invention;
[0027] Figure 7 A schematic diagram of the intersection result of elevation lines provided in an embodiment of the present invention;
[0028] Figure 8 A schematic diagram of the results of extracting all closed facade meshes using a minimum ring search method provided by an embodiment of the present invention;
[0029] Fig. 9 A schematic diagram of the effect of further using a minimum ring search method to extract facade lines from valid mesh boundaries and vertices provided in an embodiment of the present invention. DETAILED DESCRIPTION
[0030] In order to make the purpose, 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 in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention. In addition, the technical features in the various embodiments or single embodiments provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution. This combination is not restricted by the sequence of steps and / or the structural composition mode, but must be based on the ability of ordinary technicians in this field to achieve it. When the combination of technical solutions is contradictory or cannot be achieved, it should be considered that this combination of technical solutions does not exist and is not within the scope of protection required by the present invention. With the improvement of LiDAR scanning capabilities, the airborne platform LiDAR system can obtain a more complete building point cloud through vertical scanning and side scanning. Therefore, based on the segmentation of building point cloud, the facade point distribution characteristics can be directly excavated according to the building LiDAR point cloud facade data, and the facade line grid can be constructed by the least squares fitting straight line of the facade projection point through the straight line intersection method, and the building facade line automatic extraction can be completed by combining the minimum ring search analysis method. Based on this idea, the embodiment of the present invention provides a facade line automatic extraction method based on airborne building LiDAR point cloud, see Figure 1The method comprises: step 1, performing monomer segmentation on the building LiDAR point cloud to obtain the point cloud of each building; step 2, extracting the building facade points by using the plane segmentation method with normal constraint according to the point cloud of each building obtained in step 1; step 3, performing horizontal projection and straight line fitting according to the building facade points obtained in step 2 to obtain the facade lines, performing pairwise intersection processing on the facade lines, and extracting the facade mesh by using the minimum ring search method; step 4, extracting the effective facade line segments for the facade mesh obtained in step 3 in combination with the distribution characteristics of the building point cloud.
[0031] Based on the content of the above method embodiment, as an optional embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the building LiDAR point cloud in step 1 is subjected to monomer segmentation, including: step 1.1, using kd tree to organize the building point cloud, constructing the adjacency relationship between the point clouds, and estimating the average point spacing avgd of the point cloud; step 1.2, selecting an unprocessed point from the building point cloud as a seed point, and putting it into a queue; step 1.3, checking all the neighborhood points around the seed point, if there is a point whose two-dimensional distance to the seed point is less than the threshold, it is put into the queue; otherwise, it is not processed; step 1.4, popping out the first element in the queue and adding it to the set, taking the current element as the seed point, and repeating step 1.3; checking whether the queue is empty, if it is empty, go to step 1.2, otherwise, repeating step 1.4, and the process from step 1.1 to step 1.4 is iterated until all building points are processed.
[0032] In another embodiment, for the building LiDAR point cloud, the kd tree is used to construct the point cloud neighborhood relationship, and the distance-based region growing method is used to segment each building point cloud (n defaults to 3). The segmentation result is as follows: Figure 4 shown.
[0033] Based on the content of the above method embodiment, as an optional embodiment, the method for automatically extracting facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the plane segmentation method using normal constraints in step 2 extracts building facade points, including: according to the point cloud neighborhood relationship, using the local neighborhood points of each point, and using the principal component analysis method to transform and estimate the normal vector of the point; for the current point p, its neighborhood point is p i , i=1,2,...,k, k is the number of domain points, the centroid of the neighborhood point is p', the neighborhood covariance matrix R of the centroid p' is constructed, and the neighborhood covariance matrix R is decomposed by eigenvalue, where the eigenvector corresponding to the minimum eigenvalue is the normal vector of point p,
[0034]
[0035] Where T is the transpose. If the angle between the normal vector of a point and the XOY plane is less than the threshold δ, the point is a candidate facade point, otherwise it is a roof point cloud. The azimuth pointed by the normal vectors of all facade points is estimated with the positive direction of the X-axis as the starting direction, and the Ransac plane segmentation algorithm with azimuth constraint is used to extract facade points.
[0036] Based on the content of the above method embodiment, as an optional embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, which uses the Ransac plane segmentation algorithm with azimuth constraint to extract facade points, includes: step 2.1, randomly selecting three non-collinear point clouds with consistent azimuth from the facade point cloud as seed points, and estimating the initial hypothesized plane according to the seed points; based on the initial hypothesized plane, filtering points in the point set whose distance from the plane is less than a threshold as inliers, and counting the number of inliers; iteratively processing the above process, taking the plane with the largest number of inliers among all hypothesized planes as the optimal plane, and completing the facade point segmentation; step 2.2, for the remaining facade points, repeating step 2.1 until all candidate facade points are segmented, and stopping the segmentation.
[0037] In another embodiment, any one of the segmented building point clouds is selected, such as Figure 5 As shown in Figure 1, the point cloud normal vector is estimated based on the point cloud neighborhood relationship, and the building facade point detection is performed using the angle between the normal vector and the horizontal plane (δ is 10 degrees by default), and the azimuth angle constraint of the normal vector is used to perform Ransac plane segmentation processing to obtain each building facade point cloud. The result is shown in Figure 1. Figure 6 shown.
[0038] Based on the content of the above method embodiment, as an optional embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the use of the minimum ring search method to extract the facade grid in step 3 includes: projecting each facade point cloud of the building obtained according to step 2 to the XOY plane, and using the least squares straight line fitting method to obtain the facade line, intersecting the facade line with the minimum circumscribed rectangle of the wall point, and calculating the initial endpoint position of the facade line; further optimizing the endpoint position of the facade line according to the number of facade lines of the building, if the number of facade lines is greater than 3, then intersecting the facade fitting lines in pairs to form a facade line grid, and using the minimum ring search method to extract each closed facade grid.
[0039] Based on the content of the above method embodiment, as an optional embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the use of the minimum loop search method to extract each closed facade mesh includes: step 3.1, using the intersecting facade segment vertices and segment adjacency relationships to construct a facade segment vertex array V and an adjacency matrix M; step 3.2, taking any unprocessed point from the array V as the starting point and the end point, and searching its adjacent points according to the adjacency matrix M; step 3.3 traversing the adjacent points, and taking the adjacent point as the current point and the end point as the target point, using the shortest path algorithm to search for the minimum closed loop, and setting the distance between the current point and the starting point to infinity during the search; step 3.4 judging whether the current closed loop exists, if so, deleting the current loop; if it is a new loop, adding it to the closed loop stack; go to step 3.2; steps 3.1 to 3.4 are iterated, and the search is stopped after all points in V are processed.
[0040] In another embodiment, each facade point cloud of the building is projected onto the XOY plane, and the facade line is obtained by using the least squares straight line fitting method. All the facade fitting lines of the building are intersected in pairs to form a facade line grid. The facade line intersection result is as follows: Figure 7 As shown, the minimum ring search method is used to extract all closed facade meshes. The search results are as follows Figure 8 shown.
[0041] Based on the content of the above method embodiment, as an optional embodiment, the automatic extraction method of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention, the extraction of effective facade line segments in step 4 includes: forming a closed facade line grid for each closed loop obtained in step 3, and further judging the effective grid by analyzing the density and height difference of the building point cloud falling into the grid according to the building LiDAR point cloud, and completing the extraction of facade line segments, specifically including: step 4.1, constructing a grid adjacency matrix Mc according to the number of closed grids, and initializing all elements to false; step 4.2, for any closed grid, searching and judging the adjacency relationship between its boundary and the boundary of other closed grids, if the two have a common boundary, marking the adjacency matrix element as true; step 4.3, traversing each closed grid, combining the building roof point cloud, and counting the roof point cloud falling into the current closed grid; counting the number of points, and initializing the points falling into the closed grid The roof points in the grid are extracted using the Ransac plane segmentation algorithm, and the height average of the plane point cloud is used as the minimum ring height zi. The minimum ring point density di is calculated using the number of points and the area of the closed grid; Step 4.4, traverse each closed grid, if the point density of the grid is less than the threshold th_d, the grid is considered to be a pseudo-invalid grid and marked for removal; otherwise, it is marked as a valid grid; Step 4.5, take any candidate valid grid as the current grid, search its adjacent grids according to the grid adjacency matrix Mc, if the height difference dz between the adjacent grid and the current grid is less than the threshold th_z, it is marked for merging; otherwise, no processing is performed; Step 4.6, starting from any closed grid to be merged, find the adjacent candidate grid to be merged according to the adjacency matrix, and mark the common edge of the two as an invalid boundary; after all grids are processed, store the valid boundaries and vertices of all candidate grids, and use the minimum ring search method again to complete the extraction of the facade line.
[0042] In another embodiment, according to the facade line grid obtained in step 3, a grid common edge is constructed to construct a grid adjacency matrix, the point cloud density of the building roof and the height of the fitting plane in each closed grid are counted, and according to the adjacent facade grid density difference threshold and height difference threshold (th_d defaults to 100 points / square meter, th_z defaults to 0.8 meters), the effective closed grid is screened, and the minimum ring search method is further used for the effective grid boundary and vertex to complete the extraction of the facade line. The extraction result is as follows: Fig. 9 shown.
[0043] The automatic facade line extraction method based on airborne building LiDAR point cloud provided by the embodiment of the present invention can automatically extract the facade lines of multi-story buildings without field measurement work, effectively improve work efficiency, and improve measurement accuracy compared with manual measurement methods, through building LiDAR point cloud facade point detection, facade extraction to facade straight line fitting, minimum ring search and facade line segment extraction, which are all automatically completed by a computer.
[0044] The implementation basis of each embodiment of the present invention is to implement programmed processing through a device with a processor function. Therefore, in engineering practice, the technical solutions and functions of each embodiment of the present invention can be encapsulated into various modules. Based on this reality, on the basis of the above embodiments, an embodiment of the present invention provides an automatic extraction device for facade lines based on airborne building LiDAR point clouds, which is used to execute the automatic extraction method for facade lines based on airborne building LiDAR point clouds in the above method embodiment. Figure 2 The device includes: a first main module, which is used to implement step 1, and performs monomer segmentation on the building LiDAR point cloud to obtain the point cloud of each building; a second main module, which is used to implement step 2, and extract the building facade points according to the point cloud of each building obtained in step 1 by using the plane segmentation method with normal constraints; a third main module, which is used to implement step 3, and performs horizontal projection and straight line fitting on the building facade points obtained in step 2 to obtain facade lines, and performs two-by-two intersection processing on the facade lines, and uses the minimum ring search method to extract the facade mesh; a fourth main module, which is used to implement step 4, and extracts the effective facade line segments for the facade mesh obtained in step 3 in combination with the distribution characteristics of the building point cloud.
[0045] The embodiment of the present invention provides an automatic facade line extraction device based on airborne building LiDAR point cloud, using Figure 2 Several modules in it are automatically completed by computer through building LiDAR point cloud facade point detection, facade extraction to facade straight line fitting, minimum ring search and facade line segment extraction. The facade lines of multi-story buildings can be automatically extracted without field measurement work, which effectively improves work efficiency and improves measurement accuracy compared with manual measurement methods.
[0046] It should be noted that the device in the device embodiment provided by the present invention can be used to implement the method in the above method embodiment as well as the method in other method embodiments provided by the present invention. The only difference is that the corresponding functional modules are set, and the principle is basically the same as the principle of the above device embodiment provided by the present invention. As long as the technical personnel in the field refer to the specific technical solutions in other method embodiments on the basis of the above device embodiment, obtain the corresponding technical means and the technical solutions composed of these technical means by combining technical features, the device in the above device embodiment can be improved on the premise of ensuring the practicality of the technical solution, thereby obtaining the corresponding device class embodiment, which is used to implement the methods in other method class embodiments. For example:
[0047] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the automatic extraction device of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention also includes: a first submodule, which is used to realize the monomer segmentation of the building LiDAR point cloud in step 1, including: step 1.1, using the kd tree to organize the building point cloud, construct the adjacency relationship between the point clouds, and estimate the average point spacing avgd of the point cloud; step 1.2 selects an unprocessed point from the building point cloud as a seed point and puts it into a queue; step 1.3, checks all the neighborhood points around the seed point, if there is a point whose two-dimensional distance to the seed point is less than the threshold, it is included in the queue; otherwise, it is not processed; step 1.4, pops out the first element in the queue and adds it to the set, takes the current element as the seed point, and repeats step 1.3; checks whether the queue is empty, if it is empty, goes to step 1.2, otherwise, repeats step 1.4, and the process from step 1.1 to step 1.4 is iterated until all building points are processed.
[0048] Based on the content of the above device embodiment, as an optional embodiment, the automatic extraction device of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention also includes: a second submodule, which is used to implement the plane segmentation method using normal constraints in step 2 to extract building facade points, including: according to the neighborhood relationship of the point cloud, using the local neighborhood points of each point, and using the principal component analysis method to transform and estimate the normal vector of the point; for the current point p, its neighborhood point is p i , i=1,2,...,k, k is the number of domain points, the centroid of the neighborhood point is p', the neighborhood covariance matrix R of the centroid p' is constructed, and the neighborhood covariance matrix R is decomposed by eigenvalue, where the eigenvector corresponding to the minimum eigenvalue is the normal vector of point p,
[0049]
[0050] Where T is the transpose. If the angle between the normal vector of a point and the XOY plane is less than the threshold δ, the point is a candidate facade point, otherwise it is a roof point cloud. The azimuth pointed by the normal vectors of all facade points is estimated with the positive direction of the X-axis as the starting direction, and the Ransac plane segmentation algorithm with azimuth constraint is used to extract facade points.
[0051] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the automatic extraction device of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention also includes: a third sub-module, which is used to implement the facade point extraction using the Ransac plane segmentation algorithm with azimuth constraints, including: step 2.1, randomly selecting three non-collinear point clouds with consistent azimuths from the facade point cloud as seed points, and estimating the initial hypothesized plane according to the seed points; based on the initial hypothesized plane, filtering points in the point set whose distance from the plane is less than a threshold as internal points, and counting the number of internal points; iteratively processing the above process, taking the plane with the largest number of internal points among all hypothesized planes as the optimal plane, and completing the facade point segmentation; step 2.2, for the remaining facade points, repeating step 2.1 until all candidate facade points are segmented, and stopping the segmentation.
[0052] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the automatic extraction device of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention also includes: a fourth submodule, which is used to implement the extraction of facade grids using the minimum ring search method in step 3, including: projecting each facade point cloud of the building obtained according to step 2 to the XOY plane, and obtaining the facade lines using the least squares straight line fitting method, intersecting the facade lines with the minimum circumscribed rectangle of the wall points, and calculating the initial endpoint positions of the facade lines; further optimizing the endpoint positions of the facade lines according to the number of facade lines of the building, if the number of facade lines is greater than 3, intersecting the facade fitting lines in pairs to form a facade line grid, and extracting each closed facade grid using the minimum ring search method.
[0053] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the automatic extraction device of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention also includes: a fifth submodule, which is used to implement the extraction of each closed facade mesh using the minimum loop search method, including: step 3.1, using the intersecting facade segment vertices and segment adjacency relationships to construct a facade segment vertex array V and an adjacency matrix M; step 3.2, taking any unprocessed point from the array V as the starting point and the end point, and searching its adjacent points according to the adjacency matrix M; step 3.3 traversing the adjacent points, and taking the adjacent point as the current point and the end point as the target point, using the shortest path algorithm to search for the minimum closed loop, and setting the distance between the current point and the starting point to infinity during the search; step 3.4 judging whether the current closed loop exists, if so, deleting the current loop; if it is a new loop, adding it to the closed loop stack; going to step 3.2; steps 3.1 to 3.4 are iterated, and the search is stopped after all points in V are processed.
[0054] Based on the content of the above-mentioned device embodiment, as an optional embodiment, the automatic extraction device of facade lines based on airborne building LiDAR point cloud provided in the embodiment of the present invention also includes: a sixth submodule, which is used to realize the extraction of effective facade line segments in step 4, including: forming a closed facade line grid for each closed loop obtained in step 3, and further judging the effective grid by analyzing the density and height difference of the building point cloud falling into the grid according to the building LiDAR point cloud, and completing the extraction of facade line segments, specifically including: step 4.1, constructing a grid adjacency matrix Mc according to the number of closed grids, and initializing all elements to false; step 4.2, for any closed grid, searching and judging the adjacency relationship between its boundary and the boundary of other closed grids, if the two have a common boundary, marking the adjacency matrix element as true; step 4.3, traversing each closed grid, combining the building roof point cloud, and counting the roof point cloud falling into the current closed grid; counting the number of points, The roof points that fall into the closed grid are extracted using the Ransac plane segmentation algorithm, and the height average of the plane point cloud is used as the minimum ring height zi. The minimum ring point density di is calculated using the number of points and the area of the closed grid; Step 4.4, traverse each closed grid, if the point density of the grid is less than the threshold th_d, the grid is considered to be a pseudo-invalid grid and marked for removal; otherwise, it is marked as a valid grid; Step 4.5, take any candidate valid grid as the current grid, search its adjacent grids according to the grid adjacency matrix Mc, if the height difference dz between the adjacent grid and the current grid is less than the threshold th_z, it is marked for merging; otherwise, no processing is performed; Step 4.6, starting from any closed grid to be merged, find the adjacent candidate grid to be merged according to the adjacency matrix, and mark the common edge of the two as an invalid boundary; after all grids are processed, store the valid boundaries and vertices of all candidate grids, and use the minimum ring search method again to complete the extraction of the facade line.
[0055] The method of the embodiment of the present invention is implemented by relying on electronic devices, so it is necessary to introduce the relevant electronic devices. Based on this purpose, the embodiment of the present invention provides an electronic device, such as Figure 3 As shown, the electronic device includes: at least one processor, a communication interface, at least one memory, and a communication bus, wherein at least one processor, the communication interface, and at least one memory communicate with each other through the communication bus. At least one processor can call the logic instructions in at least one memory to execute all or part of the steps of the method provided by the aforementioned various method embodiments.
[0056] In addition, the logic instructions in the at least one memory mentioned above can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. The computer software product is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each method embodiment of the present invention. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0057] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.
[0058] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0059] The flowcharts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. Based on this understanding, each box in the flowchart or block diagram can represent a module, a program segment or a part of a code, and the module, a program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and sometimes in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or the flowchart, and the combination of the boxes in the block diagram and / or the flowchart can be implemented with a dedicated hardware-based system that performs a specified function or action, or can be implemented with a combination of dedicated hardware and computer instructions.
[0060] In this patent, the terms "include", "comprises" or any other variation thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of more restrictions, the elements defined by the sentence "includes..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0061] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for automatically extracting facade lines based on airborne building LiDAR point cloud, characterized in that: include: Step 1: Segment the building LiDAR point cloud into individual parts to obtain the point cloud of each building; Step 2, based on the point cloud of each building obtained in step 1, extract the building facade points using the plane segmentation method with normal constraints; The plane segmentation method using normal constraints in step 2 extracts building facade points, including: according to the neighborhood relationship of the point cloud, the local neighborhood points of each point are used, and the principal component analysis method is used to transform and estimate the normal vector of the point; for the current point p, its neighborhood points are pi, i=1, 2,..., k, k is the number of domain points, the centroid of the neighborhood points is p', and the neighborhood covariance matrix R of the centroid p' is constructed, and the neighborhood covariance matrix R is eigenvalue decomposition is performed, wherein the eigenvector corresponding to the minimum eigenvalue is the normal vector of point p, (1) Where T is the transpose. If the angle between the normal vector of a point and the XOY plane is less than the threshold δ, the point is a candidate facade point, otherwise it is a roof point cloud. The azimuth pointed by the normal vectors of all facade points is estimated with the positive direction of the X-axis as the starting direction, and the Ransac plane segmentation algorithm with azimuth constraint is used to extract facade points. The Ransac plane segmentation algorithm with azimuth constraint is used to extract facade points, including: step 2.1, randomly selecting three non-collinear point clouds with consistent azimuths from the facade point cloud as seed points, and estimating the initial hypothesized plane according to the seed points; based on the initial hypothesized plane, filtering points in the point set whose distance from the plane is less than a threshold as inliers, and counting the number of inliers; iteratively processing the above process, taking the plane with the largest number of inliers among all hypothesized planes as the optimal plane, and completing the facade point segmentation; step 2.2, for the remaining facade points, repeating step 2.1 until all candidate facade points are segmented, and stopping the segmentation; Step 3, based on the building facade points obtained in step 2, perform horizontal projection and straight line fitting to obtain facade lines, intersect the facade lines in pairs, and use the minimum ring search method to extract the facade mesh; Step 4, for the facade mesh obtained in step 3, combine the distribution characteristics of the building point cloud to complete the extraction of effective facade line segments.
2. The method for automatically extracting facade lines based on airborne building LiDAR point cloud according to claim 1, characterized in that: The individual segmentation of the building LiDAR point cloud in step 1 includes: step 1.1, using the kd tree to organize the building point cloud, constructing the adjacency relationship between the point clouds, and estimating the average point spacing avgd of the point cloud; step 1.2, selecting an unprocessed point from the building point cloud as a seed point and adding it to the queue; step 1.3, checking all the neighborhood points around the seed point, if there is a point whose two-dimensional distance to the seed point is less than the threshold, it is added to the queue; otherwise, it is not processed; step 1.4, popping the first element in the queue and adding it to the set, taking the current element as the seed point, and repeating step 1.3; checking whether the queue is empty, if it is empty, go to step 1.2, otherwise, repeat step 1.4, and the process from step 1.1 to step 1.4 is iterated until all building points are processed.
3. The method for automatically extracting facade lines based on airborne building LiDAR point cloud according to claim 1, characterized in that: The extraction of the facade mesh using the minimum ring search method in step 3 includes: projecting each facade point cloud of the building obtained according to step 2 onto the XOY plane, and obtaining the facade line using the least squares straight line fitting method, intersecting the facade line with the minimum circumscribed rectangle of the wall point, and calculating the initial endpoint position of the facade line; further optimizing the facade line endpoint position according to the number of facade lines of the building, if the number of facade lines is greater than 3, intersecting the facade fitting lines in pairs to form a facade line mesh, and extracting each closed facade mesh using the minimum ring search method.
4. The method for automatically extracting facade lines based on airborne building LiDAR point cloud according to claim 3, characterized in that: The method of extracting each closed facade mesh by using the minimum loop search method includes: step 3.1, using the intersecting facade segment vertices and segment adjacency relationships to construct a facade segment vertex array V and an adjacency matrix M; step 3.2, taking any unprocessed point from the array V as the starting point and the end point, and searching its adjacent points according to the adjacency matrix M; step 3.3 traversing the adjacent points, and taking the adjacent point as the current point and the end point as the target point, using the shortest path algorithm to search for the minimum closed loop, and setting the distance between the current point and the starting point to infinity during the search; step 3.4 determining whether the current closed loop exists, if so, deleting the current loop; if it is a new loop, adding it to the closed loop stack; go to step 3.2; steps 3.1 to 3.4 are iterated, and the search is stopped after all points in V are processed.
5. The method for automatically extracting facade lines based on airborne building LiDAR point cloud according to claim 4, characterized in that: The extraction of effective facade line segments in step 4 includes: forming a closed facade line grid for each closed loop obtained in step 3, further judging the effective grid by analyzing the density and height difference of the building point cloud falling into the grid according to the building LiDAR point cloud, and completing the extraction of facade line segments, specifically including: step 4.1, constructing a grid adjacency matrix Mc according to the number of closed grids, and initializing all elements to false; step 4.2, for any closed grid, searching and judging the adjacency relationship between its boundary and the boundary of other closed grids, if there is a common boundary between the two, marking the adjacency matrix element to true; step 4.3, traversing each closed grid, combining the building roof point cloud, and counting the roof point cloud falling into the current closed grid; counting the number of points, and using the Ransac plane segmentation algorithm to extract the largest plane for the roof points falling into the closed grid, so as to extract the maximum plane. The height mean of the plane point cloud is taken as the minimum ring height zi, and the minimum ring point density di is calculated using the number of points and the area of the closed grid; step 4.4, traverse each closed grid, if the point density of the grid is less than the threshold th_d, the grid is considered to be a pseudo invalid grid and marked for removal; otherwise, it is marked as a valid grid; step 4.5, take any candidate valid grid as the current grid, search its adjacent grids according to the grid adjacency matrix Mc, if the height difference dz between the adjacent grid and the current grid is less than the threshold th_z, mark it as a merge; otherwise, do not process it; step 4.6, starting from any closed grid to be merged, find the adjacent candidate grid to be merged according to the adjacency matrix, and mark the common edge of the two as an invalid boundary; after all grids are processed, store the valid boundaries and vertices of all candidate grids, and use the minimum ring search method again to complete the extraction of the facade line.
6. An automatic extraction device for facade lines based on airborne building LiDAR point cloud, characterized in that: include: The first main module is used to implement step 1, and perform monomer segmentation on the building LiDAR point cloud to obtain the point cloud of each building; The second main module is used to implement step 2, and extract the building facade points by using the plane segmentation method with normal constraints according to the point cloud of each building obtained in step 1; the third main module is used to implement step 3, and obtain the facade lines by performing horizontal projection and straight line fitting according to the building facade points obtained in step 2, and perform two-by-two intersection processing on the facade lines, and extract the facade mesh by using the minimum ring search method; the fourth main module is used to implement step 4, and extract the effective facade line segments for the facade mesh obtained in step 3 in combination with the distribution characteristics of the building point cloud; The automatic extraction device of facade lines based on airborne building LiDAR point cloud is used to execute the steps in any one of the automatic extraction methods of facade lines based on airborne building LiDAR point cloud claims 1-5.
7. An electronic device, characterized in that: include: At least one processor, at least one memory and a communication interface; wherein, The processor, memory and communication interface communicate with each other; The memory stores program instructions that can be executed by the processor, and the processor calls the program instructions to execute the method according to any one of claims 1 to 5.
8. A non-transitory computer-readable storage medium, characterized in that: The non-transitory computer-readable storage medium stores computer instructions, which cause the computer to execute the method of any one of claims 1 to 5.
