Window detection method based on non-equidistant slices and boundary features

By using the method of non-equidistant slicing and boundary features, the problems of missing data and missed detection in window detection are solved, and accurate identification and completion of windows on building facades are achieved, thereby improving the robustness and accuracy of detection.

CN116740546BActive Publication Date: 2025-09-26XIAN UNIV OF TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310740603.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-21
Publication Date
2025-09-26
Estimated Expiration
2043-06-21

AI Technical Summary

Technical Problem

In the existing technology, window detection in building facade reconstruction has problems of data missing and missed detection, especially due to the obstruction of glass material and the influence of complex outdoor scenes, resulting in insufficient accuracy and completeness of window detection.

Method used

A detection method based on non-equidistant slicing and boundary features is adopted. The building facade is divided into non-equidistant slices to extract the inner boundary points of potential windows. The improved K-means++ algorithm is used for clustering segmentation and interference element removal. Finally, the window shape is completed and classified, and the contour lines are drawn.

Benefits of technology

It improves the accuracy and completeness of window detection, can identify different types of windows, has good robustness, and enriches the method system of computer graphics and visual intelligence.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116740546B_ABST
    Figure CN116740546B_ABST
Patent Text Reader

Abstract

This invention discloses a window detection method based on non-equidistant slices and boundary features. Step 1: Divide the building facade into non-equidistant slices to obtain slices with potential windows and wall slices. Step 2: Extract the inner boundary points of the potential window slices obtained in step 1. Step 3: Cluster and segment the inner boundary points obtained in step 2 and filter out all window elements. Step 4: Classify and complete the window elements obtained in step 3 to ultimately obtain a more accurate window shape. This invention solves the problem of missing window data and missed detection caused by occlusion in the existing technology.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of computer vision and image processing methods, and relates to a window detection method based on non-equidistant slices and boundary features. Background Art

[0002] With the rapid development of 3D laser scanning technology, building detailed models of realistic 3D scenes has become a development trend in urban planning and other fields. Windows, as a major component of building facades, are key to building detailed facade models.

[0003] In recent years, most domestic and foreign researchers have only conducted 3D reconstruction of buildings based on the external contour features of buildings. There has been little research on the detailed features of buildings, and the ideal results have not been achieved. Because the glass material of the windows in most building facades cannot reflect the laser beam. At the same time, the complexity of outdoor scenes, such as occlusion by elements such as vegetation, can also lead to holes in the building facades and missing point cloud data in the window area, which seriously affects the accuracy and completeness of window detection. In addition, when most researchers perform window detection on the facades of modern buildings, they assume that there are no windows at the bottom of the building and directly delete the bottom points. But in reality, there may be doors and windows of various shapes at the bottom of the building, which can lead to missed windows. Summary of the Invention

[0004] The purpose of the present invention is to provide a window detection method based on non-equidistant slices and boundary features, which solves the problems of missing window data and missed detection caused by occlusion in the prior art.

[0005] The technical solution adopted by the present invention is a window detection method based on non-equidistant slices and boundary features, which is specifically implemented according to the following steps:

[0006] Step 1: Divide the building facade into non-equidistant slices to obtain slices with potential windows and wall slices;

[0007] Step 2: extract the inner boundary points of the slice on the potential window slice obtained in step 1;

[0008] Step 3: Cluster and segment the inner boundary points obtained in step 2, and filter out all window elements;

[0009] In step 4, the window elements obtained in step 3 are classified and completed to obtain a more accurate window shape.

[0010] The present invention is also characterized in that:

[0011] First, the building facade is sliced ​​horizontally and vertically. By analyzing the changes in slice density, the slices are non-equidistantly divided and marked, and the inner boundary points of the slices marked as having potential windows are extracted. Secondly, the inner boundary points are singulated based on the improved K-means++ algorithm, and interfering elements are eliminated according to the geometric characteristics of the windows. Then, the set of window boundary points is classified, and the window boundaries with incomplete data and the window areas that have been missed are completed. Finally, the outline of each complete window boundary point is drawn to realize the detection of windows on the building facade.

[0012] Step 1 is as follows:

[0013] Step 1.1, calculate the horizontal non-equidistant slices, slice the building facade point cloud data in the y-axis direction from bottom to top with equal intervals, and obtain the horizontal slice set ,in, Indicates the slices, is the total number of slices;

[0014] Step 1.2: Calculate the density of each slice and the density change between adjacent slices according to the following formulas (1) and (2):

[0015] (1)

[0016] (2)

[0017] If the density variation between adjacent slices is not greater than the threshold , then the adjacent slices are merged and the slice thickness becomes ,in and Respectively and Otherwise, no merging is performed and the first and Re-compare the slices.

