Automatic room measurement method based on laser SLAM

Through the automatic room measurement method based on laser SLAM, using lidar to collect and process point cloud data, extract wall features and detect closed loops, the problems of low efficiency and poor accuracy of existing room measurement methods are solved, and fast and accurate automatic room measurement is achieved.

CN116777939BActive Publication Date: 2025-04-15SHANGHAI CONSTRUCTION FOURTH CONSTRUCTION GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202310723281.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-06-19
Publication Date
2025-04-15
Estimated Expiration
2043-06-19

AI Technical Summary

Technical Problem

The existing mass-loading methods have problems such as low work efficiency, low accuracy and high rework, especially manual surveying and mapping can easily lead to omissions and errors.

Method used

The automatic room measurement method based on laser SLAM is adopted to collect point cloud data of the room through handheld lidar, divide it into point cloud sub-blocks, and use the Hough transform to extract straight line or arc features, and detect the closed loop through the intersection topological connection relationship to generate an orderly connected wall contour line.

Benefits of technology

It realizes rapid and efficient automatic room measurement, with a total time of only 5 to 10 minutes, effectively improving the efficiency and accuracy of room measurement, and avoiding omissions and rework caused by manual operations.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116777939B_ABST
    Figure CN116777939B_ABST
Patent Text Reader

Abstract

The present invention provides an automatic room measurement method based on laser SLAM, comprising: firstly, the point cloud data collected by the laser radar is clustered and segmented by Euclidean distance to form point cloud sub-blocks. Then, in the segmented point cloud sub-blocks, the straight line or arc features are extracted by the Hough transform method. Finally, the straight line and the point cloud data are superimposed and matched, the straight line features are extended to intersect and clipped with each other, and the intersection is generated, and the closed-loop detection is performed based on the topological connection relationship of the intersection. The point cloud data collected by the laser radar usually has the characteristics of unstructured attributes, no connection between data, no semantic information, and high data point density. The present invention can calculate the contour lines of the wall connected in an orderly manner.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to an automatic room measuring method based on laser SLAM. Background Art

[0002] Accurate house type data is the premise for the development of various decoration design work. Although the construction party provides original drawings for new and second-hand houses in China, there is often a deviation between the drawings and the actual house type data. When contacting a decoration company, the first step is to measure the house (measure the house type data), so the accuracy and efficiency of the house measurement data are very important.

[0003] The development of domestic decoration companies measuring houses is as follows:

[0004] Tape measure: Renovation workers use tape measures to measure wall lengths, door and window sizes, etc., which usually requires the cooperation of multiple people, resulting in low work efficiency. It takes more than a few hours to measure a house. Laser distance meter: Currently the most widely used. Using a laser distance meter instead of a tape measure is more convenient, faster, and more accurate; however, the measurement process requires more experience, such as knowing which are the key dimensions that cannot be missed.

[0005] Another problem with the existing housing method is that there are human omissions from data to drawings: all the dimensional data measured on site are usually recorded manually on sketches first, and then CAD drawings are drawn; this has many human factors and is prone to omissions or errors. Therefore, when decoration companies measure houses, structural errors and dimensional errors in drawings often occur, and usually require multiple reworks. Summary of the invention

[0006] The purpose of the present invention is to provide an automatic room measurement method based on laser SLAM.

[0007] In order to solve the above problems, the present invention provides an automatic room measurement method based on laser SLAM, comprising:

[0008] The point cloud data of the room is collected by handheld laser radar C = {p i};

[0009] Divide the point cloud data C into point cloud sub-blocks;

[0010] In each point cloud sub-block G i Extract straight lines or arcs in ;

[0011] Based on the straight line or arc, a valid intersection point is obtained; based on the valid intersection point, a final wall contour line connected to each other is obtained, and a closed loop existing in the final wall contour line connected to each other is detected.

[0012] Furthermore, in the above method, dividing the point cloud data C into point cloud sub-blocks includes:

[0013] Step 2.1: Randomly select a current initial point p0 in the point cloud data C;

[0014] Step 2.2: Create a point cloud collection G i , and add the initial point p0 to G i ;

