A point cloud building contour line extraction method ensuring fitting accuracy

By slicing point clouds into raster form, constructing KD trees, and iteratively refining them using the Mean-Shift algorithm, combined with feature calculation and line feature repair, the problem of low extraction accuracy caused by point cloud noise and occlusion is solved, and efficient building outline extraction is achieved.

CN116883441BActive Publication Date: 2026-02-03NANTONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310870677.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-14
Publication Date
2026-02-03
Estimated Expiration
2043-07-14

AI Technical Summary

Technical Problem

Existing point cloud data processing methods struggle to extract building outlines quickly and accurately, especially when faced with noise, occlusion, and missing data. Existing methods cannot guarantee geometric accuracy, resulting in low mapping efficiency.

Method used

We employ a method of slice point cloud rasterization, KD tree construction, Mean-Shift algorithm iterative refinement, feature calculation, and line feature repair and fusion. By calculating pixel weight center points, iterative growth, and repairing broken lines, we improve extraction accuracy.

Benefits of technology

It effectively reduces redundancy in point cloud data processing, improves the accuracy and speed of point cloud building outline extraction, and meets the needs of rapid surveying and mapping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116883441B_ABST
    Figure CN116883441B_ABST
Patent Text Reader

Abstract

The application discloses a point cloud building contour line extraction method for ensuring fitting accuracy, in the point cloud refining stage, first, slice point clouds are rasterized; then, a KD tree is constructed for the slice point clouds, and the weight center of each pixel point is calculated; then, a KD tree is constructed for the weight center point set, the iterative refinement of the point cloud slice is realized by using a revised Mean-Shift algorithm, and the weight center point is further optimized. In the feature extraction stage, the center point in each pixel is searched after refinement, the feature value and the feature vector are calculated; the direction of the pixel is transformed into a quadrant angle, the curvature of each pixel is calculated; the pixels are sorted according to the curvature, and the pixel point with the minimum curvature is selected for iterative growth. For each line support region obtained, the line feature parameters are determined by using the region center, the length and the width. The method realizes the slice line feature extraction of the coupling of discrete points and pixels, the line feature extraction accuracy of centimeter level can be obtained by the method, and the requirement of city building surveying and mapping can be met.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to a method for extracting point cloud building outlines while ensuring fitting accuracy, belonging to the fields of architectural and civil engineering and surveying engineering technology. Background Technology

[0002] Laser scanning technology has been widely applied in the field of architectural surveying. It allows for panoramic acquisition of structural and spatial information of buildings, offering high accuracy and speed. However, the massive volume of point cloud data makes processing difficult, placing high demands on processing hardware and personnel. Furthermore, existing automatic point cloud feature extraction methods struggle to guarantee geometric accuracy due to data loss caused by noise and object occlusion. Using laser-scanned point clouds for indoor mapping requires significant manual interaction to complete surveying and mapping tasks, failing to meet the need for rapid mapping. This invention proposes a point cloud building outline extraction method that ensures fitting accuracy, reduces redundancy in extracted line features, guarantees the accuracy of extracted point clouds, and meets the need for rapid extraction of building outlines from point clouds. Summary of the Invention

[0003] To address the problems existing in the prior art, this invention provides a point cloud building outline extraction method that ensures fitting accuracy, thereby solving the aforementioned technical problems.

[0004] To achieve the above objectives, the technical solution adopted by this invention is: a method for extracting point cloud building contours while ensuring fitting accuracy, comprising the following steps:

[0005] Step S1: Rasterize the sliced ​​point cloud; calculate the coordinate range of the point cloud, and calculate the number of rows and columns of the projected raster image of the sliced ​​point cloud based on the pixel size input by the user. Traverse the point cloud, calculate the row and column number of the point cloud in the raster image, and increment the number of pixels at the corresponding row and column number by 1 to obtain the occupied number raster.

[0006] Step S2: Calculate the pixel weight center, construct a KD tree for the slice point cloud, upsample each pixel of the raster image, determine whether each sub-pixel has a sampling point, and calculate the weight center point for the sub-pixel with a sampling point.