[0018] Step 1.3, repeat step 1.2, and combine the slices that meet the merging conditions from bottom to top to obtain an updated point cloud slice set ;

[0019] Step 1.4, judge The status of each slice in

[0020] Step 1.4.1, for the original slice set For each slice, the intercepted fragment Divided into two parts and , calculate the proportion by formula (3) To determine whether it is a fragment with potential windows;

[0021] (3)

[0022] Step 1.4.2, if At the threshold and If there are any windows between them, it is marked as a wall, otherwise it is marked as a potential window.

[0023] Step 1.4.3, then statistics The number of two markers contained in each slice and ,if , then the slice is considered to be a wall segment; otherwise, it is a segment with potential windows;

[0024] Step 1.5, calculate vertical non-equidistant slices. The method is similar to the horizontal non-equidistant slice method, which mainly divides the building facade point cloud data from left to right along the x-axis.

[0025] Step 2 is as follows:

[0026] Step 2.1: First, perform preliminary extraction of the inner and outer boundaries of the target slice;

[0027] Step 2.2: Based on the result of step 2.1, remove the outer boundary points of the target section and extract the inner boundary points.

[0028] Step 2.1 is as follows:

[0029] Step 2.1.1: For the target slice, take the point at the lower left corner of the slice, i.e. the point with the smallest x value, as the initial sampling point. , use the kd tree index structure to search for the nearest neighbor of the point, and then obtain the point of The point set of the nearest neighbor points ;

[0030] Step 2.1.2, initial sampling point As the coordinate origin, build a local coordinate system, and then Each point in the local coordinate system is divided into four quadrants according to its x- and y-coordinates, and the number of points distributed in each quadrant is counted. If there is no neighboring point in a quadrant, it is initially considered a boundary point; otherwise, the above steps are repeated to determine the next point.

[0031] Step 2.1.3: If the sampling point is initially considered to be a boundary point, then for the neighborhood point set Chinese Communist Party Points are used for plane fitting, and the plane equation is as shown in formula (4):

[0032] (4)

[0033] Formula (4) is transformed into formula (5) by defining formula (6), and the fitting equation satisfies Minimum, that is , and then by solving equation (7) we can get , by substituting into formula (6), we can obtain the plane equation result in formula (5);

[0034] (5)

[0035] (6)

[0036] (7)

[0037] Step 2.1.4, obtain the projection coordinates of each point in the neighborhood point set on the fitting plane through formula (8) , and then construct the unit direction vector of the neighborhood projection point and the sampling point projection point on the fitting plane through formula (9) , from this we can get the point The distribution of neighborhood points;

[0038] (8)

[0039] (9)

[0040] Step 2.1.5, select is the starting vector, and the normal vector of the fitting plane is calculated The cross product of , and then calculate the vectors and and The angle between and , adjust the directions of each angle to make them consistent. If , then take ;

[0041] Step 2.1.6, for Sort in ascending order and calculate the angle between adjacent vectors using formula (10) , maximum angle threshold Set to , compare each The size of , take the maximum value With the set threshold For comparison, if , then the sampling point is considered is a boundary point, add it to the boundary point set , otherwise it is considered as a non-boundary point.

[0042] (10);

[0043] Step 2.1.7, repeat all steps from step 2.1.1 to step 2.1.6 until all points in the slice have been determined, thus obtaining the boundary point set .

[0044] Step 2.2 is as follows:

[0045] Step 2.2.1: Based on the extracted horizontal target slices, sort the point cloud data set by y value and store it in a linked list. Calculate the minimum and maximum values ​​of x and y respectively by constructing a minimum bounding box for the point set.

[0046] Step 2.2.2, let the latitude line start from the minimum y value and take the step size as , calculate the minimum and maximum x values ​​of each latitude line within the range of y, and store its index value in the newly created array In the process, all horizontal target slices are scanned;

[0047] Step 2.2.3: Use the same method to scan the meridian of the vertical target slice, mainly starting from the minimum x value in the point set, and taking the step size as , calculate the minimum and maximum y values ​​of each meridian within the range of x, and store their index values ​​in the array In the process, all vertical target slices are scanned;

[0048] Step 2.2.4, delete the duplicate index values ​​to obtain the required outer boundary points ;

[0049] Step 2.2.5, extract the outer boundary points Create a kd tree and add the total boundary points extracted in step 2.1 Set as input;

[0050] Step 2.2.6, Each point in is used as a query point, and the neighboring points are found using the nearest neighbor search algorithm;

[0051] Step 2.2.7, in Find the indexes corresponding to the neighboring points in turn and delete them;

