A laser point cloud data wall line enhancement detection method, storage medium and device

By merging similar points, absorbing short segments with long segments, and merging multiple short segments, the problem of incomplete wall detection in existing technologies is solved, achieving fast and accurate wall line detection, which is suitable for indoor robot navigation.

CN116645387BActive Publication Date: 2025-10-31TONGJI UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202310539826.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-05-12
Publication Date
2025-10-31
Estimated Expiration
2043-05-12

AI Technical Summary

Technical Problem

Existing technologies for wall detection based on LiDAR point cloud data suffer from problems such as incomplete straight line extraction, large errors, numerous short line segments that are easily broken, leading to inaccurate wall models.

Method used

By extracting straight line segments from laser point cloud data, merging similar points, eliminating redundant short line segments, integrating line segments using a KD tree structure, retaining long line segments and merging multiple short line segments, a complete wall line detection method is formed.

Benefits of technology

It achieves rapid and accurate wall line detection, eliminates redundant short segments, ensures the integrity of wall line shape features, adapts to actual environments, and improves the real-time performance and accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116645387B_ABST
    Figure CN116645387B_ABST
Patent Text Reader

Abstract

This invention relates to a method, storage medium, and device for enhanced detection of wall lines using laser point cloud data. The method operates within a mobile robot and includes the following steps: S1, extracting straight line segments from the laser point cloud data; S2, merging adjacent points on each of the straight line segments to form multiple line segments, wherein the adjacent point is a point on the straight line segment and all points within a first range of that point; S3, determining whether a first line segment and a second line segment with the same direction exist simultaneously within a second range, and the length of the first line segment is greater than or equal to the length of the second line segment. If yes, the second line segment is deleted; otherwise, no operation is performed, and there is at least one second line segment; S4, merging straight line segments with a common endpoint to obtain a final set of straight line segments, and performing wall line detection based on the final set of straight line segments. Compared with existing technologies, this invention has advantages such as fast calculation speed, good real-time performance, and accurate judgment.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of building wall line extraction technology, and in particular to a laser point cloud data wall line enhancement detection method, storage medium and equipment. Background Technology

[0002] Walls are a special type of obstacle, characterized by their perpendicularity to the ground. They are also a crucial basic environmental element for indoor navigation. Accurately and quickly constructing wall models on a local map is extremely helpful for robot navigation indoors. Currently, commonly used wall reconstruction algorithms based on LiDAR point cloud data can be broadly divided into two categories: line extraction methods and point cloud peak value methods.

[0003] For example, patent application CN115508804A discloses a wall detection method. Initially, the specific position of the wall line relative to the robot is known. During the robot's movement, the wall line position is iteratively calculated. If a previously stored wall line does not exist, the current frame's point cloud data is acquired, and a line is fitted to the current frame's point cloud data to obtain the first straight line. This patent uses a line extraction method for wall detection. The binarized two-dimensional image formed by projecting the point cloud data from the robot's LiDAR onto a two-dimensional plane on the ground can be used to detect wall lines. However, after extracting the lines from the image, many short line segments appear. Furthermore, due to the positional error of the point cloud, when there are obstacles of a certain thickness in the binarized image, the final line detection result will extract lines from both the front and back faces of the obstacle. Additionally, because the point cloud filtering process only considers points inside the wall, other points (including points at the wall edges) are filtered out. In reality, continuous walls may appear broken in the detection results, thus failing to form a continuous wall. Summary of the Invention

[0004] The purpose of this invention is to overcome the shortcomings of the prior art by providing a laser point cloud data wall line enhancement detection method, storage medium, and device that has fast calculation speed, good real-time performance, and accurate judgment.

[0005] The objective of this invention can be achieved through the following technical solutions:

[0006] A laser point cloud data wall line enhancement detection method, which operates in a mobile robot, includes the following steps:

[0007] S1. Extract straight line segments from laser point cloud data;

[0008] S2. Merge the near points on each of the line segments to form multiple line segments, wherein the near point is a certain point on the line segment and all points within a first range of that certain point;

[0009] S3. Determine whether there are two line segments with the same direction within the second range, and whether the length of the first line segment is greater than or equal to the length of the second line segment. If yes, delete the second line segment; otherwise, do nothing. There must be at least one second line segment.

[0010] S4. Merge line segments with common endpoints to obtain the final set of line segments, and implement wall line detection based on the final set of line segments.

[0011] Further, in step S1, the extraction of the straight line segment specifically includes:

[0012] The laser point cloud data is projected onto a two-dimensional plane on the ground to form a binary two-dimensional image;