[0007] Step S3: Iterative refinement, constructing a KD tree for the weight center point set, using the modified Mean-Shift algorithm to refine the point cloud slices, and further optimizing the weight center points;

[0008] Step S4: Feature calculation: Search for nearest neighbors using the thinned center point within each pixel, calculate feature values ​​and feature vectors; transform the direction vector of the pixel into quadrant angles, calculate the curvature of each pixel, and store it as the corresponding raster image;

[0009] Step S5: Preserve accuracy through iterative growth. Sort the pixels according to curvature, select the pixel with the smallest curvature for iterative growth, and obtain the line feature support region. Use the center, angle, length and width of the line feature support region to determine the line feature parameters.

[0010] Step S6: Line feature repair and fusion, construct the nearest neighbor region for each line segment, correct the perpendicular lines at the corners, repair collinear broken lines to increase the line segments connecting the two, and repair perpendicular intersection lines to extend the intersection of the two.

[0011] Furthermore, the specific implementation steps of the point cloud rasterization in step S1 are as follows:

[0012] S11: User inputs point cloud slice data P Slice pixel size s pixel , and noise level s.

[0013] S12: Based on the point cloud slice P input by the user Slice Calculate the coordinate range of the point cloud.

[0014] S13: Calculate the number of rows and columns of the raster image S occupied by the sliced ​​point cloud after projection, based on the pixel size input by the user.

[0015] S14: Traverse the point cloud, calculate the row and column numbers of the point cloud in the raster image, and increment the number of pixels corresponding to the row and column numbers by 1 to obtain the occupied raster image.

[0016] Furthermore, the specific implementation steps for calculating the weight center in step S2 are as follows:

[0017] S21: User input noise level s and pixel size s pixel First, analyze the slice point cloud P. Slice ={p1,p2,…,p3},p i =(x i ,y i ,0) Construct the KD search tree tree1;

[0018] S22: Upsample the pixels of the raster image, subdividing each pixel into 5*5 smaller pixels.

[0019] S23: By searching the number of nearest neighbors of the center point of each subdivided pixel, determine whether each subdivided pixel has a sampling point. If the pixel size s pixel If there are nearest neighbors within the same radius, then add that subdivision pixel to set G. gravity .

[0020] S24: Traversing set G gravity Using a KD tree, the search radius is set to s+s pixelFor each subdivided pixel with sampling points, its weight center point is calculated. The calculation formula is: in

[0021] Furthermore, the specific implementation steps of the iterative refinement in step S3 are as follows:

[0022] S31: For the weight center point P weight The set is used to construct a KD search tree, tree2.

[0023] S32: Iterate through each weight center point and calculate the new position of each center point using the improved Mean-Shift algorithm. The calculation formula is:

[0024]

[0025] The first term is calculated by searching the nearest neighbor N1 in the point cloud slice using tree1, and the second term is calculated by searching the nearest neighbor N2 in the weight center set optimized by tree2. The iteration parameter is optional and defaults to 3; λ is the balancing parameter with a default value of 0.35.

[0026] Furthermore, the specific implementation steps of the feature calculation in step S4 are as follows:

[0027] S41: Construct a new KD tree tree2 from the optimized set of weight centroids.

[0028] S42: Rasterize the weight center point, traverse each pixel, and associate each pixel with the weight center point; when multiple points fall into a pixel, take any one point as the pixel association center point.

[0029] S43: Calculate the feature value and feature vector for each pixel.

[0030] S44: Record the characteristic vector corresponding to the largest eigenvalue as the direction vector. Convert the direction vector into quadrant angles. Calculate the curvature of each pixel based on the eigenvalues ​​and store it in the quadrant angle raster image and the curvature raster image.

[0031] Furthermore, the specific implementation steps of the precision-preserving iterative growth in step S5 are as follows:

[0032] S51: Sort the pixels according to their curvature. Seed pixels with smaller curvature are more likely to belong to linear features. Select the pixel with the smallest curvature as the seed point.

[0033] S52: Search a 5*5 sliding window around the seed point, determine whether the direction vector values ​​of the nearest neighbors of the seed point are the same as the current ones, and perform iterative growth by determining whether all the nearest neighbor pixels Q of each seed pixel in the seed unit set are similar;

