A point cloud classification method, device, equipment and storage medium
By using historical point cloud data to divide the grid in three-dimensional point cloud classification and determining the current point cloud type, the problems of large classification errors and high computing resource consumption in the existing methods are solved, and efficient and accurate point cloud classification is achieved.
Patent Information
- Application Number
- CN202111366930.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-18
- Publication Date
- 2025-07-11
- Estimated Expiration
- 2041-11-18
AI Technical Summary
The existing three-dimensional point cloud classification methods have oversegment or undersegment, resulting in large classification errors, high computing resource consumption, slow computing speed, and inability to meet actual needs.
By obtaining historical point cloud data and current point cloud data, the cuboid space is divided into multiple primary space meshes, the current point cloud type is determined based on the historical point cloud type and number of primary space meshes, and the grid is divided in combination with historical point cloud data to improve anti-interference and classification accuracy.
It improves the anti-interference and classification accuracy of point cloud classification, reduces the computational complexity and operation volume, and improves the classification speed.
Smart Images

Figure CN114119868B_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the technical field of three-dimensional point cloud processing, and in particular, to a point cloud classification method, device, equipment, and storage medium. Background Art
[0002] A three-dimensional point cloud is a multi-dimensional complex data set collected by three-dimensional scanning devices such as lidar and composed of three-dimensional position information, RGB color information, intensity information, etc. of spatial points. Object detection and recognition based on three-dimensional point cloud data are the main technologies for solving scene understanding, and three-dimensional point cloud classification is the basis of these technologies.
[0003] Currently, three-dimensional point cloud classification methods are divided into two categories. One is the machine learning method based on features, which extracts global features of the point cloud and classifies them through a machine learning model. Due to over-segmentation or under-segmentation in the process of machine learning feature extraction, fine classification of the point cloud cannot be performed; when there is a classification error at the object edge, the classification error will have a great impact on the model parameters. At the same time, this method has a long classification time and occupies a lot of memory. The second is the deep learning method, which converts the point cloud data into a voxel representation, and then extracts features through a deep learning model and completes tasks such as classification and segmentation. However, this method consumes a large amount of memory resources of the computer and has a very slow calculation speed, resulting in it being unusable in actual situations. Summary of the Invention
[0004] Embodiments of the present invention provide a point cloud classification method, device, equipment, and storage medium to be able to combine historical point cloud data, perform grid division on the current point cloud data, and determine the point cloud types of each spatial grid, improving the anti-interference ability, classification accuracy, and classification speed of point cloud classification.
[0005] In a first aspect, embodiments of the present invention provide a point cloud classification method, including:
[0006] Obtain point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; the historical point cloud data is the point cloud data that has been classified;
[0007] Determine a cuboid space containing the point cloud data, and divide the cuboid space into multiple primary spatial grids;
[0008] For the primary spatial grid containing the current point cloud data, determine the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type; the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary spatial grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary spatial grid.
[0009] Second aspect, an embodiment of the present invention further provides a point cloud classification device, which includes:
[0010] An acquisition module, configured to acquire point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; the historical point cloud data is classified point cloud data;
[0011] A division module, configured to determine a cuboid space containing the point cloud data, and divide the cuboid space into a plurality of primary space grids;
[0012] A first determination module, configured to, for a primary space grid containing current point cloud data, determine the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type; the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary space grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary space grid.
[0013] Third aspect, an embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, where when the processor executes the program, it implements the point cloud classification method as described in any one of the embodiments of the present invention.
[0014] Fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium, on which a computer program is stored, and when the program is executed by a processor, it implements the point cloud classification method as described in any one of the embodiments of the present invention.
[0015] By acquiring point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; determining a cuboid space containing the point cloud data, and dividing the cuboid space into a plurality of primary space grids; for a primary space grid containing current point cloud data, determining the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type, the embodiments of the present invention can combine historical point cloud data, perform grid division on current point cloud data, and determine the point cloud type of each space grid, improving the anti-interference ability, classification accuracy, and classification speed of point cloud classification. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following will briefly introduce the drawings required for the embodiments. It should be understood that the following drawings only show some embodiments of the present invention, and therefore should not be regarded as limiting the scope. For those of ordinary skill in the art, other related drawings can be obtained based on these drawings without creative efforts.
[0017] Figure 1It is a flowchart of a point cloud classification method in Embodiment 1 of the present invention;
[0018] Figure 2 It is a flowchart of a point cloud classification method in Embodiment 2 of the present invention;
[0019] Figure 3 It is a flowchart of a point cloud classification method applied to power line inspection in Embodiment 2 of the present invention;
[0020] Figure 4 It is a schematic structural diagram of a point cloud classification device in Embodiment 4 of the present invention;
[0021] Figure 5 It is a schematic structural diagram of a computer device in Embodiment 5 of the present invention. Detailed implementation manners
[0022] The present invention will be further described in detail below with reference to the accompanying drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the present invention, rather than limiting the present invention. In addition, it should be noted that, for the convenience of description, only parts related to the present invention rather than all structures are shown in the accompanying drawings.
[0023] It should be noted that similar reference numerals and letters denote similar items in the following drawings. Therefore, once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of the present invention, terms such as "primary", "second", etc. are only used for differential description and cannot be understood as indicating or implying relative importance.
[0024] Embodiment 1
[0025] Figure 1 It is a flowchart of a point cloud classification method provided in Embodiment 1 of the present invention. This embodiment is applicable to the situation of classifying based on point cloud data. This method can be executed by the point cloud classification device in the embodiments of the present invention. The device can be implemented in software and / or hardware, such as Figure 1 As shown, the method specifically includes the following steps:
[0026] S110, obtain point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data, and the historical point cloud data is the classified point cloud data;
[0027] Among them, the point cloud data is a multi-dimensional complex data set composed of data points including three-dimensional position information, RGB color information, intensity information, etc.
[0028] Specifically, the historical point cloud data is the classified point cloud data, and the historical point cloud data corresponds to a historical point cloud type; the current point cloud data is the point cloud data to be classified.
[0029] Exemplarily, the method for obtaining point cloud data may be to collect the historical point cloud data and the current point cloud data of the object to be classified at the historical moment and the current moment respectively through a three-dimensional imaging device such as a lidar at as similar angles and positions as possible.
[0030] S120. Determine a cuboid space containing the point cloud data, and divide the cuboid space into a plurality of primary space grids.
[0031] Wherein, the cuboid space is a three-dimensional area determined according to the three-dimensional position information of the point cloud data. The primary space grid is a three-dimensional area obtained by the first division of the cuboid space. For example, a cuboid space can be divided into a plurality of cube primary space grids.
[0032] Specifically, the cuboid space contains the historical point cloud data and the current point cloud data, and the primary space grids obtained by dividing the cuboid space may contain the current point cloud data and / or the historical point cloud data.
[0033] Exemplarily, the side lengths of the plurality of primary space grids obtained by evenly dividing the cuboid can be determined according to the volume size of the object to be classified, the size or aggregation density of the aggregation area of the point cloud data of the object to be classified, the quantity, type or other characteristics of the object to be classified, in combination with manual experience or test results. For example, if the object to be classified has a large volume and is relatively scattered, the side length of the primary space grid can be large; if the object to be classified has a small volume, many types, and is relatively dense, the side length of the primary space grid can be small. The embodiments of the present invention do not limit the side lengths of the primary space grids.
[0034] S130. For the primary space grid containing the current point cloud data, determine the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type.
[0035] Wherein, the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary space grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary space grid.
[0036] Specifically, among the plurality of primary space grids obtained by dividing the cuboid space, determine the primary space grids containing the current point cloud data, and sequentially traverse each primary space grid containing the current point cloud data, and determine the current point cloud type of the primary space grid according to the point cloud type corresponding to the historical point cloud data contained in the primary space grid and the quantity of the historical point cloud type. Wherein, the quantity range of the historical point cloud type contained in the primary space grid can be greater than or equal to 0 and be an integer.
[0037] In a specific example, the method for determining the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type may be as follows: If the quantity of the historical point cloud type included in the primary spatial grid is 0, then determine the current point cloud type of the primary spatial grid according to the historical point cloud type corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid; if the quantity of the historical point cloud type included in the primary spatial grid is 1, then determine the first historical point cloud type as the current point cloud type of the primary spatial grid; if the quantity of the historical point cloud type included in the primary spatial grid is greater than 1, then perform at least one grid division on the primary spatial grid to obtain a plurality of secondary spatial grids, and determine the current point cloud type of each secondary spatial grid in the primary spatial grid according to the second historical point cloud type of the secondary spatial grid and the second quantity of the second historical point cloud type.
[0038] In a specific example, the method for determining the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type may be as follows: If the quantity of the historical point cloud type included in the primary spatial grid is 0, then determine the current point cloud type of the primary spatial grid according to the historical point cloud type corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid; if the quantity of the historical point cloud type included in the primary spatial grid is 1, then determine the first historical point cloud type as the current point cloud type of the primary spatial grid; if the quantity of the historical point cloud type included in the primary spatial grid is greater than 1, then determine the point cloud type with the most point cloud data among the second historical point cloud types of the primary spatial grid as the current point cloud type of the primary spatial grid.
[0039] The point cloud classification method provided by the embodiments of the present invention divides the current point cloud data into grids by combining historical point cloud data. Since the historical point cloud data has been correctly classified, it has a strong anti-interference ability against the noise of the current data, and improves the anti-interference of point cloud classification. Determine the current point cloud type through the historical point cloud type of each primary spatial grid, thereby realizing the classification of point cloud data, making the classification algorithm simple, easy to implement, and having a relatively high classification accuracy.
[0040] The technical solution of this embodiment can, by obtaining point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; determining a cuboid space containing the point cloud data, and dividing the cuboid space into a plurality of primary spatial grids; for the primary spatial grid containing the current point cloud data, determine the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type, combine the historical point cloud data, divide the current point cloud data into grids and determine the point cloud type of each spatial grid, reduce the complexity and computation amount of the classification algorithm, and improve the anti-interference, classification accuracy and classification speed of point cloud classification.
[0041] Optionally, determining a cuboid space for accommodating point cloud data includes:
[0042] Determining the cuboid space where the point cloud data is located according to the three-dimensional spatial coordinates of the historical point cloud data and the three-dimensional spatial coordinates of the current point cloud data.
[0043] Among them, the cuboid space is used to accommodate the current point cloud data and the historical point cloud data. Therefore, the size of the cuboid space is determined according to the three-dimensional spatial coordinates of the historical point cloud data and the three-dimensional spatial coordinates of the current point cloud data, so that both the historical point cloud data and the current point cloud data can be completely accommodated in the cuboid space. The cuboid space can be divided into multiple primary space grids, or the primary space grids can be further divided into secondary space grids. Taking each space grid as an object for point cloud classification, the types of all space grids in the cuboid space can be determined. The space grids of the same type are merged to achieve the classification of the point cloud data.
[0044] Embodiment 2
[0045] Figure 2 The flowchart of a point cloud classification method in Embodiment 2 of the present invention is shown. Based on the above embodiment, this embodiment optimizes determining the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type.
[0046] As Figure 2 shown, the method of this embodiment specifically includes the following steps:
[0047] S210, obtaining point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data, and the historical point cloud data is classified point cloud data.
[0048] S220, determining a cuboid space containing the point cloud data, and dividing the cuboid space into multiple primary space grids.
[0049] S230, for the primary space grid containing the current point cloud data, obtaining the first historical point cloud type of the historical point cloud data contained in the primary space grid, and determining the first quantity of the first historical point cloud type.
[0050] Specifically, traverse the primary space grid. For each primary space grid containing the current point cloud data, obtain the first historical point cloud type of the historical point cloud data contained in the primary space grid, and determine the quantity of the first historical point cloud type contained in the primary space grid.
[0051] Exemplarily, the way to obtain the first historical point cloud type of the historical point cloud data included in the primary spatial grid can be the point cloud type determined by using traditional deep learning or machine learning and other point cloud classification methods based on the historical point cloud data.
[0052] Generally, only one point cloud type is included in the primary spatial grid inside an object contour, and there may be no point cloud type in the primary spatial grid outside the object contour; while there may be multiple point cloud types in the primary spatial grid at the edge of the object contour.
[0053] S240, if the first quantity is 0, then determine the current point cloud type of the primary spatial grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid.
[0054] Specifically, if the first quantity is 0, that is, no historical point cloud type is included in the primary spatial grid, then determine the adjacent primary spatial grids of the primary spatial grid, and determine the historical point cloud type corresponding to the historical point cloud data in the adjacent primary spatial grids as the current point cloud type of the primary spatial grid.
[0055] In a specific example, the way to determine the current point cloud type of the primary spatial grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid can be: determine the historical point cloud data closest to the central data point of the primary spatial grid in the adjacent primary spatial grids, and obtain the point cloud type corresponding to the historical point cloud data as the current point cloud type of the primary spatial grid.
[0056] In another specific example, the way to determine the current point cloud type of the primary spatial grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid can be: determine the point cloud type with the most data points in the adjacent primary spatial grids, and determine the point cloud type as the current point cloud type of the primary spatial grid.
[0057] S250, if the first quantity is 1, then determine the first historical point cloud type as the current point cloud type of the primary spatial grid.
[0058] Specifically, if the first quantity is 1, that is, the point cloud data of only one historical point cloud type is included in the primary spatial grid, then determine the first historical point cloud type included in the primary spatial grid as the current point cloud type of the primary spatial grid.
[0059] S260, if the first quantity is greater than 1, then perform at least one grid division on the primary spatial grid to obtain multiple secondary spatial grids, and determine the current point cloud types of the secondary spatial grids in the primary spatial grid according to the second historical point cloud types and the second quantities of the second historical point cloud types.
[0060] Among them, the size of the secondary space grid can be determined according to factors such as the accuracy requirements of the point cloud type and the size of the point cloud data of the object to be classified, or it can be user-defined.
[0061] Specifically, if the first quantity is 1, that is, the point cloud data of multiple historical point cloud types is included in the primary space grid. Therefore, in order to improve the accuracy of point cloud classification, it is necessary to perform multiple grid divisions on the primary space grid. According to the second historical point cloud type and the second quantity of the second historical point cloud type of the secondary space grid obtained after the division, the current point cloud type of each secondary space grid in the primary space grid is determined. Among them, the number of times of dividing the primary space grid can be determined according to the number of historical point cloud types included in the secondary space grid obtained after the division. If the quantity is less than the preset quantity, no further grid division is performed.
[0062] For each secondary space grid obtained by each division, according to the second historical point cloud type of the secondary space grid and the second quantity of the second historical point cloud type, the current point cloud type of each secondary space grid in the primary space grid is determined until the point cloud types of all space grids in the primary space grid are determined, thereby realizing point cloud classification of the point cloud data.
[0063] The technical solution of this embodiment obtains point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data, and the historical point cloud data is the classified point cloud data; determines a cuboid space containing the point cloud data, and divides the cuboid space into multiple primary space grids; obtains the first historical point cloud type of the historical point cloud data included in the primary space grid, and determines the first quantity of the first historical point cloud type; if the first quantity is 0, then according to the historical point cloud type corresponding to the historical point cloud data in the adjacent primary space grid of the primary space grid, determines the current point cloud type of the primary space grid; if the first quantity is 1, then determines the first historical point cloud type as the current point cloud type of the primary space grid; if the first quantity is greater than 1, then performs at least one grid division on the primary space grid to obtain multiple secondary space grids, and according to the second historical point cloud type and the second quantity of the second historical point cloud type of the secondary space grid, determines the current point cloud type of each secondary space grid in the primary space grid. In the process of determining the current point cloud type of the space grid, assignment operations are performed according to the historical point cloud type, further reducing the operation complexity and operation time, reducing the amount of operations, and improving the operation speed. At the same time, performing at least one grid division on the primary space grid to obtain multiple secondary space grids and determining the point cloud types of each secondary space grid in the primary space grid further improves the accuracy of point cloud classification.
[0064] For the point cloud data collected by the radar, in order to further improve the classification speed while ensuring the accuracy of point cloud classification, if the first quantity is greater than 1, perform a grid division on the primary space grid to obtain multiple secondary space grids, that is, the point cloud types determined by the secondary space grids can meet the accuracy requirements.
[0065] Therefore, preferably, perform at least one grid division on the primary space grid to obtain multiple secondary space grids, including: performing a grid division on the primary space once to obtain multiple secondary space grids.
[0066] Specifically, perform a uniform grid division on the primary space once to obtain multiple secondary space grids.
[0067] Optionally, determine the current point cloud type of each secondary space grid in the primary space grid according to the second historical point cloud type of the secondary space grid and the second quantity of the second historical point cloud type, including:
[0068] For the secondary space grid containing the current point cloud data, obtain the second historical point cloud type of the historical point cloud data contained in the secondary space grid, and determine the second quantity of the second historical point cloud type;
[0069] If the second quantity is 0, determine the current point cloud type of the secondary space grid according to the second historical point cloud type corresponding to the historical point cloud data in the adjacent secondary space grids of the secondary space grid;
[0070] If the second quantity is 1, determine the second historical point cloud type as the current point cloud type of the secondary space grid;
[0071] If the second quantity is greater than 1, determine the point cloud type with the most point cloud data among the second historical point cloud types of the secondary space grid as the target point cloud type, and determine the target point cloud type as the current point cloud type of the secondary space grid.
[0072] Specifically, if the first quantity is greater than 1, perform a grid division on the primary space once to obtain multiple secondary space grids, then step S260 is similar to the step of determining the current point cloud type of the primary space grid, and specifically includes:
[0073] Step S261: If the second quantity is 0, determine the current point cloud type of the secondary space grid according to the second historical point cloud type corresponding to the historical point cloud data in the adjacent secondary space grids of the secondary space grid.
[0074] Specifically, if the second quantity is 0, that is, the secondary space grid does not contain any type of historical point cloud, then determine the adjacent secondary space grids of the secondary space grid, and determine the current point cloud type of the secondary space grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent secondary space grids.
[0075] In a specific example, the method for determining the current point cloud type of the secondary space grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent secondary space grids of the secondary space grid may be: determine the historical point cloud data closest to the central data point of the secondary space grid in the adjacent secondary space grids, and obtain the point cloud type corresponding to the historical point cloud data as the current point cloud type of the secondary space grid.
[0076] In another specific example, the method for determining the current point cloud type of the secondary space grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent secondary space grids of the secondary space grid may be: determine the point cloud type with the most data points in the adjacent secondary space grids, and determine the point cloud type as the current point cloud type of the secondary space grid.
[0077] Step S263: If the second quantity is 1, then determine the second historical point cloud type as the current point cloud type of the secondary space grid.
[0078] Specifically, if the second quantity is 1, that is, the secondary space grid only contains point cloud data of one type of historical point cloud, then determine the first historical point cloud type contained in the secondary space grid as the current point cloud type of the secondary space grid.
[0079] Step S263: If the second quantity is greater than 1, then determine the point cloud type with the most point cloud data among the second historical point cloud types of the secondary space grid as the target point cloud type, and determine the target point cloud type as the current point cloud type of the secondary space grid.
[0080] Specifically, if the second quantity is greater than 1, that is, the secondary space grid contains point cloud data corresponding to multiple point cloud types, determine the point cloud type with the most point cloud data as the target point cloud type, and use the target point cloud type as the current point cloud type of the secondary space grid.
[0081] Optionally, based on the above embodiments, if the target quantity is 0, then determining the current point cloud type of the target-level space grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent target-level space grids of the target-level space grid includes:
[0082] Determine the target data points in the adjacent target-level space grids, where the target data points are the data points closest to the central data point of the target-level space grid in the adjacent target-level space grids;
[0083] Determine the point cloud type corresponding to the target data point as the current point cloud type of the target-level spatial grid;
[0084] Wherein, the target quantity is the first quantity or the second quantity, and the target-level spatial grid is the primary spatial grid or the secondary spatial grid.
[0085] Exemplarily, if the target quantity is the first quantity and the target-level spatial grid is the primary spatial grid, that is, the first quantity of the first historical point cloud type included in the primary spatial grid is 0, the method for determining the current point cloud type of the primary spatial grid is: determine the first target data point in the adjacent primary spatial grid, and the first target data point is the data point closest to the central data point of the primary spatial grid in the adjacent primary spatial grid; determine the point cloud type corresponding to the first target data point as the current point cloud type of the primary spatial grid.
[0086] If the target quantity is the second quantity and the target-level spatial grid is the secondary spatial grid, that is, the second quantity of the second historical point cloud type included in the secondary spatial grid is 0, the method for determining the current point cloud type of the secondary spatial grid is: determine the second target data point in the adjacent secondary spatial grid, and the second target data point is the data point closest to the central data point of the secondary spatial grid in the adjacent secondary spatial grid; determine the point cloud type corresponding to the second target data point as the current point cloud type of the secondary spatial grid.
[0087] In an ideal state, the historical point cloud data and the current point cloud data of the object to be classified basically coincide. Using the point cloud classification method provided by the embodiments of the present invention can accurately, quickly, and effectively classify the point cloud data. However, in actual situations, due to factors such as the acquisition method and the acquisition position points, there will be a certain offset between the historical point cloud data and the current point cloud data. Therefore, before determining the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type, it is necessary to preprocess the historical point cloud data or the current point cloud data to reduce the offset between the two and improve the accuracy of point cloud classification.
[0088] Optionally, before determining the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type, it further includes:
[0089] Determine at least one reference point of the object to be classified in the target area;
[0090] Determine the offset of the reference point according to the current position information of the reference point in the current point cloud data and the historical position information of the reference point in the historical point cloud data;
[0091] Based on the offset, adjust the position of the current point cloud data or the historical point cloud data to minimize the offset of the current point cloud data or the historical point cloud data.
[0092] Among them, the target area is the area with typical features in the object to be classified, which is used as the reference point for determining the offset. The selection of the target area can be determined according to the user's experience or according to the feature information extracted from the point cloud data of the object to be classified.
[0093] For some objects to be classified, the overall difference between the historical point cloud data and the current point cloud data is large, but the difference between the historical point cloud data and the current point cloud data in the local area is small or there is a small offset. Therefore, the target area can be a partial area obtained by cutting the object to be classified.
[0094] Specifically, determine the target area of the object to be classified, select at least one reference point within the target area, and this reference point is the common feature point of the historical point cloud data and the current point cloud data; determine the current position information of the reference point in the current point cloud data and the historical position information of the reference point in the historical point cloud data, and take the difference between the current position information and the historical position information as the offset of the reference point; adjust the coordinate position of the current point cloud data or the historical point cloud data to minimize the offset between the current point cloud data and the historical point cloud data, so that the current point cloud data and the historical point cloud data basically coincide.
[0095] Based on the current point cloud data and the historical point cloud data after basic coincidence, using the point cloud classification method provided by the embodiments of the present invention to classify the point cloud data can accurately, quickly and effectively classify the point cloud data.
[0096] Embodiment III
[0097] To better understand the point cloud classification method provided by the present invention, apply the above point cloud classification method to the power line inspection in the power system. In the power system, the power pole is one of the basic equipment in the overhead distribution line. Power poles are often erected in environments such as jungles. The trees growing between two power poles may touch the distribution line, causing power outages, electric leakage and other power accidents. To avoid the occurrence of such power accidents, power line inspections are generally carried out regularly, and the trees are trimmed when necessary. Therefore, the main task of power line inspection is to classify the point cloud data of the power poles collected by the radar to determine the distribution line and trees between the power poles. Figure 3 This is a flowchart of a point cloud classification method applied to power line inspection in Embodiment III of the present invention. This embodiment is based on the above embodiment and applies the point cloud classification method to the power line inspection in the power system.
[0098] The positions of the power transmission towers and distribution lines are fixed, and only the trees change slightly over time. By using the point cloud classification method provided in the embodiments of the present invention and combining historical point cloud data, the collected point cloud data can be accurately, quickly, and effectively classified to determine the power transmission towers, distribution lines, and trees therefrom.
[0099] As Figure 3 shown, the method of this embodiment specifically includes the following steps:
[0100] S301: Obtain the point cloud data of power line inspection, where the point cloud data includes: historical point cloud data and current point cloud data; the historical point cloud data is the classified point cloud data.
[0101] S302. Preprocess the collected point cloud data of power line inspection.
[0102] In power line inspection, since the radar acquisition device is usually installed on a helicopter, an aerial photography aircraft, or an unmanned aerial vehicle for point cloud data acquisition, it is inevitable that the positions of each acquisition may not be exactly the same. Therefore, there will be a certain offset between the collected historical point cloud data and current point cloud data, and it is necessary to preprocess the collected power line inspection to make the two basically coincide.
[0103] Among them, the preprocessing specifically includes:
[0104] S3021: Determine the target area of the point cloud data of power line inspection.
[0105] S3022: Determine the reference points of the power line inspection within the target area.
[0106] Among them, the reference points can be characteristic points that are common to the historical point cloud data and the current point cloud data and do not change, such as the tip of the power transmission tower or the center point of the power transmission tower.
[0107] S3023: Determine the offset of the reference point according to the current position information of the reference point in the current point cloud data and the historical position information of the reference point in the historical point cloud data.
[0108] S3024: Based on the offset, adjust the position of the current point cloud data or the historical point cloud data to minimize the offset between the current point cloud data and the historical point cloud data.
[0109] S303. Determine the cuboid space where the point cloud data is located according to the three-dimensional space coordinates of the historical point cloud data and the three-dimensional space coordinates of the current point cloud data, and divide the cuboid space into multiple primary space grids.
[0110] S304. For the primary spatial grid containing the current point cloud data, obtain the first historical point cloud type of the historical point cloud data contained in the primary spatial grid, and determine the first quantity of the first historical point cloud type.
[0111] S305. If the first quantity is 0, then determine the current point cloud type of the primary spatial grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid, and return to execute step S304 until the current point cloud types of the last primary spatial grid are determined.
[0112] Specifically, determine the target data points in the adjacent primary spatial grids, where the target data points are the data points closest to the central data point of the primary spatial grid in the adjacent primary spatial grids; determine the point cloud type corresponding to the target data points as the current point cloud type of the primary spatial grid.
[0113] S306. If the first quantity is 1, then determine the first historical point cloud type as the current point cloud type of the primary spatial grid, and return to execute step S304 until the current point cloud types of the last primary spatial grid are determined.
[0114] S307. If the first quantity is greater than 1, then perform a grid division on the primary spatial grid to obtain a plurality of secondary spatial grids, and execute step S308.
[0115] S308. According to the second historical point cloud type of the secondary spatial grid and the second quantity of the second historical point cloud type.
[0116] S309. If the second quantity is 0, then determine the current point cloud type of the secondary spatial grid according to the second historical point cloud types corresponding to the historical point cloud data in the adjacent secondary spatial grids of the secondary spatial grid, and return to execute step S308 until the point cloud types of all secondary spatial grids of the current primary spatial grid are determined, then return to execute S304 until the point cloud types of all primary spatial grids are determined, and end the operation.
[0117] S310. If the second quantity is 1, then determine the second historical point cloud type as the current point cloud type of the secondary spatial grid, and return to execute step S308 until the point cloud types of all secondary spatial grids of the current primary spatial grid are determined, then return to execute S304 until the point cloud types of all primary spatial grids are determined, and end the operation.
[0118] S311. If the second quantity is greater than 1, determine the point cloud type with the most point cloud data among the second historical point cloud types of the secondary space grid as the target point cloud type, determine the target point cloud type as the current point cloud type of the secondary space grid, and return to execute step S308 until the point cloud types of all secondary space grids of the current primary space grid are determined, then return to execute S304 until the point cloud types of all primary space grids are determined, and end the operation.
[0119] In the embodiment of the present invention, by combining historical point cloud data, grid division is performed on the current point cloud data of power line inspection, and the point cloud types of each space grid are determined. During the process of determining the current point cloud type of the space grid, assignment operations are performed according to the historical point cloud type, further reducing the computational complexity and computational time, reducing the amount of computation, and improving the computational speed. At the same time, at least one grid division is performed on the primary space grid to obtain multiple secondary space grids, and the point cloud types of each secondary space grid in the primary space grid are determined, further improving the accuracy of point cloud classification.
[0120] Embodiment 4
[0121] Figure 4 It is a schematic structural diagram of a point cloud classification device provided in Embodiment 4 of the present invention. This embodiment is applicable to the case of classifying based on point cloud data. The device can be implemented in software and / or hardware, and the device can be integrated in any device that provides the function of point cloud classification, such as Figure 4 As shown, the point cloud classification device specifically includes: an acquisition module 410, a division module 420, and a first determination module 430.
[0122] Among them, the acquisition module 410 is used to acquire point cloud data, and the point cloud data includes: historical point cloud data and current point cloud data; the historical point cloud data is the classified point cloud data.
[0123] The division module 420 is used to determine the cuboid space containing the point cloud data, and divide the cuboid space into multiple primary space grids.
[0124] The first determination module 430 is used to determine the current point cloud type of the primary space grid containing the current point cloud data according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type; the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary space grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary space grid.
[0125] Optionally, the division module 420 is specifically used for:
[0126] Determine the cuboid space where the point cloud data is located according to the three-dimensional space coordinates of the historical point cloud data and the three-dimensional space coordinates of the current point cloud data.
[0127] Optionally, the first determination module 430 includes:
[0128] An acquisition unit, configured to acquire a first historical point cloud type of the historical point cloud data included in the primary space grid, and determine a first quantity of the first historical point cloud type;
[0129] A first determination unit, configured to, if the first quantity is 0, determine the current point cloud type of the primary space grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary space grids of the primary space grid;
[0130] A second determination unit, configured to, if the first quantity is 1, determine the first historical point cloud type as the current point cloud type of the primary space grid;
[0131] A third determination unit, configured to, if the first quantity is greater than 1, perform at least one grid division on the primary space grid to obtain a plurality of secondary space grids, and determine the current point cloud types of the secondary space grids in the primary space grid according to the second historical point cloud types of the secondary space grids and a second quantity of the second historical point cloud types.
[0132] Optionally, the third determination unit includes:
[0133] A division sub-unit, configured to perform one grid division on the primary space to obtain a plurality of secondary space grids.
[0134] Optionally, the third determination unit includes:
[0135] An acquisition sub-unit, configured to, for a secondary space grid including current point cloud data, acquire a second historical point cloud type of the historical point cloud data included in the secondary space grid, and determine a second quantity of the second historical point cloud type;
[0136] A first determination sub-unit, configured to, if the second quantity is 0, determine the current point cloud type of the secondary space grid according to the second historical point cloud types corresponding to the historical point cloud data in the adjacent secondary space grids of the secondary space grid;
[0137] A second determination sub-unit, configured to, if the second quantity is 1, determine the second historical point cloud type as the current point cloud type of the secondary space grid;
[0138] A third determination subunit, configured to, if the second quantity is greater than 1, determine the point cloud type with the most point cloud data among the second historical point cloud types of the secondary spatial grid as the target point cloud type, and determine the target point cloud type as the current point cloud type of the secondary spatial grid.
[0139] Optionally, the first determination unit or the first determination subunit is specifically configured to:
[0140] Determine a target data point in the adjacent target-level spatial grid, where the target data point is the data point closest to the central data point of the target-level spatial grid in the adjacent target-level spatial grid;
[0141] Determine the point cloud type corresponding to the target data point as the current point cloud type of the target-level spatial grid;
[0142] Wherein, the target quantity is the first quantity or the second quantity, and the target-level spatial grid is the primary spatial grid or the secondary spatial grid.
[0143] Optionally, it further includes:
[0144] A second determination module, configured to determine at least one reference point of the object to be classified in the target area before determining the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type;
[0145] A third determination module, configured to determine an offset of the reference point according to the current position information of the reference point in the current point cloud data and the historical position information of the reference point in the historical point cloud data;
[0146] An adjustment module, configured to adjust the position of the current point cloud data or the historical point cloud data based on the offset to minimize the offset between the current point cloud data and the historical point cloud data.
[0147] The above product can execute the method provided in any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
[0148] Embodiment 5
[0149] Figure 5 The following is a structural block diagram of a computer device provided in Embodiment 5 of the present invention. As Figure 5 shown, the computer device includes a processor 510, a memory 520, an input device 530, and an output device 540; the number of processors 510 in the computer device can be one or more. Figure 5Take a processor 510 as an example in the following; the processor 510, memory 520, input device 530, and output device 540 in the computer device can be connected through a bus or other means. Figure 5 Take the connection through the bus as an example.
[0150] As a computer-readable storage medium, the memory 520 can be used to store software programs, computer-executable programs, and modules, such as the program instructions / modules corresponding to the point cloud classification method in the embodiments of the present invention (for example, the acquisition module 410, division module 420, and first determination module 430 in the point cloud classification device). By running the software programs, instructions, and modules stored in the memory 520, the processor 510 can execute various functional applications and data processing of the computer device, that is, implement the above-mentioned... method.
[0151] The memory 520 mainly includes a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store data created according to the use of the terminal, etc. In addition, the memory 520 can include high-speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other non-volatile solid-state storage devices. In some instances, the memory 520 can further include a memory remotely set relative to the processor 510, and these remote memories can be connected to the computer device through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and their combinations.
[0152] The input device 530 can be used to receive input digital or character information, and generate key signal inputs related to the user settings and function controls of the computer device. The output device 540 can include a display device such as a display screen.
[0153] Embodiment Six
[0154] Embodiment Six of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the program is executed by a processor, it implements the point cloud classification method provided by all the embodiments of the present application: obtaining point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; determining a cuboid space containing the point cloud data, and dividing the cuboid space into multiple primary space grids; for the primary space grid containing the current point cloud data, determining the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type; the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary space grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary space grid.
[0155] Any combination of one or more computer-readable media may be employed. The computer-readable media may be a computer-readable signal medium or a computer-readable storage medium. A computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, 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 disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the context of this document, a computer-readable storage medium may be any tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device.
[0156] A computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which the computer-readable program code is carried. Such a propagated data signal may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing. The computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium that can send, propagate, or transmit a program for use by or in connection with an instruction execution system, apparatus, or device.
[0157] The program code embodied on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0158] The computer program code for carrying out operations of the present invention may be written in one or more programming languages or combinations thereof, including object-oriented programming languages such as Java, Smalltalk, C++, as well as conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0159] Note that the above is only a preferred embodiment of the present invention and the technical principles applied. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and various obvious changes, re-adjustments and substitutions can be made by those skilled in the art without departing from the protection scope of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments. Without departing from the concept of the present invention, more other equivalent embodiments can be included, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A point cloud classification method, characterized in that, Including: Obtain point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; the historical point cloud data is classified point cloud data; Determine a cuboid space containing the point cloud data, and divide the cuboid space into multiple primary space grids; For a primary space grid containing current point cloud data, determine the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type; the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary space grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary space grid; The determining the current point cloud type of the primary space grid according to the first historical point cloud type of the primary space grid and the first quantity of the first historical point cloud type includes: Obtain the first historical point cloud type of the historical point cloud data contained in the primary space grid, and determine the first quantity of the first historical point cloud type; If the first quantity is 0, determine the current point cloud type of the primary space grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary space grids of the primary space grid; If the first quantity is 1, determine the first historical point cloud type as the current point cloud type of the primary space grid; If the first quantity is greater than 1, perform at least one grid division on the primary space grid to obtain multiple secondary space grids, and determine the current point cloud types of the secondary space grids in the primary space grid according to the second historical point cloud types of the secondary space grids and the second quantities of the second historical point cloud types.
2. The method according to claim 1, characterized in that Determining the cuboid space accommodating the point cloud data includes: Determine the cuboid space where the point cloud data is located according to the three-dimensional space coordinates of the historical point cloud data and the three-dimensional space coordinates of the current point cloud data.
3. The method according to claim 1, wherein Performing at least one grid division on the primary space grid to obtain multiple secondary space grids includes: Perform one grid division on the primary space to obtain multiple secondary space grids.
4. The method according to claim 3, characterized in that, Determining the current point cloud types of the secondary space grids in the primary space grid according to the second historical point cloud types of the secondary space grids and the second quantities of the second historical point cloud types includes: For a secondary space grid containing current point cloud data, obtain the second historical point cloud type of the historical point cloud data contained in the secondary space grid, and determine the second quantity of the second historical point cloud type; If the second quantity is 0, determine the current point cloud type of the secondary space grid according to the second historical point cloud types corresponding to the historical point cloud data in the adjacent secondary space grids of the secondary space grid; If the second quantity is 1, determine the second historical point cloud type as the current point cloud type of the secondary space grid; If the second quantity is greater than 1, determine the point cloud type with the most point cloud data among the second historical point cloud types of the secondary space grid as the target point cloud type, and determine the target point cloud type as the current point cloud type of the secondary space grid.
5. The method according to claim 4, characterized in that, If the target quantity is 0, then according to the historical point cloud types corresponding to the historical point cloud data in the adjacent target-level spatial grids of the target-level spatial grid, determine the current point cloud type of the target-level spatial grid, including: Determine the target data points in the adjacent target-level spatial grids, where the target data points are the data points closest to the central data point of the target-level spatial grid in the adjacent target-level spatial grids; Determine the point cloud type corresponding to the target data points as the current point cloud type of the target-level spatial grid; Wherein, the target quantity is the first quantity, and the corresponding target-level spatial grid is the primary spatial grid; the target quantity is the second quantity, and the corresponding target-level spatial grid is the secondary spatial grid.
6. The method according to any one of claims 1-4, characterized in that, Before determining the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type, it further includes: Determine at least one reference point of the object to be classified in the target area; Determine the offset of the reference point according to the current position information of the reference point in the current point cloud data and the historical position information of the reference point in the historical point cloud data; Based on the offset, adjust the position of the current point cloud data or the historical point cloud data to minimize the offset between the current point cloud data and the historical point cloud data.
7. A point cloud classification device, characterized in that, Including: An acquisition module, configured to acquire point cloud data, where the point cloud data includes: historical point cloud data and current point cloud data; the historical point cloud data is the classified point cloud data; A division module, configured to determine a cuboid space containing the point cloud data, and divide the cuboid space into multiple primary spatial grids; A first determination module, configured to, for the primary spatial grid containing the current point cloud data, determine the current point cloud type of the primary spatial grid according to the first historical point cloud type of the primary spatial grid and the first quantity of the first historical point cloud type; the first historical point cloud type is the point cloud type of the historical point cloud data contained in the primary spatial grid; the current point cloud type is the point cloud type of the current point cloud data contained in the primary spatial grid; The first determination module includes: An acquisition unit, configured to acquire the first historical point cloud type of the historical point cloud data contained in the primary spatial grid, and determine the first quantity of the first historical point cloud type; A first determination unit, configured to, if the first quantity is 0, determine the current point cloud type of the primary spatial grid according to the historical point cloud types corresponding to the historical point cloud data in the adjacent primary spatial grids of the primary spatial grid; A second determination unit, configured to, if the first quantity is 1, determine the first historical point cloud type as the current point cloud type of the primary spatial grid; A third determination unit, configured to, if the first quantity is greater than 1, perform at least one grid division on the primary spatial grid to obtain multiple secondary spatial grids, and determine the current point cloud types of the secondary spatial grids in the primary spatial grid according to the second historical point cloud types of the secondary spatial grids and the second quantities of the second historical point cloud types.
8. A computer device, characterized in that, Comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, wherein when the processor executes the program, the method according to any one of claims 1-6 is implemented.
9. A computer-readable storage medium, characterized in that, There is a computer program stored thereon, and when the program is executed by a processor, the method according to any one of claims 1-6 is implemented.
Citation Information
Patent Citations
Automatic point cloud classification method in transformer substation scene based on three-dimensional grid
CN112883878A
Target detection and classification method, system and device and storage medium
CN113449799A