Columnar object extraction method and device in point cloud, storage medium and equipment

By generating depth maps and performing horizontal and vertical clustering, the problems of poor column extraction performance and resource waste were solved, achieving efficient column extraction.

CN115205569BActive Publication Date: 2026-03-31JIUZHI (SUZHOU) INTELLIGENT TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-29
Publication Date
2026-03-31

AI Technical Summary

Technical Problem

In existing technologies, column extraction is ineffective and wastes resources significantly, especially when the column is too close to the ground or tree canopy, making it difficult to separate. Furthermore, region growing methods result in each point being traversed multiple times.

Method used

By generating a depth map and utilizing the 3D coordinate and depth information in the depth map, horizontal clustering is performed first, followed by vertical clustering, to extract columns. The specific steps include: generating a depth map, dividing into a first cluster and a second cluster, merging elements according to clustering conditions, and finally determining columns based on aspect ratio.

Benefits of technology

It improves the extraction efficiency of columnar data, reduces resource consumption, and only requires two traversals for each element, saving computational resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115205569B_ABST
    Figure CN115205569B_ABST
Patent Text Reader

Abstract

The application discloses a columnar object extraction method and device in a point cloud, a storage medium and equipment, and belongs to the technical field of image processing. The method comprises the following steps: acquiring a frame of point cloud; generating a depth map according to the point cloud, wherein each element in the depth map comprises three-dimensional coordinate information, a row identifier, a column identifier and depth information of a point; dividing each row element into at least one first cluster by traversing left and right adjacent elements in each row element of the depth map, and each first cluster comprises at least two continuously adjacent elements; merging a plurality of first clusters into at least one second cluster by traversing up and down adjacent elements in adjacent two row elements of the depth map; and extracting a columnar object according to the second cluster. In the application, the columnar object can be first horizontally clustered and then vertically clustered according to the characteristics of the columnar object, so that the extraction effect of the columnar object is improved. In addition, each element only needs to be traversed twice when the columnar object is extracted, so that resources are saved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a method, apparatus, storage medium and device for extracting columnar objects from point clouds. Background Technology

[0002] During vehicle operation, it is necessary to identify cylindrical objects in real time. Cylindrical objects refer to objects containing pillars, such as traffic lights and road signs.

[0003] In related technologies, the computer equipment in a car can first acquire a frame of point cloud data, and then extract columnar structures using a region growing method. Specifically, the region growing method includes the following steps:

[0004] (1) Create a KD tree;

[0005] (2) Randomly select a point as a seed point, search for the nearest neighbor points within a set range of the seed point, and use the searched points as new seed points to continue searching for nearest neighbor points until no new nearest neighbor points can be found. Then, these points are used as a point set.

[0006] (3) Select the next untraversed point as the seed point and continue to search for nearest neighbors. Repeat the operation in (2) until all points have been traversed.

[0007] (4) Determine the number of points in each cluster. If the number is less than the threshold, discard the cluster. If the number is greater than the threshold, calculate the aspect ratio of each cluster. If the aspect ratio is greater than the threshold, then the cluster is identified as a columnar structure.

[0008] Existing clustering methods are not specifically designed for the characteristics of columns. For example, when the ground and the column are too close, or when there is a large canopy on the tree trunk, it is impossible to separate the column from the ground or the canopy, thus affecting the extraction effect of the column. In addition, when the region growing method extracts columns, each point is traversed multiple times, resulting in a great waste of resources. Summary of the Invention

[0009] This application provides a method, apparatus, storage medium, and device for extracting columnar objects from point clouds, addressing the problems of poor extraction results and significant resource waste. The technical solution is as follows:

[0010] On the one hand, a method for extracting columnar objects from point clouds is provided, the method comprising:

[0011] Obtain a single frame of point cloud data;

[0012] A depth map is generated based on the point cloud, and each element in the depth map contains the three-dimensional coordinate information, row identifier, column identifier, and depth information of a point.

[0013] By traversing the left and right adjacent elements in each row of the depth map, each row of elements is divided into at least one first cluster, and each first cluster contains at least two consecutive adjacent elements.

[0014] By traversing the adjacent elements in two adjacent rows of the depth map, multiple first clusters are merged into at least one second cluster;

[0015] Columnar samples were extracted based on the second clustering.

[0016] In one possible implementation, dividing each row of elements into at least one first cluster by traversing the left and right adjacent elements in each row of the depth map includes:

[0017] Obtain the two adjacent elements in each row of the depth map;

[0018] Calculate whether the two elements satisfy the clustering conditions based on the three-dimensional coordinates and the depth information;

[0019] If it is determined that the two elements satisfy the clustering conditions, then the two elements are merged into a first cluster;

[0020] If it is determined that the two elements do not meet the clustering conditions, then continue to traverse the next group of two adjacent elements.

[0021] In one possible implementation, the method further includes: for each of the two elements, calculating the root identifier of the element based on the row identifier and column identifier of the element;

[0022] After merging the two elements into a first cluster, the method further includes adding the smallest root identifier of the two obtained root identifiers as the root identifier corresponding to the two elements to the root identifier set.

[0023] In one possible implementation, calculating the root identifier of the element based on its row identifier and column identifier includes:

[0024] Multiply the row identifier of the element by the width of the depth map;

[0025] Add the resulting product to the column identifier to obtain the root identifier of the element.

[0026] In one possible implementation, merging multiple first clusters into at least one second cluster by traversing the adjacent elements in adjacent rows of the depth map includes:

[0027] Get any two adjacent elements in any two first clusters;

[0028] Calculate whether the two elements satisfy the clustering conditions based on the three-dimensional coordinates and the depth information;

[0029] If it is determined that the two elements satisfy the clustering conditions, then the two first clusters are merged into one second cluster, the root identifiers of the two first clusters are obtained, the smallest root identifier among the two root identifiers is retained in the root identifier set, and the largest root identifier among the two root identifiers is deleted.

[0030] If it is determined that the two elements do not meet the clustering conditions, then continue to traverse the next group of two adjacent elements.

[0031] In one possible implementation, extracting the columnar section based on the second cluster includes:

[0032] Iterate through each root identifier in the set of root identifiers;

[0033] For each root identifier corresponding to a second cluster, calculate the aspect ratio of the objects formed by the elements in the second cluster;

[0034] If the aspect ratio is greater than or equal to the fourth threshold, then the object is determined to be a columnar object;

[0035] If the aspect ratio is less than the fourth threshold, then the object is determined not to be a columnar object.

[0036] In one possible implementation, calculating whether the two elements satisfy the clustering condition based on the three-dimensional coordinates and the depth information includes:

[0037] Calculate the distance between the two elements based on the three-dimensional coordinates;

[0038] Calculate the depth difference between the two elements based on the depth information;

[0039] If the distance is less than or equal to the first threshold and the depth difference is less than or equal to the second threshold, then the two elements are determined to satisfy the clustering condition.

[0040] If the distance is greater than a first threshold, or the depth difference is greater than a second threshold, then it is determined that the two elements do not meet the clustering conditions.

[0041] In one possible implementation, before merging the two first clusters into a second cluster, the method further includes:

[0042] Calculate the x-axis and y-axis occupancy ranges of the two first clusters after merging;

[0043] If the range occupied by the x-axis direction and the range occupied by the y-axis direction are both less than or equal to the third threshold, then the step of merging the two first clusters into one second cluster is triggered.

[0044] If the range occupied by the x-axis direction or the range occupied by the y-axis direction is greater than the third threshold, then continue to traverse the next group of two adjacent elements.

[0045] In one possible implementation, after dividing each row of elements into at least one first cluster by traversing the left and right adjacent elements in each row of the depth map, the method further includes:

[0046] For each first cluster, calculate the x-axis and y-axis occupancy ranges corresponding to the first cluster.

[0047] If the range occupied by the x-axis direction and the range occupied by the y-axis direction are both less than or equal to the third threshold, then the first cluster is retained;

[0048] If the range occupied by the x-axis direction or the range occupied by the y-axis direction is greater than the third threshold, then the first cluster is deleted.

[0049] On one hand, a device for extracting columnar objects from point clouds is provided, the device comprising:

[0050] The acquisition module is used to acquire a single frame of point cloud data.

[0051] The generation module is used to generate a depth map based on the point cloud, wherein each element in the depth map contains the three-dimensional coordinate information, row identifier, column identifier and depth information of a point;

[0052] The partitioning module is used to divide each row of elements into at least one first cluster by traversing the left and right adjacent elements in each row of the depth map, and each first cluster contains at least two consecutive adjacent elements.