[0034] Iterate through all nearest neighbor pixels. If the current pixel is close to its nearest neighbor pixel q... i Direction angle θ j Less than the threshold, i.e., θ j If the value is less than Δθ, then all points in that pixel unit are added to set Ψ, and the line support region angle is updated; the pixel is used as the new growth center, and the similarity of its nearest neighbor pixels is determined; when a pixel is added to a region, it is marked and will never be visited again.

[0035] S53: Repeat steps S51-S53 until all neighboring pixels have been traversed.

[0036] S54: Calculate the rectangular bounding box of the set Ψ. The line-supported region (a set of pixels) must be associated with a line segment (actually a rectangle). The line segment is determined by its endpoints and its width, or equivalently, its center, angle, length, and width. Extract the parameters of the line features based on the rectangular region.

[0037] S55, Repeat steps S51-S54, selecting new seed points for iteration, until all seed points have been traversed, obtaining the final line feature set L = {L1, L2, ..., L...} n}, where L i The extracted line segments.

[0038] Furthermore, the specific implementation steps of step S6, line feature repair and fusion, are as follows:

[0039] S61: For the set of line segments L, calculate the value of each line segment L. i Construct a Deloni triangulation by finding the midpoint of the L-axis; use each edge in the Deloni triangulation to find the current L-axis. i The nearest neighbor M of the line segment.

[0040] S62: Traverse each line segment L i Take the nearest neighbor L j and L k When line segment L i With neighbor L j Perpendicular to the nearest neighbor L k When parallel, correct L i The direction of L i and L k They are in the same direction.

[0041] S63: Traverse each line segment L i Obtain its nearest neighbor M i Inner straight segment L j When line segment L i With neighbor L j Collinear, and L i and L jIf there is no closer neighbor between the two segments, add the segment to the repair set L. repair .

[0042] S64: Traverse each line segment L i Obtain its nearest neighbor M i Inner straight segment L j When line segment L i With neighbor L j Vertical, calculate L i and L j The intersection point, add the line segment to the repair set L repair .

[0043] S65: Traverse each line segment L i Obtain its nearest neighbor < i Inner straight segment L j When line segment L i With neighbor L j Connecting adjacent line segments and the current line segment, we merge them into a polyline, and finally obtain the polyline set PL.

[0044] The beneficial effects of this invention are: this invention can effectively solve the problem of difficulty in rapid mapping caused by laser point cloud noise, occlusion, and data loss, save mapping time, and improve the efficiency of urban building surveying and mapping. Attached Figure Description

[0045] Figure 1 This is a flowchart of the algorithm of the present invention;

[0046] Figure 2 This is an example of the point cloud rasterization upsampling process according to an embodiment of the present invention;

[0047] Figure 3 This is an example of building point cloud slice data according to an embodiment of the present invention;

[0048] Figure 4 This is a diagram illustrating the point cloud iterative refinement effect according to an embodiment of the present invention.

[0049] Figure 5 This is a schematic diagram illustrating the calculation of line feature parameters in the line feature support region according to an embodiment of the present invention;

[0050] Figure 6 This is an example of extracting a vector graphic representation of a building outline in an embodiment of the present invention. Detailed Implementation

[0051] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. However, it should be understood that the specific embodiments described herein are merely illustrative and are not intended to limit the scope of the invention.

[0052] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains. The terminology used herein in the description of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention.

[0053] like Figure 1 As shown, this invention provides a point cloud building outline extraction method that ensures fitting accuracy, which can solve the problem of difficulty in rapid mapping caused by laser point cloud noise, occlusion, and data loss.

[0054] A method for extracting point cloud building contours while ensuring fitting accuracy includes the following steps:

[0055] Step S1: As Figure 2 The user inputs point cloud slice data, including pixel size and point cloud noise level. The algorithm first calculates the coordinate range of the point cloud, and based on the pixel size, calculates the number of rows and columns in the projected raster image of the sliced ​​point cloud. It then iterates through the point cloud, calculates the row and column numbers of the points in the raster image, and increments the pixel count for the corresponding row and column number by 1 to obtain the occupied raster count.

