Automatic vector mapping method, storage medium and device based on indoor three-dimensional point cloud

Through the conversion of coordinate systems through RNASAC and PCA algorithms, combined with the Hough transformation method, the indoor three-dimensional point cloud data is automatically processed, which solves the problem of inefficient traditional mapping and achieves efficient and accurate vector mapping.

CN119478250BActive Publication Date: 2025-09-02CHINA UNIV OF MINING & TECH
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411851970.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-16
Publication Date
2025-09-02
Estimated Expiration
2044-12-16

AI Technical Summary

Technical Problem

Traditional indoor mapping methods are inefficient, manual processing of indoor three-dimensional point cloud data is time-consuming and error-prone, and existing automated mapping methods are difficult to match the data acquisition speed.

Method used

The RNASAC algorithm is used to obtain the best fit plane and side, and convert it to the auxiliary coordinate system. Combined with PCA analysis and Hough transformation method, the hierarchy, classification and line drawing of point cloud data are carried out to realize automatic vector mapping.

Benefits of technology

It improves the accuracy of floor hierarchy and the accuracy of vector lines, ensures the reliability and aesthetics of data, and is suitable for indoor surveying and mapping.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119478250B_ABST
    Figure CN119478250B_ABST
Patent Text Reader

Abstract

The present invention discloses an automatic vector mapping method, storage medium, and device based on indoor three-dimensional point clouds. The method comprises the following steps: 1. obtaining the original point cloud data of the corresponding building interior, and obtaining the best-fit plane and two best-fit sides of the original point cloud data based on the RNASAC algorithm. The original building point cloud data is converted into an auxiliary coordinate system based on the plane normal vector of the best-fit plane and the side normal vectors of the two best-fit sides, and the floors are layered; 2. data denoising and partition type classification are performed; 3. point cloud normal vectors are estimated based on the PCA analysis method to achieve bidirectional partition separation, and each partition point cloud is divided into horizontal and vertical directions at 45°; 4. linear shape drawing is performed; 5. linear shape correction is performed; and 6. coordinate correction is performed to obtain a vector map. The present invention can efficiently draw both accurate and beautiful vector linear shapes based on the original data, and is particularly suitable for indoor surveying and mapping.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an automatic vector mapping method based on indoor three-dimensional point cloud, a storage medium and a device. Background Art

[0002] Traditional indoor mapping methods rely primarily on manual measurement and drawing, a time-consuming and labor-intensive process. Complex indoor spaces require multiple measurements of different locations to ensure data accuracy, and then manual drawing based on the measured data, resulting in an inefficient process. With the rapid development of 3D laser scanning technology, the acquisition of indoor point cloud data has become more efficient and accurate. Mapping based on this point cloud data can significantly shorten field engineering measurement time. However, existing automated mapping methods struggle to keep up with current data acquisition speeds, and many mapping methods based on indoor point cloud data still require manual drawing.

[0003] Because indoor 3D point cloud data contains a large number of points, manual mapping requires manual analysis and processing of these points one by one, such as identifying the boundaries of walls, doors, windows, and other partitions. A complex indoor scene can contain millions of points, and manually processing this data to create a floor plan is still very time-consuming. Furthermore, the manual mapping process, with its large amount of data to process, is susceptible to visual fatigue, inattention, and other factors during the long point cloud data processing process, leading to data errors. Modifications are also very tedious. Therefore, an automated mapping method is urgently needed. Summary of the Invention

[0004] To address the above issues, the present invention provides an automatic vector mapping method, storage medium, and device based on indoor three-dimensional point clouds, which can efficiently draw accurate and beautiful vector lines based on original data, and is particularly suitable for indoor surveying and mapping.

[0005] In order to achieve the above technical objectives and the above technical effects, the present invention is implemented through the following technical solutions:

[0006] An automatic vector mapping method based on indoor three-dimensional point cloud includes the following steps:

[0007] Step 1: Obtain the original point cloud data of the corresponding building interior, and obtain the best-fit plane and two best-fit sides of the original point cloud data based on the RNASAC algorithm. Based on the plane normal vector of the best-fit plane and the side normal vectors of the two best-fit sides, convert the original building point cloud data into an auxiliary coordinate system and stratify the floors;