[0053] The merging module is used to merge multiple first clusters into at least one second cluster by traversing the adjacent elements in two adjacent rows of the depth map.

[0054] An extraction module is used to extract columns based on the second cluster.

[0055] On the one hand, a computer-readable storage medium is provided, wherein at least one instruction is stored therein, the at least one instruction being loaded and executed by a processor to implement the column extraction method in point clouds as described above.

[0056] On one hand, a computer device is provided, the computer device including a processor and a memory, the memory storing at least one instruction, the instruction being loaded and executed by the processor to implement the columnar extraction method in point clouds as described above.

[0057] The beneficial effects of the technical solution provided in this application include at least the following:

[0058] By generating a depth map from the point cloud, and then iterating through the left and right adjacent elements in each row of the depth map, each row is divided into at least one first cluster, with each first cluster containing at least two consecutive adjacent elements. By iterating through the top and bottom adjacent elements in adjacent rows of the depth map, multiple first clusters are merged into at least one second cluster. Finally, columns are extracted based on the second clusters. This approach, by first clustering horizontally and then vertically according to the characteristics of the columns, improves the extraction efficiency. Furthermore, each element only needs to be traversed twice during column extraction, thus saving resources. Attached Figure Description

[0059] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0060] Figure 1 This is a flowchart of a method for extracting columnar objects from a point cloud according to an embodiment of this application;

[0061] Figure 2 This is a flowchart of a method for extracting columnar objects from point clouds according to another embodiment of this application;

[0062] Figure 3 This is a structural block diagram of a point cloud column extraction device provided in another embodiment of this application. Detailed Implementation

[0063] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the implementation methods of this application will be further described in detail below with reference to the accompanying drawings.

[0064] Please refer to Figure 1 This document illustrates a flowchart of a method for extracting columnar objects from a point cloud according to an embodiment of this application. This method can be applied to a computer device. The method may include:

[0065] Step 101: Obtain a point cloud frame.

[0066] In this embodiment, a point cloud frame can be acquired using radar in a vehicle and then sent to a computer device. The three-dimensional coordinates of each point cloud element are known.

[0067] Step 102: Generate a depth map based on the point cloud. Each element in the depth map contains the three-dimensional coordinates, row identifier, column identifier, and depth information of a point.

[0068] The computer device can first initialize a point cloud frame into an image matrix of dimension H*W, then calculate the row identifier, column identifier, and depth of each point in the image matrix, and finally store the three-dimensional coordinate information, row identifier, column identifier, and depth information of a point in each element to obtain a depth map.

[0069] Assuming the 3D coordinates of a point are (x, y, z), and the vertical field of view (fov) is known, the formulas for calculating the row identifier, column identifier, and depth are as follows:

[0070] Row identifier = (fov / 2-arctan(z,sqrt(x*x+y*y))) / fov*H;

[0071] Column identifier = 0.5 * W * (1 - arctan(y,x));

[0072] Depth information = sqrt(x*x+y*y+z*z).

[0073] Step 103: By traversing the left and right adjacent elements in each row of the depth map, each row of elements is divided into at least one first cluster, and each first cluster contains at least two consecutive adjacent elements.

[0074] Each row of elements in the depth map can be divided into at least one first cluster, and the elements in each first cluster are consecutively adjacent. For example, elements 1-20 in the first row form the first first cluster, and elements 35-90 form the second first cluster. Elements 5-44 in the second row form the first first cluster, and elements 70-85 form the second first cluster, and so on.

[0075] Step 104: By traversing the adjacent elements in the adjacent rows of the depth map, multiple first clusters are merged into at least one second cluster.

[0076] Using the example above, if the 70th element of the first row and the 70th element of the second row satisfy the aggregation condition, then the second first cluster of the first row and the second first cluster of the second row will be merged to obtain a second cluster.

[0077] Step 105: Extract the columnar structure based on the second cluster.

[0078] For each second cluster obtained, the computer device can determine whether the objects composed of the elements in the second cluster are columnar structures. If they are columnar structures, they are extracted; otherwise, they are not extracted.

[0079] In summary, the column extraction method from point clouds provided in this application generates a depth map from the point cloud. Then, by traversing the left and right adjacent elements in each row of the depth map, each row is divided into at least one first cluster, with each first cluster containing at least two consecutive adjacent elements. By traversing the top and bottom adjacent elements in adjacent rows of the depth map, multiple first clusters are merged into at least one second cluster. Finally, columns are extracted based on the second clusters. This method allows for horizontal clustering followed by vertical clustering based on the characteristics of the columns, thereby improving the extraction efficiency. Furthermore, each element only needs to be traversed twice during column extraction, thus saving resources.