[0015] Step 2.3: Search the point cloud data C through KD-tree, and add the point set whose Euclidean distance to the initial point p0 is within the threshold ΔD area to the point set G i , mark the current initial point p0 as completed search;

[0016] Step 2.4: If in the point set G i There are unfinished search points in the point set G. i Randomly select a point that has not been searched yet as the new current initial point p0 and go to step 2.3. Otherwise, set G i As a segmented point cloud sub-block;

[0017] Step 2.5: If every point in the point cloud data C belongs to a point cloud sub-block, the point cloud segmentation is completed; otherwise, randomly select a new initial point p0 from the remaining points in the point cloud data C that do not belong to any point cloud sub-block, and go to step 2.2.

[0018] Furthermore, in the above method, ΔD=0.05*L, where L is the size of the point cloud bounding box.

[0019] Furthermore, in the above method, in each point cloud sub-block G i Line or arc extraction can be performed in:

[0020] Step 3.1: Establish the Hough parameter space in polar coordinates, divide the Hough space into interval blocks, and initialize the voting value H of interval block j j [r j ,θ j ]=0;

[0021] Step 3.2: Point P in the point cloud sub-block i (x i ,y i ) is transformed into a straight line r = x in Hough space i cosθ+y i sinθ, the voting value H of the interval block j that the straight line passes through j [r j ,θ j ]Increase by 1;

[0022] Step 3.3: Find the point P with the highest voting value in Hough spacem (r m ,θ m ), the corresponding straight line is the detected straight line.

[0023] Furthermore, in the above method, the interval block size is r=0.5*L, θ=1°, wherein r represents the polar diameter, and θ represents the polar angle.

[0024] Furthermore, in the above method, obtaining a valid intersection point based on a straight line or an arc includes:

[0025] For each point p in the point cloud data i , calculate point p i The distance to the nearest straight line or arc, if the distance is less than the threshold ΔD M , then the point p i Mark as a recognized point; otherwise, mark as an unrecognized point;

[0026] Find the intersection point P between similar straight lines or arcs c , calculate the distance between the intersection point and the end point of the line or arc, if the distance is less than a given threshold ΔD M , then the intersection point P c Valid, recorded as a valid intersection; if the distance is greater than the given threshold △D M , and then analyze the intersection point P c The nearest distance d from the unidentified points to the line and arc is calculated for the surrounding unidentified points. min , if d min ≤ΔD M , then the intersection point of the unrecognized point is determined to be valid and recorded as a valid intersection point.

[0027] Furthermore, in the above method, ΔD M =0.001*L.

[0028] Furthermore, in the above method, based on the valid intersection points, the final interconnected wall contour lines include:

[0029] For valid intersections, the straight lines or arcs corresponding to the valid intersections are respectively extended to the valid intersections, and the straight lines or arcs are cut according to the valid intersections to obtain the final interconnected wall contour lines.

[0030] Furthermore, in the above method, detecting the closed loops existing in the final interconnected wall contours includes:

[0031] Create an edge set O and randomly select an edge L from the final contour S Add to set O and use it as the initial edge;

[0032] Calculate the other edges in the contour and L s The clockwise angle between adjacent sides, select the side with the largest angle L N , if L N If L is already in set O, then the set O forms a closed loop and ends; otherwise, N After adding set O, repeat this step.

[0033] Compared with the prior art, the present invention includes: firstly, the point cloud data collected by the laser radar is segmented by Euclidean distance clustering to form point cloud sub-blocks. Then, in the segmented point cloud sub-blocks, the straight line or arc features are extracted by the Hough transform method. Finally, the straight line and point cloud data are superimposed and matched, the straight line features are extended to intersect and clipped, and the intersection points are generated, and the closed loop detection is performed based on the topological connection relationship of the intersection points.

[0034] The point cloud data collected by LiDAR usually has the characteristics of unstructured attributes, no connection between data, no semantic information, and high data point density. The present invention proposes an algorithm for extracting wall line features based on 2D point cloud data, which can calculate the orderly connected wall contour lines.