[0013] Extract line segments from the two-dimensional image.

[0014] Furthermore, in step S2, a recursive method is used to merge the similar points.

[0015] Furthermore, the specific steps of the recursive method include:

[0016] S21. Starting from one endpoint of a straight line segment, construct a KD tree with that endpoint as the root node;

[0017] S22. Search for the nearest points of the current root node, generate new coordinates of the root node based on all the nearest points, and take the other endpoints of all the nearest points that are on the same straight line segment and do not exist in the KD tree as leaf nodes.

[0018] S23. Traverse all leaf nodes, using a leaf node as the root node and repeat step S22 until no new leaf node can be found. Construct a complete KD tree, extract each edge of the complete KD tree to form a new set of line segments, discard the complete KD tree, and delete the searched line endpoints.

[0019] S24. Based on the current set of line segments, repeat steps S21-S23 until all endpoints are deleted, resulting in multiple merged line segments.

[0020] Further, in step S22, the mean of the coordinates of all similar points is calculated as the new coordinates of the root node.

[0021] Furthermore, the first range is the range of a circle with a certain point as its center and a radius r.

[0022] Furthermore, the second range is a rectangular range with the two endpoints of the first line segment as its diagonals.

[0023] Furthermore, in step S4, merging line segments with common endpoints specifically involves:

[0024] Find the line segments with a common endpoint, and determine whether the slope difference between two adjacent line segments is less than a set value. If so, select the other two endpoints besides the common endpoint as new endpoints to form a new line segment and merge them. If not, do not merge.

[0025] The present invention also provides a computer-readable storage medium including one or more programs executable by one or more processors of an electronic device, the one or more programs including instructions for performing the laser point cloud data wall line enhancement detection method as described above.

[0026] The present invention also provides an electronic device including one or more processors, a memory, and one or more programs stored in the memory, said one or more programs including instructions for performing the laser point cloud data wall line enhancement detection method as described above.

[0027] Compared with the prior art, the present invention has the following beneficial effects:

[0028] (1) Considering the physical limitations in actual application scenarios, the present invention can integrate and connect the extracted straight lines by concentrating the straight line segments, thereby eliminating too many short line segments.

[0029] (2) The present invention eliminates redundant straight lines in the extracted and detected straight line segments and connects the straight line segments to close the wall line, which can extract the wall line more completely and accurately, retain the shape characteristics of the wall line, and better match the actual environment.

[0030] (3) The present invention can solve the problem of wall environment detection of mobile robots based on lidar point cloud data in indoor environment and obtain calculation results that meet engineering requirements. Attached Figure Description

[0031] Figure 1 This is a schematic diagram of the process of the present invention;

[0032] Figure 2 This is a flowchart of the method for merging similar points in this embodiment;

[0033] Figure 3 This is a schematic diagram of the process of long line segments absorbing short line segments in this embodiment;

[0034] Figure 4 This is a schematic diagram illustrating the process of merging multiple short line segments into a long line segment in this embodiment;

[0035] Figure 5The following are example diagrams illustrating the algorithm's effect in this embodiment: (a) is the result of extracting the set of lines from the input two-dimensional image; (b) is the result after merging similar points; (c) is the result after absorbing short line segments with long line segments; and (d) is the final result after merging multiple short line segments into long line segments. Detailed Implementation

[0036] The present invention will now be described in detail with reference to the accompanying drawings and specific embodiments. These embodiments are based on the technical solution of the present invention and provide detailed implementation methods and specific operating procedures. However, the scope of protection of the present invention is not limited to the following embodiments.

[0037] This embodiment provides a laser point cloud data wall line enhancement detection method. This method operates within a mobile robot and processes the wall lines detected in the binary two-dimensional image formed by projecting the laser radar point cloud data onto a two-dimensional plane on the ground. The extracted line segments are integrated and connected to eliminate excessive redundant short line segments. For example... Figure 1 As shown, the method includes the following steps:

[0038] S1. Extract straight line segments from laser point cloud data;

[0039] S2. Merge the near points on each of the line segments to form multiple line segments, wherein the near point is a certain point on the line segment and all points within a first range of that certain point;

[0040] S3. Determine whether there are two line segments with the same direction within the second range, and whether the length of the first line segment is greater than or equal to the length of the second line segment. If yes, delete the second line segment; otherwise, do nothing. There must be at least one second line segment.

[0041] S4. Merge line segments with common endpoints to obtain the final set of line segments, and implement wall line detection based on the final set of line segments.