[0008] Step 2: Data denoising and partition type classification;

[0009] Step 3: Based on the PCA analysis method, the normal vector of the point cloud is estimated to achieve bidirectional partition separation, and each partition point cloud is divided into horizontal and vertical directions at 45°;

[0010] Step 4: Draw the line;

[0011] Step 5: Perform linear correction;

[0012] Step 6: Perform coordinate correction to obtain a vector diagram.

[0013] Preferably, obtaining the best-fit plane and two best-fit sides of the original point cloud data based on the RNASAC algorithm specifically includes the following steps:

[0014] Step A01: For the original n point cloud data obtained inside the building, set a normal vector of a target plane, and iteratively process the original point cloud data using the RANSAC algorithm to obtain a fitted surface point cloud that matches the target normal vector within the angle and distance error range. The plane equation obtained by fitting is set to formula (1):

[0015] ax+by+cz+d=0(1)

[0016] The constraint condition is a 2 +b 2 +c 2 =1, the average coordinates of all points are And satisfy formula (2):

[0017]

[0018] Subtracting formula (1) from formula (2) yields formula (3):

[0019]

[0020] Then formula (3) is the best fitting plane, and the corresponding plane normal vector is (a, b, c);

[0021] Step A02: Repeat the above formulas (1)-(3) to obtain the first best-fit side surface corresponding to the left or right side of the building interior and its corresponding first side normal vector, as well as the second best-fit side surface corresponding to the front or back of the building interior and its corresponding second side normal vector.

[0022] Preferably, converting the original building point cloud data into an auxiliary coordinate system based on the plane normal vector of the best fitting plane and the side normal vectors of the two best fitting sides specifically includes the following steps:

[0023] Step B01, calculate the rotation angle θ between the plane or side normal vector and the target normal vector, and set the plane or side normal vector to The target normal vector is but:

[0024]

[0025] Where,

[0026] Step B02: Calculate the rotation axis between the plane or side normal vector and the target normal vector:

[0027]

[0028] Where, is the rotation axis coordinate;

[0029] Step B03: Calculate the rotation matrix R based on the rotation angle and the rotation axis:

[0030]

[0031] Where R is the rotation matrix and I is the identity matrix;

[0032] Step B04: For any point P(u, v, w) in the original point cloud data, the rotated point P′(u′, v′, w′) is calculated using formula (7):

[0033]

[0034] Preferably, stratifying the floors specifically includes the following steps:

[0035] Step C01: performing rounding processing on the elevation coordinates of the rotated point cloud and counting the corresponding elevation change intervals;

[0036] Step C02: using the SG filter to perform denoising on the statistically obtained elevation data;

[0037] Step C03, using a five-point cubic fitting method to perform fitting optimization on the statistical line shape;

[0038] Step C04: Extract the maximum value of the elevation information area, pair the floor maximum value and ceiling maximum value of the same floor, and increase the floor maximum value to obtain the minimum elevation value Z of the split floor. min , reduce the maximum value of the ceiling to obtain the maximum elevation Z of the split floor max ;

[0039] Step C05: Layer the floors, and the elevation interval of each floor is Z min -Z max .

[0040] Preferably, step 2 specifically includes the following steps:

[0041] Step D01: After obtaining the target floor point cloud data, project the target floor point cloud data onto the best-fitting plane, calculate the density of each point in the point cloud data using a neighboring point search method, and remove the point clouds with a point cloud density less than a set threshold.

[0042] Step D02: Extract the main partitions of each floor;

[0043] Step D03: Slice the floor point cloud data. The interval between each slice is calculated as shown in formula (8):

[0044]

[0045] Where ΔZ is the interval between slices, D is the set slice thickness, and ψ is the set number of slices;

[0046] Step D04: Calculate the selected range of each slice elevation as shown in formula (9):

[0047] Zmin+(i-1)*(ΔZ+D)≤Di≤Zmin+(i-1)*ΔZ+i*D(9)

[0048] Where D i The elevation range of the i-th slice is selected. The data of each slice is projected onto the best-fit plane. Based on the projected point cloud obtained in step D01, a neighboring point search operation is performed on the projected point cloud of each slice. If there are some point clouds for which no neighboring points are found on a specific slice, it is determined that the slice has a vacancy in that part of the area.