[0035] In order to solve the problems of low efficiency, low accuracy and frequent rework in traditional house measurement, the present invention proposes an intelligent house measurement technology using laser SLAM, which aims to automatically generate two-dimensional and three-dimensional drawings of house walls through laser radar scanning, thereby improving the efficiency and quality of house measurement.

[0036] The total time for measuring a room using the method of the present invention is 5 to 10 minutes. Compared with the manual surveying of the traditional room surveying method, the efficiency can be effectively improved;

[0037] It does not rely on experience and expertise. Users can just hold the laser radar and walk around the room, which effectively avoids omissions and rework caused by manual operation.

[0038] Applying LiDAR SLAM technology to house measurement is different from manual mapping of existing house measurement methods;

[0039] The present invention proposes an algorithm for extracting wall line features based on 2D point cloud data, and verifies the applicability of the point cloud processing and inspection method of the present invention in the field of room measurement. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] Figure 1 is a flow chart of an automatic room measurement method based on laser SLAM according to an embodiment of the present invention;

[0041] Figure 2 is a schematic diagram of initial point cloud data according to an embodiment of the present invention;

[0042] Figure 3is a schematic diagram of a rewritten straight line equation according to an embodiment of the present invention;

[0043] Figure 4 is a schematic diagram of a mapping of a Hough space according to an embodiment of the present invention;

[0044] Figure 5 It is a schematic diagram of a circle in a graphic space corresponding to a point in a Hough parameter space according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] like Figure 1 As shown, the present invention provides an automatic room measurement method based on laser SLAM, comprising:

[0047] Step 1: Point cloud data collection: Use handheld laser radar to collect point cloud data C = {p i}, the initial point cloud data is as follows Figure 2 shown.

[0048] Step 2: Point cloud segmentation: Segment the point cloud data C into point cloud sub-blocks, specifically including the following steps:

[0049] Step 2.1: Randomly select a current initial point p0 in the point cloud data C;

[0050] Step 2.2: Create a point cloud collection G i , and add the initial point p0 to G i ;

[0051] Step 2.3: Search the point cloud data C through KD-tree, and add the point set whose Euclidean distance to the initial point p0 is within the threshold ΔD area to the point set G i , mark the current initial point p0 as having completed the search, preferably, ΔD = 0.05*L, where L is the size of the point cloud bounding box;

[0052] Here, the Euclidean distance is the overall distance between two points (X, Y) in N-dimensional space. The calculation formula is as follows, which can be used as a measure of the similarity between two points. That is, the smaller the distance between two points, the greater their similarity.

[0053]

[0054] Where two points are represented by X=(X1, X2, ..., X N ), Y=(Y1,Y2,...,Y N ), X i , Y i(i=1,2,...,N) is the i-th coordinate of the point;

[0055] Clustering algorithms based on Euclidean distance believe that clusters are composed of objects that are close to each other, and usually aim to obtain compact and independent clusters.

[0056] Construct the corresponding KD-tree for the initial point cloud data. KD-tree is an index tree data structure that can be used for neighbor queries of large-scale N-dimensional data to speed up Euclidean clustering.

[0057] Set the distance threshold ΔΔD, randomly select an initial point p0 in the point cloud, and create a point cloud set G i ;

[0058] Step 2.4: If in the point set G i There are unfinished search points in the point set G. i Randomly select a point that has not been searched yet as the new current initial point p0 and go to step 2.3. Otherwise, set G i As a segmented point cloud sub-block;

[0059] Here, the KD-tree search is used to search for a point set Q = {P1, P2, ..., P n}, add it to G i Mark p0 has completed the search. i Repeat this process for the unfinished searched points in G until no new points are added to G and each point has been searched, and G is regarded as a segmented point cloud sub-block;

[0060] Step 2.5: If every point in the point cloud data C belongs to a point cloud sub-block, the point cloud segmentation is completed; otherwise, randomly select a new initial point p0 from the remaining points in the point cloud data C that do not belong to any point cloud sub-block, and go to step 2.2.

