Method and device for identifying long corridor scene, medium and program product

By counting the normal angle and maximum angle difference between point cloud data and the matching points of long corridor scene map, the problem of low recognition efficiency in the existing technology is solved, the recognition accuracy of long corridor scenes is improved, and the accuracy of robot positioning is ensured.

CN119107621APending Publication Date: 2024-12-10ZHEJIANG ZHIDING ROBOT CO LTD
View PDF 0 Cites 2 Cited by

Patent Information

Application Number
CN202411197521.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-28
Publication Date
2024-12-10

AI Technical Summary

Technical Problem

The prior art has low recognition efficiency when identifying long corridor scenes, resulting in robot positioning errors, mainly due to misidentification by only judging whether the constraint direction of the point cloud is single.

Method used

By obtaining point cloud data and matching points on the map corresponding to long corridor scenes, determine the normal angle of the matching point and count the number of matching points that fall into the preset angle range, calculate the maximum angle difference between each preset angle range. If the maximum angle difference is greater than the threshold, it is determined that the current scene is not a long corridor scene.

Benefits of technology

It improves the recognition accuracy of long corridor scenes, reduces the situation of misidentification, and thus improves the accuracy of robot positioning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119107621A_ABST
    Figure CN119107621A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for identifying a long corridor scene, a medium and a program product, and relates to the technical field of laser mapping. According to the embodiment of the invention, an initial angle range in which the number of matching points in a preset angle range is greater than a first number threshold value is determined; determining each other angle range meeting a preset number of matching points in the preset angle range, and respectively determining the maximum angle difference between each other angle range and the initial angle range; when the maximum angle difference is larger than the first angle threshold value, the situation that the long corridor scene is mistakenly recognized only by determining whether the constraint direction is single or not in the related technology can be recognized, and therefore the recognition accuracy of long corridor scene recognition is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of laser mapping technology, and in particular to a method, device, medium and program product for identifying a long corridor scene. Background Art

[0002] During the robot positioning process, the current position can be obtained by matching the point cloud information obtained by the robot scanning with the known map information (black border of the grid map). Figure 1 In the scene shown, when the robot moves to position A or B in the long corridor, due to the single structure of the long corridor, the robot cannot distinguish different positions, which will make the current posture matched by the robot at position A or B incorrect, which will lead to robot positioning error. Therefore, the long corridor scene needs to be detected.

[0003] At present, when determining whether a scene is a long corridor, the relevant technology mainly determines whether the constraint direction of the point cloud is single to identify whether the current scene is a long corridor scene; if so, it is treated as a long corridor, resulting in low recognition accuracy. Summary of the invention

[0004] In view of this, the embodiments of the present application are dedicated to providing a method, device, medium and program product for identifying a long corridor scene, so as to solve the problem of low recognition efficiency when identifying a long corridor scene in the related art.

[0005] In a first aspect, an embodiment of the present application provides a method for identifying a long corridor scene, the method comprising: obtaining matching points between point cloud data obtained by scanning the current scene and each point on a map corresponding to the long corridor scene; determining the normal angle of each matching point and counting the number of matching points falling into each preset angle range; starting from a starting angle range, determining each other angle range in the preset angle range that meets a preset matching point quantity threshold, and respectively determining the maximum angle difference between each other angle range and the starting angle range; if the maximum angle difference is greater than a first angle threshold, determining that the current scene is not a long corridor scene.

[0006] In the second aspect, an embodiment of the present application provides a device for identifying a long corridor scene, the device comprising: a matching point acquisition module, used to obtain matching points between point cloud data obtained by scanning the current scene and each point on a map corresponding to the long corridor scene; a quantity determination module, used to determine the normal angle of each matching point and count the number of matching points falling into each preset angle range; a range determination module, used to determine a starting angle range in which the number of matching points in the preset angle range is greater than a first quantity threshold; an angle difference determination module, used to determine, starting from the starting angle range, each other angle range in the preset angle range that meets a preset matching point quantity threshold, and respectively determine the maximum angle difference between each other angle range and the starting angle range; a scene recognition module, used to determine that the current scene is not a long corridor scene if the maximum angle difference is greater than the first angle threshold.

[0007] In a third aspect, an embodiment of the present application provides a computing device, comprising: a processor and a memory for storing processor executable instructions; the processor is used to execute the method for identifying a long corridor scene described in the first aspect above.

[0008] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program, and the computer program is used to execute the method for identifying a long corridor scene described in the first aspect above.

[0009] In a fifth aspect, an embodiment of the present application provides a program product, including computer program instructions, which, when executed by a processor, enable the processor to implement the method for identifying a long corridor scene described in the first aspect.

[0010] In this embodiment, first, the matching points of the point cloud data obtained by scanning the current scene and the points on the map corresponding to the long corridor scene are obtained; then, the normal angle of each matching point is determined and the number of matching points falling into each preset angle range is counted; then, the starting angle range in which the number of matching points in the preset angle range is greater than the first number threshold is determined; starting from the starting angle range, each other angle range in the preset angle range that meets the preset matching point number threshold is determined, and the maximum angle difference between each other angle range and the starting angle range is determined respectively; if the maximum angle difference is greater than the first angle threshold, it is determined that the current scene is not a long corridor scene; in this embodiment, the starting angle range in which the number of matching points in the preset angle range is greater than the first number threshold is first determined, and starting from the starting angle range, each other angle range in the preset angle range that meets the preset matching point number is determined, and the maximum angle difference between each other angle range and the starting angle range is determined respectively; when the maximum angle difference is greater than the first angle threshold, the situation in which the long corridor scene is misidentified by only determining whether the constraint direction is single in the related art can be identified, thereby improving the recognition accuracy of the long corridor scene recognition. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] Figure 1 It is a schematic diagram of robot positioning in the related art;