[0049] Step D05: Classify the partitions based on the characteristics of the space partitions.

[0050] Preferably, step 3 specifically includes the following steps:

[0051] Step E01: Estimating the normal vector of each partition type point cloud by using a local surface fitting method;

[0052] Step E02: Find the corresponding m neighboring points by establishing a KD-Tree, construct an m*3 matrix through the coordinates of these m points, and calculate the covariance matrix of the matrix. The process is shown in formula (10):

[0053]

[0054] Where Cov(X) is the covariance matrix of the constructed matrix, m is the number of neighboring points to be searched, μ x is the average value of each dimension;

[0055] Step E03: Obtain the eigenvalue and its corresponding eigenvector according to the eigenvalue definition. The calculation process is shown in formula (11):

[0056]

[0057] In the formula, λ represents the eigenvalue, and x represents the eigenvector;

[0058] Step E04: Obtain the corresponding normal vectors of each partition point cloud, and divide each partition point cloud into horizontal and vertical directions at 45° by solving the angle between the normal vector of each point and the best-fit side normal vector.

[0059] Preferably, step 4 specifically includes the following steps:

[0060] Step F01: using a KD-Tree-based Euclidean clustering method to divide the point cloud data into clusters after classification and orientation;

[0061] Step F02: Convert the coordinates of each cluster point data into Hough space. The coordinate conversion is shown in formula (12):

[0062] r=x cosτ+y sinτ (12)

[0063] Where x, y are the horizontal and vertical coordinates of the point cloud that need to be converted to the Hough space in the cluster point, τ is the angle of 1° in the range of 1 to 180°, and r is the Hough coordinate corresponding to different τ in the Hough space;

[0064] Step F03: round the corresponding coordinates to two decimal places, count and sort the points with the same τ and Hough coordinates, and select the set of points that meet the set quantity requirement to obtain the points for subsequent linear drawing;

[0065] Step F04: Fit the slope of the straight line using the least squares method to obtain the corresponding straight line;

[0066] Step F05: perform linear intersection and merging.

[0067] Preferably, the coordinate inverse calculation formula in step 6 is as shown in formula (13). For any point Points after inverse calculation for:

[0068]

[0069] Where R -1 It is the inverse matrix of the rotation matrix. When you need to draw a two-dimensional vector graph, the Z-axis coordinate is set to 0.

[0070] Correspondingly, a computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned automatic vector mapping methods based on indoor three-dimensional point clouds.

[0071] Correspondingly, a computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement any one of the above-mentioned automatic vector mapping methods based on indoor three-dimensional point clouds.

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

[0073] First, by converting the original coordinates into an auxiliary coordinate system, this invention effectively separates elevation results, significantly reducing elevation ambiguity and improving the accuracy of floor stratification. Furthermore, the proposed Hough transform method for point cloud data is not limited by image pixels and can comprehensively process and analyze target point cloud data, effectively preventing the omission of linear information.

[0074] Second, the vector images drawn by this method accurately represent the range and separation information of the target point cloud area. Furthermore, the linear shapes drawn by this method are completely based on the original point cloud data, ensuring data accuracy and reliability. This method can efficiently and automatically draw accurate and aesthetically pleasing vector linear shapes based on the original data, making it particularly suitable for indoor surveying and mapping, providing a solid data foundation for digital twins of complex indoor spaces. BRIEF DESCRIPTION OF THE DRAWINGS

[0075] Figure 1 It is a flow chart of an automatic vector mapping method based on indoor three-dimensional point cloud of the present invention;

[0076] Figure 2 This is a schematic diagram of point cloud elevation comparison after conversion to a rotated coordinate system;

[0077] Figure 3 This is the result of the Hough transform line shape recognition based on the point cloud of the present invention;

[0078] Figure 4 Schematic diagram of the Hough space voting matrix of the present invention;

[0079] Figure 5 This is the anisotropic linear drawing result diagram of the present invention;

[0080] Figure 6 This is a schematic diagram of linear intersection identification according to the present invention;

[0081] Figure 7 This is the final vectorized result diagram of the present invention. DETAILED DESCRIPTION