[0061] Here, a new initial point p0 is randomly selected from the remaining points, and step 2.2 is repeated until all points are segmented and all clustering targets are obtained.

[0062] Step 3: In each point cloud sub-block G i To extract a straight line or arc, the following steps are included:

[0063] Step 3.1: Establish the Hough parameter space in polar coordinates, divide the Hough space into interval blocks, and initialize the voting value H of interval block j j [r j ,θ j]=0, preferably, the interval block size is r=0.5*L, θ=1°, where r represents the polar diameter and θ represents the polar angle;

[0064] Step 3.2: Point P in the point cloud sub-block i (x i ,y i ) is transformed into a straight line r = x in Hough space i cosθ+y i sinθ, the voting value H of the interval block j that the straight line passes through j [r j ,θ j ]Increase by 1;

[0065] Step 3.3: Find the point P with the highest voting value in Hough space m (r m ,θ m ), the corresponding straight line is the detected straight line;

[0066] Here, after preliminary segmentation, each point cloud sub-block is obtained, and the Hough transform method is used in the point cloud sub-blocks to extract straight line and arc features.

[0067] The basic idea of ​​Hough transform is to map the graphic coordinate space to the Hough parameter space, and use the point-line duality of the two spaces to detect the geometric shapes in the graphic space by analyzing the information of the points in the Hough space.

[0068] In a rectangular coordinate system, the equation of a straight line can be expressed as y=kx+b, where k is the slope of the straight line, b is the intercept of the straight line on the Y-axis, and (x, y) is the point on the straight line.

[0069] The formula can be rewritten as b = -xk + y, where -x is regarded as the slope and y is regarded as the intercept, the formula can still represent a straight line. The space where the point (k, b) is located is the Hough parameter space. Figure 3 shown.

[0070] A point in the graph space corresponds to a line in the Hough space. Conversely, a point in the Hough space corresponds to a line in the graph space.

[0071] The above straight line equation is not convenient for handling the case of k = ∞, so it is changed to polar coordinate representation, ρ = xcosθ + ysinθ, where ρ is the vertical distance from the origin to the straight line, and θ is the angle between the vertical line and the horizontal coordinate. Similarly, polar coordinate representation also corresponds to Hough space, that is, any straight line in the graphic space can be mapped to a point (θ, ρ) in Hough space, such as Figure 4 shown.

[0072] Since the collinear points in the graphic space are mapped to different lines in the Hough space, the common intersection of these lines corresponds to the straight line in the graphic space. Usually, a voting mechanism is used to count the voting value of each point in the Hough space and detect the straight line by selecting the maximum value.

[0073] In the rectangular coordinate system, the equation of a circle can be expressed as (xa) 2 +(yb) 2 =r 2 , where (a, b) is the coordinate of the center of the circle and r is the radius of the circle. The circle in the graphics space corresponds to the point (a, b, r) in the Hough parameter space, and the point in the graphics space corresponds to the three-dimensional cone surface in the Hough parameter space, such as Figure 5 shown.

[0074] Points on the same circle in the graphics space are mapped to the Hough parameter space to form a set of conical surfaces. These conical surfaces intersect at one point (a0, b0, r0). This intersection point represents the circle in the graphics space.

[0075] Step 4: Inspection and correction: Based on the straight line or arc, obtain the valid intersection point; based on the valid intersection point, the final interconnected wall contour line, detect the closed loop in the final interconnected wall contour line, specifically including the following steps:

[0076] Step 4.1: For each point p in the point cloud data i , calculate point p i The distance to the nearest straight line or arc, if the distance is less than the threshold ΔD M , then the point p i is marked as an identified point; otherwise, it is marked as an unidentified point. M =0.001*L;

[0077] Here, the point cloud data is superimposed and matched with the line or arc features, and the distance from each point to the nearest feature is calculated. If the nearest distance is less than a given threshold, the point is marked as an identified point; otherwise, it is an unidentified point. Unidentified points may be noise points or some intersection connection features.