[0012] Figure 2 It is a schematic diagram of the architecture of an application scenario of the method for identifying a long corridor scene provided in an embodiment of the present application;

[0013] Figure 3 is a flow chart of a method for identifying a long corridor scene provided by an embodiment of the present application;

[0014] Figure 4 It is a schematic diagram of several current scenarios;

[0015] Figure 5 is a flow chart of a method for determining matching points provided in an embodiment of the present application;

[0016] Figure 6 is a flow chart of a clustering method provided in an embodiment of the present application;

[0017] Figure 7 is a schematic diagram of a single-line laser;

[0018] Figure 8 is a schematic diagram of the structure of a device for identifying a long corridor scene provided in an embodiment of the present application;

[0019] Fig. 9 It is a schematic diagram of the structure of the computing device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0020] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0021] For ease of understanding, this article first introduces the application scenarios to which the method for identifying long corridor scenes provided by this application is applicable. Figure 2 , the computing device 210 is electrically connected to the sensor group 230. The data storage system 220 can store the data that the computing device 210 needs to process. The data storage system 220 can be integrated on the computing device 210, or placed on the cloud or other network servers. After the sensor group 230 collects a single frame of point cloud, it transmits the collected single frame of point cloud to the computing device 210, and the computing device 210 performs the following operations:

[0022] (1) Obtain matching points between the point cloud data obtained by scanning the current scene and the points on the corresponding map of the long corridor scene;

[0023] (2) determining the normal angle of each matching point and counting the number of matching points that fall within each preset angle range;

[0024] (3) determining a starting angle range in which the number of matching points in the preset angle range is greater than a first number threshold;

[0025] (4) starting from the starting angle range, determining each other angle range in the preset angle range that meets the preset matching point quantity threshold, and respectively determining the maximum angle difference between each other angle range and the starting angle range;

[0026] (5) If the maximum angle difference is greater than the first angle threshold, it is determined that the current scene is not a long corridor scene.

[0027] The computing device 210 may be, but is not limited to, various personal computers, laptop computers, smart phones, tablet computers, and portable wearable devices. In the embodiment of the present application, it may be a computing unit in a robot.

[0028] like Figure 3 As shown, the embodiment of the present application provides a method for identifying a long corridor scene, and the solution is applied to Figure 2 The computing device in the example is used to illustrate, including the following steps:

[0029] Step S301, obtaining matching points between the point cloud data obtained by scanning the current scene and the points on the map corresponding to the long corridor scene.

[0030] In a long corridor scene, there are usually two walls, and the two boundary lines between the two walls and the ground are parallel to each other. In the process of identifying the long corridor scene, whether the current scene where the robot is located is a long corridor scene is mainly determined by identifying whether the point cloud data belongs to the points on the two boundary lines.

[0031] In one example, in Figure 4 The current scenes include (1) to (5). Among them, scenes (1) and (2) are scenes in which the relevant technology can correctly identify the long corridor; scenes (3), (4) and (5) are only constrained in a single direction in the relevant technology, which misidentifies the current scene where the robot is located as a long corridor scene, resulting in low recognition accuracy.