[0082] The technical solution of the present invention is further described in detail below in conjunction with the accompanying drawings and specific embodiments so that those skilled in the art can better understand the present invention and implement it, but the embodiments are not intended to limit the present invention.

[0083] An automatic vector mapping method based on indoor 3D point cloud, such as Figure 1 As shown, the following steps are included:

[0084] Step 1: First, obtain the original point cloud data of the corresponding building interior and obtain the best-fit plane and two best-fit sides of the original point cloud data based on the RNASAC algorithm (RANdom SAmple Consensus). Since the interior of the building is mostly symmetrical, only three sides need to be fitted: the bottom or top surface is fitted into a plane, the left or right surface is fitted into a side, and the front or back surface is fitted into a side. Preferably, the steps include the following:

[0085] Step A01: For the original n point cloud data obtained inside the building, set a normal vector of a target plane, and iteratively process the original point cloud data using the RANSAC algorithm to obtain a fitted surface point cloud that matches the target normal vector within the angle and distance error range. The plane equation obtained by fitting is set to formula (1):

[0086] ax+by+cz+d=0(1)

[0087] The constraint condition is a 2 +b 2 +c 2 =1, the average coordinates of all points are And satisfy formula (2):

[0088]

[0089] Subtracting formula (1) from formula (2) yields formula (3):

[0090]

[0091] Then formula (3) is the best fitting plane, and the corresponding plane normal vector is (a, b, c);

[0092] Step A02: Repeat the above formulas (1)-(3) to obtain the first best-fit side surface corresponding to the left or right side of the building interior and its corresponding first side normal vector, as well as the second best-fit side surface corresponding to the front or back of the building interior and its corresponding second side normal vector.

[0093] Secondly, the original building point cloud data is converted into an auxiliary coordinate system based on the plane normal vector of the best fitting plane and the side normal vectors of the two best fitting sides. By constructing the auxiliary coordinate system, the original building point cloud data is rotated and transformed so that its contour can be accurately aligned with the coordinate axis of the auxiliary coordinate system, and the spatial orientation of the point cloud data is standardized. Preferably, the specific steps include the following:

[0094] Step B01, calculate the rotation angle θ between the plane or side normal vector and the target normal vector, and set the plane or side normal vector to The target normal vector is but:

[0095]

[0096] Where,

[0097] For the best-fit plane, its target normal vector is (0,0,1), for the first best-fit side, its target normal vector is (1,0,0), and for the second best-fit side, its target normal vector is (0,1,0).

[0098] Step B02: Calculate the rotation axis between the plane or side normal vector and the target normal vector:

[0099]

[0100] Where, is the rotation axis coordinate;

[0101] Step B03: Calculate the rotation matrix R based on the rotation angle and the rotation axis:

[0102]

[0103] Where R is the rotation matrix and I is the identity matrix;

[0104] Step B04: For any point P(u, v, w) in the original point cloud data, the rotated point P′(u′, v′, w′) is calculated using formula (7):

[0105]

[0106] Finally, the floors are layered based on the corrected point cloud elevation. The point cloud elevation comparison diagram after conversion to the rotated coordinate system by this method is shown in the figure below. Figure 2 As shown, it is possible to effectively separate the elevation results and significantly reduce the elevation fuzzy area, thereby improving the accuracy of floor stratification. Preferably, floor stratification specifically includes the following steps:

[0107] Step C01: After completing the rotation correction operation of the corresponding coordinates, perform rounding processing on the rotated point cloud elevation coordinates and count the corresponding elevation change intervals;

[0108] Step C02: using the SG filter to perform denoising on the statistically obtained elevation data;

[0109] Step C03: Using a five-point cubic fitting method (taking five adjacent data points, a cubic curve can be fitted, and then the data values ​​at the corresponding positions on the cubic curve are used as the filtered result) to optimize the statistical line shape fitting, so as to avoid noise glitches;

[0110] Step C04: After completing the optimization of the elevation signal, statistics are started on the maximum values ​​of the elevation information area. The regional maximum value mentioned here is actually the floor segmentation surface of the building point cloud. The maximum value of the elevation information area is extracted. Since the rounding interval is completed by rounding, after obtaining the maximum value of the corresponding area, it is necessary to pair the floor maximum value and ceiling maximum value of the same floor, and increase the floor maximum value to obtain the minimum elevation value Z of the segmented floor. min , reduce the maximum value of the ceiling to obtain the maximum elevation Z of the split floor max ;