[0080] Please refer to Figure 2 This document illustrates a flowchart of a method for extracting columnar objects from a point cloud according to an embodiment of this application. This method can be applied to a computer device. The method may include:

[0081] Step 201: Obtain a point cloud frame.

[0082] In this embodiment, a point cloud frame can be acquired using radar in a vehicle and then sent to a computer device. The three-dimensional coordinates of each point cloud element are known.

[0083] Step 202: Generate a depth map based on the point cloud. Each element in the depth map contains the three-dimensional coordinates, row identifier, column identifier, and depth information of a point.

[0084] The computer device can first initialize a point cloud frame into an image matrix of dimension H*W, then calculate the row identifier, column identifier, and depth of each point in the image matrix, and finally store the three-dimensional coordinate information, row identifier, column identifier, and depth information of a point in each element to obtain a depth map.

[0085] Assuming the 3D coordinates of a point are (x, y, z), and the vertical field of view (fov) is known, the formulas for calculating the row identifier (row id), column identifier (column id), and depth (range) are as follows:

[0086] Row identifier = (fov / 2-arctan(z,sqrt(x*x+y*y))) / fov*H;

[0087] Column identifier = 0.5 * W * (1 - arctan(y,x));

[0088] Depth information = sqrt(x*x+y*y+z*z).

[0089] Step 203: Obtain the two adjacent elements in each row of the depth map; calculate whether the two elements meet the clustering conditions based on the 3D coordinates and depth information; if the two elements meet the clustering conditions, merge the two elements into a first cluster; if the two elements do not meet the clustering conditions, continue to traverse the next group of two adjacent elements.

[0090] Specifically, the computer device retrieves the first and second elements from the first row and calculates whether these two elements meet the clustering criteria. If they do, they are merged; otherwise, they are not merged. The computer device then retrieves the second and third elements from the first row and calculates whether they meet the clustering criteria. If they do, and the first and second elements have already been merged into a first cluster, the third element is merged into that first cluster. If they do, and the first and second elements have not been merged, they are merged into a first cluster; otherwise, they are not merged. This process is repeated row by row, clustering each row of elements.

[0091] Ultimately, each row of elements in the depth map can be divided into at least one first cluster, and the elements in each first cluster are consecutively adjacent. For example, elements 1-20 in the first row form the first first cluster, and elements 35-90 form the second first cluster. Elements 5-44 in the second row form the first first cluster, and elements 70-85 form the second first cluster, and so on.

[0092] Specifically, calculating whether two elements meet the clustering conditions based on three-dimensional coordinates and depth information can include: calculating the distance between the two elements based on the three-dimensional coordinates; calculating the depth difference between the two elements based on the depth information; if the distance is less than or equal to a first threshold and the depth difference is less than or equal to a second threshold, then the two elements are determined to meet the clustering conditions; if the distance is greater than the first threshold or the depth difference is greater than the second threshold, then the two elements are determined not to meet the clustering conditions.

[0093] The first threshold and the second threshold can be set based on empirical values, and no specific values ​​are limited in this embodiment.

[0094] Step 204: For each of the two elements, calculate the root identifier of the element based on the row identifier and column identifier of the element; add the root identifier with the smaller of the two root identifiers as the root identifier corresponding to the two elements to the root identifier set.

[0095] In this embodiment, the computer device also needs to initialize the identifier (id) and root identifier (root_id) of each element.

[0096] Specifically, calculating the root identifier of an element based on its row and column identifiers can include: multiplying the element's row identifier by the width of the depth map; and adding the resulting product to the column identifier to obtain the element's root identifier. That is, id = row id * W + column id, root_id = id.

[0097] If two elements need to be merged into a first cluster, the root identifiers of the two elements can be compared to determine the smallest root identifier, and this smallest root identifier can be added to the root identifier set as the root identifier corresponding to the two elements.

[0098] Suppose that the first and second elements in the first row need to be merged into a first cluster, and the root identifier of the first element is 1 and the root identifier of the second element is 2. Then, 1 can be added to the root identifier set as the root identifier corresponding to the two elements.