[0032] In this embodiment, sensors (e.g., Figure 2The sensor group 230 shown in the figure is used to scan the environment of the current scene when the robot moves in the current scene. When the light emitted by the sensor encounters an obstacle (i.e., two walls) in the current scene, it will return to obtain point cloud data including the current scene; then, edge detection is performed on the point cloud data of the current scene to obtain point cloud data corresponding to two boundary lines. The sensor may include various laser radars, etc.

[0033] In one example, the point on the map that is closest to the long corridor scene may be found from the point cloud data as a matching point.

[0034] For example, a KD tree may be constructed in advance using the points on the map corresponding to the long corridor; then, a search may be performed in the KD tree to determine whether there is a point that is closest to the point in the point cloud data; if so, the point in the point cloud data is used as a matching point.

[0035] Here, the nearest point may be a point with a distance of 0; or, a point that satisfies a certain distance threshold, which is set with reference to the error existing in the laser radar when scanning to obtain point cloud data and / or the recognition accuracy of identifying long corridor scenes.

[0036] In practice, it is very likely that no point with a distance of 0 (ie, an overlapping point) from the point cloud data can be found in the map. In this case, adjacent points are generally used as matching points.

[0037] Step S302, determining the normal angle of each matching point and counting the number of matching points falling within each preset angle range.

[0038] In this embodiment, the normal angle of each matching point can be determined based on the normal angle corresponding to the slope of each matching point; wherein the slope of each matching point can be determined by the coordinates of the two matching points before and after the matching point. The normal angle in point cloud processing usually refers to the angle between the normal at the matching point and a reference direction (such as the direction of the global coordinate system).

[0039] It should be noted that the method of determining the slope based only on the coordinates of the two preceding and following matching points is to reduce the amount of calculation and improve processing efficiency, and this is not the only method. For example, the slope of each matching point can also be determined by the slopes of the two adjacent preceding and following matching points.

[0040] Correspondingly, counting the number of matching points falling into each preset angle range includes: mapping the normal angle of each matching point to each preset angle range, and respectively counting the number of normal angles falling into each preset angle range, and then determining the number of matching points in each preset angle range according to the number of normal angles in each preset angle range. Wherein, each preset angle range may correspond to each angle range in a plurality of angle ranges; for example, [89°, -89°] is divided into 18 angle ranges, and the 18 angle ranges correspond to each preset angle range.

[0041] Step S303: determine a starting angle range corresponding to an angle range in which the number of matching points in a preset angle range is greater than a first number threshold.

[0042] In this embodiment, an angle range in which the number of matching points is greater than a first number threshold is determined from each preset angle range, and the angle range is used as the starting angle range. The starting angle range can be used as the position for starting to determine the angle difference; that is, the angle difference between each other angle range (that is, starting from the starting angle range, each other angle range in which the number of matching points meets the preset matching point number threshold is determined from each preset angle range) and the starting angle range is determined in sequence. The preset matching point number threshold can be used to filter out angle ranges with a small number of matching points, so as to reduce the amount of processing for subsequently determining the maximum angle difference, thereby improving processing efficiency.

[0043] In one example, a preset matching point number threshold can be used to filter out matching points that have little impact on long corridor recognition (e.g., Figure 4 The matching points corresponding to the isolated noise in the middle scene (3) are selected to reduce the processing amount. The preset matching point number threshold can be set according to the recognition accuracy of the long corridor scene or prior knowledge.

[0044] In this embodiment, by setting a preset number of matching points to screen out angle ranges with a small number of matching points, on the one hand, interference with long corridor scene recognition can be reduced; on the other hand, the amount of operation can be reduced and processing efficiency can be improved.

[0045] Step S304, starting from the starting angle range, determining each other angle range in the preset angle range that meets the preset matching point quantity threshold, and respectively determining the maximum angle difference between each other angle range and the starting angle range.

[0046] In this embodiment, the angle differences between each other angle range and the starting angle range are determined in sequence, and the maximum angle difference among the angle differences is determined.

[0047] Here, each preset angle range is a different angle range; for example, each preset angle range may be in the order of increasing angle range, for example, [-89°, -79°], ..., [79°, 89°]. Each preset angle range may also be in the order of decreasing angle range, which will not be described in detail here.

[0048] In one example, when counting the number of matching points in each preset angle range through an array, the array is traversed starting from the starting angle range as the starting index, and the angle differences between each other angle range and the starting angle range are determined in turn, and the maximum angle difference among these angle differences is determined.

[0049] In one example, the maximum angle difference max_diff is determined based on the following formula:

[0050] diff1=|angle1-angle2|

[0051] diff2=|angle1-180°-angle2|

[0052] diff3=|angle2-180°-angle1|

[0053] diff4=min(min(diff1,diff2),diff3)

[0054] if (diff4 is greater than the first angle threshold), max_diff = diff4.

[0055] Among them, angle1 is the starting angle range, angle2 is each other angle range, and diff1, diff2, diff3 and diff4 are angle differences respectively.

[0056] Step S305: If the maximum angle difference is greater than the first angle threshold, it is determined that the current scene is not a long corridor scene.

[0057] In this embodiment, when it is determined that the maximum angle difference determined in step S304 exceeds the first angle threshold, it can be determined that the current scene is not a long corridor scene.

[0058] In one example, in Figure 4 In the scenario (4), there is a raised structure in the current scene where the robot is located. At this time, the maximum angle difference determined in step S304 will exceed the first angle threshold, and the raised structure can be Figure 4 The scene (4) is identified as a non-long corridor scene, which can solve the problem of Figure 4 The problem of scene (4) being misidentified as a long corridor scene.

[0059] exist Figure 4In the scene (5), there are other walls (for example, walls perpendicular to the two walls in the long corridor scene). In this case, the maximum angle difference determined in step S304 will also exceed the first angle threshold. Figure 4 The scene (5) is identified as a non-long corridor scene, which can solve the problem of Figure 4 The problem of scene (5) being misidentified as a long corridor scene.

[0060] In one example, the first angle threshold may be 18 degrees. The first angle threshold may be set according to the recognition accuracy of the long corridor scene or prior knowledge.

[0061] The method for identifying a long corridor scene provided in an embodiment of the present application first determines a starting angle range in which the number of matching points in a preset angle range is greater than a first number threshold, and starting from the starting angle range, determines each other angle range in the preset angle range that satisfies the preset number of matching points, and respectively determines the maximum angle difference between each other angle range and the starting angle range; when the maximum angle difference is greater than the first angle threshold, the situation in the related art where the long corridor scene is misidentified by only determining whether the constraint direction is single can be identified, thereby improving the recognition accuracy of the long corridor scene recognition.

[0062] In an embodiment of the present application, the method for identifying a long corridor scene provided by the embodiment of the present application, determining the normal angle of each matching point (see the number of matching points falling within each preset angle range in step S302 for details), may include the following steps:

[0063] An array including N elements is created, where the index of each element in the array corresponds to each preset angle range, and the value of each element corresponds to the number of matching points falling within the corresponding angle range.

[0064] In one example, [89°, -89°] is first divided into 18 angle ranges, and the 18 angle ranges correspond to the preset angle ranges respectively; then, the 18 angle ranges are respectively mapped to the index of the array, and the number of matching points in each preset corner point range is recorded by taking the element value in the array. Where N is the number greater than or equal to the preset corner point range, which is usually a positive integer greater than 1.

[0065] In one example, when determining a starting angle range in which the number of matching points in a preset angle range is greater than a first quantity threshold, the index corresponding to the starting angle range is used as the starting index of the array; wherein the starting index may be the starting traversal position when traversing the array.

[0066] Corresponding to this example, starting from the starting angle range, each other angle range in the preset angle range that meets the preset matching point quantity threshold is determined, and the maximum angle difference between each other angle range and the starting angle range is determined respectively, including: taking the starting angle range as the starting index of the array, and traversing the array from the starting index to determine each other index in the traversed elements that meets the preset matching point quantity threshold, and determining the maximum angle difference between each other index and the starting index respectively.

[0067] Here, counting the number of matching points falling within each preset angle range may include: counting the number of matching points falling within each preset angle range by taking values ​​of elements of an array.

[0068] In this embodiment, each preset angle range is mapped to the index of the array, and the value of the corresponding element is increased. The value of the element can be used to represent the number of matching points, and then the number of matching points falling into each preset angle range can be counted.

[0069] In an embodiment of the present application, before counting the number of matching points falling within each preset angle range, the method further includes:

[0070] Determine the normal angle for each point on the map;

[0071] For each matching point, determining a first angle difference between a normal angle of the matching point and a normal angle of a point on the corresponding map;

[0072] Delete the matching points whose first angle difference is greater than the preset angle threshold.

[0073] The points on the map refer to points in the grid map that are occupied. An occupied point in the grid map usually indicates that there is an obstacle or an impassable area at the point.

[0074] Here, the preset angle threshold can be used to screen the field points (also matching points) of the same type as each matching point. The preset angle threshold can be determined according to the accuracy of identifying the long corridor scene or set according to prior knowledge, for example, set to 30 degrees. Among them, the method of determining the normal angle of each point on the map is the same as the direction of determining the normal angle of each matching point. Just replace each matching point with each point, and no further details will be given here.

[0075] It should be noted that the steps of determining the normal angle of each point on the map and the steps of determining the normal angle of each matching point can be executed simultaneously; or the steps of determining the normal angle of each point on the map can be executed first; or the steps of determining the normal angle of each matching point can be executed first.

[0076] In this implementation, the first angle difference (i.e., the included angle) between the normal angle of each matching point and the normal angle of the corresponding point on the map can be used to screen out matching points that do not meet the preset angle threshold, thereby eliminating the interference of matching points that do not meet the preset angle threshold on the recognition of the long corridor scene.

[0077] Figure 5 Shown is a flow chart of a method for determining matching points provided in one embodiment of the present application.

[0078] like Figure 5 As shown, the method flow for determining each matching point provided in the embodiment of the present application (see determining the normal angle of each matching point in step S302 for details) may include the following steps:

[0079] Step S501: clustering the point cloud data to obtain at least two clusters.

[0080] In this embodiment, according to the type of point cloud data in the long corridor scene, for example, the long corridor scene mainly involves two walls, and two boundary lines between the two walls and the ground are parallel to each other.

[0081] In one example, each boundary line may correspond to a cluster.

[0082] When the number of clusters obtained by clustering exceeds 2, it can be determined that the current scene includes more than two clusters corresponding to the boundary lines. At this time, the current scene cannot be directly identified as a long corridor scene.

[0083] Step S502: Screen at least two clusters based on a preset clustering threshold to obtain a target cluster.

[0084] In this embodiment, after at least two clusters are obtained through clustering in step S501, the at least two clusters may be screened using a preset clustering threshold to obtain a target cluster.

[0085] In an example, the target clusters may correspond to clusters of two boundary lines respectively.

[0086] Here, at least two clusters are screened by using a preset clustering threshold to obtain target clusters corresponding to the two boundary lines respectively.

[0087] In practical applications, isolated noise points can be eliminated by presetting the clustering threshold (corresponding to Figure 4 The impact of the scene (3) in the long corridor scene recognition. Generally, the preset clustering threshold can be set according to the number of points corresponding to the isolated noise. For example, the preset clustering threshold is 5, that is, at least two clusters with less than 5 points are screened out, thereby eliminating the interference of isolated noise points on the long corridor scene recognition.

[0088] In identifying the long corridor scene, the number of points corresponding to the two boundary lines in the long corridor scene is fully considered. Based on this, the clusters corresponding to isolated noise can be filtered out by the preset clustering threshold, so that the current scene can be correctly identified as a long corridor scene.

[0089] Step S503, obtaining matching points in the target cluster that match each point on the map corresponding to the long corridor scene.

[0090] In this embodiment, the nearest point on the map corresponding to the long corridor scene may be searched from the target cluster as a matching point.

[0091] For example, a KD tree may be constructed in advance using the points on the map corresponding to the long corridor; then, the KD tree is searched to determine whether there is a point closest to the point in the target cluster; if so, the point in the target cluster is used as a matching point.

[0092] In this embodiment, when determining the normal angle of each matching point, the slope corresponding to each matching point can be determined based on the coordinates of the two matching points before and after each matching point; the slope corresponding to each matching point is used to query the preset angle query table to obtain the normal angle of each matching point.

[0093] In this embodiment, each point in the target cluster is used as a matching point to perform the following steps: the slope corresponding to each matching point is determined based on the coordinates of the two matching points before and after each matching point; then, the normal angle of the matching point is found from a preset angle query table using the slope corresponding to the matching point.

[0094] Here, the tangent value can be obtained for the normal angle in [-89°, 89°], and the tangent value and the normal angle corresponding to the tangent value are used as the key value pair of the angle query table to establish a preset angle query table. After determining the slope corresponding to each matching point, a method such as binary search can be used to first determine the tangent value closest to the slope from the preset angle query table, and then the normal angle corresponding to the tangent value is output as the normal angle of each matching point.

[0095] In one example, the tangent value of the normal angle may be calculated for each normal angle in [-89°, 89°] (eg, every 1 degree).

[0096] In this embodiment, in order to improve processing efficiency, when determining the normal angle, the slope corresponding to each matching point is determined only based on the coordinates of the two adjacent points before and after each matching point; then, the tangent value closest to the slope is found from a preset angle lookup table through the slope, and the normal angle corresponding to the found tangent value is output as the normal angle of each matching point. Although the above-mentioned angle lookup table method (the accuracy of the angle lookup table is 1 degree) loses the output accuracy of the function (for example, the output accuracy of the arctan function is lost) compared to determining the normal angle through a function, the efficiency of obtaining the normal angle is improved, and in the process of identifying the long corridor scene, it will not affect the accuracy of identifying the long corridor scene.

[0097] In one example, the tan values ​​from -89.9 degrees to 89.9 degrees (every 1 degree interval) are first calculated to form a preset angle query table. The tan value closest to the slope corresponding to the matching point in the angle query table is searched by binary search, and the normal angle corresponding to the closest tan value is output as the normal angle of each matching point.

[0098] In this implementation, although the accuracy of the output angle is lost by using the table lookup method (the accuracy of the table lookup method is 1 degree), the processing speed is hundreds of times faster than calculating the angle by using the standard deviation and atctan (inverse tangent). Moreover, when judging long corridors, the accuracy of 1 degree fully meets the accuracy requirements for identifying long corridor scenes. Therefore, by using this table lookup method, the processing speed can be improved while ensuring the recognition accuracy.

[0099] In one embodiment of the present application, the slope corresponding to each matching point is determined according to the coordinates of the two matching points before and after each matching point in the target cluster, including:

[0100] According to the coordinates of the two matching points before and after each matching point in the target cluster, the slope corresponding to each matching point is determined; the slope corresponding to each matching point is smoothed to obtain the slope corresponding to each matching point after smoothing.

[0101] Specifically, the smoothing process may include: determining the slope corresponding to the matching point after smoothing according to the average value of the slopes corresponding to the two matching points before and after the matching point.

[0102] In one example, for each point in the cluster, the x-axis coordinate and y-axis coordinate differences of the two matching points before and after the point are calculated, and their ratio is calculated as the slope and stored in the attributes of the current point. Afterwards, each point with a slope is mean filtered, and the slope of the point becomes: the average of the slopes of the two matching points before and after the point.

[0103] In this implementation, mean filtering is performed on the slope corresponding to each matching point to reduce the influence of noise.

[0104] Figure 6 The figure is a flow chart of a clustering method provided by an embodiment of the present application. Clustering the point cloud data to obtain at least two clusters (see step S501 for details) may include the following steps:

[0105] Step S601, obtaining clustering parameters; wherein the clustering parameters include the angular resolution of the points.

[0106] In this embodiment, the clustering parameters may be used to define parameters involved in the clustering process, such as the angular resolution of the points. The angular resolution represents the angular step between two adjacent points.

[0107] Step S602, sequentially determining the distance difference between each point in the point cloud data and the previous point.

[0108] In this embodiment, the ranging value of each point in the point cloud data and the ranging value of the previous point are first determined; then, the ranging difference between each point and the previous point is determined based on the ranging value of each point and the ranging value of the previous point; wherein the ranging value can be a value obtained by ranging using a laser radar as a light source.

[0109] Step S603: The points whose corresponding ranging differences are less than the ranging difference threshold are grouped as a cluster, and the ranging difference threshold is updated according to the angular resolution and ranging value of the points.

[0110] In this embodiment, points in the point cloud data whose ranging differences are less than the ranging difference threshold are grouped as a cluster, and after each determination of the ranging value and the ranging value of the previous point, the ranging difference threshold is updated according to the angular resolution and ranging value of the current point.

[0111] In this embodiment, the point cloud data scanned in the current scene are clustered to obtain at least two clusters, so that different types of points in the point cloud data can be segmented, so as to filter out points of different types from those on the two boundary lines in the long corridor scene from the point cloud data, thereby reducing the interference of different types of points on the recognition of the long corridor scene.

[0112] In one embodiment of the present application, the clustering parameters also include clustering resolution;

[0113] The points whose corresponding distance measurement difference is less than the distance measurement difference threshold are regarded as a cluster including:

[0114] Starting from the second point in the point cloud data, the current point is taken in turn, the distance difference between the current point and the previous point is determined, and the distance difference threshold is determined to be the larger value between the distance difference initial value and the clustering resolution;

[0115] If the ranging difference is less than the ranging difference threshold, the current point and the previous point are added to the same cluster, and the ranging difference threshold is updated according to the angular resolution and ranging value of the current point; otherwise, the current point is added to a new cluster.

[0116] In this implementation, (1) traverse the point cloud data: for each point in the point cloud data, starting from the second point, calculate the range difference (range_diff) between the current point and the previous point, and update the range difference threshold (range_diff_thresh) to the larger value of the initial threshold and the cluster resolution (resolution); (2) check the range difference: if the range difference is less than the range value threshold in (1), update the end index of the cluster, and update the range difference threshold according to the range value of the current point, the range difference between the current point and the previous point, and the product of the angular resolution between the current point and the previous point; if the range difference is greater than the range difference threshold in (1), the current cluster is considered to be over, and its start and end indexes are added to the list corresponding to the cluster, and a new cluster is started. At this time, the range difference threshold is updated according to the product of the angular resolution of the current point and the range difference. (3) Stop clustering until the last point in the point cloud data is traversed.

[0117] Here, the cluster resolution is used to determine the distance difference threshold. The distance difference is determined based on the difference between the distance value of the current point and the distance value of the previous point.

[0118] In one example, a single line laser (such as Figure 7 ), for a single-line laser, the data of two adjacent laser points are stored adjacently in the data structure. For example, the laser points are stored in the form of Figure 7 The data numbers 1, 2, 3, ... 13, 14, 15 are stored adjacently in sequence. Therefore, this feature can be used to calculate the distance difference between adjacent laser points and realize clustering operation.

[0119] In the whole clustering process, compared with the commonly used Euclidean distance calculation and Manhattan distance calculation methods, this implementation method can realize clustering by dynamically adjusting the distance difference threshold (range_diff_thresh) through the distance difference between the current point and the previous point, and does not involve complex functions, so the processing efficiency is higher.

[0120] Combination of the above Figure 3 , Figure 5 and Figure 6 , describes the method embodiment of the present application in detail, and the following is combined with Figures 8 to 9 , describes the device embodiment of the present application in detail. It should be understood that the description of the method embodiment corresponds to the description of the device embodiment, so the parts not described in detail can refer to the previous method embodiment.

[0121] Figure 8 FIG. 1 is a schematic diagram of a structure of a device for identifying a long corridor scene provided by an embodiment of the present application. Figure 8As shown, the apparatus for identifying the long corridor scene provided by the embodiment of the present application includes a matching point acquisition module 801, a quantity determination module 802, a range determination module 803, an angle difference determination module 804 and a scene recognition module 805. Among them, the matching point acquisition module 801 is used to obtain matching points that match the point cloud data obtained by scanning the current scene with each point on the corresponding map of the long corridor scene; the quantity determination module 802 is used to determine the normal angle of each matching point and count the number of matching points falling into each preset angle range; the range determination module 803 is used to determine the starting angle range in which the number of matching points in the preset angle range is greater than the first number threshold; the angle difference determination module 804 is used to determine, starting from the starting angle range, each other angle range in the preset angle range that meets the preset matching point number threshold, and respectively determine the maximum angle difference between each other angle range and the starting angle range; the scene recognition module 805 is used to determine that the current scene is not a long corridor scene if the maximum angle difference is greater than the first angle threshold.

[0122] In one embodiment, the matching point acquisition module 801 includes: a clustering unit, which is used to cluster the point cloud data to obtain at least two cluster clusters; a screening unit, which is used to screen at least two cluster clusters based on a preset clustering threshold to obtain a target cluster cluster; and a matching point acquisition unit, which is used to obtain matching points in the target cluster cluster that match each point on the map corresponding to the long corridor scene.

[0123] In one embodiment, the quantity determination module 802 includes: an angle determination unit, including: a slope determination unit, which is used to determine the slope corresponding to each matching point according to the coordinates of the two matching points before and after each matching point; an angle determination unit, which is used to use the slope corresponding to each matching point to query a preset angle query table to obtain the normal angle of each matching point.

[0124] In one embodiment, the angle determination unit is specifically used to: use the binary search method to find the tangent angle value closest to the slope corresponding to each matching point in the angle query table, and use the normal angle corresponding to the tangent angle value as the normal angle of each matching point; the angle query table includes the correspondence between the tangent angle value and the normal angle.

[0125] In one embodiment, the clustering unit includes: an acquisition subunit, used to acquire clustering parameters; wherein the clustering parameters include the angular resolution of the point; a determination subunit, used to sequentially determine the ranging difference between each point in the point cloud data and the previous point; and a clustering subunit, used to group the points whose corresponding ranging differences are less than a ranging difference threshold as a cluster cluster, and the ranging difference threshold is updated according to the angular resolution and ranging value of the point.

[0126] In one embodiment, the clustering parameters further include clustering resolution;

[0127] The clustering subunit is specifically used to: start from the second point in the point cloud data as the current point, determine the distance difference between the current point and the previous point, and determine the distance difference threshold as the larger value of the distance difference initial value and the clustering resolution; if the distance difference is less than the distance difference threshold, add the current point and the previous point to the same cluster cluster, and update the distance difference threshold according to the angular resolution and distance value of the current point; otherwise, add the current point to a new cluster cluster.

[0128] In one embodiment, the slope determination unit is specifically used to: determine the slope corresponding to each matching point according to the coordinates of the two matching points before and after each matching point in the target cluster; smooth the slope corresponding to each matching point to obtain the slope corresponding to each matching point after smoothing.

[0129] In one embodiment, the device also includes: a normal angle determination module, used to determine the normal angle of each point on the map; an angle difference determination module, also used to determine, for each matching point, a first angle difference between the normal angle of the matching point and the normal angle of the corresponding point on the map; and a deletion module, used to delete matching points whose first angle difference is greater than a preset angle threshold.

[0130] In one embodiment, the quantity determination module 802 further includes: a quantity determination unit, configured to: create an array including N elements, wherein the index of each element in the array corresponds to each preset angle range, the value of each element corresponds to the number of matching points falling within the corresponding angle range, and N is a positive integer greater than 1;

[0131] The angle difference determination module 804 is specifically used to: use the starting angle range as the starting index of the array, and traverse the array from the starting index to determine each other index in the traversed elements that meets the preset matching point quantity threshold, and respectively determine the maximum angle difference between each other index and the starting index.

[0132] Below, reference Fig. 9 To describe a computing device according to an embodiment of the present application. Fig. 9 Shown is a schematic diagram of the structure of a computing device provided in one embodiment of the present application.

[0133] like Fig. 9 As shown, the computing device includes one or more processors 901 and memory 902 .

[0134] The processor 901 may be a central processing unit (CPU) or other forms of processing units having data processing capabilities and / or instruction execution capabilities, and may control other components in a computing device to perform desired functions.

[0135] The memory 902 may include one or more computer program products, and the computer program product may include various forms of computer-readable storage media, such as volatile memory and / or non-volatile memory. Volatile memory may include, for example, random access memory (RAM) and / or cache memory (cache), etc. Non-volatile memory may include, for example, read-only memory (ROM), hard disk, flash memory, etc. One or more computer program instructions may be stored on a computer-readable storage medium, and the processor 901 may run the program instructions to implement the functions of the method for identifying a long corridor scene in each embodiment of the present application mentioned above. Various contents such as point cloud data and matching points may also be stored in the computer-readable storage medium.

[0136] In one example, the computing device may further include: an input device 903 and an output device 904 , and these components are interconnected via a bus system and / or other forms of connection mechanisms (not shown).

[0137] The input device 903 may include, for example, a keyboard, a mouse, etc.

[0138] The output device 904 can output various information to the outside, including that the maximum angle difference is greater than the first angle threshold, etc. The output device 904 can include, for example, a display, a speaker, a printer, a communication network and a remote output device connected thereto, and the like.

[0139] Of course, to simplify, Fig. 9 Only some of the components in the computing device related to the present application are shown, and components such as a bus, an input / output interface, etc. are omitted. In addition, the computing device may further include any other appropriate components according to specific application scenarios.

[0140] In addition to the above-mentioned methods and devices, an embodiment of the present application may also be a computer program product, which includes computer program instructions, which, when executed by a processor, enable the processor to execute the steps of the method for identifying a long corridor scene according to various embodiments of the present application described above in this specification.

[0141] The computer program product may be written in any combination of one or more programming languages ​​to write program codes for performing the operations of the embodiments of the present application, including object-oriented programming languages ​​such as Java, C++, etc., and conventional procedural programming languages ​​such as "C" language or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user device, as a separate software package, partially on the user computing device and partially on a remote computing device, or entirely on a remote computing device or server.

[0142] In addition, an embodiment of the present application may also be a computer-readable storage medium on which computer program instructions are stored. When the computer program instructions are executed by a processor, the processor executes the steps of the method for identifying a long corridor scene according to various embodiments of the present application described above in this specification.

[0143] Computer readable storage media can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can include, for example, but is not limited to, a system, device or device of electricity, magnetism, light, electromagnetic, infrared, or semiconductor, or any combination of the above. More specific examples (non-exhaustive list) of readable storage media include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0144] The basic principles of the present application are described above in conjunction with specific embodiments. However, it should be noted that the advantages, strengths, effects, etc. mentioned in the present application are only examples and not limitations, and it cannot be considered that these advantages, strengths, effects, etc. are required by each embodiment of the present application. In addition, the specific details disclosed above are only for the purpose of illustration and ease of understanding, not for limitation, and the above details do not limit the present application to being implemented by adopting the above specific details.

[0145] The block diagrams of the devices, apparatuses, equipment, and systems involved in this application are only illustrative examples and are not intended to require or imply that they must be connected, arranged, and configured in the manner shown in the block diagram. As will be appreciated by those skilled in the art, these devices, apparatuses, equipment, and systems can be connected, arranged, and configured in any manner. Words such as "including", "comprising", "having", etc. are open words, referring to "including but not limited to", and can be used interchangeably with them. The words "or" and "and" used here refer to the words "and / or" and can be used interchangeably with them, unless the context clearly indicates otherwise. The words "such as" used here refer to the phrase "such as but not limited to", and can be used interchangeably with them.

[0146] It should also be noted that in the apparatus, device and method of the present application, each component or each step can be decomposed and / or recombined. Such decomposition and / or recombination should be regarded as equivalent solutions of the present application.

[0147] The above description of the disclosed aspects is provided to enable any person skilled in the art to make or use the present application. Various modifications to these aspects will be readily apparent to those skilled in the art, and the general principles defined herein may be applied to other aspects without departing from the scope of the present application. Therefore, the present application is not intended to be limited to the aspects shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.

[0148] The above description has been given for the purpose of illustration and description. In addition, this description is not intended to limit the embodiments of the present application to the forms disclosed herein. Although multiple example aspects and embodiments have been discussed above, those skilled in the art will recognize certain variations, modifications, changes, additions and sub-combinations thereof.

[0149] The above description is only a preferred embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.

Claims

1. A method for identifying a long corridor scene, characterized in that: The method comprises: Obtain matching points between the point cloud data obtained by scanning the current scene and the points on the corresponding map of the long corridor scene; Determine the normal angle of each matching point and count the number of matching points that fall within each preset angle range; Determine a starting angle range in which the number of matching points in the preset angle range is greater than a first number threshold; Starting from the starting angle range, determining each other angle range in the preset angle range that meets the preset matching point quantity threshold, and respectively determining the maximum angle difference between each other angle range and the starting angle range; If the maximum angle difference is greater than the first angle threshold, it is determined that the current scene is not a long corridor scene.

2. The method according to claim 1, characterized in that The step of obtaining matching points between the point cloud data obtained by scanning the current scene and each point on the map corresponding to the long corridor scene includes: Clustering the point cloud data to obtain at least two clusters; Screening at least two clusters based on a preset clustering threshold to obtain a target cluster; Obtain matching points in the target cluster that match points on the map corresponding to the long corridor scene.

3. The method according to claim 1 or 2, characterized in that: Determining the normal angle of each matching point includes: According to the coordinates of the two matching points before and after each matching point, the slope corresponding to each matching point is determined respectively; The slope corresponding to each matching point is used to query the preset angle query table to obtain the normal angle of each matching point.

4. The method according to claim 3, characterized in that The method of querying a preset angle query table using the slope corresponding to each matching point to obtain the normal angle of each matching point includes: Use the binary search method to find the tangent angle value closest to the slope corresponding to each matching point in the angle query table, and use the normal angle corresponding to the tangent angle value as the normal angle of each matching point; The angle lookup table includes the corresponding relationship between the tangent angle value and the normal angle.

5. The method according to claim 2, characterized in that: Clustering the point cloud data to obtain at least two clusters, including: Acquire clustering parameters; wherein the clustering parameters include the angular resolution of the points; Determining the distance difference between each point in the point cloud data and the previous point in sequence; Points whose corresponding ranging differences are less than a ranging difference threshold are grouped as a cluster, and the ranging difference threshold is updated according to the angular resolution and ranging value of the points.

6. The method according to claim 5, characterized in that The clustering parameters also include clustering resolution; The point corresponding to the distance measurement difference less than the distance measurement difference threshold is regarded as a cluster including: Starting from the second point in the point cloud data, sequentially taking it as the current point, determining the distance difference between the current point and the previous point, and determining the distance difference threshold as the larger value of the distance difference initial value and the clustering resolution; If the ranging difference is less than the ranging difference threshold, the current point and the previous point are added to the same cluster, and the ranging difference threshold is updated according to the angular resolution and ranging value of the current point; otherwise, the current point is added to a new cluster.

7. The method according to claim 3, characterized in that The step of determining the slope corresponding to each matching point according to the coordinates of the two matching points before and after each matching point comprises: According to the coordinates of the two matching points before and after each matching point in the target cluster, determine the slope corresponding to each matching point; The slope corresponding to each matching point is smoothed to obtain the slope corresponding to each matching point after smoothing.

8. The method according to claim 1, characterized in that The method further comprises: determining a normal angle for each point on the map; For each matching point, determining a first angle difference between a normal angle of the matching point and a normal angle of a point on the corresponding map; Delete the matching points whose first angle difference is greater than a preset angle threshold.

9. The method according to claim 1, characterized in that: The counting of the number of matching points falling within each preset angle range includes: Create an array including N elements, wherein the index of each element in the array corresponds to each preset angle range, the value of each element corresponds to the number of matching points falling within the corresponding angle range, and N is a positive integer greater than 1; Starting from the starting angle range, determining each other angle range in the preset angle range that meets the preset matching point quantity threshold, and respectively determining the maximum angle difference between each other angle range and the starting angle range, includes: The starting angle range is used as the starting index of the array, and the array is traversed from the starting index to determine other indexes in the traversed elements that meet a preset matching point quantity threshold, and the maximum angle difference between each other index and the starting index is determined respectively.

10. A computing device, characterized in that including memory and processor; The memory is connected to the processor and is used to store programs; The processor is configured to implement the method according to any one of claims 1 to 9 by running the program in the memory.

11. A computer-readable storage medium, characterized in that: The storage medium stores a computer program, and when the computer program is executed by the processor, the method according to any one of claims 1 to 9 is implemented.

12. A computer program product, characterized in that The method comprises computer program instructions which, when executed by a processor, cause the processor to implement the method according to any one of claims 1 to 9.

Citation Information

Cited By

  • 2D laser point cloud channel robot road condition recognition method and system and storage medium

    CN121582900A

  • 2d laser point cloud channel robot road condition recognition method and system and storage medium

    CN121582900B