[0052] Step 2.2.8, All point cloud data are judged point by point until All points in the are judged;

[0053] Step 2.2.9, use formula (11) to delete the remaining outer boundary points, leaving only the required inner boundary points. ;

[0054] (11)

[0055] In formula (11):

[0056] ——are the minimum and maximum x-coordinate values ​​of the building facade point cloud;

[0057] ——are the minimum and maximum y-coordinate values ​​of the building facade point cloud;

[0058] ——These are the thresholds for extracting inner boundary points on the x and y axes respectively.

[0059] Step 3 is as follows:

[0060] Step 3.1, based on the input boundary point set , calculate its centroid, and use the KNN algorithm to find the point closest to the centroid and use this point as the initial seed point;

[0061] Step 3.2: Calculate the nearest Euclidean distance from the remaining points to the initial seed point according to formula (13), and then use formula (14) to calculate the probability of the remaining points being selected as the next cluster center, and select the point with the highest probability as the next cluster center;

[0062] (12)

[0063] (13)

[0064] Step 3.3, repeat step 3.2 until you get The cluster center or the current distance change is less than the threshold;

[0065] Step 3.4, calculate the remaining points and The distance between the cluster centers is used to classify the points closer to the center into the same class;

[0066] Step 3.5, recalculate the cluster center based on the updated classification set;

[0067] Step 3.6, repeat steps 3.4-3.5 until the number of iterations is reached or the cluster center no longer changes.

[0068] Step 3.7: Remove interference factors that are not window elements and set the area threshold in the code , aspect ratio , and set the height threshold from the ground , delete the interfering elements and realize the individual extraction of windows.

[0069] Step 4 is as follows:

[0070] Step 4.1, classify the windows;

[0071] Step 4.2, complete the window;

[0072] Step 4.3, draw the window outline.

[0073] Step 4.1 is as follows:

[0074] Step 4.1.1, using the window aspect ratio , normalized perimeter and normalized area Construct a feature vector for a single window

[0075] Step 4.1.2, calculate the similarity between the feature vectors of each window in the facade using formulas (14) and (15) , set the similarity threshold , when the similarity When and The windows represented are classified as the same type, otherwise excluded.

[0076] (14)

[0077] In formula (14):

[0078] ——The maximum and minimum y coordinates of each window point cloud respectively;

[0079] ——respectively the maximum and minimum x-coordinate values ​​of each window point cloud;

[0080] ——are the minimum and maximum values ​​of all window perimeters respectively;

[0081] ——are the minimum and maximum areas of all windows respectively;

[0082] (15);

[0083] Step 4.2 is as follows:

[0084] Step 4.2.1, calculate the centroid of each window outline of the same type and sort them according to the x-coordinate of the centroid to obtain the arrangement order of the windows in the same row;

[0085] Step 4.2.2, based on the arrangement order, use formula (16) to calculate the distribution spacing between adjacent windows in each row;

[0086] (16)

[0087] Step 4.2.3: For windows with incomplete or missed data, copy the window point cloud with complete outlines to the incomplete location of the window data or the area where the window was not detected according to the arrangement rules to complete the window;

[0088] Step 4.3 is as follows:

[0089] Step 4.3.1, set of feature points of the boundary of a single window Mark all points to indicate whether the point has been processed;

[0090] Step 4.3.2, from the collection Select the unmarked lower left corner (with the smallest x and y values) As the initial growth point, and point As the first element to form a new point set , and then from the point set Search distance point The nearest point is used as its connection point ,Will and From point set Delete it and determine the direction vector according to formula (17) ;

[0091] (17)

[0092] Step 4.3.3, from the collection Using KNN algorithm to search points of Neighborhood point set , calculated using formula (18) and Angle deviation , calculate and select the point corresponding to the minimum value through formula (19) As and mark the connection point as used. If the connection point has been processed, jump to step 4.3.5.

[0093] (18)

[0094] (19)

[0095] In formula (19):

[0096] —the distance between a connection point and each of its nearest neighbors;

[0097] Step 4.3.4, Update ,Will Add as new elements , jump to step 4.3.3;

[0098] In step 4.3.5, if the boundary feature points do not form a closed pattern, jump to step 4.3.2; otherwise, end the sorting.

[0099] The beneficial effects of the present invention are:

[0100] The present invention solves the problem of incorrectly extracting elements that do not belong to the window area in a building facade or the problem of some windows being unable to be identified due to occlusion or incomplete data by using a window detection method based on non-equidistant slices and boundary features. The present invention can detect different types of windows on a building facade with greatly improved accuracy and completeness, and has good robustness, enriching the methodological system of computer graphics and visual intelligence. BRIEF DESCRIPTION OF THE DRAWINGS