[0099] In this embodiment, after dividing each row of elements into at least one first cluster by traversing the left and right adjacent elements in each row of the depth map, the method further includes: for each first cluster, calculating the x-axis occupancy range and y-axis occupancy range corresponding to the first cluster; if both the x-axis occupancy range and y-axis occupancy range are less than or equal to a third threshold, then the first cluster is retained; if either the x-axis occupancy range or the y-axis occupancy range is greater than the third threshold, then the first cluster is deleted.

[0100] The x-axis range is defined by the x-axis data of all elements in the first cluster, and the y-axis range is defined by the y-axis data of all elements in the first cluster. The third threshold can be set based on empirical values; this embodiment does not limit the specific value.

[0101] Step 205: Obtain two adjacent elements from any two first clusters; calculate whether the two elements meet the clustering conditions based on the three-dimensional coordinates and depth information; if the two elements meet the clustering conditions, merge the two first clusters into one second cluster, obtain the root identifiers of the two first clusters, retain the smallest root identifier among the two root identifiers in the root identifier set, and delete the largest root identifier among the two root identifiers; if the two elements do not meet the clustering conditions, continue to traverse the next group of two adjacent elements.

[0102] Using the example above, suppose the 70th element of the first row and the 70th element of the second row satisfy the aggregation condition. Then, merge the second first cluster of the first row and the second first cluster of the second row to obtain a single second cluster. Assuming the root identifier of the second first cluster of the first row is 1 and the root identifier of the second first cluster is 10, retain 1 from the root identifier set, delete 10 from the root identifier set, and use 1 as the root identifier for this second cluster.

[0103] Specifically, calculating whether two elements meet the clustering conditions based on three-dimensional coordinates and depth information can include: calculating the distance between the two elements based on the three-dimensional coordinates; calculating the depth difference between the two elements based on the depth information; if the distance is less than or equal to a first threshold and the depth difference is less than or equal to a second threshold, then the two elements are determined to meet the clustering conditions; if the distance is greater than the first threshold or the depth difference is greater than the second threshold, then the two elements are determined not to meet the clustering conditions.

[0104] The first threshold and the second threshold can be set based on empirical values, and no specific values ​​are limited in this embodiment.

[0105] In this embodiment, before merging two first clusters into one second cluster, the method further includes: calculating the x-axis and y-axis occupancy ranges of the merged two first clusters; if both the x-axis and y-axis occupancy ranges are less than or equal to a third threshold, then the step of merging the two first clusters into one second cluster is triggered; if either the x-axis or y-axis occupancy range is greater than the third threshold, then the next set of two adjacent elements is traversed.

[0106] The x-axis range is defined by the x-axis data of all elements in the merged second cluster, and the y-axis range is defined by the y-axis data of all elements in the merged second cluster. The third threshold can be set based on empirical values; this embodiment does not limit the specific value.

[0107] Step 206: Traverse each root identifier in the root identifier set; for each root identifier corresponding to a second cluster, calculate the aspect ratio of the objects formed by the elements in the second cluster; if the aspect ratio is greater than or equal to the fourth threshold, then determine that the object is a columnar object; if the aspect ratio is less than the fourth threshold, then determine that the object is not a columnar object.

[0108] The computer device can use the x-axis range of the second cluster as the width of the object and the y-axis range as the height of the object, and then calculate the aspect ratio of the object. If the aspect ratio is greater than or equal to a fourth threshold, the object is determined to be a columnar object; if the aspect ratio is less than the fourth threshold, the object is determined not to be a columnar object. The fourth threshold can be set based on empirical values, and this embodiment does not limit the specific value.

[0109] In summary, the column extraction method from point clouds provided in this application generates a depth map from the point cloud. Then, by traversing the left and right adjacent elements in each row of the depth map, each row is divided into at least one first cluster, with each first cluster containing at least two consecutive adjacent elements. By traversing the top and bottom adjacent elements in adjacent rows of the depth map, multiple first clusters are merged into at least one second cluster. Finally, columns are extracted based on the second clusters. This method allows for horizontal clustering followed by vertical clustering based on the characteristics of the columns, thereby improving the extraction efficiency. Furthermore, each element only needs to be traversed twice during column extraction, thus saving resources.

[0110] Please refer to Figure 3 This diagram illustrates a structural block diagram of a point cloud column extraction device according to an embodiment of this application. This point cloud column extraction device can be applied in a computer device. The point cloud column extraction device may include:

[0111] The acquisition module 310 is used to acquire a single frame of point cloud data.

[0112] The generation module 320 is used to generate a depth map from the point cloud. Each element in the depth map contains the three-dimensional coordinate information, row identifier, column identifier and depth information of a point.

[0113] The partitioning module 330 is used to divide each row of elements into at least one first cluster by traversing the left and right adjacent elements in each row of the depth map, and each first cluster contains at least two consecutive adjacent elements.

[0114] The merging module 340 is used to merge multiple first clusters into at least one second cluster by traversing the adjacent elements in two adjacent rows of the depth map.

[0115] Extraction module 350 is used to extract columns based on the second cluster.

[0116] In an optional embodiment, the partitioning module 330 is further configured to:

[0117] Get the two adjacent elements in each row of the depth map;

[0118] Calculate whether two elements satisfy the clustering conditions based on their three-dimensional coordinates and depth information;

[0119] If two elements are determined to satisfy the clustering criteria, then the two elements are merged into a first cluster;

[0120] If it is determined that two elements do not meet the clustering criteria, the process continues to traverse the next group of two adjacent elements. In an optional embodiment, the device further includes a calculation module for calculating the root identifier of each of the two elements based on the element's row identifier and column identifier.

[0121] The merging module 340 is also used to add the smallest root identifier of the two root identifiers obtained after merging two elements into a first cluster to the root identifier set as the root identifier corresponding to the two elements.

[0122] In an optional embodiment, the computing module is further configured to:

[0123] Multiply the row identifier of the element by the width of the depth map;

[0124] Add the resulting product to the column identifier to obtain the root identifier of the element.

[0125] In an optional embodiment, the merging module 340 is further configured to:

[0126] Get any two adjacent elements in any two first clusters;

[0127] Calculate whether two elements satisfy the clustering conditions based on their three-dimensional coordinates and depth information;

[0128] If it is determined that two elements satisfy the clustering condition, then the two first clusters are merged into one second cluster, the root identifiers of the two first clusters are obtained, the smallest root identifier among the two root identifiers is retained in the root identifier set, and the largest root identifier among the two root identifiers is deleted.

[0129] If it is determined that two elements do not meet the clustering criteria, then continue to traverse the next group of two adjacent elements.

[0130] In an optional embodiment, the extraction module 350 is further configured to:

[0131] Iterate through each root identifier in the root identifier set;

[0132] For each root identifier corresponding to a second cluster, calculate the aspect ratio of the objects formed by the elements in the second cluster;

[0133] If the aspect ratio is greater than or equal to the fourth threshold, then the object is determined to be a columnar object;

[0134] If the aspect ratio is less than the fourth threshold, then the object is determined not to be a columnar object.

[0135] In an optional embodiment, the partitioning module 330 is further configured to:

[0136] Calculate the distance between two elements based on their three-dimensional coordinates;

[0137] Calculate the depth difference between two elements based on the depth information;

[0138] If the distance is less than or equal to the first threshold and the depth difference is less than or equal to the second threshold, then the two elements are determined to satisfy the clustering condition.

[0139] If the distance is greater than the first threshold, or the depth difference is greater than the second threshold, then the two elements are determined not to meet the clustering conditions.

[0140] In an optional embodiment, the merging module 340 is further configured to:

[0141] Calculate the distance between two elements based on their three-dimensional coordinates;

[0142] Calculate the depth difference between two elements based on the depth information;

[0143] If the distance is less than or equal to the first threshold and the depth difference is less than or equal to the second threshold, then the two elements are determined to satisfy the clustering condition.

[0144] If the distance is greater than the first threshold, or the depth difference is greater than the second threshold, then the two elements are determined not to meet the clustering conditions.

[0145] In an optional embodiment, the merging module 340 is further configured to:

[0146] Before merging two first clusters into one second cluster, calculate the x-axis and y-axis occupancy of the merged first clusters.

[0147] If the range occupied in the x-axis direction and the range occupied in the y-axis direction are both less than or equal to the third threshold, then the step of merging the two first clusters into one second cluster is triggered.

[0148] If the range occupied by either the x-axis or y-axis exceeds the third threshold, then continue traversing the next set of two adjacent elements.

[0149] In an optional embodiment, the partitioning module 330 is further configured to:

[0150] After dividing each row of elements into at least one first cluster by traversing the left and right adjacent elements in each row of the depth map, for each first cluster, the x-axis occupancy range and y-axis occupancy range corresponding to the first cluster are calculated.

[0151] If the range occupied in both the x-axis and y-axis directions is less than or equal to the third threshold, then the first cluster is retained.

[0152] If the range occupied by either the x-axis or y-axis exceeds the third threshold, then the first cluster is deleted.

[0153] In summary, the column extraction device in point clouds provided in this application generates a depth map from the point cloud, then divides each row of elements in the depth map into at least one first cluster by traversing the left and right adjacent elements. Each first cluster contains at least two consecutive adjacent elements. By traversing the top and bottom adjacent elements in adjacent rows of the depth map, multiple first clusters are merged into at least one second cluster. Finally, columns are extracted based on the second clusters. In this way, based on the characteristics of the columns, horizontal clustering is performed first, followed by vertical clustering, thereby improving the extraction effect of columns. In addition, each element only needs to be traversed twice when extracting columns, thus saving resources.

[0154] One embodiment of this application provides a computer-readable storage medium storing at least one instruction, which is loaded and executed by a processor to implement the columnar extraction method in a point cloud as described above.

[0155] One embodiment of this application provides a computer device including a processor and a memory, wherein the memory stores at least one instruction, which is loaded and executed by the processor to implement the columnar extraction method in point clouds as described above.

[0156] It should be noted that the above-described embodiment of the point cloud column extraction device is only illustrated by the division of the functional modules described above. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the point cloud column extraction device can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the point cloud column extraction device and the point cloud column extraction method embodiment provided above belong to the same concept, and their specific implementation process is detailed in the method embodiment, which will not be repeated here.

[0157] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.

[0158] The above description is not intended to limit the embodiments of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the embodiments of this application should be included within the protection scope of the embodiments of this application.

Claims

1. A method for extracting a column in a point cloud, characterized in that, The method comprises: acquiring a frame of point cloud; generating a depth map according to the point cloud, each element in the depth map containing three-dimensional coordinate information of a point, row identification, column identification and depth information, the row identification = (fov / 2 - arctan(z, sqrt(x*x+y*y))) / fov* H, the column identification = 0.5 * W * (1 - arctan(y,x)), wherein (x, y, z) represents three-dimensional coordinate information of a point, fov represents a vertical field of view angle, H and W represent the height and width of the image matrix converted from the point cloud; dividing each row element of the depth map into at least one first cluster by traversing left and right adjacent elements in each row element of the depth map, each first cluster containing at least two continuous adjacent elements; merging a plurality of first clusters into at least one second cluster by traversing up and down adjacent elements in adjacent two row elements of the depth map; extracting a columnar object according to the second cluster; the step of dividing each row element of the depth map into at least one first cluster by traversing left and right adjacent elements in each row element of the depth map comprises: acquiring two elements adjacent to each other in each row element of the depth map; calculating whether the two elements satisfy a clustering condition according to the three-dimensional coordinate and the depth information; if it is determined that the two elements satisfy the clustering condition, merging the two elements into one first cluster; if it is determined that the two elements do not satisfy the clustering condition, continuing to traverse the next two elements adjacent to each other; the step of merging a plurality of first clusters into at least one second cluster by traversing up and down adjacent elements in adjacent two row elements of the depth map comprises: acquiring two elements adjacent to each other in any two first clusters; calculating whether the two elements satisfy a clustering condition according to the three-dimensional coordinate and the depth information; if it is determined that the two elements satisfy the clustering condition, merging the two first clusters into one second cluster; if it is determined that the two elements do not satisfy the clustering condition, continuing to traverse the next two elements adjacent to each other.

2. The columnar object extraction method in the point cloud according to claim 1, wherein the method further comprises: for each of the two elements, calculating a root identification of the element according to the row identification and the column identification of the element; after the step of merging the two elements into one first cluster, the method further comprises: adding the smaller one of the two root identifications obtained to a root identification set as a root identification corresponding to the two elements.

3. The method of claim 2, wherein, the step of calculating a root identification of the element according to the row identification and the column identification of the element comprises: multiplying the row identification of the element by the width of the depth map; adding the product obtained to the column identification to obtain the root identification of the element.