[0078] Step 4.2: Find the intersection point P between similar straight lines or arcs c , calculate the distance between the intersection point and the end point of the line or arc, if the distance is less than a given threshold ΔD M , then the intersection point P c Valid, recorded as a valid intersection; if the distance is greater than a given threshold ΔD M , and then analyze the intersection point P c The nearest distance d from the unidentified points to the line and arc is calculated for the surrounding unidentified points. min , if dmin ≤ΔD M , then the intersection point of the unrecognized point is determined to be valid and recorded as a valid intersection point.

[0079] Here, find the intersection of the adjacent straight lines and arcs, calculate the distance between the intersection and the end point of the straight line or arc, and if the distance is less than a given threshold ΔD M , the intersection is considered valid; if the distance is greater than a given threshold ΔD M , and then analyze the intersection point P c The unrecognized points around (the area with the intersection point as the center and the given threshold as the radius) are calculated to calculate the closest distance d from the unrecognized points to the straight line and the arc respectively. min , if d min ≤ΔD M , then the unrecognized point is determined to be a valid intersection point (falling on a straight line or arc), otherwise it is invalid.

[0080] The probability of statistically valid unidentified points p = N in / N, as the basis for determining the validity of the intersection (where N in is the number of valid unrecognized points, and N is the total number of points).

[0081] Step 4.3: For valid intersections, the straight lines or arcs corresponding to the valid intersections are respectively extended to the valid intersections, and the straight lines or arcs are cut according to the valid intersections to obtain the final interconnected wall contour lines.

[0082] Here, if the intersection point is valid, the straight line and arc are extended to the intersection point respectively, otherwise no processing is done. After obtaining the valid intersection point, the straight line and arc are clipped to obtain the final contour line.

[0083] Due to the disconnected nature of point clouds, the straight line and arc features extracted by the Hough transform method are often disconnected from each other. By analyzing the intersection of straight line and arc features and their geometric characteristics at the intersection, the straight line and arc can be extended or cut to form interconnected wall contours.

[0084] Step 4.4: Create an edge set O and randomly select an edge L from the final contour S Add to set O and use it as the initial edge;

[0085] Step 4.5: Calculate the other edges and The clockwise angle between adjacent sides, select the side with the largest angle L N , if L N is already in set O, then the set O forms a closed loop and the algorithm ends; otherwise, L N Add set O and repeat step 4.5.

[0086] Here, straight lines and arcs are connected at intersections. By analyzing this connectivity, closed loops in the graph can be detected. Specifically, starting from a straight line edge, use the "maximum left turn principle" at the intersection to find the next edge, and so on until a closed loop is formed.

[0087] The present invention is divided into three parts. First, the point cloud data collected by the laser radar is segmented by Euclidean distance clustering to form point cloud sub-blocks. Then, in the segmented point cloud sub-blocks, the straight line or arc features are extracted by the Hough transform method. Finally, the straight line and point cloud data are superimposed and matched, the straight line features are extended to intersect and clipped, and the intersection points are generated. The closed loop detection is performed based on the topological connection relationship of the intersection points.

[0088] The point cloud data collected by LiDAR usually has the characteristics of unstructured attributes, no connection between data, no semantic information, and high data point density. The present invention proposes an algorithm for extracting wall line features based on 2D point cloud data, which can calculate the orderly connected wall contour lines.

[0089] In order to solve the problems of low efficiency, low accuracy and frequent rework in traditional house measurement, the present invention proposes an intelligent house measurement technology using laser SLAM, which aims to automatically generate two-dimensional and three-dimensional drawings of house walls through laser radar scanning, thereby improving the efficiency and quality of house measurement.

[0090] The present invention proposes an automatic room measurement technology based on SLAM, which has the following advantages:

[0091] High efficiency: The total time for measuring a house using the method of the present invention is 5 to 10 minutes. Compared with the manual surveying of the traditional house surveying method, the efficiency can be effectively improved;

[0092] Practicality: It does not rely on experience and expertise. Users can just hold the laser radar and walk around the room, which effectively avoids omissions and rework caused by manual operation.

[0093] Novelty: The application of LiDAR SLAM technology to house measurement is different from the manual mapping of existing house surveying methods;