[0042] In the above steps, extracting line segments specifically involves: projecting the laser point cloud data onto a two-dimensional plane on the ground to form a binary two-dimensional image, and then extracting line segments from the two-dimensional image. The extracted set of line segments can be stored using line segment storage variables Lines={[x1,y1,x2,y2],…} and point storage variables Points={[xi,yi]…}.

[0043] Based on the above steps, the core of this method includes the following three parts: merging similar points, long segments absorbing short segments, and merging multiple short segments into long segments.

[0044] (1) Merge similar points

[0045] The idea behind merging similar points is to treat all points within a first range of a point on a line segment as similar points and merge them into a new point. In this embodiment, the first range is the range of a circle with a certain point as the center and a radius r.

[0046] This embodiment uses a recursive method to merge the similar points and stores the found points in a tree structure to construct a KD-Tree (K-Dimensional Tree). The processing phase starts from the starting point of a straight line segment, making that point the root node of the tree. The KD-Tree searches all points within its radius, calculating the average of all points as the new coordinates of the root node. The other endpoints of the lines containing all the searched points are designated as leaf nodes of the root node. One leaf node is selected as the root node, and the above process is repeated. If a point at the other end of the line is already in the tree structure, that node is not designated as a leaf node. This process continues until no new leaf node is found. Each edge of the constructed tree is a line segment. After obtaining the line segments, the constructed tree is discarded, and the used line endpoints are deleted. The above process is repeated until all points are deleted, finally yielding the merged line segments.

[0047] like Figure 2 As shown, the specific steps for merging similar points include:

[0048] S201. Based on the line segments in step S1, establish a line segment array Lines = {[x1,y1,x2,y2],...} and an array of line endpoints Points = {[xi,yi],...}, and construct a filtered line segment array LineFilter;

[0049] S202. Determine if the array Lines is empty. If it is, end the process; otherwise, proceed to step S203.

[0050] S203. Construct a KD-tree (KDTree) based on the array Points, and create an empty tree (LineTree).

[0051] S204. Select one of the Points as the root node p0 of the LineTree;

[0052] S205. Use KDTree to search for all points Points_Near within the radius r of point p0, and use Lines to obtain the other endpoint Points_Aside of the line segment where all points in Points_Near are located.

[0053] S206. Calculate the mean of the coordinates of all points in Points_Near and use it as the new coordinates of p0. Use all points in Lines_ASide that are not in LineTree as leaf nodes of p0.

[0054] S207. Select the leaf node in LineTree that has not been searched as the new p0;

[0055] S208. Determine whether all leaf nodes of the LineTree have been searched. If yes, proceed to step S209; otherwise, return to S204.

[0056] S209. Delete the line segments and endpoints used in the above steps from the Lines and Points arrays;

[0057] S209. Each edge in the LineTree is a new line segment, stored in the LineFilter array, and return to step S202.

[0058] (2) Long segments absorb short segments

[0059] Determine whether a first line segment (long line segment) and a second line segment (short line segment) with the same direction exist simultaneously within the second range. If so, the long line segment absorbs the short line segment; in this embodiment, specifically, the long line segment is retained and the short line segment is deleted. If not, no absorption occurs. The second range is a rectangle with the two endpoints of the first line segment as its diagonals.

[0060] In the process of long line segments absorbing short line segments, short line segments that are close to the long line segment and in the same direction are removed. The principle is as follows: Figure 3 As shown. Figure 3 The image contains both long and short line segments. If the endpoint coordinates (x3, y3, x4, y4) of a short line segment are all within the dashed box bounded by the endpoint coordinates (x1, y1, x2, y2) of a long line segment, then the short line segment is considered part of the long line segment. In this case, the short line segment can be deleted while retaining the long line segment. Since there are relatively few long line segments in the set of lines extracted from the input 2D image, and most of the long line segments are walls parallel to the coordinate axes, while the inclined line segments are relatively short, the range of the dashed box in the image will not be very large, which can avoid the incorrect merging of short line segments in some key areas.

[0061] (3) Merging multiple short segments into a longer segment

[0062] In this embodiment, multiple short line segments with common endpoints that meet certain requirements are merged. Specifically, the line segments with common endpoints are obtained, and it is determined whether the slope difference between two adjacent line segments is less than a set value. If so, the other two endpoints besides the common endpoint are selected as new endpoints to form a new line segment, thus merging them. If not, they are not merged.