[0111] For example, for the maximum value of the lower elevation area, that is, the floor maximum value, increase ω; and for the maximum value of the higher elevation area, that is, the ceiling maximum value, reduce ω accordingly. For example, in a pair of maximum values, if the lower elevation maximum value is 12.1m and the higher elevation maximum value is 13.4m, and the decimal point is rounded to 1 decimal place, then ω can be taken as 0.05 with two decimal places (if the decimal point is rounded to 2 decimal places, then ω can be taken as 0.005 with three decimal places, and so on). Then, when the floors are stratified, Z min =12.1+0.05=12.15, Z max =13.4-0.05=13.35.

[0112] Step C05: Layer the floors, and the elevation interval of each floor is Z min -Z max , corresponding to the above example, the elevation range of this floor is 12.15m to 13.35m.

[0113] Step 2: Data denoising and partition type classification. Preferably, step 2 specifically includes the following steps:

[0114] Step D01: After completing the division and separation of each floor, since some non-partition furniture exists on each floor, this part of the point cloud data needs to be removed. After obtaining the point cloud data of the target floor, the point cloud data of this part of the floor is projected onto the best fitting plane. The density of each point in the point cloud data is obtained by the neighboring point search method. The point cloud with a point cloud density less than the set threshold is removed. This part of the point cloud is the non-partition furniture point cloud;

[0115] Step D02: Extract the main partitions of each floor;

[0116] Step D03: Slice the floor point cloud data. The interval between each slice is calculated as shown in formula (8):

[0117]

[0118] Where ΔZ is the interval between slices, D is the set slice thickness, and ψ is the set number of slices;

[0119] Step D04: Calculate the selected range of each slice elevation as shown in formula (9):

[0120] Zmin+(i-1)*(ΔZ+D)≤Di≤Zmin+(i-1)*ΔZ+i*D(9)

[0121] Where D i is the elevation selection range of the i-th slice. The data of each slice is projected onto the best-fit plane. Based on the projected point cloud obtained in step D01, a neighboring point search operation is performed on the projected point cloud of each slice. If there are some point clouds for which no neighboring points are found on a specific slice, it is determined that the slice has a vacancy in that part of the area.

[0122] Step D05: Classify the partitions based on their characteristics. For the main wall structures inside the building, for example, the characteristics of spatial partitions such as walls, windows, doors, and partitions are analyzed and classified. For example, doors may have point cloud gaps in a certain number of slices on the bottom layer and above, while windows usually have point cloud gaps in the middle slices, while walls should not have point cloud gaps. However, given that there may be a certain degree of occlusion during the data collection process, point cloud gaps are allowed in some areas of a small number of slices. Partitions usually have point cloud gaps in the upper slices.

[0123] Step 3: First, the point cloud normal vector is estimated based on the PCA analysis method (principal component analysis) to achieve bidirectional partition separation. Finally, each partition point cloud is divided into horizontal and vertical directions according to 45°. Preferably, the method specifically includes the following steps:

[0124] Step E01: After classifying the point cloud partition type, a large number of irrelevant point clouds are removed, and the normal vector of each partition type point cloud is estimated by the local surface fitting method;

[0125] Step E02: Find the corresponding m neighboring points by establishing a KD-Tree, construct an m*3 matrix through the coordinates of these m points, and calculate the covariance matrix of the matrix. The process is shown in formula (10):

[0126]

[0127] Where Cov(X) is the covariance matrix of the constructed matrix, m is the number of neighboring points to be searched, μ x is the average value of each dimension;

[0128] Step E03: Obtain the eigenvalue and its corresponding eigenvector according to the eigenvalue definition. The calculation process is shown in formula (11):

[0129]

[0130] In the formula, λ represents the eigenvalue, and x represents the eigenvector;

