Building facade auxiliary element construction method based on three-dimensional point cloud
By converting three-dimensional point cloud data into a local coordinate system, extracting and regularizing the outlines of the building's facade door and window structures, estimating geometric information and constructing partition lines, the problems of low efficiency and insufficient accuracy in drawing building facades in existing technologies are solved, and efficient and accurate automated drawing is achieved.
Patent Information
- Application Number
- CN202510583576.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-07
- Publication Date
- 2025-09-19
AI Technical Summary
When drawing building facades based on three-dimensional point cloud data, existing technologies rely on manual operation, which is inefficient and costly, and the accuracy of automated methods is insufficient, making it difficult to meet high-precision requirements.
By converting the 3D point cloud data into a local coordinate system, the initial contour polylines of the door and window structure are extracted. After regularization, the geometric information of the building facade is estimated, and partition lines are constructed. Finally, the building facade space is divided and auxiliary elements are generated.
It realizes the automatic construction of auxiliary elements of building facades, improves drawing efficiency and accuracy, and reduces labor costs.
Smart Images

Figure CN120672987A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of surveying, mapping and geographic information technology, and in particular to a method for constructing auxiliary elements of building facades based on three-dimensional point clouds. Background Art
[0002] With the continued advancement of urbanization in my country, micro-renovation of old buildings in historic neighborhoods has become a crucial strategy for promoting sustainable urban development and stimulating new urban vitality. Within this process, mapping the elevations of existing buildings is a crucial foundational task in achieving these goals. In recent years, LiDAR technology, with its ability to rapidly acquire high-precision, high-density 3D point cloud data of the measured surface, has become a crucial data source for building elevation mapping.
[0003] Although the acquisition process for point cloud data is becoming increasingly streamlined, the creation of building facades based on this data remains heavily reliant on manual labor. This manual approach is not only labor-intensive, inefficient, and labor-intensive, but also significantly impacts the draftsman's experience, as the definition of elements such as auxiliary lines and door and window structure corners relies entirely on visual assessment. Some existing research has employed object recognition technology to automatically extract door and window structures from building facades. However, these methods rely on additional image data input, and the recognition results are expressed in the form of bounding boxes, which lack the geometric accuracy to meet the high-precision requirements of building facade rendering tasks. Summary of the Invention
[0004] In order to solve the above problems, the present invention proposes a method for constructing auxiliary elements of building facades based on three-dimensional point clouds, which can efficiently realize the construction of auxiliary elements of building facades and improve the efficiency and accuracy of building facade drawing tasks.
[0005] An embodiment of the present invention provides a method for constructing auxiliary elements of a building facade based on a three-dimensional point cloud, comprising:
[0006] The acquired three-dimensional point cloud data of the building facade is converted into a predefined local coordinate system to obtain two-dimensional point cloud data of the building facade;
[0007] Extracting initial outline polylines of the door and window structure from the two-dimensional point cloud data;
[0008] Regularizing the initial contour polyline to obtain an optimized contour polyline of the door and window structure;
[0009] Estimate building facade geometry information based on optimized contour polylines;
[0010] Constructing a partition line based on the optimized contour polyline and the building facade geometric information;
[0011] The space where the building facade is located is divided according to the partition lines to obtain auxiliary elements of the building facade.
[0012] Preferably, the acquired three-dimensional point cloud data of the building facade is converted into a predefined local coordinate system to obtain two-dimensional point cloud data of the building facade, specifically including:
[0013] Fitting the plane parameters of the building facade from the acquired three-dimensional point cloud data of the building facade through a random sampling consistency algorithm;
[0014] Calculating a normal vector of the building facade according to the plane parameters;
[0015] Constructing a rigid body transformation matrix for transferring from the world coordinate system where the three-dimensional point cloud data is located to a preset local coordinate system according to the normal vector;
[0016] The three-dimensional point cloud data is converted to the local coordinate system according to the rigid body transformation matrix to obtain the two-dimensional point cloud data.
[0017] Preferably, extracting the initial outline polyline of the door and window structure from the two-dimensional point cloud data comprises:
[0018] Creating a grid based on a preset resolution, assigning pixels corresponding to data points in the two-dimensional point cloud data and the grid to white and the remaining pixels to black, and performing preprocessing to obtain a binary image of the building facade;
[0019] Extracting independent contour polylines of the door and window structures from the binary image using a boundary tracking algorithm;
[0020] The contour polylines whose number of pixels is less than a preset value are eliminated from the independent contour polylines, the pixels of the remaining contour polylines are inversely mapped into two-dimensional points in the local coordinate system, and the two-dimensional points are connected in pairs to form a closed contour to obtain the initial contour polyline.
[0021] Preferably, regularizing the initial contour polyline to obtain the optimized contour polyline of the door and window structure comprises:
[0022] Calculating the angle between each side of each door and window structure and the horizontal axis of the local coordinate system based on the initial contour polyline;
[0023] When the calculated angle is less than the preset angle threshold, the edge is rotated around its own midpoint until it is parallel to the horizontal axis; otherwise, the edge is rotated around its own midpoint until it is perpendicular to the horizontal axis;
[0024] Calculate the distance from the midpoint of one of the two parallel adjacent sides of each door and window structure to the straight line on which the other side lies;
[0025] When the calculated distance is less than a preset distance threshold, a merging distance is calculated based on the lengths of the two adjacent edges and the calculated distance; taking the position of the longer of the two adjacent edges as a reference, the merging distance is translated toward the shorter of the two adjacent edges to determine a merged edge after the two adjacent edges are merged;
[0026] The straight lines where every two adjacent edges of the remaining edge lines are intersected are calculated, the intersection points are reconstructed, and the closed polyline is obtained to obtain the optimized contour polyline.
[0027] Preferably, estimating building facade geometric information based on the optimized contour polyline includes:
[0028] Calculating coordinate parameters of each door and window structure according to the axis-aligned bounding box of each optimized contour polyline, wherein the coordinate parameters include center coordinates, width, height and area;
[0029] Calculating median parameters of all door and window structures according to the coordinate parameters of each door and window structure, wherein the median parameters include median area, median width, and median height;
[0030] Screening out optimized contour polylines whose area ratio to the median area is not less than a preset first threshold, and constructing a center point set using the center of the axis-aligned bounding box of the screened optimized contour polylines;
[0031] Performing one-dimensional Euclidean clustering in the horizontal axis direction of the local coordinate system according to the horizontal coordinates of the center point set, determining the product of the median width and a preset second threshold as the shortest distance between clusters, and using the obtained number of clusters as the average number of columns of the door and window structure;
[0032] performing one-dimensional Euclidean clustering in the longitudinal direction of the local coordinate system according to the longitudinal coordinates of the center point set, determining the product of the median height and a preset third threshold as the shortest distance between clusters, and using the obtained number of clusters as the average number of rows of the door and window structure;
[0033] The median parameter, the average number of columns, and the average number of rows are used as the building facade geometric information.
[0034] Preferably, constructing a partition line according to the optimized contour polyline and the building facade geometric information includes:
[0035] For the optimized contour polyline of each door and window structure, the vertical coordinate value of the side parallel to the horizontal axis is extracted as the position value, and the horizontal axis position set is constructed; the horizontal coordinate value of the side parallel to the vertical axis is extracted as the position value, and the vertical axis position set is constructed;
[0036] Dividing the horizontal axis position set and the vertical axis position set into a plurality of position subsets respectively through adaptive clustering;
[0037] Calculate an optimal position value for each position subset;
[0038] A straight line equation is constructed according to the obtained optimal position value, and the straight line equation is intersected with the axis-aligned bounding box of the two-dimensional point cloud data of the building facade to obtain two intersection points, which are connected to form a partition line.
[0039] Furthermore, the horizontal axis position set and the vertical axis position set are divided into several position subsets respectively through adaptive clustering, including:
[0040] Arrange the horizontal axis position set and the vertical axis position set in descending order according to the lengths of the sides corresponding to the position values in the horizontal axis position set and the vertical axis position set;
[0041] Determining different length thresholds for the position subsets of the horizontal axis position set and the position subsets of the vertical axis position set respectively according to the building facade geometric information;
[0042] Select the position value of the unassigned subset in the sorted order as the initial element of the current subset, and calculate the absolute value of the deviation between the initial element and other position values;
[0043] Add other position values whose absolute deviation is less than the preset cluster deviation threshold to the current subset, and calculate the sum of the lengths of the edges corresponding to the position values in the subset;
[0044] The subsets of which the sum of the side lengths of the position subsets is greater than the corresponding set length threshold are retained to obtain the divided position subsets.
[0045] Preferably, calculating an optimal position value for each position subset includes:
[0046] Construct a set with each element in the position subset as the initial element, calculate the absolute value of the deviation between the element and other elements, add other elements whose absolute deviation value is less than the preset collinearity deviation threshold to the current set, and calculate the sum of the lengths of the edges corresponding to the elements in the set;
[0047] According to the obtained sets, the set with the largest sum of side lengths is selected as the optimal set;
[0048] The length of the edge corresponding to the position value in the optimal set is used as the weight, and the weighted average of the position values is calculated as the optimal position value of the partition line.
[0049] Preferably, dividing the space where the building facade is located according to the partition lines to obtain auxiliary elements of the building facade includes:
[0050] Intersect all partition lines in pairs and calculate the intersection points;
[0051] Line segments and rectangular surface elements are constructed according to the intersection points, and the position information and adjacency relationship of various auxiliary elements are stored in the form of point tables, line tables and surface tables to obtain the auxiliary elements.
[0052] Preferably, the method further comprises:
[0053] The auxiliary elements are transformed from the local coordinate system to the original world coordinate system according to the rigid body transformation matrix.
[0054] The present invention provides a method for constructing auxiliary elements of building facades based on three-dimensional point clouds. The acquired three-dimensional point cloud data of the building facade is converted into a predefined local coordinate system to obtain two-dimensional point cloud data of the building facade; the initial contour polylines of the door and window structure are extracted from the two-dimensional point cloud data; the initial contour polylines are regularized to obtain optimized contour polylines of the door and window structure; the geometric information of the building facade is estimated based on the optimized contour polylines; partition lines are constructed based on the optimized contour polylines and the geometric information of the building facade; the space where the building facade is located is divided according to the partition lines to obtain auxiliary elements of the building facade. The present application scheme can efficiently realize the construction of auxiliary elements of the building facade and improve the efficiency and accuracy of the building facade drawing task. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] Figure 1 1 is a flow chart of a method for constructing auxiliary elements of a building facade based on a three-dimensional point cloud according to an embodiment of the present invention;
[0056] Figure 2 This is a schematic diagram of the effect of ground-based three-dimensional point cloud data of a building facade provided by an embodiment of the present invention;
[0057] Figure 3 This is a schematic diagram of the effect of the intersection type auxiliary element provided by an embodiment of the present invention;
[0058] Figure 4 This is a schematic diagram of the effect of the line segment type auxiliary element provided by an embodiment of the present invention;
[0059] Figure 5 This is a schematic diagram of the effect of the facet type auxiliary element provided by an embodiment of the present invention;
[0060] Figure 6 This is a schematic diagram of the effect of mobile handheld three-dimensional point cloud data of a building facade provided by an embodiment of the present invention;
[0061] Figure 7 This is another schematic diagram of the effect of the intersection type auxiliary element provided by an embodiment of the present invention;
[0062] Figure 8 This is another schematic diagram of the effect of the line segment type auxiliary element provided by an embodiment of the present invention;
[0063] Figure 9 This is another schematic diagram of the effect of the facet-type auxiliary element provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0064] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0065] In response to the above technical problems, this case provides a method for constructing auxiliary elements of building facades based on three-dimensional point clouds, see Figure 1 , is a flow chart of a method for constructing auxiliary elements of a building facade based on a three-dimensional point cloud provided by an embodiment of the present invention, the method comprising the following steps:
[0066] Step S1, converting the acquired three-dimensional point cloud data of the building facade into a predefined local coordinate system to obtain two-dimensional point cloud data of the building facade;
[0067] Step S2, extracting the initial outline polyline of the door and window structure from the two-dimensional point cloud data;
[0068] Step S3, performing regularization on the initial contour polyline to obtain an optimized contour polyline of the door and window structure;
[0069] Step S4, estimating building facade geometric information based on the optimized contour polyline;
[0070] Step S5, constructing partition lines according to the optimized contour polyline and the building facade geometric information;
[0071] Step S6: dividing the space where the building facade is located according to the partition lines to obtain auxiliary elements of the building facade.
[0072] In the specific implementation of this embodiment, the three-dimensional point cloud data of the building facade is converted from the world coordinate system to the local coordinate system defined by the building facade to obtain the two-dimensional point cloud data of the building facade;
[0073] Extract the initial outline polylines of the door and window structures based on the obtained two-dimensional point cloud data of the building facade;
[0074] Regularizing the obtained initial contour polyline of the door and window structure to obtain the optimized contour polyline of the door and window structure;
[0075] Estimate the building facade geometry information based on the obtained optimized outline polyline of the door and window structure;
[0076] Constructing partition lines based on the obtained optimized outline polylines of the door and window structures and the obtained building facade geometry information;
[0077] According to the obtained partition lines, the space where the building facade is located is divided to obtain auxiliary elements of intersection points, line segments and surface elements.
[0078] The solution provided in this embodiment enables the automatic construction of auxiliary elements for building facades based on 3D point cloud data. The generated auxiliary elements include the corner points, boundary lines, and internal surfaces of door and window structures. Because the auxiliary elements are all calculated using the original data points, the resulting auxiliary elements are highly accurate, few in number, and highly specific. Compared to the original manual method of directly referencing the original 3D point cloud data to depict building facades, this method of drawing building facades by picking up auxiliary elements greatly improves the efficiency and accuracy of drawing, while also significantly saving labor costs.
[0079] In another embodiment provided by the present invention, the step S1 specifically includes the following steps:
[0080] Fitting the plane parameters of the building facade from the acquired three-dimensional point cloud data of the building facade through a random sampling consistency algorithm;
[0081] Calculating a normal vector of the building facade according to the plane parameters;
[0082] Constructing a rigid body transformation matrix for transferring from the world coordinate system where the three-dimensional point cloud data is located to a preset local coordinate system according to the normal vector;
[0083] The three-dimensional point cloud data is converted to the local coordinate system according to the rigid body transformation matrix to obtain the two-dimensional point cloud data.
[0084] Specifically, the plane parameters C = {α, β, γ, δ} of the building facade are fitted from the three-dimensional point cloud data of the building facade through a random sampling consistency algorithm, where α, β, γ, δ represent the coefficients of the plane equation;
[0085] The plane equation is: αx+βy+γz+δ=0;
[0086] Among them, x, y, z represent the coordinate values of the building facade point cloud in the original world coordinate system, α, β, γ represent the coefficients of x, y, z respectively, and δ represents the plane equation constant.
[0087] Considering that the building facades in the real world are vertical, the normal vector of the building facade is calculated as:
[0088] Construct a local coordinate system with the centroid of the building facade point cloud as the origin, the horizontal direction as the horizontal axis, the vertical direction as the vertical axis, and the normal direction as the vertical axis. Calculate the rigid body transformation matrix from the original world coordinate system to the local coordinate system:
[0089] in, Represents the centroid coordinate value of the building facade point cloud;
[0090] According to the obtained rigid body transformation matrix, the three-dimensional point cloud data of the building facade is converted to the local coordinate system, and only the horizontal and vertical coordinates of the converted point cloud data are retained to obtain the two-dimensional point cloud data of the building facade.
[0091] In another embodiment provided by the present invention, the step S2 includes:
[0092] Creating a grid based on a preset resolution, assigning pixels corresponding to data points in the two-dimensional point cloud data and the grid to white and the remaining pixels to black, and performing preprocessing to obtain a binary image of the building facade;
[0093] Extracting independent contour polylines of the door and window structures from the binary image using a boundary tracking algorithm;
[0094] The contour polylines whose number of pixels is less than a preset value are eliminated from the independent contour polylines, the pixels of the remaining contour polylines are inversely mapped into two-dimensional points in the local coordinate system, and the two-dimensional points are connected in pairs to form a closed contour to obtain the initial contour polyline.
[0095] In the specific implementation of this embodiment, a grid is created based on a preset resolution, pixels corresponding to the two-dimensional point cloud data of the building facade are assigned white, and the remaining pixels are assigned black, and morphological operations of dilation and erosion are performed to eliminate pores between points to obtain a binary image of the building facade;
[0096] The boundary tracking algorithm is used to extract the independent contour polylines of the door and window structure from the binary image. The contour polylines that occupy too small a number of pixels are eliminated. The pixels of the remaining contour polylines are inversely mapped into two-dimensional points in the local coordinate system. The two points are connected to form a closed contour to obtain the initial contour polylines of the door and window structure.
[0097] In another embodiment provided by the present invention, the step S3 specifically includes:
[0098] Calculating the angle between each side of each door and window structure and the horizontal axis of the local coordinate system based on the initial contour polyline;
[0099] When the calculated angle is less than the preset angle threshold, the edge is rotated around its own midpoint until it is parallel to the horizontal axis; otherwise, the edge is rotated around its own midpoint until it is perpendicular to the horizontal axis;
[0100] Calculate the distance from the midpoint of one of the two parallel adjacent sides of each door and window structure to the straight line on which the other side lies;
[0101] When the calculated distance is less than the preset distance threshold, the two adjacent edges are merged to obtain a merged edge. The specific process includes:
[0102] Calculating a merge distance based on the lengths of the two adjacent edges and the calculated distance; translating the merge distance toward the shorter edge of the two adjacent edges using the position of the longer edge as a reference to determine a merged edge of the two adjacent edges;
[0103] The straight lines where every two adjacent edges of the remaining edge lines are intersected are calculated, the intersection points are reconstructed, and the closed polyline is obtained to obtain the optimized contour polyline.
[0104] In the specific implementation of this embodiment, for each initial outline polyline of the door and window structure, the following steps are performed in sequence:
[0105] Calculate the angle between each edge and the horizontal axis of the local coordinate system. If the angle is less than 45°, rotate the edge about its midpoint until it is parallel to the horizontal axis. Otherwise, rotate the edge about its midpoint until it is perpendicular to the horizontal axis.
[0106] It should be noted that, in this embodiment, the angle threshold is set to 45°. In other embodiments, the angle threshold can be adjusted or set according to actual conditions.
[0107] For each pair of parallel adjacent edges, calculate the distance d from the midpoint of one edge to the line on which the other edge lies. If d is less than the preset distance threshold, merge the two edges and calculate the merged distance based on the lengths of the two adjacent edges and the calculated distance.
[0108] The calculated merge distance is
[0109] Wherein, l and s represent the length of the long side and the length of the short side, respectively.
[0110] Taking the position of the longer side of the two adjacent sides as a reference, translating the shorter side of the two adjacent sides by the merging distance to determine the merging side of the two adjacent sides;
[0111] The straight lines where every two adjacent edges of the remaining edges intersect are calculated, the intersection points are reconstructed, and the closed polyline is obtained to obtain the optimized outline polyline of the door and window structure.
[0112] In another embodiment provided by the present invention, the step S4 specifically includes:
[0113] Calculating coordinate parameters of each door and window structure according to the axis-aligned bounding box of each optimized contour polyline, wherein the coordinate parameters include center coordinates, width, height and area;
[0114] Calculate the median parameters of all door and window structures according to the coordinate parameters of each door and window structure, wherein the median parameters include the median area, the median width, and the median height;
[0115] Screening out optimized contour polylines whose area ratio to the median area is not less than a preset first threshold, and constructing a center point set with the center of the axis-aligned bounding box of the screened optimized contour polylines;
[0116] Performing one-dimensional Euclidean clustering in the horizontal axis direction of the local coordinate system according to the horizontal coordinates of the center point set, determining the product of the median width and a preset second threshold as the shortest distance between clusters, and using the obtained number of clusters as the average number of columns of the door and window structure;
[0117] performing one-dimensional Euclidean clustering in the longitudinal direction of the local coordinate system according to the longitudinal coordinates of the center point set, determining the product of the median height and a preset third threshold as the shortest distance between clusters, and using the obtained number of clusters as the average number of rows of the door and window structure;
[0118] The median parameter, the average number of columns, and the average number of rows are used as the building facade geometric information.
[0119] In the specific implementation of this embodiment, for each optimized outline polyline of the door and window structure, the coordinate parameters of its axis-aligned bounding box are calculated;
[0120] The coordinate parameters include the center coordinate c, width ω, height h and area ε, and the calculation formula is:
[0121]
[0122] Among them, x min ,x max ,y min ,y max It is the maximum value of the vertex coordinates of the optimized outline polyline of the door and window structure;
[0123] Calculate the median parameters of all axis-aligned bounding boxes;
[0124] The median parameters include the median area ε median , median width w median and the median height h median ;
[0125] Establish the judgment condition as ε≥ε median / 2, filter out the optimized contour polylines that meet the judgment conditions, and align their axes with the center of the bounding box to construct a point set;
[0126] It should be noted that, in this embodiment, the first threshold is set to 1 / 2. In other embodiments, the first threshold may be adjusted or set according to actual conditions.
[0127] For the horizontal coordinates of the obtained center point set, one-dimensional Euclidean clustering is performed in the horizontal direction of the local coordinate system, requiring that the closest distance between clusters is greater than w median / 2, and the number of clusters obtained is taken as the average number of columns N of the door and window structure column ;
[0128] It should be noted that, in this embodiment, the second threshold is set to 1 / 2. In other embodiments, the second threshold can be adjusted or set according to actual conditions.
[0129] According to the vertical coordinates of the obtained center point set, one-dimensional Euclidean clustering is performed in the vertical direction of the local coordinate system, requiring the closest distance between clusters to be greater than h median / 2, and the number of clusters obtained is taken as the average number of rows N of the door and window structure row .
[0130] It should be noted that, in this embodiment, the third threshold is set to 1 / 2. In other embodiments, the third threshold can be adjusted or set according to actual conditions.
[0131] The median parameter, the average number of columns and the average number of rows are used as the building facade geometric information.
[0132] In another embodiment provided by the present invention, the step S5 specifically includes:
[0133] For the optimized contour polyline of each door and window structure, the vertical coordinate value of the side parallel to the horizontal axis is extracted as the position value, and the horizontal axis position set is constructed; the horizontal coordinate value of the side parallel to the vertical axis is extracted as the position value, and the vertical axis position set is constructed;
[0134] Dividing the horizontal axis position set and the vertical axis position set into a plurality of position subsets respectively through adaptive clustering;
[0135] Calculate an optimal position value for each position subset;
[0136] A straight line equation is constructed according to the obtained optimal position value, and the straight line equation is intersected with the axis-aligned bounding box of the two-dimensional point cloud data of the building facade to obtain two intersection points, which are connected to form a partition line.
[0137] In the specific implementation of this embodiment, for the optimized outline polylines of all door and window structures, the vertical coordinate values of the edges parallel to the horizontal axis are extracted as position values to construct a horizontal axis position set, and the horizontal coordinate values of the edges parallel to the vertical axis are extracted as position values to construct a vertical axis position set;
[0138] Perform the following steps for the horizontal and vertical axis position sets:
[0139] By adaptive clustering, the location set is divided into several location subsets;
[0140] For each position subset obtained, calculate an optimal position value v;
[0141] Construct the equation of the line with the obtained optimal position value; if it is the horizontal axis position set, the equation of the line is: y = v; if it is the vertical axis position set, the equation of the line is: x = v;
[0142] The equation of the intersection line is combined with the axis-aligned bounding box of the two-dimensional point cloud data of the building facade to obtain two intersection points, which are connected to form a partition line.
[0143] The method for constructing partition lines provided in this embodiment effectively eliminates the influence of noise points and outliers commonly found at the edges of door and window structures, takes into account the distribution patterns of door and window structures on building facades, and the parameter setting of the method is adaptive based on the geometric information of the building facade, which is robust and easy to use.
[0144] In another embodiment of the present invention, the process of dividing the position subsets includes the following steps:
[0145] Arrange the horizontal axis position set and the vertical axis position set in descending order according to the lengths of the sides corresponding to the position values in the horizontal axis position set and the vertical axis position set;
[0146] Determining different length thresholds for the position subsets of the horizontal axis position set and the position subsets of the vertical axis position set respectively according to the building facade geometric information;
[0147] Select the position value of the unassigned subset in the sorted order as the initial element of the current subset, and calculate the absolute value of the deviation between the initial element and other position values;
[0148] Add other position values whose absolute deviation is less than the preset cluster deviation threshold to the current subset, and calculate the sum of the lengths of the edges corresponding to the position values in the subset;
[0149] The subsets of which the sum of the side lengths of the position subsets is greater than the corresponding set length threshold are retained to obtain the divided position subsets.
[0150] When specifically calculating different position subsets, the above steps are executed cyclically to obtain several position subsets.
[0151] Specifically: Arrange the position set in descending order according to the length of the edge corresponding to the position value;
[0152] Setting an adaptive length threshold according to the building facade geometric information, and determining different length thresholds for the position subsets of the horizontal axis position set and the position subsets of the vertical axis position set respectively;
[0153] If it is a horizontal axis position set, set the length threshold to 0.15·w median ·N column If it is a vertical axis position set, the length threshold is set to 0.15·h median ·N row ;
[0154] It should be noted that, in this embodiment, a method for setting a length threshold is provided. In other embodiments, the length threshold may be set to other values or set in other ways.
[0155] Sequentially select the position value of the unassigned subset as the initial element of the current subset, calculate the absolute value of the deviation between this element and other position values, add other position values whose absolute deviation value is less than the cluster deviation threshold to the current subset, calculate the sum of the lengths of the edges corresponding to the position values in the subset, and if the sum of the lengths is greater than the corresponding length threshold, retain the subset, otherwise discard it;
[0156] The above steps are executed repeatedly until the entire position set is traversed and several position subsets are obtained.
[0157] In another embodiment provided by the present invention, the process of determining the optimal position value specifically includes the following steps:
[0158] Construct a set with each element in the position subset as the initial element, calculate the absolute value of the deviation between the element and other elements, add other elements whose absolute deviation value is less than the preset collinearity deviation threshold to the current set, and calculate the sum of the lengths of the edges corresponding to the elements in the set;
[0159] According to the obtained sets, the set with the largest sum of side lengths is selected as the optimal set;
[0160] The length of the edge corresponding to the position value in the optimal set is used as the weight, and the weighted average of the position values is calculated as the optimal position value of the partition line.
[0161] In the specific implementation of this embodiment, for each element in the position subset, a set is constructed using it as the initial element, the absolute value of the deviation between the element and other elements is calculated, other elements whose absolute value of deviation is less than the collinear deviation threshold are added to the current set, and the sum of the lengths of the edges corresponding to the elements in the set is calculated.
[0162] For all the obtained sets, select the set with the largest sum of side lengths as the optimal set;
[0163] The length of the edge corresponding to the position value in the optimal set is used as the weight, and the weighted average of the position values is calculated as the optimal position value of the partition line.
[0164] In another embodiment provided by the present invention, step S6 specifically includes the following steps:
[0165] Intersect all partition lines in pairs and calculate the intersection points;
[0166] Line segments and rectangular surface elements are constructed according to the intersection points, and the position information and adjacency relationship of various auxiliary elements are stored in the form of point tables, line tables and surface tables to obtain the auxiliary elements.
[0167] In the specific implementation of this embodiment, all partition lines are intersected in pairs, the intersection points are calculated, line segments and rectangular surface elements are constructed based on the intersection points, and the position information and adjacency relationship of various auxiliary elements are stored in the form of point table, line table and surface table.
[0168] In another embodiment of the present invention, the method further includes:
[0169] The auxiliary elements are transformed from the local coordinate system to the original world coordinate system according to the rigid body transformation matrix.
[0170] Specifically, the building facade auxiliary elements are transformed from the local coordinate system to the original world coordinate system using the rigid body transformation matrix from the world coordinate system to the local coordinate system.
[0171] In another embodiment provided by the present invention, the method proposed in this application is used to construct auxiliary elements from the ground-based three-dimensional point cloud data of a building facade. Figure 2 , which is a schematic diagram of the effect of ground-based 3D point cloud data of a building facade provided by an embodiment of the present invention. The parameter values are set as follows: distance threshold 0.2m, cluster deviation threshold 0.15m, and collinearity deviation threshold 0.05m. Figures 3-5 All types of building facade auxiliary elements obtained in this embodiment are shown respectively. Figure 3 This is a schematic diagram of the effect of the intersection type auxiliary element provided by an embodiment of the present invention. Figure 4 This is a schematic diagram of the effect of the line segment type auxiliary element provided by an embodiment of the present invention. Figure 5 It is a schematic diagram of the effect of the facet type auxiliary element provided by an embodiment of the present invention.
[0172] In another embodiment provided by the present invention, the method proposed in this application is used to construct auxiliary elements from mobile handheld three-dimensional point cloud data of a building facade. Figure 6 , which is a schematic diagram of the effect of mobile handheld 3D point cloud data of building facades provided by an embodiment of the present invention. The parameter values are set as follows: distance threshold 0.2m, cluster deviation threshold 0.1m, and collinearity deviation threshold 0.05m. Figures 7-9 The result diagrams of the auxiliary elements construction of the building facade in this embodiment are respectively shown. Figure 7 is another schematic diagram of the effect of the intersection type auxiliary element provided by an embodiment of the present invention. Figure 8 This is another schematic diagram of the effect of the line segment type auxiliary element provided by an embodiment of the present invention. Figure 9 This is another schematic diagram of the effect of the facet-type auxiliary element provided by an embodiment of the present invention.
[0173] Experimental tests have shown that this method can automatically construct facade auxiliary elements for both fixed-point stand-type and mobile handheld three-dimensional point cloud data of building facades. For building facade point cloud data with a point count of 300,000, it only takes about 3 seconds, indicating that this method has good data compatibility and operational efficiency.
[0174] It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles of the present invention, and these improvements and modifications are also considered to be within the scope of protection of the present invention.
Claims
1. A method for constructing auxiliary elements of building facades based on three-dimensional point clouds, characterized in that: The method comprises: The acquired three-dimensional point cloud data of the building facade is converted into a predefined local coordinate system to obtain two-dimensional point cloud data of the building facade; Extracting initial outline polylines of the door and window structure from the two-dimensional point cloud data; Regularizing the initial contour polyline to obtain an optimized contour polyline of the door and window structure; Estimate building facade geometry information based on optimized contour polylines; Constructing a partition line based on the optimized contour polyline and the building facade geometric information; The space where the building facade is located is divided according to the partition lines to obtain auxiliary elements of the building facade.
2. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 1, characterized in that: The acquired 3D point cloud data of the building facade is converted into a predefined local coordinate system to obtain the 2D point cloud data of the building facade, specifically including: Fitting the plane parameters of the building facade from the acquired three-dimensional point cloud data of the building facade through a random sampling consistency algorithm; Calculating a normal vector of the building facade according to the plane parameters; Constructing a rigid body transformation matrix for transferring from the world coordinate system where the three-dimensional point cloud data is located to a preset local coordinate system according to the normal vector; The three-dimensional point cloud data is converted to the local coordinate system according to the rigid body transformation matrix to obtain the two-dimensional point cloud data.
3. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 1, characterized in that: Extracting initial contour polylines of the door and window structure from the two-dimensional point cloud data, including: Creating a grid based on a preset resolution, assigning pixels corresponding to data points in the two-dimensional point cloud data and the grid to white and the remaining pixels to black, and performing preprocessing to obtain a binary image of the building facade; Extracting independent contour polylines of the door and window structures from the binary image using a boundary tracking algorithm; The contour polylines whose number of pixels is less than a preset value are eliminated from the independent contour polylines, the pixels of the remaining contour polylines are inversely mapped into two-dimensional points in the local coordinate system, and the two-dimensional points are connected in pairs to form a closed contour to obtain the initial contour polyline.
4. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 1, characterized in that: Regularizing the initial contour polyline to obtain an optimized contour polyline of the door and window structure includes: Calculating the angle between each side of each door and window structure and the horizontal axis of the local coordinate system based on the initial contour polyline; When the calculated angle is less than the preset angle threshold, the edge is rotated around its own midpoint until it is parallel to the horizontal axis; otherwise, the edge is rotated around its own midpoint until it is perpendicular to the horizontal axis; Calculate the distance from the midpoint of one of the two parallel adjacent sides of each door and window structure to the straight line on which the other side lies; When the calculated distance is less than a preset distance threshold, a merging distance is calculated based on the lengths of the two adjacent edges and the calculated distance; taking the position of the longer of the two adjacent edges as a reference, the merging distance is translated toward the shorter of the two adjacent edges to determine a merged edge after the two adjacent edges are merged; The straight lines where every two adjacent edges of the remaining edge lines are intersected are calculated, the intersection points are reconstructed, and the closed polyline is obtained to obtain the optimized contour polyline.
5. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 1, characterized in that: Estimate building facade geometry information based on optimized outline polylines, including: Calculating coordinate parameters of each door and window structure according to the axis-aligned bounding box of each optimized contour polyline, wherein the coordinate parameters include center coordinates, width, height and area; Calculating median parameters of all door and window structures according to the coordinate parameters of each door and window structure, wherein the median parameters include median area, median width, and median height; Screening out optimized contour polylines whose area ratio to the median area is not less than a preset first threshold, and constructing a center point set with the center of the axis-aligned bounding box of the screened optimized contour polylines; Performing one-dimensional Euclidean clustering in the horizontal axis direction of the local coordinate system according to the horizontal coordinates of the center point set, determining the product of the median width and a preset second threshold as the shortest distance between clusters, and using the obtained number of clusters as the average number of columns of the door and window structure; performing one-dimensional Euclidean clustering in the longitudinal direction of the local coordinate system according to the longitudinal coordinates of the center point set, determining the product of the median height and a preset third threshold as the shortest distance between clusters, and using the obtained number of clusters as the average number of rows of the door and window structure; The median parameter, the average number of columns, and the average number of rows are used as the building facade geometric information.
6. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 1, characterized in that: Constructing a partition line according to the optimized contour polyline and the building facade geometric information, comprising: For the optimized contour polyline of each door and window structure, the vertical coordinate value of the side parallel to the horizontal axis is extracted as the position value, and the horizontal axis position set is constructed; the horizontal coordinate value of the side parallel to the vertical axis is extracted as the position value, and the vertical axis position set is constructed; Dividing the horizontal axis position set and the vertical axis position set into a plurality of position subsets respectively through adaptive clustering; Calculate an optimal position value for each position subset; A straight line equation is constructed according to the obtained optimal position value, and the straight line equation is intersected with the axis-aligned bounding box of the two-dimensional point cloud data of the building facade to obtain two intersection points, which are connected to form a partition line.
7. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 6, characterized in that: By adaptive clustering, the horizontal axis position set and the vertical axis position set are divided into several position subsets, including: Arrange the horizontal axis position set and the vertical axis position set in descending order according to the lengths of the sides corresponding to the position values in the horizontal axis position set and the vertical axis position set; Determining different length thresholds for the position subsets of the horizontal axis position set and the position subsets of the vertical axis position set respectively according to the building facade geometric information; Select the position value of the unassigned subset in the sorted order as the initial element of the current subset, and calculate the absolute value of the deviation between the initial element and other position values; Add other position values whose absolute deviation is less than the preset cluster deviation threshold to the current subset, and calculate the sum of the lengths of the edges corresponding to the position values in the subset; The subsets of which the sum of the side lengths of the position subsets is greater than the corresponding set length threshold are retained to obtain the divided position subsets.
8. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 6, characterized in that: For each subset of positions, an optimal position value is calculated, including: Construct a set with each element in the position subset as the initial element, calculate the absolute value of the deviation between the element and other elements, add other elements whose absolute deviation value is less than the preset collinearity deviation threshold to the current set, and calculate the sum of the lengths of the edges corresponding to the elements in the set; According to the obtained sets, the set with the largest sum of side lengths is selected as the optimal set; The length of the edge corresponding to the position value in the optimal set is used as the weight, and the weighted average of the position values is calculated as the optimal position value of the partition line.
9. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 1, characterized in that: The space where the building facade is located is divided according to the partition lines to obtain auxiliary elements of the building facade, including: Intersect all partition lines in pairs and calculate the intersection points; Line segments and rectangular surface elements are constructed according to the intersection points, and the position information and adjacency relationship of various auxiliary elements are stored in the form of point tables, line tables and surface tables to obtain the auxiliary elements.
10. The method for constructing auxiliary elements of building facades based on three-dimensional point clouds according to claim 2, characterized in that: The method further includes The auxiliary elements are transformed from the local coordinate system to the original world coordinate system according to the rigid body transformation matrix.