[0101] Figure 1 is the original data input in step 1 of the embodiment of the window detection method based on non-equidistant slices and boundary features of the present invention;

[0102] Figure 2 is the non-equidistant horizontal slice division result of the building facade obtained in step 1 of the embodiment of the window detection method based on non-equidistant slices and boundary features of the present invention;

[0103] Figure 3 is the non-equidistant vertical slice division result of the building facade obtained in step 1 of the embodiment of the window detection method based on non-equidistant slices and boundary features of the present invention;

[0104] Figure 4 This is the boundary point extraction result of step 2 of the embodiment of the window detection method based on non-equidistant slices and boundary features of the present invention;

[0105] Figure 5 This is the result of extracting the inner boundary points in step 2 of the embodiment of the window detection method based on non-equidistant slices and boundary features of the present invention;

[0106] Figure 6 3 is a window singulation result diagram of step 3 of an embodiment of a window detection method based on non-equidistant slices and boundary features of the present invention;

[0107] Figure 7 4 is a window completion result diagram of step 4 of an embodiment of a window detection method based on non-equidistant slices and boundary features of the present invention;

[0108] Figure 8 4 is a window detection result diagram of step 4 of an embodiment of a window detection method based on non-equidistant slices and boundary features of the present invention. DETAILED DESCRIPTION

[0109] The present invention will be described in detail below with reference to the accompanying drawings and specific embodiments.

[0110] Example 1

[0111] This embodiment provides a window detection method based on non-equidistant slices and boundary features, which is specifically implemented by the following steps:

[0112] Step 1: Divide the building facade into non-equidistant slices to obtain slices with potential windows and wall slices;

[0113] Step 2: extract the inner boundary points of the slice on the potential window slice obtained in step 1;

[0114] Step 3: Cluster and segment the inner boundary points obtained in step 2, and filter out all window elements;

[0115] In step 4, the window elements obtained in step 3 are classified and completed to obtain a more accurate window shape.

[0116] Example 2

[0117] This embodiment provides a window detection method based on non-equidistant slicing and boundary features. On the basis of Example 1, the building facade is first sliced ​​horizontally and vertically. By analyzing the changes in slice density, the slices are non-equidistantly divided and marked, and inner boundary points are extracted for slices marked as having potential windows. Secondly, the inner boundary points are singulated based on the improved K-means++ algorithm, and interference elements are eliminated according to the geometric features of the windows. Then, the set of window boundary points is classified, and the window boundaries with incomplete data and the window areas that have been missed are completed. Finally, the contour line is drawn for each complete window boundary point to realize the detection of windows on the building facade.

[0118] Example 3

[0119] This embodiment provides a window detection method based on non-equidistant slices and boundary features. Based on the first embodiment, the method is implemented in the following steps:

[0120] Step 1: Divide the building facade into non-equidistant slices to obtain slices with potential windows and wall slices;

[0121] Step 1.1, as Figure 1 As shown in the figure, the horizontal non-equidistant slices are calculated, and the building facade point cloud data is sliced ​​with equal intervals from bottom to top along the y-axis direction, with the interval set to 0.07mm, to obtain the horizontal slice set. ,in, Indicates the slices, is the total number of slices;

[0122] Step 1.2: Calculate the density of each slice and the density change between adjacent slices according to the following formulas (1) and (2):

[0123] (1)

[0124] (2)

[0125] If the density variation between adjacent slices is not greater than the threshold , that is, when the density of adjacent slices does not change much, the adjacent slices are merged and the slice thickness becomes ,in and Respectively and Otherwise, no merging is performed and the first and Re-compare the slices.

[0126] Step 1.3, repeat step 1.2, and combine the slices that meet the merging conditions from bottom to top to obtain an updated point cloud slice set ;

[0127] Step 1.4, judge The status of each slice in

[0128] Step 1.4.1, for the original slice set For each slice, the intercepted fragment Divided into two parts and , calculate the proportion by formula (3) To determine whether it is a fragment with potential windows;

[0129] (3)