[0131] Step E04: Principal Component Analysis (PCA) shows that the local surface constructed when selecting neighboring points is roughly flat. Therefore, the direction of the point cloud normal is the eigenvector corresponding to the minimum eigenvalue. The corresponding normal vectors of each type of partition point cloud are obtained. By solving the angle between the normal vector of each point and the best-fit side normal vector, each partition point cloud is divided into horizontal and vertical directions according to 45°. For example, taking the X-axis and Y-axis coordinate system as an example, a straight line with a 45° angle is drawn on the X-axis and Y-axis. When the partition point cloud falls between the straight line and the X-axis, it is horizontal; when the partition point cloud falls between the straight line and the Y-axis, it is vertical.

[0132] Step 4: perform line drawing. Preferably, step 4 specifically includes the following steps:

[0133] Step F01: using a KD-Tree-based Euclidean clustering method to divide the point cloud data into clusters after classification and orientation;

[0134] Step F02: Compared with the traditional Hough transform method used for line shape recognition in an image, the present invention proposes a Hough transform method applied to point cloud data. Specifically, the coordinates of each cluster point data are transformed into the Hough space. The coordinate transformation is shown in formula (12):

[0135] r=x cosτ+y sinτ (12)

[0136] Where x, y are the horizontal and vertical coordinates of the point cloud that needs to be converted to the Hough space in the cluster point, τ is the angle of 1° in the range of 1 to 180°, and r is the Hough coordinate corresponding to different τ in the Hough space. The Hough transform line shape recognition result based on the point cloud is shown in the figure below: Figure 3 As shown;

[0137] Step F03: After solving the Hough coordinates of all points in the cluster, the corresponding coordinates are rounded to two decimal places, and the points with the same τ and Hough coordinates are counted and sorted (i.e., intersection matrix voting, such as Figure 4As shown), these points are the point sets with linear relationships, and the point sets that meet the set quantity requirements are selected to obtain the points for subsequent linear drawing;

[0138] Step F04: Since these points are only obtained with an angle error of 1°, the linear slope obtained cannot meet the actual application requirements. Therefore, after extracting the corresponding cluster points, the ployfit function provided by MATLAB is used to fit the linear slope of the obtained point cloud using the least squares method, and finally the corresponding straight line is obtained, as shown in FIG. Figure 5 As shown;

[0139] Step F05: perform linear intersection and merging.

[0140] Linear merging is mainly divided into same-direction merging and different-direction intersection. First, the point cloud linear shapes obtained by the above processing are searched to find out whether there are similar distances and small angle differences in the same-direction linear shapes. If so, the two linear related point clouds are clustered and merged. Then, the line drawing method in step 4 is used to merge the merged cluster points again. For different-direction linear shapes, the two points with the farthest distance in each linear cluster are found. Since the cluster points are distributed in a straight line shape, the two points with the farthest distance are the linear endpoints. The horizontal endpoints are searched one by one to find out whether there are longitudinal endpoints with a smaller distance. If so, the corresponding horizontal and longitudinal lines are extended to intersect at the same endpoint, such as Figure 6 shown.

[0141] Step 5: Perform line correction. After all endpoints are merged, some lines may not intersect due to occlusion or other factors during the point cloud data acquisition process. The search threshold for these endpoints is gradually increased to allow them to intersect with similar lines.

[0142] Step 6: Correct the coordinates to obtain the vector diagram. After the vectorization is completed, since the vector diagram is based on the auxiliary coordinate system, it is necessary to inversely calculate the coordinates to obtain the vector diagram corresponding to the original data. Preferably, the coordinate inverse calculation formula in step 6 is as shown in formula (13). For any point Points after inverse calculation for:

[0143]

[0144] Where R -1 is the inverse matrix of the rotation matrix. If you need to draw a two-dimensional vector graph, you only need to set the Z-axis coordinate to 0 to achieve the coordinate inverse calculation of the corresponding two-dimensional image, such as Figure 7 shown.

[0145] Correspondingly, a computer-readable storage medium stores at least one instruction, and the at least one instruction is loaded and executed by a processor to implement any one of the above-mentioned automatic vector mapping methods based on indoor three-dimensional point clouds.

[0146] Correspondingly, a computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement any one of the above-mentioned automatic vector mapping methods based on indoor three-dimensional point clouds.

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