4. The columnar object extraction method in the point cloud according to claim 2, wherein After merging the two first clusters into a second cluster, root identifiers of the two first clusters are obtained, the smallest root identifier of the two root identifiers is kept in the root identifier set, and the largest root identifier of the two root identifiers is deleted.

5. The method of claim 4, wherein, The extracting the columnar object according to the second cluster comprises: traversing each root identifier in the root identifier set; for a second cluster corresponding to each root identifier, calculating an aspect ratio of an object composed of elements in the second cluster; if the aspect ratio is greater than or equal to a fourth threshold value, determining that the object is a columnar object; if the aspect ratio is less than the fourth threshold value, determining that the object is not a columnar object.

6. The method of claim 1, wherein, The calculating whether the two elements satisfy a clustering condition according to the three-dimensional coordinate and the depth information comprises: calculating a distance between the two elements according to the three-dimensional coordinate; calculating a depth difference between the two elements according to the depth information; if the distance is less than or equal to a first threshold value, and the depth difference is less than or equal to a second threshold value, determining that the two elements satisfy the clustering condition; if the distance is greater than the first threshold value, or the depth difference is greater than the second threshold value, determining that the two elements do not satisfy the clustering condition.

7. The method of claim 6, wherein, Before the merging the two first clusters into a second cluster, the method further comprises: calculating an x-axis direction occupied range and a y-axis direction occupied range after the merging of the two first clusters; if the x-axis direction occupied range and the y-axis direction occupied range are both less than or equal to a third threshold value, triggering the step of merging the two first clusters into a second cluster; if the x-axis direction occupied range or the y-axis direction occupied range is greater than the third threshold value, continuing to traverse a next set of two elements adjacent in up and down directions.

8. The method of claim 1, wherein, After the dividing each row of elements in the depth map into at least one first cluster by traversing elements adjacent in left and right directions in each row of elements, the method further comprises: for each first cluster, calculating an x-axis direction occupied range and a y-axis direction occupied range corresponding to the first cluster; if the x-axis direction occupied range and the y-axis direction occupied range are both less than or equal to a third threshold value, keeping the first cluster; if the x-axis direction occupied range or the y-axis direction occupied range is greater than the third threshold value, deleting the first cluster.

9. A column extraction apparatus in a point cloud, characterized by, The apparatus comprises: an obtaining module configured to obtain a frame of point cloud; a generating module configured to generate a depth map according to the point cloud, each element in the depth map comprising three-dimensional coordinate information of a point, a row identifier, a column identifier and depth information, the row identifier = (fov / 2-arctan(z,sqrt(x*x+y*y))) / fov*H, and the column identifier = 0.5*W*(1-arctan(y,x)), wherein (x, y, z) represents three-dimensional coordinate information of a point, fov represents a vertical field of view angle, and H and W represent a height and a width of an image matrix converted from the point cloud; The dividing module is configured to divide each row of elements in the depth map into at least one first cluster by traversing left and right adjacent elements in each row of elements in the depth map, and each first cluster contains at least two continuous adjacent elements; The merging module is configured to merge a plurality of first clusters into at least one second cluster by traversing up and down adjacent elements in any two adjacent rows of elements in the depth map; The extracting module is configured to extract the columnar object according to the second cluster; The dividing module is further configured to: obtain two left and right adjacent elements in each row of elements in the depth map; calculate whether the two elements satisfy a clustering condition according to the three-dimensional coordinates and the depth information; if it is determined that the two elements satisfy the clustering condition, merge the two elements into one first cluster; and if it is determined that the two elements do not satisfy the clustering condition, continue to traverse the next set of two left and right adjacent elements. The merging module is further configured to: obtain two up and down adjacent elements in any two first clusters; calculate whether the two elements satisfy a clustering condition according to the three-dimensional coordinates and the depth information; if it is determined that the two elements satisfy the clustering condition, merge the two first clusters into one second cluster; and if it is determined that the two elements do not satisfy the clustering condition, continue to traverse the next set of two up and down adjacent elements.

10. A computer-readable storage medium, characterized in that, The storage medium has at least one instruction stored therein, and the at least one instruction is loaded and executed by the processor to implement the columnar object extraction method in the point cloud according to any one of claims 1 to 8.

11. A computer device, comprising: The computer device includes a processor and a memory, and the memory has at least one instruction stored therein, and the instruction is loaded and executed by the processor to implement the columnar object extraction method in the point cloud according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Depth image segmentation method and system

    CN114170247A