[0056] Step S2: Calculate pixel weight centers, construct a KD tree for the sliced ​​point cloud, and upsample each pixel of the raster image. Figure 3 ), determine whether each subdivided pixel has a sampling point, and calculate the weight center point for subdivided pixels that have sampling points;

[0057] Step S3: Iterative refinement. Construct a KD tree for the weight center point set, refine the point cloud slices using the modified Mean-Shift algorithm, and further optimize the weight center points. The result is as follows: Figure 4 ;

[0058] Step S4: Feature calculation: Search for nearest neighbors using the thinned center point within each pixel, calculate feature values ​​and feature vectors; transform the direction vector of the pixel into quadrant angles, calculate the curvature of each pixel, and store it as the corresponding raster image;

[0059] Step S5: Preserve accuracy through iterative growth. Pixels are sorted according to curvature, and the pixel with the smallest curvature is selected for iterative growth to obtain the line feature support region. The line feature parameters are determined using the center, angle, length, and width of the line feature support region. Figure 5 .

[0060] Step S6: Line feature repair and fusion, construct the nearest neighbor region for each line segment, correct the perpendicular lines at the corners, repair collinear broken lines to increase the line segments connecting the two, and repair perpendicular intersection lines to extend the intersection of the two.

[0061] The algorithm ends here. Figure 6 The extracted line feature set is obtained.

[0062] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions or improvements made within the spirit and principles of the present invention should be included within the protection scope of the present invention.

Claims

1. A method for extracting point cloud building contours while ensuring fitting accuracy, characterized in that, Includes the following steps: Step S1: Rasterize the sliced ​​point cloud; calculate the coordinate range of the point cloud, and calculate the number of rows and columns of the sliced ​​point cloud projected raster image based on the pixel size input by the user; traverse the point cloud, calculate the row and column number of the point cloud in the raster image, and increment the number of pixels at the corresponding row and column number by 1 to obtain the number of occupancy raster. Step S2: Calculate the pixel weight center, construct a KD tree for the slice point cloud, upsample each pixel of the raster image, determine whether each sub-pixel has a sampling point, and calculate the weight center point for the sub-pixel with a sampling point. Step S3: Iterative refinement, constructing a KD tree for the weight center point set, using the modified Mean-Shift algorithm to refine the point cloud slices, and further optimizing the weight center points; Step S4: Feature calculation: Search for nearest neighbors using the thinned center point within each pixel, calculate feature values ​​and feature vectors; transform the direction vector of the pixel into quadrant angles, calculate the curvature of each pixel, and store it as the corresponding raster image; Step S5: Preserve accuracy through iterative growth. Sort the pixels according to curvature, select the pixel with the smallest curvature for iterative growth, and obtain the line feature support region. Use the center, angle, length and width of the line feature support region to determine the line feature parameters. Step S6: Line feature repair and fusion, construct the nearest neighbor region for each line segment, correct the perpendicular lines at the corners, repair collinear broken lines to increase the line segments connecting the two, and repair perpendicular intersection lines to extend the intersection of the two.

2. The point cloud building outline extraction method with guaranteed fitting accuracy according to claim 1, characterized in that, The specific implementation steps for calculating the weight center in step S2 are as follows: S21: User input noise level s and pixel size s pixel First, analyze the slice point cloud P. Slice ={p1,p2,…,p3},p i =(x i ,y i ,0) Construct the KD search tree tree1; S22: Upsample the pixels of the raster image, and subdivide each pixel into 5*5 smaller pixels; S23: By searching the number of nearest neighbors of the center point of each subdivided pixel, determine whether each subdivided pixel has a sampling point. If the pixel size s pixel If there are nearest neighbors within the same radius, then add that subdivision pixel to set G. gravity ; S24: Traversing set G gravity Using a KD tree, the search radius is set to s+s pixel For subdivided pixels with sampling points, calculate their weight center points; The calculation formula is: in 3. The point cloud building outline extraction method with guaranteed fitting accuracy according to claim 1, characterized in that, The specific implementation steps of the iterative refinement in step S3 are as follows: S31: For the weight center point P weight The set is used to construct a KD search tree, tree2; S32: Traverse each weight center point and calculate the new position of each center point using the improved Mean-Shift algorithm; the calculation formula is: The first term is calculated by searching the nearest neighbor N1 in the point cloud slice using tree1, and the second term is calculated by searching the nearest neighbor N2 in the weight center set optimized by tree2. The iteration parameter is optional and defaults to 3. λ is the balancing parameter with a default value of 0.