[0148] First, by converting the original coordinates into an auxiliary coordinate system, this invention effectively separates elevation results, significantly reducing elevation ambiguity and improving the accuracy of floor stratification. Furthermore, the proposed Hough transform method for point cloud data is not limited by image pixels and can comprehensively process and analyze target point cloud data, effectively preventing the omission of linear information.

[0149] Second, the vector images drawn by this method accurately represent the range and separation information of the target point cloud area. Furthermore, the linear shapes drawn by this method are completely based on the original point cloud data, ensuring data accuracy and reliability. This method can efficiently and automatically draw accurate and aesthetically pleasing vector linear shapes based on the original data, making it particularly suitable for indoor surveying and mapping, providing a solid data foundation for digital twins of complex indoor spaces.

[0150] The above are only preferred embodiments of the present invention and are not intended to limit the patent scope of the present invention. Any equivalent structures or equivalent process changes made using the contents of the present invention's description and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.

Claims

1. An automatic vector mapping method based on indoor three-dimensional point cloud, characterized in that: The steps include: Step 1: Obtain the original point cloud data of the corresponding building interior, and obtain the best-fit plane and two best-fit sides of the original point cloud data based on the RNASAC algorithm. Based on the plane normal vector of the best-fit plane and the side normal vectors of the two best-fit sides, convert the original building point cloud data into an auxiliary coordinate system and stratify the floors; Step 2: Data denoising and partition type classification; Step 3: Based on the PCA analysis method, the normal vector of the point cloud is estimated to achieve bidirectional partition separation, and each partition point cloud is divided into horizontal and vertical directions at 45°; Step 4: Draw the line; Step 5: Perform linear correction; Step 6: Correct the coordinates to obtain a vector diagram; The specific steps of layering floors are as follows: Step C01: performing rounding processing on the elevation coordinates of the rotated point cloud and counting the corresponding elevation change intervals; Step C02: using the SG filter to perform denoising on the statistically obtained elevation data; Step C03, using a five-point cubic fitting method to perform fitting optimization on the statistical line shape; Step C04: Extract the maximum value of the elevation information area, pair the floor maximum value and ceiling maximum value of the same floor, and increase the floor maximum value to obtain the minimum elevation value Z of the split floor. min , reduce the maximum value of the ceiling to obtain the maximum elevation Z of the split floor may ; Step C05: Layer the floors, and the elevation interval of each floor is Z min ~Z max ; Step 3 specifically includes the following steps: Step E01: Estimating the normal vector of each partition type point cloud by using a local surface fitting method; Step E02: Find the corresponding m neighboring points by establishing a KD-Tree, construct an m*3 matrix through the coordinates of these m points, and calculate the covariance matrix of the matrix. The process is shown in formula (10): Where Cov(X) is the covariance matrix of the constructed matrix, m is the number of neighboring points to be searched, μ x is the average value of each dimension; Step E03: Obtain the eigenvalue and its corresponding eigenvector according to the eigenvalue definition. The calculation process is shown in formula (11): In the formula, λ represents the eigenvalue, and x represents the eigenvector; Step E04: Obtain the corresponding normal vectors of each partition point cloud, and divide each partition point cloud into horizontal and vertical directions at 45° by solving the angle between the normal vector of each point and the best-fit side normal vector.

2. The automatic vector mapping method based on indoor three-dimensional point cloud according to claim 1, characterized in that: The steps for obtaining the best-fit plane and two best-fit sides of the original point cloud data based on the RNASAC algorithm are as follows: Step A01: For the original n point cloud data obtained inside the building, set a normal vector of a target plane, and iteratively process the original point cloud data using the RANSAC algorithm to obtain a fitted surface point cloud that matches the target normal vector within the angle and distance error range. The plane equation obtained by fitting is set to formula (1): ax+by+cz+d=0(1) where the constraint is a 2 +b 2 +c 2 =1, the average coordinates of all points are And satisfy formula (2): Subtracting formula (1) from formula (2) yields formula (3): Then formula (3) is the best fitting plane, and the corresponding plane normal vector is (a, b, c); Step A02: Repeat the above formulas (1)-(3) to obtain the first best-fit side surface corresponding to the left or right side of the building interior and its corresponding first side normal vector, as well as the second best-fit side surface corresponding to the front or back of the building interior and its corresponding second side normal vector.