[0094] Creativity: The present invention proposes an algorithm for extracting wall line features based on 2D point cloud data, and verifies the applicability of the point cloud processing and inspection method of the present invention in the field of room measurement.

[0095] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.

[0096] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed in the present invention can be implemented by electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0097] Obviously, those skilled in the art can make various changes and modifications to the invention without departing from the spirit and scope of the invention. Thus, if these modifications and variations of the invention fall within the scope of the claims of the invention and their equivalents, the invention is also intended to include these modifications and variations.

Claims

1. An automatic room measurement method based on laser SLAM, characterized in that: include: Collect point cloud data of the room using handheld LiDAR ; Point cloud data The point cloud is divided into sub-blocks; In each point cloud sub-block Extract straight lines or arcs in ; Based on straight lines or arcs, obtain valid intersection points; Based on the valid intersection points, a final interconnected wall contour line is obtained, and a closed loop existing in the final interconnected wall contour line is detected, including: for the valid intersection points, the straight lines or arcs corresponding to the valid intersection points are respectively extended to the valid intersection points, and the straight lines or arcs are clipped according to the valid intersection points to obtain the final interconnected wall contour line; Detect closed loops in the final interconnected wall contours, including: Create an edge set O and randomly select an edge L from the final contour S Add to set O and use it as the initial edge; Calculate the other edges in the contour and The clockwise angle between adjacent sides, select the side with the largest angle ,if If it is already in set O, then the set O forms a closed loop and ends; otherwise, After adding set O, repeat this step; In each point cloud sub-block Line or arc extraction can be performed in: Step 3.1: Establish the Hough parameter space in polar coordinates, divide the Hough space into interval blocks, and initialize the voting value of interval block j ; Step 3.2: Sub-block the points in the point cloud Transformed into a straight line in Hough space , the voting value of the interval block j that the straight line passes through Increase by 1; Step 3.3: Find the point with the highest vote value in Hough space , and its corresponding straight line is the detected straight line; Based on a line or arc, get valid intersection points, including: For each point in the point cloud data , calculation point The distance to the nearest line or arc, if the distance is less than the threshold , then the point Mark as a recognized point; otherwise, mark as an unrecognized point; Find the intersection points between adjacent lines or arcs , calculate the distance between the intersection point and the end point of the line or arc, if the distance is less than a given threshold , then the intersection point is considered Valid, recorded as a valid intersection; if the distance is greater than a given threshold , and then analyze the intersection The nearest distances from the unidentified points to the lines and arcs are calculated for the unidentified points around them. ,like , then the intersection point of the unrecognized point is determined to be valid and recorded as a valid intersection point.

2. The automatic room measurement method based on laser SLAM as claimed in claim 1, characterized in that: Point cloud data The point cloud sub-blocks are divided into: Step 2.1: Randomly select a current initial point in the point cloud data C ; Step 2.2: Create a point cloud collection , and the initial point join in ; Step 2.3: Search the point cloud data C through KD-tree and compare it with the initial point The Euclidean distance is at the threshold The point set of the area range is added to the point set , the current initial point Mark the search as completed; Step 2.4: If the point is set If there are unfinished search points in the point set Randomly select a point that has not been searched yet as the new current starting point Then go to step 2.3, otherwise, As a segmented point cloud sub-block; Step 2.5: If every point in the point cloud data C belongs to a point cloud sub-block, the point cloud segmentation is completed; otherwise, a new initial point is randomly selected from the remaining points in the point cloud data C that do not belong to any point cloud sub-block. Then go to step 2.

2.

3. The automatic room measurement method based on laser SLAM as claimed in claim 2, characterized in that: , where L is the size of the point cloud bounding box.

4. The automatic room measurement method based on laser SLAM as claimed in claim 3, characterized in that: The interval block size is , , where r represents the polar diameter, Indicates the polar angle.

5. The automatic room measurement method based on laser SLAM as claimed in claim 3, characterized in that: 。

Citation Information

Patent Citations

  • Gas diffusion layer fiber measurement method based on image recognition

    CN113610790A

  • Three-dimensional reconstruction method and related device

    CN114219909A