[0130] Step 1.4.2, if At the threshold and between( and If the values ​​of are 0.45 and 0.55 respectively, it is marked as a wall, otherwise it is marked as a potential window;

[0131] Step 1.4.3, then statistics The number of two markers contained in each slice and ,if , then the slice is considered to be a wall segment; otherwise, it is a segment with potential windows. The horizontal division result is as follows Figure 2 As shown;

[0132] Step 1.5, calculate vertical non-equidistant slices. The method is similar to the horizontal non-equidistant slice method, which mainly divides the building facade point cloud data from left to right along the x-axis.

[0133] Step 2: extract the inner boundary points of the slice on the potential window slice obtained in step 1;

[0134] Step 2.1: First, perform preliminary extraction of the inner and outer boundaries of the target slice;

[0135] Step 2.2: Based on the result of step 2.1, remove the outer boundary points of the target section and extract the inner boundary points.

[0136] Step 2.1 is as follows:

[0137] Step 2.1.1: For the target slice, take the point at the lower left corner of the slice, i.e. the point with the smallest x value, as the initial sampling point. . Use the kd tree index structure to search for the nearest neighbor of the point, so as to obtain the point of The point set of the nearest neighbor points ;

[0138] Step 2.1.2, initial sampling point As the coordinate origin, build a local coordinate system, and then Each point in the local coordinate system is divided into four quadrants according to its x- and y-coordinates, and the number of points distributed in each quadrant is counted. If there is no neighboring point in a quadrant, it is initially considered a boundary point; otherwise, the above steps are repeated to determine the next point.

[0139] Step 2.1.3: If the sampling point is initially considered to be a boundary point, then for the neighborhood point set Chinese Communist Party Points are used for plane fitting, and the plane equation is as shown in formula (4):

[0140] (4)

[0141] Formula (4) is transformed into formula (5) by defining formula (6), and the fitting equation satisfies Minimum, that is , and then by solving equation (7) we can get , by substituting into formula (6), we can obtain the plane equation result in formula (5);

[0142] (5)

[0143] (6)

[0144] (7)

[0145] Step 2.1.4, obtain the projection coordinates of each point in the neighborhood point set on the fitting plane through formula (8) , and then construct the unit direction vector of the neighborhood projection point and the sampling point projection point on the fitting plane through formula (9) , from this we can get the point The distribution of neighborhood points;

[0146] (8)

[0147] (9)

[0148] Step 2.1.5, select is the starting vector, and the normal vector of the fitting plane is calculated The cross product of , and then calculate the vectors and and The angle between and , adjust the directions of each angle to make them consistent. If , then take ;

[0149] Step 2.1.6, for Sort in ascending order and calculate the angle between adjacent vectors using formula (10) , maximum angle threshold Set to , compare each The size of , take the maximum value With the set threshold For comparison, if , then the sampling point is considered is a boundary point, add it to the boundary point set , otherwise it is considered as a non-boundary point.

[0150] (10);

[0151] Step 2.1.7, repeat all steps from step 2.1.1 to step 2.1.6 until all points in the slice have been determined, thus obtaining the boundary point set , the extraction results are as follows Figure 4 shown.

[0152] Step 2.2 is as follows:

[0153] Step 2.2.1: Based on the extracted horizontal target slices, sort the point cloud data set by y value and store it in a linked list. Calculate the minimum and maximum values ​​of x and y respectively by constructing a minimum bounding box for the point set.

[0154] Step 2.2.2, let the latitude line start from the minimum y value and take the step size as , calculate the minimum and maximum x values ​​of each latitude line within the range of y, and store its index value in the newly created array In the process, all horizontal target slices are scanned;

[0155] Step 2.2.3: Use the same method to scan the meridian of the vertical target slice, mainly starting from the minimum x value in the point set, and taking the step size as , calculate the minimum and maximum y values ​​of each meridian within the range of x, and store their index values ​​in the array In the process, all vertical target slices are scanned;

[0156] Step 2.2.4, delete the duplicate index values ​​to obtain the required outer boundary points ;

[0157] Step 2.2.5, extract the outer boundary points Create a kd tree and add the total boundary points extracted in step 2.1 Set as input;

[0158] Step 2.2.6, Each point in is used as a query point, and the neighboring points are found using the nearest neighbor search algorithm;

[0159] Step 2.2.7, in Find the indexes corresponding to the neighboring points in turn and delete them;

[0160] Step 2.2.8, All point cloud data are judged point by point until All points in the are judged;

[0161] Step 2.2.9, use formula (11) to delete the remaining outer boundary points, leaving only the required inner boundary points. , the extracted inner boundary points are as follows Figure 5 As shown;

[0162] (11)

[0163] In formula (11):

[0164] ——are the minimum and maximum x-coordinate values ​​of the building facade point cloud;

[0165] ——are the minimum and maximum y-coordinate values ​​of the building facade point cloud;

[0166] ——These are the thresholds for extracting inner boundary points on the x and y axes respectively.

[0167] Step 3: Cluster and segment the inner boundary points obtained in step 2, and filter out all window elements;

[0168] Step 3.1, based on the input boundary point set , calculate its centroid, and use the KNN algorithm to find the point closest to the centroid and use this point as the initial seed point;

[0169] Step 3.2: Calculate the nearest Euclidean distance from the remaining points to the initial seed point according to formula (13), and then use formula (14) to calculate the probability of the remaining points being selected as the next cluster center, and select the point with the highest probability as the next cluster center;

[0170] (12)

[0171] (13)

[0172] Step 3.3, repeat step 3.2 until you get The cluster center or the current distance change is less than the threshold;

[0173] Step 3.4, calculate the remaining points and The distance between the cluster centers is used to classify the points closer to the center into the same class;

[0174] Step 3.5, recalculate the cluster center based on the updated classification set;

[0175] Step 3.6, repeat steps 3.4-3.5 until the number of iterations is reached or the cluster center no longer changes.

[0176] Step 3.7: Remove interference factors that are not window elements and set the area threshold in the code Less than 0.9 or greater than 4, aspect ratio (height:width) is greater than 3 (3:1), and a height threshold from the ground is set If it is less than 0.5, the interfering elements will be deleted to achieve individual extraction of windows.

[0177] Step 4: Classify and complete the window elements obtained in step 3 to obtain a more accurate window shape.

[0178] Step 4.1, classify the windows;

[0179] Step 4.1.1, using the window aspect ratio , normalized perimeter C i and normalized area Construct a feature vector for a single window

[0180] Step 4.1.2, calculate the similarity between the feature vectors of each window in the facade using formulas (14) and (15) , set the similarity threshold , when the similarity When V 1 and V The windows represented by 2 are classified as the same type, otherwise they are excluded.

[0181] (14)

[0182] In formula (14):

[0183] ——The maximum and minimum y coordinates of each window point cloud respectively;

[0184] ——respectively the maximum and minimum x-coordinate values ​​of each window point cloud;

[0185] ——are the minimum and maximum values ​​of all window perimeters respectively;

[0186] ——are the minimum and maximum areas of all windows respectively;

[0187] (15);

[0188] Step 4.2, complete the window;

[0189] Step 4.2.1, calculate the centroid of each window outline of the same type and sort them according to the x-coordinate of the centroid to obtain the arrangement order of the windows in the same row;

[0190] Step 4.2.2, based on the arrangement order, use formula (16) to calculate the distribution spacing between adjacent windows in each row;

[0191] (16)

[0192] Step 4.2.3: For windows with incomplete or missed data, copy the window point cloud with complete outline to the incomplete position of the window data or the area where the window is not detected according to the arrangement rules to complete the window. The completion result is as follows: Figure 7 As shown;

[0193] Step 4.3, draw the window outline

[0194] Step 4.3.1, set of feature points of the boundary of a single window Mark all points to indicate whether the point has been processed;

[0195] Step 4.3.2, from the collection Select the unmarked lower left corner (with the smallest x and y values) As the initial growth point, and point As the first element to form a new point set , and then from the point set Search distance point The nearest point is used as its connection point ,Will and From point set Delete it and determine the direction vector according to formula (17) ;

[0196] (17)

[0197] Step 4.3.3, from the collection Using KNN algorithm to search points of Neighborhood point set , calculated using formula (18) and Angle deviation , calculate and select the point corresponding to the minimum value through formula (19) As and mark the connection point as used. If the connection point has been processed, jump to step 4.3.5.

[0198] (18)

[0199] (19)

[0200] In formula (19):

[0201] —the distance between a connection point and each of its nearest neighbors;

[0202] Step 4.3.4, Update ,Will Add as new elements , jump to step 4.3.3;

[0203] In step 4.3.5, if the boundary feature points do not form a closed pattern, jump to step 4.3.2; otherwise, end the sorting, and the final window detection result is as follows Figure 8 shown.

Claims

1. A window detection method based on non-equidistant slices and boundary features, characterized in that: Please follow the steps below to implement: Step 1: Divide the building facade into non-equidistant slices to obtain slices with potential windows and wall slices; Step 2: extract the inner boundary points of the slice on the potential window slice obtained in step 1; Step 3: Cluster and segment the inner boundary points obtained in step 2, and filter out all window elements; Step 4: Classify and complete the window elements obtained in step 3 to obtain a more accurate window shape. The step 1 is specifically as follows: Step 1.1, calculate the horizontal non-equidistant slices, slice the building facade point cloud data in the y-axis direction from bottom to top with equal intervals, and obtain the horizontal slice set ,in, Indicates the slices, is the total number of slices; Step 1.2: Calculate the density of each slice and the density change between adjacent slices according to the following formulas (1) and (2): (1) (2) If the density variation between adjacent slices is not greater than the threshold , then the adjacent slices are merged and the slice thickness becomes ,in and Respectively and Otherwise, no merging is performed and the first and Re-compare the slices. Step 1.3, repeat step 1.2, and combine the slices that meet the merging conditions from bottom to top to obtain an updated point cloud slice set ; Step 1.4, judge The status of each slice in Step 1.4.1, for the original slice set For each slice, the intercepted fragment Divided into two parts and , calculate the proportion by formula (3) To determine whether it is a fragment with potential windows; (3) Step 1.4.2, if At the threshold and If there are any windows between them, it is marked as a wall, otherwise it is marked as a potential window. Step 1.4.3, then statistics The number of two markers contained in each slice and ,if , then the slice is considered to be a wall segment; otherwise, it is a segment with potential windows; Step 1.5: Calculate vertical non-equidistant slices. The method is similar to the horizontal non-equidistant slice method. The main purpose is to divide the building facade point cloud data from left to right along the x-axis. The step 2 is specifically as follows: Step 2.1: First, perform preliminary extraction of the inner and outer boundaries of the target slice; Step 2.2: Based on the result of step 2.1, remove the outer boundary points of the target section and extract the inner boundary points; The step 4 is specifically as follows: Step 4.1, classify the windows; Step 4.2, complete the window; Step 4.3, draw the window outline.

2. The window detection method based on non-equidistant slices and boundary features according to claim 1, characterized in that: First, the building facade is sliced ​​horizontally and vertically. By analyzing the changes in slice density, the slices are non-equidistantly divided and marked, and the inner boundary points of the slices marked as having potential windows are extracted. Secondly, the inner boundary points are singulated based on the improved K-means++ algorithm, and interfering elements are eliminated according to the geometric characteristics of the windows. Then, the set of window boundary points is classified, and the window boundaries with incomplete data and the window areas that have been missed are completed. Finally, the outline of each complete window boundary point is drawn to realize the detection of windows on the building facade.

3. The window detection method based on non-equidistant slices and boundary features according to claim 1, characterized in that: The step 2.1 is as follows: Step 2.1.1: For the target slice, take the point at the lower left corner of the slice, i.e. the point with the smallest x value, as the initial sampling point. , use the kd tree index structure to search for the nearest neighbor of the point, and then obtain the point of The point set of the nearest neighbor points ; Step 2.1.2, initial sampling point As the coordinate origin, build a local coordinate system, and then Each point in the local coordinate system is divided into four quadrants according to its x- and y-coordinates. The number of points distributed in each quadrant is counted. If there is no neighboring point in a quadrant, the initial sampling point p is preliminarily considered to be a boundary point. Otherwise, repeat the above steps to determine the next point. Step 2.1.3: If the sampling point is initially considered to be a boundary point, then for the neighborhood point set Chinese Communist Party Points are used for plane fitting, and the plane equation is as shown in formula (4): c ≠0(4) Formula (4) is transformed into formula (5) by defining formula (6), and the fitting equation satisfies Minimize and make the fitting equation satisfy Minimum, that is , and then by solving equation (7) we can get , by substituting into formula (6), we can obtain the plane equation result in formula (5); (5) (6) (7) Step 2.1.4, obtain the projection coordinates of each point in the neighborhood point set on the fitting plane through formula (8) ,in , and then construct the unit direction vector of the neighborhood projection point and the sampling point projection point on the fitting plane through formula (9) ,in , from this we can get the point The distribution of neighborhood points; (8) (9) Step 2.1.5, select is the starting vector, and the normal vector of the fitting plane is calculated The cross product of , and then calculate the vectors and and The angle between and , middle , and middle , adjust the directions of each angle to make them consistent. If , then take ; Step 2.1.6, for Sort in ascending order and calculate the angle between adjacent vectors using formula (10) ,in , maximum angle threshold Set to , compare each The size of , take the maximum value With the set threshold For comparison, if , then the sampling point is considered is a boundary point, add it to the boundary point set , otherwise it is considered as a non-boundary point. (10); Step 2.1.7, repeat all steps from step 2.1.1 to step 2.1.6 until all points in the slice have been determined, thus obtaining the boundary point set .

4. The window detection method based on non-equidistant slices and boundary features according to claim 1, characterized in that: Step 2.2 is as follows: Step 2.2.1: Based on the extracted horizontal target slices, sort the point cloud data set by y value and store it in a linked list. Calculate the minimum and maximum values ​​of x and y respectively by constructing a minimum bounding box for the point set. Step 2.2.2, let the latitude line start from the minimum y value and take the step size as , calculate the minimum and maximum x values ​​of each latitude line within the range of y, and store its index value in the newly created array In the process, all horizontal target slices are scanned; Step 2.2.3: Use the same method to scan the meridian of the vertical target slice, mainly starting from the minimum x value in the point set, and taking the step size as , calculate the minimum and maximum y values ​​of each meridian within the range of x, and store their index values ​​in the array In the process, all vertical target slices are scanned; Step 2.2.4, delete the duplicate index values ​​to obtain the required outer boundary points ; Step 2.2.5, extract the outer boundary points Create a kd tree and add the total boundary points extracted in step 2.1 Set as input; Step 2.2.6, Each point in is used as a query point, and the neighboring points are found using the nearest neighbor search algorithm; Step 2.2.7, in Find the indexes corresponding to the neighboring points in turn and delete them; Step 2.2.8, All point cloud data are judged point by point until All points in the are judged; Step 2.2.9, use formula (11) to delete the remaining outer boundary points, leaving only the required inner boundary points. ; (11) In formula (11): ——are the minimum and maximum x-coordinate values ​​of the building facade point cloud; ——are the minimum and maximum y-coordinate values ​​of the building facade point cloud; ——These are the thresholds for extracting inner boundary points on the x and y axes respectively.

5. The window detection method based on non-equidistant slices and boundary features according to claim 1, characterized in that: The step 3 is specifically as follows: Step 3.1, based on the input boundary point set , calculate its centroid, and use the KNN algorithm to find the point closest to the centroid and use this point as the initial seed point; Step 3.2: Calculate the nearest Euclidean distance from the remaining points to the initial seed point according to formula (12), and then use formula (13) to calculate the probability of the remaining points being selected as the next cluster center, and select the point with the highest probability as the next cluster center; (12) (13) Step 3.3, repeat step 3.2 until you get The cluster center or the current distance change is less than the threshold; Step 3.4, calculate the remaining points and The distance between the cluster centers is used to classify the points closer to the center into the same class; Step 3.5, recalculate the cluster center based on the updated classification set; Step 3.6, repeat steps 3.4-3.5 until the number of iterations is reached or the cluster center no longer changes. Step 3.7: Remove interference factors that are not window elements and set the area threshold in the code , aspect ratio , and set the height threshold from the ground , delete the interfering elements and realize the individual extraction of windows.

6. The window detection method based on non-equidistant slices and boundary features according to claim 1, characterized in that: The step 4.1 is specifically as follows: Step 4.1.1, using the window aspect ratio , normalized perimeter and normalized area Construct a feature vector for a single window ; Step 4.1.2, calculate the similarity between the feature vectors of each window in the facade using formulas (14) and (15) , set the similarity threshold , when the similarity When and The windows represented are classified as the same type, otherwise excluded. (14) In formula (14): ——The maximum and minimum y coordinates of each window point cloud respectively; ——respectively the maximum and minimum x-coordinate values ​​of each window point cloud; ——are the minimum and maximum values ​​of all window perimeters respectively; ——are the minimum and maximum areas of all windows respectively; (15); The step 4.2 is specifically as follows: Step 4.2.1, calculate the centroid of each window outline of the same type and sort them according to the x-coordinate of the centroid to obtain the arrangement order of the windows in the same row; Step 4.2.2, based on the arrangement order, use formula (16) to calculate the distribution spacing between adjacent windows in each row; (16) Step 4.2.3: For windows with incomplete or missed data, copy the window point cloud with complete outlines to the incomplete location of the window data or the area where the window was not detected according to the arrangement rules to complete the window; The step 4.3 is specifically as follows: Step 4.3.1, set of feature points of the boundary of a single window Mark all points to indicate whether the point has been processed; Step 4.3.2, from the collection Select the unmarked point in the lower left corner, that is, the point with the smallest x and y values As the initial growth point, and point As the first element to form a new point set , and then from the point set Search distance point The nearest point is used as its connection point ,Will and From point set Delete it and determine the direction vector according to formula (17) ; (17) Step 4.3.3, from the collection Using KNN algorithm to search points of Neighborhood point set , calculated using formula (18) and Angle deviation , calculate and select the point corresponding to the minimum value through formula (19) As and mark the connection point as used. If the connection point has been processed, jump to step 4.3.

5. (18) (19) In formula (19): —the distance between a connection point and each of its nearest neighbors; Step 4.3.4, Update ,Will Add as new elements , jump to step 4.3.3; In step 4.3.5, if the boundary feature points do not form a closed pattern, jump to step 4.3.2; otherwise, end the sorting.

Citation Information

Patent Citations

  • Point cloud building reconstruction method based on segmentation

    CN107146280A

  • Building datum extraction from laser scanning data

    US20150063683A1