3. The automatic vector mapping method based on indoor three-dimensional point cloud according to claim 2, characterized in that: The conversion of the original building point cloud data into an auxiliary coordinate system based on the plane normal vector of the best fitting plane and the side normal vectors of the two best fitting sides specifically includes the following steps: Step B01, calculate the rotation angle θ between the plane or side normal vector and the target normal vector, and set the plane or side normal vector to The target normal vector is but: Where, Step B02: Calculate the rotation axis between the plane or side normal vector and the target normal vector: Where, is the rotation axis coordinate; Step B03: Calculate the rotation matrix R based on the rotation angle and the rotation axis: Where R is the rotation matrix and I is the identity matrix; Step B04: For any point P(u, v, w) in the original point cloud data, the rotated point P′(u′, v′, w′) is calculated using formula (7):

4. The automatic vector mapping method based on indoor three-dimensional point cloud according to claim 1, characterized in that: Step 2 specifically includes the following steps: Step D01: After obtaining the target floor point cloud data, project the target floor point cloud data onto the best-fitting plane, calculate the density of each point in the point cloud data using a neighboring point search method, and remove the point clouds with a point cloud density less than a set threshold. Step D02: extract the main partitions of each floor; Step D03: Slice the floor point cloud data. The interval between each slice is calculated as shown in formula (8): Where ΔZ is the interval between slices, D is the set slice thickness, and ψ is the set number of slices; Step D04: Calculate the selected range of each slice elevation as shown in formula (9): Z min +(i-1)*(ΔZ+D)≤D i ≤Z min +(i-1)*ΔZ+i*D(9) where D i The elevation range of the i-th slice is selected. The data of each slice is projected onto the best-fit plane. Based on the projected point cloud obtained in step D01, a neighboring point search operation is performed on the projected point cloud of each slice. If there are some point clouds for which no neighboring points are found on a specific slice, it is determined that the slice has a vacancy in that part of the area. Step D05: Classify the partitions based on the characteristics of the space partitions.

5. The automatic vector mapping method based on indoor three-dimensional point cloud according to claim 1, characterized in that: Step 4 specifically includes the following steps: Step F01: using the KD-Tree-based Euclidean clustering method to divide the point cloud data into clusters after classification and orientation; Step F02: Convert the coordinates of each cluster point data into Hough space. The coordinate conversion is shown in formula (12): r=xcosτ+ysinτ (12) Where x, y are the horizontal and vertical coordinates of the point cloud that need to be converted to the Hough space in the cluster point, τ is the angle of 1° in the range of 1 to 180°, and r is the Hough coordinate corresponding to different τ in the Hough space; Step F03: round the corresponding coordinates to two decimal places, count and sort the points with the same τ and Hough coordinates, and select the set of points that meet the set quantity requirement to obtain the points for subsequent linear drawing; Step F04: Fit the slope of the straight line using the least squares method to obtain the corresponding straight line; Step F05: perform linear intersection and merging.

6. The automatic vector mapping method based on indoor three-dimensional point cloud according to claim 5, characterized in that: The coordinate inverse solution formula in step 6 is shown in formula (13). For any point Points after inverse calculation for: Where R -1 It is the inverse matrix of the rotation matrix. When you need to draw a two-dimensional vector graph, the Z-axis coordinate is set to 0.

7. A computer-readable storage medium, characterized in that The storage medium stores at least one instruction, and the at least one instruction is loaded and executed by the processor to implement the automatic vector mapping method based on indoor three-dimensional point cloud according to any one of claims 1 to 6.

8. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one instruction, and the instruction is loaded and executed by the processor to implement the automatic vector mapping method based on indoor three-dimensional point cloud according to any one of claims 1-6.

Citation Information

Patent Citations

  • Multi-floor indoor structured three-dimensional modeling method and system based on laser point cloud

    CN110189412A

  • Method, device and equipment for constructing wall contour based on point cloud data vectorization

    CN118485772A

  • Indoor building structure extraction and vectorization reconstruction method and device based on laser radar data

    CN118799496A

  • Road scene point cloud identification method and system suitable for inspection robot

    CN118887641A