[0063] The principle is as follows Figure 4As shown, first enumerate the line segments with a common endpoint, then determine the slope of two adjacent line segments. If the slopes are similar, select the two endpoints of the line segments other than the common endpoint as the new line segment. The short line segments (x1,y1,x2,y2) and (x2,y2,x3,y3) are eventually merged into a new long line segment (x1,y1,x3,y3).

[0064] An example of the effect in this embodiment is as follows: Figure 5 The diagram illustrates the phased effects of each step: the set of lines extracted from the input 2D image, the effect after merging near-points, the effect after long-segment absorption of short-segment processing, and the final effect after merging multiple short-segment segments into long-segment processing. It can be seen that after processing in this embodiment, the number of line segments is reduced. The original number of extracted line segments was 17. After merging near-points, absorbing short-segment segments with long segments, and merging multiple short-segment segments, the final number of line segments decreases to 10, a reduction of 41.2% compared to the original number, while the original wall line positions remain essentially unchanged.

[0065] If the above methods are implemented as software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this invention, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.

[0066] In other embodiments, an electronic device is also provided, including one or more processors, a memory, and one or more programs stored in the memory, the one or more programs including instructions for performing the laser point cloud data wall line enhancement detection method as described above.

[0067] The preferred embodiments of the present invention have been described in detail above. It should be understood that those skilled in the art can make numerous modifications and variations based on the concept of the present invention without creative effort. Therefore, all technical solutions that can be obtained by those skilled in the art based on the concept of the present invention through logical analysis, reasoning, or limited experimentation on the basis of existing technology should be within the scope of protection defined by the claims.

Claims

1. A laser point cloud data wall line enhancement detection method, characterized in that, This method operates in a mobile robot and includes the following steps: S1. Extract straight line segments from laser point cloud data; S2. Merge the near points on each of the line segments to form multiple line segments, wherein the near point is a certain point on the line segment and all points within a first range of that certain point; S3. Determine whether there are two line segments with the same direction within the second range, and whether the length of the first line segment is greater than or equal to the length of the second line segment. If yes, delete the second line segment; otherwise, do nothing. There must be at least one second line segment. S4. Merge line segments with common endpoints to obtain the final set of line segments, and implement wall line detection based on the final set of line segments; In step S2, a recursive method is used to merge the similar points; The specific steps of the recursive method include: S21. Starting from one endpoint of a straight line segment, construct a KD tree with that endpoint as the root node; S22. Search for the nearest points of the current root node, generate new coordinates of the root node based on all the nearest points, and take the other endpoints of all the nearest points that are on the same straight line segment and do not exist in the KD tree as leaf nodes. S23. Traverse all leaf nodes, using a leaf node as the root node and repeat step S22 until no new leaf node can be found. Construct a complete KD tree, extract each edge of the complete KD tree to form a new set of line segments, discard the complete KD tree, and delete the searched line endpoints. S24. Based on the current set of line segments, repeat steps S21-S23 until all endpoints are deleted, resulting in multiple merged line segments. The second range is the range of a rectangle with the two endpoints of the first line segment as its diagonals; In step S4, merging line segments with common endpoints specifically involves: Find the line segments with a common endpoint, and determine whether the slope difference between two adjacent line segments is less than a set value. If so, select the other two endpoints besides the common endpoint as new endpoints to form a new line segment and merge them. If not, do not merge.

2. The laser point cloud data wall line enhancement detection method according to claim 1, characterized in that, In step S1, the extraction of the straight line segment specifically includes: The laser point cloud data is projected onto a two-dimensional plane on the ground to form a binary two-dimensional image; Extract line segments from the two-dimensional image.

3. The laser point cloud data wall line enhancement detection method according to claim 1, characterized in that, In step S22, the mean of the coordinates of all similar points is calculated as the new coordinates of the root node.

4. The laser point cloud data wall line enhancement detection method according to claim 1, characterized in that, The first range is a circle with a certain point as its center and a radius of... The range of the circle formed.

5. A computer-readable storage medium, characterized in that, It includes one or more programs that are executed by one or more processors of an electronic device, the one or more programs including instructions for performing the laser point cloud data wall line enhancement detection method as described in any one of claims 1-4.

6. An electronic device, characterized in that, It includes one or more processors, a memory, and one or more programs stored in the memory, said one or more programs including instructions for performing the laser point cloud data wall line enhancement detection method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Wall surface detection method, robot and storage medium

    CN115508804A

  • Point cloud data based single tree three-dimensional modeling and morphological parameter extracting method

    CN103942838A

  • Method and system for supporting large-scale time series data interaction based on line segment KD tree

    CN113535712A