A method for extracting and fusing the outline of a series-connected residential building
Through the extraction and fusion method of the contour lines of residential buildings connected in series, the problem of unsightly three-dimensional reconstruction effect of buildings in the existing technology is solved, and the accurate and rapid extraction and fusion of the outer contour lines of the building is achieved, reducing the impact of data volume and noise.
Patent Information
- Application Number
- CN202211196146.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-09-29
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2042-09-29
AI Technical Summary
The existing three-dimensional map mapping technology based on laser point clouds has problems such as large amount of data, redundant information, noise, occlusion and missing data, resulting in the three-dimensional reconstruction effect of buildings that cannot meet the needs of analysis and calculation.
The contour lines extraction and fusion methods of residential building buildings are adopted, including point cloud slice line feature extraction, angle and distance regularization, parallel line segment fusion, broken line fusion, intersection line merging and isolated line elimination, and the precise extraction and fusion of building exterior contour lines is achieved through LSD algorithms and KD trees and other technologies.
On the premise of ensuring the original geometric shape of the building model, the parallel lines, redundant lines and disconnection problems caused by noise are minimized, the building profile characteristics are regularized, the amount of data is reduced, and the building contour extraction is achieved efficient building contour extraction.
Smart Images

Figure CN115578245B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a method for extracting and fusing the building contour lines of residential buildings in series, belonging to the field of surveying and mapping geography information. Background Art
[0002] In recent years, the Chinese government has vigorously promoted the construction of smart cities. Building contour information has been widely applied in fields such as the update of urban basic information databases, target recognition, disaster prediction, change detection, real estate, etc., and is one of the important contents of 3D model reconstruction. With the rapid development of mobile measurement technology, it has become increasingly convenient to obtain point cloud and image data. However, there are still some difficulties in the existing technologies for 3D map mapping based on laser point clouds in theory and practice. For example, the laser point cloud has a large amount of data, information redundancy, problems such as noise, occlusion, and data loss, so that the 3D reconstruction of buildings has an unbeautiful display effect and cannot meet the requirements of analysis and calculation. Therefore, how to solve these problems is the current hot spot and difficulty to be solved. Summary of the Invention
[0003] Aiming at the problems existing in the above-mentioned prior art, the present invention provides a method for extracting and fusing the building contour lines of residential buildings in series, so as to accurately and quickly fuse and extract the building contour lines of residential buildings.
[0004] In order to achieve the above purpose, the technical solution adopted by the present invention is: a method for extracting and fusing the building contour lines of residential buildings in series, characterized by including the following steps:
[0005] Step 1: Feature extraction of point cloud slice lines. Slice the point cloud of a single residential building obtained by preprocessing, project the sliced point cloud data onto a plane as a raster image, and use the LSD algorithm for image edge detection to achieve the extraction of the straight line features of the building outer contour;
[0006] Step 2: Angle and distance regularization. For each extracted straight line segment, calculate the angle and distance correction numbers according to several straight line segments in its neighborhood, so that all straight line segments satisfy the parallel rule, and adjust the parallel lines deviating from a certain position to an approximately collinear position;
[0007] Step 3: Fusion of parallel (collinear) line segments. Search for the neighboring line segments of each line segment according to the given distance threshold d1. When the neighboring line segment is parallel to the current line segment, merge the neighboring line segment into the current straight line segment and update the neighboring information of the current line segment;
[0008] Step 4: Fusion of broken lines. Search for the neighboring line segments of each line segment according to the given distance threshold d2 (d2>d1). When the neighboring line segment is parallel to the current line segment and the perpendicular distance is less than the given threshold, fuse the neighboring line segment into the current straight line segment and update the neighboring information of the current line segment;
[0009] Step 5: Intersection line merging. According to the given distance threshold d2, search for the neighboring line segments of each line segment. When the neighboring line segment is not parallel to the current line segment and there is a certain angle, adjust the node coordinate information of the current line segment to make it intersect with the neighbor;
[0010] Step 6: Isolated line removal. Traverse all the adjusted line segments, sort them according to the line segment length, and remove some line segments shorter than the threshold according to the input removal length threshold to obtain the final outer contour line of the residential building.
[0011] Further, the specific steps of the point cloud slicing line feature extraction in Step 1 are as follows:
[0012] 2.1. Input the three-dimensional point cloud of a single building, denoted as P = {p1, p2,..., p n}, p i = (x i , y i , z i ). Obtain the point cloud slice according to the set slice elevation and slice thickness. The processed point cloud slice is denoted as P slice = {p′1, p′2,..., p′ n}, p′ i = (x i , y i , 0);
[0013] 2.2. Project the sliced point cloud P slice onto the two-dimensional plane according to the set pixel size s to obtain the raster image I;
[0014] 2.3. Use the LSD line feature extraction algorithm to process the image I to obtain a series of line segments L = {L1, L2,..., L n}, where L i is the extracted line segment, and each line segment is marked with a line segment ID.
[0015] Further, the specific steps of the angle and distance regularization in Step 2 are as follows:
[0016] 3.1. Perform equidistant sampling on the set of L line segments according to the set sampling interval s to obtain the sampling points P s = {p s1 , p s2 ,..., p sn};
[0017] 3.2. Based on the set of sampling points P s and the line segments to which they belong, construct a data structure S i = (x i , y i , z i , L i), where "L" i " is the ID name of the straight-line segment L, indicating that the sampling point S i is located on the straight-line segment L i ;
[0018] 3.3. Construct a KD tree based on the set S of points; traverse the endpoints l1 and l2 of each straight-line segment, search for the neighboring points S within the range of its radius R j , and judge the straight-line segments within the neighborhood according to the ID name of S j ; iterate sequentially until all the endpoints of the straight-line segments are traversed to obtain the neighborhood M i of each straight-line segment. The neighborhood set M = {M1, M2,..., M n};
[0019] 3.4. Taking the x-axis as the polar axis, denote the quadrant angle of each straight-line segment as x i , the included angle between the straight-line segment L i and the straight-line segment L i within its neighborhood M j is α ij . Assuming that the angle after the regularization adjustment of each line segment is x i ′, then the angle correction value of each line segment is Δx i = x i - x i ′. Construct the optimization objective function for the angle correction with the parallel rule constraint of the line segments as:
[0020] U(Δx) = D(x) + λV(x) (1);
[0021]
[0022]
[0023] where θ ij = α ij . When α ij is close to 0 degrees or 180 degrees, approximately parallel line segments are corrected to be strictly parallel through V(x); balance D(x) and V(x) by weighting with the parameter λ, and minimize the U(x) objective function through convex quadratic programming;
[0024] 3.5. The expression of the straight line adopts the polar coordinate representation equation. Denote the correction value of each line segment in the direction of its normal vector as Δx i , and calculate the distance correction value in a similar way to the above equation; obtain the set L′ of the straight-line segments with angle and distance corrections. At this time, the straight-line segments are updated to L′ = (L′1, L′2,..., L′ n ).
[0025] Further, the specific steps of fusing parallel line segments (collinear line segments) and broken line segments in Step 3 and Step 4 are as follows:
[0026] 4.1. For the updated set of line segments L′, construct the neighborhood of each line segment. The radius r1 for fusing parallel line segments (collinear line segments) is less than the search radius r2 for fusing broken line segments.
[0027] 4.2. Traverse each line segment L′ i , and obtain its neighboring region M′ i of line segments L′ j therein. Determine whether the neighboring line segment is parallel to the current line segment, and select the longer one among the neighboring line segment and the current line segment as the direction L of the fused line segment new ;
[0028] 4.3. Project the current line segment and the neighboring line segment onto L new , and update the node coordinates of the current line segment; Add the neighboring information of L′ j to the current line segment L′ i , and delete the neighboring information in line segment L′ i that points to line segment L′ j ;
[0029] 4.4. Delete line segment L′ j , update the neighboring information of all other (excluding L′ i ) line segments, and update the set L′;
[0030] 4.5. For the updated set L′, iterate sequentially until all parallel (collinear) line segments have been merged, thereby achieving the merging of all broken line segments;
[0031] Further, for the updated set of line segments L′ in Step 4.1, constructing the neighborhood of each line segment can be done in two ways: One way is to perform equidistant sampling on each line segment to construct a KD - tree, and obtain the neighboring line segments of each line segment through nearest - neighbor search; Another way is to construct an R - tree, calculate the bounding box of each line segment, construct the R - tree, and traverse each line segment to search for its neighboring line segments in the R - tree.
[0032] Further, the specific steps of merging intersection lines in Step 5 are as follows:
[0033] 5.1. For the updated set of line segments L′, construct the neighborhood of each line segment, which can be done in two ways: One way is to perform equidistant sampling on each line segment to construct a KD - tree, and obtain the neighboring line segments of each line segment through nearest - neighbor search; Another way is to construct an R - tree, calculate the bounding box of each line segment, insert the bounding box and the line segment index key - value pair into the R - tree, and traverse each line segment to search for its neighboring line segments in the R - tree;
[0034] 5.2. Traverse each line segment L′ i , and obtain its neighborhood M′ i of the line segment L′ j . When there is a certain angle between the neighboring line segment and the current line segment, calculate the intersection point p of the line where the neighboring line segment lies and the line where the current line segment lies intersect , and determine the positional relationship between the intersection point and the current line segment: {on the line segment, on the extension line, on the reverse extension line}; for multiple neighbors, calculate the distance value from each intersection point to the endpoints of the line segment to obtain D = {Δd1, Δd2, …, Δd m}, sort the distances D from the intersection points to the endpoints of the line segment, and select the smallest min{D} as the distance adjustment value for the endpoints of the line segment;
[0035] 5.3. Update the endpoint coordinates of the current line segment according to the distance adjustment value;
[0036] 5.4. Traverse all line segments until all line segments are updated to achieve intersection line merging.
[0037] Further, the specific steps for removing isolated short line segments in step six are as follows:
[0038] 6.1. Search for line segments in the neighborhood M i of the updated set of line segments L′;
[0039] 6.2. Sort all line segments according to the distance;
[0040] 6.3. If the number of neighboring line segments of the current line segment is 0 and the length of the line segment is less than a given threshold; mark the line segment as to be deleted and add it to the set of line segments to be deleted L del ;
[0041] 6.4. Traverse the set of line segments to be deleted and delete the corresponding line segments from L′.
[0042] The beneficial effects of the present invention are as follows: The present invention can, on the premise of ensuring the original geometric shape of the building model, minimize a large number of parallel lines, redundant lines, and broken lines generated by noise in the point cloud during the extraction of the building contour line, regularize the building contour line features to the greatest extent, thereby reducing the data volume of the building slice in the extraction of the building contour line and achieving efficient extraction of the building outline. Compared with the prior art, the present invention is more practical and user-friendly. Also, since the building contour information is an important basis for building extraction and three-dimensional model reconstruction, the present invention also has important significance for the rapid modeling of point cloud data and the automatic construction of building models. Description of the Drawings
[0043] Figure 1 is a flow chart of the method for extracting the building contour line of a residential building according to the present invention;
[0044] Figure 2 Laser scanning of building point cloud data in the embodiments of the present invention;
[0045] Figure 3 (a) is a sliced point cloud data diagram, Figure 3 (b) is a top view of the sliced point cloud data;
[0046] Figure 4 The building contour line obtained by processing with the LSD line feature extraction algorithm in the embodiments of the present invention;
[0047] Figure 5 (a) are the initially extracted contour line features with many redundant broken lines and parallel lines, Figure 5 (b) are the contour line features after regularizing the angles and distances of adjacent straight line segments, Figure 5 (c) are the contour line features after fusing parallel lines, broken lines, and intersecting lines;
[0048] Figure 6 (a) is the building contour line before removing isolated lines, Figure 6 (b) is the building contour line after removing isolated lines. Detailed implementation manners
[0049] To make the objectives, technical solutions, and advantages of the present invention clearer, the present 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 only used to explain the present invention and are not intended to limit the scope of the present invention.
[0050] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by those of ordinary skill in the technical field to which the present invention belongs. The terms used in the specification of the present invention herein are only for the purpose of describing specific embodiments and are not intended to limit the present invention.
[0051] As Figure 1 shown, the present invention provides a method for extracting and fusing the contour lines of a series of residential buildings, which is applicable to the extraction of building outlines in the process of visual mapping of urban three-dimensional models in the fields of surveying and mapping geographic information and construction engineering, and can solve the problems of rough extraction of residential building contour lines and redundancy of broken lines and parallel lines in the process of building two-dimensional automated modeling.
[0052] First, select an independent building and use the method proposed by the present invention to extract the contour line, and then elaborate on the principle and process of processing this method. Figure 2 The data for this independent building are:
[0053] Step 1: Feature extraction of point cloud slice lines. Load the data of the independent building in the point cloud data processing software, select a representative building location, and use the developed point cloud cropping function to slice the building point cloud to obtain sliced point cloud data that maintains the original geometric shape of the model and has high integrity (as shown in Figure 3 ), project the sliced point cloud data onto a plane as a raster image, and use the LSD algorithm for image edge detection to extract the straight line features of the building outline. In the experiment, the pixel size for slicing line feature extraction is set to 0.015, the line length is 0.2, and the results are output (as shown in Figure 4 ).
[0054] Step 2: Angle and distance regularization. For each extracted straight line segment, calculate the angle and distance correction numbers based on several straight line segments in the neighborhood to make all straight line segments satisfy the parallel rule, and adjust the parallel lines deviated from a certain position to an approximately collinear position, as shown in Figure 5 (b).
[0055] Specifically, first input the point cloud of a single building, denoted as P = {p1, p2,..., p n}, p i = (x i , y i , z i ), obtain the point cloud slice according to the set slice elevation and slice thickness, and the processed point cloud slice is denoted as P slice = {p′1, p′2,..., p′ n}, p′ i = (x i , y i , 0); then project the sliced point cloud P slice onto a two-dimensional plane according to the set pixel size s to obtain the raster image I; then use the LSD line feature extraction algorithm to process the image I to obtain a series of straight line segments L = (L1, L2,..., L n}, where L i is the extracted straight line segment and the line segment ID is marked.
[0056] Step 3: Fusion of parallel line segments (collinear line segments). Search for the neighboring line segments of each line segment according to the given distance threshold d1. When the neighboring line segment is parallel to the current line segment, merge the neighboring line segment into the current straight line segment and update the neighboring information of the current line segment, as shown in Figure 5 (c).
[0057] Specifically, first perform equidistant sampling on the set L of straight line segments according to the set sampling interval s to obtain the sampling points P s = {p s1 , p s2 ,..., p sn}; Based on the set of sampling points P s and the line segments to which they belong, construct the data structure S i =(x i , y i , z i , L i ), where "L i " is the ID name of the line segment L, indicating that the sampling point S i is located on the line segment L i ; Subsequently, based on the set S composed of points, construct a KD tree for it; Traverse the endpoints l1 and l2 of each line segment, search for the neighboring points S j within the range of its radius R, and judge the line segments within the neighborhood according to the ID name of S j ; Iterate in turn until all the endpoints of the line segments are traversed, and obtain the neighborhood M i of each line segment. The neighborhood set M = {M1, M2,..., Mn}; Subsequently, with the x-axis as the polar axis, record the quadrant angle of each line segment as x i , and the angle between the line segment L i and the line segment L i within its neighborhood M i is α ij . Assume that the angle after the regularization adjustment of each line segment is x i ′, then the angle correction value of each line segment is Δx i =x i -x i ′, and construct the optimization objective function for the line segment angle correction as:
[0058] U(Δx)=D(x)+λV(x)
[0059]
[0060]
[0061] where θ ij =α ij . When α ij is close to 0° or 180°, approximately parallel line segments are corrected to be strictly parallel through V(x). Balance D(x) and V(x) by weighting with the parameter λ, and minimize the U(x) objective function through convex quadratic programming solution;
[0062] Finally, the expression of the line is represented by the polar coordinate equation. Record the correction value of each line segment in the direction of its normal vector as Δx i , and calculate the distance correction value using a similar equation to the above. Obtain the set of line segments L′ with angle and distance corrections. At this time, the line segment is updated to L′=(L′1, L′2,..., L′ n}.
[0063] Step 4: Disconnected line fusion. Search for the neighboring line segments of each line segment according to the given distance threshold d2 (d2 > d1). When the neighboring line segment is parallel to the current line segment and the perpendicular distance is less than the given threshold, fuse the neighboring line segment into the current line segment and update the neighboring information of the current line segment. Perform 2D line trimming on the regularized contour line. In the experiment, set the distance between connected line segments to 0.25 and the distance threshold for parallel line fusion to 0.08 to obtain the contour line of the residential building after parallel line disconnected line fusion, which greatly reduces the redundancy of disconnected lines and parallel lines.
[0064] Specifically, first, for the updated set of line segments L′, construct the neighborhood of each line segment. There are two ways: one is to sample each line segment at equal intervals to construct a KD tree and obtain the neighboring line segments of each line segment through nearest neighbor search; the other way is to construct an R tree, calculate the bounding box of each line segment, construct an R tree, and traverse each line segment to search for its neighboring line segments in the R tree. The difference between Step 3 and Step 4 lies in the different set nearest neighbor search radii. The fusion radius r1 of parallel line segments (collinear line segments) is less than the search radius r2 of disconnected line fusion; then traverse each line segment L′ i to obtain its neighborhood M′ i and the line segments L′ j inside it, judge whether the neighboring line segment is parallel to the current line segment, and select the longer one of the neighboring line segment and the current line segment as the direction L of the fused line segment new ; then project the current line segment and the neighboring line segment onto L new and update the node coordinates of the current line segment; add the neighboring information of L′ j to the current line segment L′ i , delete the neighboring information in the line segment L′ i that points to the line segment L′ j ; then delete the line segment L′ j , update the neighboring information of all other (excluding L′ i ) line segments, and update the set L′; for the updated L′ set, iterate sequentially until all parallel (collinear) line segments have been merged; for Step 4, all disconnected line merges are achieved.
[0065] Step 5: Intersecting line merge. Search for the neighboring line segments of each line segment according to the given distance threshold d2. When the neighboring line segment is not parallel to the current line segment and there is a certain angle, adjust the node coordinate information of the current line segment to make it intersect with the neighboring one.
[0066] Specifically, first, for the updated set of straight line segments L′, construct the neighborhood of each straight line segment. There are two ways to do this: one is to sample each line segment at equal intervals to construct a KD tree and obtain the neighboring line segments of each line segment through nearest neighbor search; the other way is to construct an R tree, calculate the bounding box of each line segment, insert the bounding box and the line segment index key value pair into the R tree, and traverse each line segment to search for its neighboring line segments in the R tree.
[0067] Subsequently, traverse each line segment L′ i to obtain its neighborhood M′ i and the straight line segments L′ j inside it. When there is a certain angle between the neighboring line segment and the current line segment, calculate the intersection point P of the straight line where the neighboring line segment is located and the straight line where the current line segment is located intersect , and judge the positional relationship between the intersection point and the current line segment: {on the line segment, on the extension line, on the reverse extension line}. For multiple neighbors, calculate the distance value from each intersection point to the endpoints of the straight line segment to obtain D = {Δd1, Δd2, …, Δd m}, sort the distances D from the intersection points to the endpoints of the line segment, and select the smallest min{D} as the distance adjustment value for the endpoints of the straight line segment.
[0068] Update the endpoint coordinates of the current line segment according to the distance adjustment value; finally, traverse all the straight line segments until all the line segments are updated, and realize the intersection line merging.
[0069] Step six: Remove isolated lines. Traverse all the adjusted straight line segments, sort them according to the line segment length, and remove the partial straight line segments shorter than the threshold according to the input removal length threshold to obtain the final building outline.
[0070] Specifically, first, for the updated set of straight line segments L′, search for the straight line segments in the neighborhood M i ; then sort all the straight line segments according to the distance; if the number of neighboring line segments of the current line segment is 0 and the line segment length is less than the given threshold; mark this line segment as to be deleted and add it to the set of line segments to be deleted L del ; traverse the set of line segments to be deleted and delete the corresponding straight line segments from L′.
[0071] This method can minimize a large number of parallel lines, redundant lines and broken lines problems caused by noise in the point cloud when extracting the building outline, regularize the building outline features to the greatest extent, thereby reducing the data volume of the building slice when extracting the building outline, and realizing efficient building outline extraction. Compared with the existing technology, the present invention is more practical and easy to use. Also, since the building outline information is an important basis for building extraction and 3D model reconstruction, the present invention also has important significance for the rapid modeling of point cloud data and the automatic construction of building models.
[0072] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for extracting and fusing the building outline of residential buildings in series, characterized in that, It includes the following steps: Step 1: Feature extraction of point cloud slice lines. Slice the point cloud of a single residential building obtained by preprocessing, project the sliced point cloud data onto a plane as a raster image, and use the LSD algorithm for image edge detection to extract the straight line features of the building outline; Step 2: Angle and distance regularization. For each extracted straight line segment, perform angle and distance correction calculations based on several straight line segments in its neighborhood to make all straight line segments satisfy the parallel rule, and adjust the parallel lines deviating from a certain position to an approximately collinear position; Step 3: Fusion of parallel or collinear line segments. Search for the neighboring line segments of each line segment according to the given distance threshold d1. When the neighboring line segment is parallel to the current line segment, merge the neighboring line segment into the current straight line segment and update the neighboring information of the current line segment; Step 4: Disconnected line fusion. According to the given distance threshold d 2, d2 > d 1, Search for the neighboring lines of each line segment. When the neighboring line is parallel to the current line segment and the perpendicular distance is less than the given threshold, fuse the neighboring line segment into the current line segment and update the neighboring information of the current line segment; Step 5: Merge of intersecting lines. Search for the neighboring line segments of each line segment according to the given distance threshold d2. When the neighboring line segment is not parallel to the current line segment and there is a certain included angle, adjust the node coordinate information of the current straight line segment to make it intersect with the neighboring line segment; Step 6: Elimination of isolated lines. Traverse all the adjusted straight line segments, sort them according to the line segment length, and eliminate the partial straight line segments shorter than the threshold according to the input elimination length threshold to obtain the final outline line of the residential building; 2. The method for extracting and fusing the building contour lines of a series of residential buildings according to claim 1, wherein The specific steps of the feature extraction of point cloud slice lines in Step 1 are as follows: 2.
1. Input the 3D point cloud of a single building, denoted as P = {p1, p2,..., p n}, where p i = (x i , y i , z i ). Obtain the point cloud slice according to the set slice elevation and slice thickness. The processed point cloud slice is denoted as P Slice = {p′1, p′2,..., p′ n}, where p′ i = (x i , y i , 0); 2.
2. Project the sliced point cloud P onto a two-dimensional plane according to the set pixel size s to obtain a raster image I; Slice 2.
3. Process the image I using the LSD line feature extraction algorithm to obtain a series of straight line segments L = {L1, L2,..., L n}, where L i is the extracted straight line segment, and each line segment is marked with a line segment ID.
3. A method for extracting and fusing the building contour lines of residential buildings in series according to claim 1, characterized in that, The specific steps of the angle and distance regularization in Step 2 are as follows: 3.
1. Equally spaced sampling is performed on the set of L straight line segments according to the set sampling interval s to obtain sampling points P s ={p s1 , p s2 ,..., p sn}; 3.
2. Based on the sampling point set P s and its corresponding line segments to construct data structure S i =(x i ,y i , z i , L i ), where "L i " is the ID name of the straight line segment L, indicating the sampling point S i Located on the straight line segment L i superior; 3.
3. Build a KD tree based on the set S of points; traverse the endpoints l1 and l2 of each line segment, and search for the neighboring points S within the range of its radius R j , and judge the line segments in the neighborhood according to the ID names of S j . Iterate sequentially until all the endpoints of the line segments are traversed, and obtain the neighborhood M of each line segment i , the neighborhood set M = {M1, M2,..., M n}; 3.
4. With the x-axis as the polar axis, denote the quadrant angle of each straight line segment as x i , the straight line segment L i and its neighborhood M i The included angle between the straight line segment L j in it and L is α ij . Assume that the angle after the regularization adjustment of each line segment is x i ′, then the angle correction value of each line segment is Δx i = x i - x i ′. The optimization objective function for the angle correction that constructs the parallel rule constraint of the line segment is as follows: U(Δx) = D(x) + λV(x) (1); where θ ij = α ij , when α ij is close to 0 degrees or 180 degrees, the approximately parallel line segments are corrected to be strictly parallel by V(x); D(x) and V(x) are weighted and balanced by the parameter λ, and the minimization of the objective function U(x) is achieved by solving convex quadratic programming; 3.
5. The expression of the straight line adopts the polar coordinate representation equation, and the correction value of each line segment in the direction of its normal vector is denoted as Δx i , and the distance correction value is calculated using a similar equation above; the set of straight line segments L' after angle and distance correction is obtained. At this time, the straight line segment is updated to L' = {L'1, L'2,..., L' n}.
4. A method for extracting and fusing the building outline of a residential building in series according to claim 1, characterized in that, The specific steps of the fusion of parallel line segments or collinear line segments and the fusion of broken lines in Step 3 and Step 4 are as follows: 4.
1. For the updated set of straight line segments L′, construct the neighborhood of each straight line segment. The radius r1 of the fusion of parallel line segments or collinear line segments is less than the search radius r2 of the fusion of broken lines; 4.
2. Traverse each line segment L' i , and obtain its neighborhood M' i of the straight line segment L' j . Determine whether the neighboring line segment is parallel to the current line segment, and select the longer one of the neighboring line segment and the current line segment as the direction L of the fusion line segment new ; 4.
3. Project the current line segment and the neighboring line segment onto L new , and update the coordinates of the nodes of the current line segment; Add the neighboring information of L′ j to the current line segment L′ i , and delete the neighboring information in the line segment L′ i that points to the line segment L′ j ; 4.
4. Delete line segment L′ j , update the neighbor information of all other line segments, and update set L′; 4.
5. For the updated set L′, iterate sequentially until all parallel or collinear line segments have been merged, thus achieving the merger of all broken lines.
5. A method for extracting and fusing the building contour lines of residential buildings in series according to claim 4, characterized in that, In Step 4.1, for the updated set of straight line segments L′, construct the neighborhood of each straight line segment in two ways: one is to equally sample each line segment to construct a KD tree and obtain the neighboring line segments of each line segment through nearest neighbor search; the other way is to construct an R tree, calculate the bounding box of each line segment, construct an R tree, and traverse each line segment to search for its neighboring line segments in the R tree.
6. A method for extracting and fusing the building contour lines of residential buildings in series according to claim 1, characterized in that, The specific steps of the merge of intersecting lines in Step 5 are as follows: 5.
1. For the updated set of straight line segments L′, construct the neighborhood of each straight line segment in two ways: one is to equally sample each line segment to construct a KD tree and obtain the neighboring line segments of each line segment through nearest neighbor search; the other way is to construct an R tree, calculate the bounding box of each line segment, insert the bounding box and the line segment index key value pair into the R tree, and traverse each line segment to search for its neighboring line segments in the R tree; 5.
2. Traverse each line segment L′ i and obtain its neighborhood M′ i containing the line segment L′ j . When there is a certain angle between the neighboring line segment and the current line segment, calculate the intersection point P of the line where the neighboring line segment lies and the line where the current line segment lies Intersect . Determine the positional relationship between the intersection point and the current line segment: {on the line segment, on the extension line, on the reverse extension line}; for multiple neighbors, calculate the distance value from each intersection point to the endpoints of the line segment to obtain D = {Δd1, Δd2, …, Δd m}. Sort the distances D from the intersection points to the endpoints of the line segment and select the smallest min{D} as the distance adjustment value for the endpoints of the line segment 5.
3. Update the endpoint coordinates of the current line segment according to the distance adjustment value; 5.
4. Traverse all straight line segments until all line segments have been updated to achieve the merge of intersecting lines.
7. A method for extracting and fusing the building contour lines of residential buildings in series according to claim 1, characterized in that, The specific steps of the elimination of isolated short line segments in Step 6 are as follows: 6.
1. Search for the straight line segments in the neighborhood M of the updated set L' of straight line segments i among the straight line segments; 6.
2. Sort all straight line segments according to the distance; 6.
3. If the number of neighboring segments of the current segment is 0 and the segment length is less than the given threshold, mark the segment as to be deleted and add it to the set L of segments to be deleted del ; 6.
4. Traverse the set of line segments to be deleted and delete the corresponding line segments from L'.