35.

4. The point cloud building outline extraction method with guaranteed fitting accuracy according to claim 1, characterized in that, The specific implementation steps for feature calculation in step S4 are as follows: S41: Construct a new KD tree tree2 for the optimized set of weight centroids; S42: Rasterize the weight center point, traverse each pixel, and associate each pixel with the weight center point; when multiple points fall into a pixel, take any one point as the pixel association center point. S43: Calculate the feature value and feature vector for each pixel; S44: Record the characteristic vector corresponding to the largest eigenvalue as the direction vector, convert the direction vector into quadrant angles, calculate the curvature of each pixel based on the eigenvalues, and store them in the quadrant angle raster image and the curvature raster image.

5. The point cloud building contour extraction method with guaranteed fitting accuracy according to claim 1, characterized in that, The specific implementation steps of the precision-preserving iterative growth in step S5 are as follows: S51: Sort the pixels according to curvature. Seed pixels with smaller curvature are more likely to belong to the straight line feature. Select the pixel with the smallest curvature as the seed point. S52: Search a 5*5 sliding window around the seed point, determine whether the direction vector values ​​of the nearest neighbors of the seed point are the same as the current ones, and perform iterative growth by determining whether all the nearest neighbor pixels Q of each seed pixel in the seed unit set are similar; Iterate through all nearest neighbor pixels. If the current pixel is close to its nearest neighbor pixel q... i Direction angle θ j Less than the threshold, i.e., θ j If the value is less than Δθ, then all points in that pixel unit are added to set Ψ, and the line support region angle is updated; the pixel is used as the new growth center, and the similarity of its nearest neighbor pixels is determined; when a pixel is added to a region, it is marked and will never be visited again; S53: Repeat steps S51-S53 until all neighboring pixels have been traversed. S54: Calculate the rectangular bounding box of set Ψ. The line-supported region must be associated with a line segment, which is determined by its endpoints and width, or equivalent center, angle, length and width. Extract the parameters of the line features based on the rectangular region. S55, Repeat steps S51-S54, selecting new seed points for iteration, until all seed points have been traversed, obtaining the final line feature set L = {L1, L2, ..., L...} n }, where L i The extracted line segments.

6. The point cloud building outline extraction method with guaranteed fitting accuracy according to claim 1, characterized in that, The specific implementation steps of the line feature repair and fusion in step S6 are as follows: S61: For the set of line segments L, calculate the value of each line segment L. i At the midpoint, construct the Deloni triangle network; Find the current L by using each edge in the Deloni triangulation. i The nearest neighbor M of the line segment; S62: Traverse each line segment L i Take the nearest neighbor L j and L k When line segment L i With neighbor L j Perpendicular to the nearest neighbor L k When parallel, correct L i The direction of L i and L k Same direction; S63: Traverse each line segment L i Obtain its nearest neighbor M i Inner straight segment L j When line segment L i With neighbor L j Collinear, and L i and L j If there is no closer neighbor between the two segments, add the segment to the repair set L. repair ; S64: Traverse each line segment L i Obtain its nearest neighbor M i Inner straight segment L j When line segment L i With neighbor L j Vertical, calculate L i and L j The intersection point, add the line segment to the repair set L repair ; S65: Traverse each line segment L i Obtain its nearest neighbor M i Inner straight segment L j When line segment L i With neighbor L j Connecting adjacent line segments and the current line segment, we merge them into a polyline, and finally obtain the polyline set PL.

Citation Information

Patent Citations

  • Low-altitude image DSM generation building edge refinement method

    CN113538501A

  • Axis net-based actually measured three-dimensional point cloud and BIM model coordinate alignment method

    CN114329705A