Plant Point Cloud Extraction Method and Device Based on Octree and Connectivity Analysis

Through the Octet and Connectivity Analysis method, the problem of ground point interference and high computational complexity in point cloud data processing is solved, efficient and accurate plant point cloud extraction is achieved, and the effect of extracting plant phenotypic information is improved.

CN120070475BActive Publication Date: 2025-07-22HUINUO RUIDE (BEIJING) TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510537929.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-04-27
Publication Date
2025-07-22
Estimated Expiration
2045-04-27

AI Technical Summary

Technical Problem

The existing point cloud data processing technology faces problems such as ground point interference, dense outliers and high computational complexity in plant phenotype research, resulting in limited accuracy and efficiency of plant phenotype information extraction.

Method used

Using the method based on octree and connectivity analysis, filtering processing, hierarchical segmentation, connectivity analysis and target height determination, ground point cloud interference was removed, and the connected leaf node group with the largest connected component was extracted as the plant point cloud extraction result.

Benefits of technology

It improves the accuracy of plant point cloud extraction, reduces noise interference, enhances computing efficiency, and ensures the accuracy and completeness of plant phenotype information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120070475B_ABST
    Figure CN120070475B_ABST
Patent Text Reader

Abstract

The present application provides a method and device for extracting plant point clouds based on octree and connectivity analysis. It can filter the point cloud data of plants to avoid the interference of some noises, and also uses the octree data structure for hierarchical segmentation to obtain the point cloud spatial structure information. Based on this point cloud spatial structure information, the target height at which the plant is separated from the ground can be accurately determined, and then the ground point cloud can be removed according to this target height, so as to exclude the interference of the ground point cloud. Then, connectivity analysis is performed on the remaining leaf nodes in the plant point cloud spatial structure information, and then each connected group of connected leaf nodes is found. In this way, the point cloud corresponding to the connected leaf node group with the largest connected component can be selected as the plant point cloud extraction result, and other outlier point clouds can be removed to improve the accuracy of plant point cloud extraction.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of data analysis, and particularly to a method and device for extracting plant point clouds based on octree and connectivity analysis. Background Art

[0002] Point cloud technology is increasingly widely used in plant phenotype research. High-precision measurement and analysis of the point cloud characteristics of each plant have important scientific value and practical significance.

[0003] Existing point cloud data processing technologies face problems such as ground point interference, the existence of dense outliers, and high computational complexity in the external environment, resulting in limited accuracy and efficiency in extracting plant phenotype information. Summary of the Invention

[0004] In view of this, the purpose of the present application is to propose a method and device for extracting plant point clouds based on octree and connectivity analysis to solve or partially solve the above technical problems.

[0005] Based on the above purpose, the present application provides a method for extracting plant point clouds based on octree and connectivity analysis, including:

[0006] Determine the point cloud data of the plant, perform filtering processing on the point cloud data to obtain filtered point cloud data;

[0007] Use the octree data structure to hierarchically segment the filtered point cloud data to obtain point cloud spatial structure information;

[0008] Obtain the leaf nodes at multiple heights in the point cloud spatial structure information, and determine the target height at which the plant is separated from the ground from the multiple heights;

[0009] Determine the ground point cloud according to the target height, and remove the ground point cloud from the point cloud spatial structure information to obtain plant point cloud spatial structure information;

[0010] Perform connectivity analysis on the leaf nodes in the plant point cloud spatial structure information to obtain multiple connected leaf node groups, determine the connected components of each connected leaf node group, and extract the connected leaf node group with the largest connected component as the plant point cloud extraction result.

[0011] Based on the same inventive concept, the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable by the processor. The processor implements the above method when executing the computer program.

[0012] As can be seen from the above, the method and device for plant point cloud extraction based on octree and connectivity analysis provided by the present application can filter the point cloud data of plants, avoid the interference of some noises, and hierarchically segment using the octree data structure to obtain the point cloud spatial structure information. Based on this point cloud spatial structure information, the target height at which the plant is separated from the ground can be accurately determined, and then the ground point cloud can be removed according to this target height, thus excluding the interference of the ground point cloud. Then, connectivity analysis is performed on the remaining leaf nodes in the plant point cloud spatial structure information, and then each connected group of connected leaf nodes is found. In this way, the point cloud corresponding to the connected leaf node group with the largest connected component can be selected as the plant point cloud extraction result, and other outlier point clouds can be removed, improving the accuracy of plant point cloud extraction. Description of the Drawings

[0013] In order to more clearly illustrate the technical solutions in the present application or related technologies, the following will briefly introduce the drawings required for use in the embodiments or related technology descriptions. Obviously, the drawings in the following description are only embodiments of the present application. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.

[0014] Figure 1 It is a flowchart of the method for plant point cloud extraction based on octree and connectivity analysis according to an embodiment of the present application;

[0015] Figure 2 It is a side view schematic diagram of the point cloud structure information of the first layer according to an embodiment of the present application;

[0016] Figure 3 It is a top view schematic diagram of the point cloud structure information of the first layer according to an embodiment of the present application;

[0017] Figure 4 It is a top view schematic diagram of the leaf nodes from the first layer to the 6th layer according to an embodiment of the present application;

[0018] Figure 5 It is a schematic diagram of the adjacent undirected graph according to an embodiment of the present application;

[0019] Figure 6 It is a schematic diagram of the process of removing the ground point cloud according to an embodiment of the present application;

[0020] Figure 7 It is a schematic diagram of the process of connectivity analysis and plant point cloud extraction according to an embodiment of the present application;

[0021] Figure 8 It is a structural block diagram of the device for plant point cloud extraction based on octree and connectivity analysis according to an embodiment of the present application;

[0022] Figure 9 Schematic diagram of the structure of the electronic device according to an embodiment of the present application. Detailed implementation manners

[0023] To make the objectives, technical solutions, and advantages of the present application more clear and understandable, the following further describes the present application in detail with reference to specific embodiments and the accompanying drawings.

[0024] It should be noted that, unless otherwise defined, the technical terms or scientific terms used in the embodiments of the present application should have the ordinary meanings understood by those of ordinary skill in the art to which the present application pertains. The terms "first", "second", and similar terms used in the embodiments of the present application do not denote any order, quantity, or importance, but are only used to distinguish different components. The terms such as "include" or "comprise" mean that the elements or objects appearing before this term cover the elements or objects listed after this term and their equivalents, without excluding other elements or objects. The terms such as "connect" or "couple" are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The terms such as "upper", "lower", "left", "right", etc. are only used to represent relative positional relationships, and when the absolute position of the object being described changes, the relative positional relationship may also change accordingly.

[0025] Glossary of terms:

[0026] SOR: Statistical Outlier Removal, statistical filtering.

[0027] ROR: Radius Outlier Removal, radius filtering.

[0028] DFS: Depth-First-Search, depth-first search.

[0029] Octree: Octree, a tree-like data structure used to describe three-dimensional space.

[0030] Based on the description of the background technology, point cloud technology is increasingly applied in agricultural scientific research. In the field environment, it faces problems such as ground point interference, the existence of dense outliers, and high computational complexity, resulting in limited accuracy and efficiency of plant phenotype information extraction. Traditional methods such as statistical filtering (SOR) and radius filtering (ROR) are difficult to effectively remove, and excessive filtering may lose key phenotype information.

[0031] The following further describes the embodiments of the present application in detail with reference to the accompanying drawings.

[0032] The plant point cloud extraction method based on octree and connectivity analysis proposed in the embodiments of the present application, as Figure 1 shown, includes:

[0033] Step 101: Determine the point cloud data of the plant, and perform filtering processing on the point cloud data to obtain filtered point cloud data.

[0034] In specific implementation, the plant point cloud data refers to the point cloud data of a single plant collected in a field environment (for example, the point cloud data of a rice plant). Since there is usually noise in the point cloud data, which may affect subsequent processing, the point cloud data will be subjected to filtering processing (for example, statistical filtering processing) to obtain filtered point cloud data. The filtered point cloud data obtained in this way has less noise and reduces the workload of subsequent processing.

[0035] Step 102: Use the octree data structure to hierarchically segment the filtered point cloud data to obtain point cloud spatial structure information.

[0036] In specific implementation, using the octree data structure to hierarchically segment the filtered point cloud data can obtain point cloud spatial structure information including the distribution of leaf nodes at each height layer.

[0037] Step 103: Obtain the leaf nodes at multiple heights in the point cloud spatial structure information, and determine the target height at which the plant is separated from the ground from the multiple heights.

[0038] Step 104: Determine the ground point cloud according to the target height, and remove the ground point cloud from the point cloud spatial structure information (as Figure 6 shown), to obtain the plant point cloud spatial structure information.

[0039] In specific implementation, the target height can be used as the segmentation height to remove the point cloud data belonging to the ground below the target height, effectively avoiding the influence of the ground on subsequent analysis.

[0040] Step 105: Perform connectivity analysis on the leaf nodes in the plant point cloud spatial structure information to obtain multiple connected leaf node groups, and determine the connected components of each connected leaf node group.

[0041] In specific implementation, since the point clouds of each plant are definitely connected, performing connectivity analysis on the leaf nodes in the plant point cloud spatial structure information can separate multiple connected leaf node groups that are connected.

[0042] Step 106: Extract the point cloud corresponding to the connected leaf node group with the largest connected component as the plant point cloud extraction result (as Figure 7 shown).

[0043] In specific implementation, since the point cloud of the plant to be extracted must be the plant with the largest distribution range, and a larger distribution range corresponds to a larger connected component, the point cloud corresponding to the connected leaf node group with the largest connected component can be extracted, so that the connected leaf node groups of other small plants can be removed, and then an accurate plant point cloud extraction result can be obtained.

[0044] Through the above solution, the point cloud data of the plant can be filtered to avoid the interference of some noises, and the octree data structure is also used for hierarchical segmentation to obtain the point cloud space structure information. Based on this point cloud space structure information, the target height at which the plant is separated from the ground can be accurately determined, and then the ground point cloud can be removed according to this target height, so that the interference of the ground point cloud can be excluded; then, the connectivity analysis is performed on the remaining leaf nodes in the plant point cloud space structure, and then each connected leaf node group is found out, so that the point cloud corresponding to the connected leaf node group with the largest connected component can be selected as the plant point cloud extraction result, and then other outlier point clouds can be removed to improve the accuracy of plant point cloud extraction.

[0045] In some embodiments, step 102 includes:

[0046] Step 1021, determining the nodes of the current layer according to the filtered point cloud data, and determining 8 leaf nodes of the nodes of the current layer.

[0047] Step 1022, performing point cloud allocation on each point cloud of the filtered point cloud data and allocating it to the corresponding leaf nodes of the nodes of the current layer. After determining that all the point clouds of the filtered point cloud data are allocated to each leaf node of the nodes of the current layer, the point cloud structure information of the current layer is obtained.

[0048] Step 1023, iterative process: for each leaf node of the nodes of the current layer, reusing this leaf node as the next layer node, and re-determining 8 leaf nodes of this next layer node, and according to the process of point cloud allocation (that is, repeating the process of step 1022), reallocating the point clouds belonging to this leaf node to obtain the point cloud structure information of the next layer.

[0049] In some embodiments, the determination process of the 8 leaf nodes of the nodes of each layer includes:

[0050] Step A1, determining the node center and node side length of the node, where the node includes: the node of the current layer and / or the node of the next layer.

[0051] In specific implementation, a three-dimensional coordinate system (including the x-axis and y-axis in the horizontal direction and the z-axis in the longitudinal direction) is established according to the point cloud data.

[0052] Take the nodes of the first layer as the root nodes (representing the cubic bounding box of the entire point cloud).

[0053] First, find the point cloud within the root node of the bounding box range, that is, find the coordinates of the point with the minimum value in all three dimensions in the point cloud data, , and the coordinates of the point with the maximum value in all three dimensions in the point cloud data .

[0054] , where m represents the number of the corresponding point cloud, i represents the sequence number of traversing the point cloud. represents the point cloud coordinate of traversing the x-axis, and selects the minimum value of the x-axis; represents the point cloud coordinate of traversing the y-axis, and selects the minimum value of the y-axis; represents the point cloud coordinate of traversing the z-axis, and selects the minimum value of the z-axis.

[0055] , where m represents the number of the corresponding point cloud, and i represents the sequence number of traversing the point cloud. represents the point cloud coordinate of traversing the x-axis, and selects the maximum value of the x-axis; represents the point cloud coordinate of traversing the y-axis, and selects the maximum value of the y-axis; represents the point cloud coordinate of traversing the z-axis, and selects the maximum value of the z-axis.

[0056] The node center coordinates of the root node are: .

[0057] The node side length of the root node is: .

[0058] Any node M consists of the following elements:

[0059] The coordinates of the node center are: , where represents the three-dimensional quantity , and each belongs to the real number .

[0060] The node side length: .

[0061] The set of leaf nodes: , where, represents 8 leaf nodes.

[0062] The point cloud belonging to this node: , where , represents the position coordinates corresponding to the point cloud i, Represents a three-dimensional quantity , each belonging to the real numbers .

[0063] Step A2. Determine the center point of each leaf node among the 8 leaf nodes according to the node center and the node side length, and determine the leaf node side length of each leaf node according to the node side length (as Figure 2 shown), where the leaf nodes include: the center point of the leaf node and the leaf node side length.

[0064] In specific implementation, for each leaf node j determined by the 8 leaf nodes N j (N j ∈ ), the center point of the leaf node of each leaf node j is : , where represents the offset of leaf node j. For example, the offset is any one of (1, 1, 1), (1, 1, -1), (1, -1, 1), (1, -1, -1), (-1, 1, 1), (-1, 1, -1), (-1, -1, 1), (-1, -1, -1).

[0065] The leaf node side length , where is the leaf node side length.

[0066] As Figure 3 Showing the point cloud structure information of the first layer from the top view perspective, representing the relationship between the node center point coordinates and the center point coordinates of the leaf nodes of its leaf nodes. Represents the node center coordinates Represents the center point coordinates of the leaf node of leaf node j Represents the point cloud assigned to the leaf node.

[0067] Through the above solution, the determination process of the leaf nodes can be accurately carried out.

[0068] In some embodiments, for the leaf nodes of the nodes of any layer, the process of corresponding point cloud assignment includes:

[0069] Step B1. Determine the target leaf node that meets the requirements according to the position of each point cloud in the filtered point cloud data, where the target leaf node belongs to each leaf node of the nodes of any layer.

[0070] Step B2. Assign the point cloud to the target leaf node. After determining that all the point clouds in the filtered point cloud data have been assigned, delete the leaf nodes without point clouds to obtain the point cloud structure information of this layer.

[0071] During specific implementation, for the coordinates of a certain point cloud i , where represents the coordinate of point cloud i on the x-axis, represents the coordinate of point cloud i on the y-axis, represents the coordinate of point cloud i on the z-axis. Determine the center point of the leaf node of the target leaf node j, and determine whether the coordinates of a certain point cloud i satisfy the following conditions:

[0072] ;

[0073] If satisfied, assign point cloud i to the target leaf node j.

[0074] After all the point clouds in the filtered point cloud data are assigned, the point cloud structure information corresponding to this layer is obtained.

[0075] Through the above solution, accurate point cloud assignment can be performed for each layer of leaf nodes obtained, ensuring that the filtered point cloud data can obtain the most suitable point cloud space structure information.

[0076] Step 1024, during the iteration process, count the iteration level (for example, ), determine that the iteration level is greater than or equal to the level threshold (for example, ), stop the iteration process, and use the point cloud structure information of the final layer obtained finally as the point cloud space structure information.

[0077] During specific implementation, the number of nodes obtained corresponding to one iteration level is 1, and the number of leaf nodes is 8; the number of nodes obtained corresponding to two iteration levels is 8, and the number of leaf nodes is 8×8 = 64;...; the number of nodes obtained corresponding to n iteration levels is 8 n-1 ones, and the number of leaf nodes is 8 n ones.

[0078] Figure 4 Show the recursive process with a top view perspective with 6, and the leaf nodes not assigned with point clouds will not be shown.

[0079] For each iteration level, all the point clouds in the filtered point cloud data will be assigned to the corresponding leaf nodes, and the leaf nodes without point clouds will be deleted to avoid affecting subsequent calculations.

[0080] Through the above solution, the finally obtained point cloud space structure information will include the leaf nodes of each height layer, which is convenient for subsequent determination of the target height for ground segmentation based on the leaf nodes of each height layer.

[0081] In some embodiments, step 103 includes:

[0082] Step 1031: Project the center points of each leaf node in the point cloud spatial structure information onto a vertical plane (for example, the xz plane formed by the x-axis and the z-axis). There are corresponding projection points for each leaf node in the vertical plane.

[0083] In specific implementation, determine the set O of the center points of each leaf node in the point cloud spatial structure information. For the center point coordinates of any leaf node j Project it onto the xz plane to obtain the projection point, and combine all the projection points to obtain the initial projection point set , and the corresponding formula is as follows:

[0084] .

[0085] Step 1032: Remove the duplicate projection points in the vertical plane, and combine all the projection points in the vertical plane to obtain the projection point set.

[0086] In specific implementation, remove the duplicate projection points in the initial projection point set to obtain the projection point set The formula is: , where unique() represents the deduplication algorithm.

[0087] Step 1033: Determine the mode of the projection point set, and determine the target height according to the mode.

[0088] In specific implementation, count the set Z of the z-axis coordinates of each projection point in the projection point set , calculate the number of leaf nodes at each height level, and use the z-axis coordinate with the largest number of leaf nodes as the mode .

[0089] The z-axis coordinate corresponding to the mode can be directly used as the target height, or an offset can be added to or subtracted from it as the target height.

[0090] Through the above solution, since the target height is determined according to the mode of the projection point set, the mode of the projection point set can represent the height of the layer with the most leaf nodes, and this layer generally represents the surface layer. Therefore, the target height determined in this way has high accuracy.

[0091] In some embodiments, in step 1033, determining the target height according to the mode specifically includes:

[0092] Step 10331: Determine the height corresponding to the mode (for example, ), and obtain the side length of the leaf node of the leaf node in the point cloud spatial structure information (for example, ).

[0093] Step 10332, add the height corresponding to the mode to the edge lengths of the leaf nodes at a predetermined ratio to obtain the target height (for example, ).

[0094] In specific implementation, the predetermined ratio can also be set according to actual needs, and the predetermined ratio is less than or equal to 1, preferably 1 / 2. For example, the calculation formula for the target height is: .

[0095] Through the above solution, the height of the soil surface layer, that is, the target height, can be accurately determined.

[0096] In some embodiments, step 105 includes:

[0097] Step 1051, construct at least one adjacency undirected graph according to the adjacency relationship between each leaf node in the plant point cloud spatial structure information.

[0098] In some embodiments, step 1051 includes:

[0099] Step 10511, according to the Euclidean distance between each leaf node in the plant point cloud spatial structure information.

[0100] In specific implementation, the set of leaf node center points of each leaf node in the plant point cloud spatial structure information , where n is the number of leaf nodes in the plant point cloud spatial structure information.

[0101] Calculate the Euclidean distance between the leaf node center point of leaf node i and the leaf node center point of leaf node j. The formula is: .

[0102] Combine the Euclidean distances between each leaf node to form a matrix D, where .

[0103] Step 10512, obtain the edge lengths of the leaf nodes of the leaf nodes in the plant point cloud spatial structure information (for example, ).

[0104] Step 10513, determine that two leaf nodes with Euclidean distance less than or equal to the edge length of the leaf node are adjacent nodes.

[0105] In specific implementation, determine the adjacency relationship between leaf node i and leaf node j according to each value in matrix D :

[0106] ;

[0107] Among them, indicates adjacency. Leaf node i and leaf node j are adjacent nodes, indicates non - adjacency. Leaf node i and leaf node j are non - adjacent leaf nodes.

[0108] Step 10514: Combine the leaf nodes that are adjacent to each other to form an undirected adjacency graph, and at least one undirected adjacency graph is correspondingly obtained from the plant point cloud spatial structure information.

[0109] In specific implementation, an undirected adjacency graph is constructed according to the adjacency relationship. For example, an adjacency list :

[0110] , that is, each leaf node in the undirected adjacency graph stores a list, which contains all the leaf nodes adjacent to this leaf node.

[0111] For example: G = {v1:[ v2, v3]} , indicating that leaf node v1 can directly reach leaf nodes v2 and v3.

[0112] For example, an example of the adjacency list G:

[0113] Leaf node 0: [2, 8, 4, 1, 7];

[0114] Leaf node 1: [0, 4, 5];

[0115] Leaf node 2: [0, 8, 7, 6];

[0116] Leaf node 3: [8, 6, 4];

[0117] Leaf node 4: [0, 9, 3, 1];

[0118] Leaf node 5: [1];

[0119] Leaf node 6: [3, 8, 9, 2];

[0120] Leaf node 7: [2, 0];

[0121] Leaf node 8: [0, 2, 3, 6, 9];

[0122] Leaf node 9: [4, 6, 8].

[0123] The undirected adjacency graph constructed according to the above - mentioned adjacency list is as Figure 5 shown.

[0124] Step 1052: For each adjacent undirected graph, combine each leaf node in the adjacent undirected graph to obtain a connected leaf node group corresponding to the adjacent undirected graph.

[0125] In some embodiments, Step 1052 is executed for each adjacent undirected graph:

[0126] Step 10521: Construct an empty connected set (e.g., CC), and traverse the unvisited leaf nodes in the adjacent undirected graph.

[0127] Step 10522: Determine the leaf nodes connected to the unvisited leaf nodes, add the unvisited leaf nodes and the connected leaf nodes to the connected set. When it is determined that all leaf nodes in the adjacent undirected graph have been visited, use the final connected set as a connected leaf node group corresponding to the adjacent undirected graph.

[0128] Specifically, after constructing the empty connected set CC, traverse the unvisited leaf node o in the adjacent undirected graph, execute the depth-first search (DFS) algorithm, and according to the adjacency list G, find all reachable leaf nodes and mark them to prevent repeated access, and then form a new connected component , satisfying

[0129] ,

[0130] and .

[0131] Iteration: Continue to find the next unvisited leaf node until all leaf nodes in the adjacent undirected graph are traversed to obtain a connected leaf node group corresponding to the adjacent undirected graph.

[0132] Step 1053: Count the connected components of each connected leaf node group.

[0133] Specifically, the corresponding connected component represents the number of leaf nodes in the connected leaf node group.

[0134] Through the above solution, the connected range of the corresponding leaf nodes can be determined by the connected component. The larger the connected component, the larger the connected range. Therefore, the connected leaf node group with the largest connected component belongs to the plant, and the other connected leaf node groups belong to the weeds around the plant. In this way, these discrete leaf nodes can be directly removed according to the connected component, and the most suitable connected leaf node group can be obtained, and then the corresponding point cloud can be used as the plant point cloud extraction result.

[0135] It should be noted that the method of the embodiment of the present application can be executed by a single device, such as a computer or a server. The method of this embodiment can also be applied to a distributed scenario and completed by multiple devices cooperating with each other. In this case of a distributed scenario, one of the multiple devices can only execute one or more steps in the method of the embodiment of the present application, and these multiple devices will interact with each other to complete the described method.

[0136] It should be noted that some embodiments of the present application have been described above. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the above embodiments and still achieve the desired result. Additionally, the processes depicted in the drawings do not necessarily require the specific order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0137] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application further provides a plant point cloud extraction device based on octree and connectivity analysis.

[0138] Reference Figure 8 , the device includes:

[0139] A filtering processing module 201, configured to determine the point cloud data of a plant, perform filtering processing on the point cloud data, and obtain filtered point cloud data;

[0140] An octree processing module 202, configured to hierarchically segment the filtered point cloud data by using an octree data structure to obtain point cloud spatial structure information;

[0141] A height determination module 203, configured to obtain leaf nodes at multiple heights in the point cloud spatial structure information, and determine a target height at which the plant is separated from the ground from the multiple heights;

[0142] A ground point cloud removal module 204, configured to determine the ground point cloud according to the target height, and remove the ground point cloud from the point cloud spatial structure information to obtain plant point cloud spatial structure information;

[0143] A connectivity analysis module 205, configured to perform connectivity analysis on the leaf nodes in the plant point cloud spatial structure information to obtain multiple connected leaf node groups, and determine the connected components of each connected leaf node group;

[0144] A plant point cloud extraction module 206, configured to extract the point cloud corresponding to the connected leaf node group with the largest connected component as the plant point cloud extraction result.

[0145] In some embodiments, the octree processing module 202 includes:

[0146] A node determination unit configured to determine nodes of the current layer based on the filtered point cloud data and determine eight leaf nodes of the nodes of the current layer;

[0147] A point cloud allocation unit configured to perform point cloud allocation on each point cloud of the filtered point cloud data and allocate it to the corresponding leaf nodes of the nodes of the current layer. After determining that all point clouds of the filtered point cloud data are allocated to each leaf node of the nodes of the current layer, the point cloud structure information of the current layer is obtained;

[0148] An iterative processing unit configured to perform an iterative process: for each leaf node of the nodes of the current layer, re-use this leaf node as the node of the next layer, and re-determine eight leaf nodes of this next layer node, and re-allocate the point clouds belonging to this leaf node according to the process of point cloud allocation to obtain the point cloud structure information of the next layer;

[0149] A point cloud space structure processing unit configured to count the iteration levels during the iterative process, determine that the iteration level is greater than or equal to the level threshold, stop the iterative process, and use the point cloud structure information of the final layer finally obtained as the point cloud space structure information.

[0150] In some embodiments, the node determination unit is specifically configured to:

[0151] Determine the node center and node side length of the node, where the node includes: the node of the current layer and / or the node of the next layer;

[0152] Determine the leaf node center point of each leaf node among the eight leaf nodes according to the node center and node side length, and determine the leaf node side length of each leaf node according to the node side length, where the leaf node includes: the leaf node center point and the leaf node side length.

[0153] In some embodiments, the point cloud allocation unit is specifically configured to:

[0154] Determine a target leaf node that meets the requirements according to the position of each point cloud in the filtered point cloud data, where the target leaf node belongs to each leaf node of the nodes of any layer;

[0155] Allocate this point cloud to the target leaf node. After determining that all point clouds in the filtered point cloud data are allocated, delete the leaf nodes without point clouds to obtain the point cloud structure information of this layer.

[0156] In some embodiments, the height determination module 203 is specifically configured to:

[0157] Project the center points of the leaf nodes in the point cloud spatial structure information onto a vertical plane, and there are corresponding projection points for each leaf node in the vertical plane.

[0158] Remove the duplicate projection points in the vertical plane, and combine all the projection points in the vertical plane to obtain a set of projection points.

[0159] Determine the mode of the set of projection points, and determine the target height according to the mode.

[0160] In some embodiments, the height determination module 203 is further specifically configured to:

[0161] Determine the height corresponding to the mode, and obtain the side length of the leaf node in the point cloud spatial structure information of the plant.

[0162] Add the height corresponding to the mode to the side length of the leaf node at a predetermined ratio to obtain the target height.

[0163] In some embodiments, the connectivity analysis module 205 includes:

[0164] An adjacency relationship determination unit, configured to construct at least one undirected adjacency graph according to the adjacency relationship between the leaf nodes in the plant point cloud spatial structure information;

[0165] A connectivity processing unit, configured to combine the leaf nodes in each undirected adjacency graph to obtain a connected leaf node group corresponding to the undirected adjacency graph;

[0166] A connected component statistics unit, configured to count the connected components of each connected leaf node group.

[0167] In some embodiments, the adjacency relationship determination unit is specifically configured to:

[0168] According to the Euclidean distance between the leaf nodes in the plant point cloud spatial structure information;

[0169] Obtain the side length of the leaf node in the plant point cloud spatial structure information;

[0170] Determine that two leaf nodes with an Euclidean distance less than or equal to the side length of the leaf node are adjacent nodes;

[0171] Combine the leaf nodes that are adjacent nodes to form an undirected adjacency graph, and the plant point cloud spatial structure information correspondingly obtains at least one undirected adjacency graph.

[0172] In some embodiments, the connectivity processing unit performs, for each undirected adjacency graph:

[0173] Construct an empty connected set and traverse the unvisited leaf nodes in the undirected adjacency graph;

[0174] Determine the leaf nodes connected to the unvisited leaf nodes, add the unvisited leaf nodes and the connected leaf nodes to the connected set, and determine that all the leaf nodes in the undirected adjacency graph have been visited. Take the final connected set as a connected leaf node group corresponding to the undirected adjacency graph.

[0175] For the convenience of description, when describing the above device, it is divided into various modules according to functions and described separately. Of course, when implementing the present application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0176] The device in the above embodiment is used to implement the corresponding method in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0177] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, it implements the method in any of the above embodiments.

[0178] Figure 9 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.

[0179] The processor 1010 can be implemented in a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0180] The memory 1020 can be implemented in the form of ROM (Read Only Memory), RAM (Random Access Memory), static storage devices, dynamic storage devices, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and called and executed by the processor 1010.

[0181] The input / output interface 1030 is used to connect to the input / output module to achieve information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0182] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to achieve communication interaction between this device and other devices. Among them, the communication module can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.).

[0183] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0184] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary for implementing the solutions of the embodiments of this specification and does not necessarily include all the components shown in the figure.

[0185] The electronic device in the above embodiment is used to implement the corresponding method in any of the foregoing embodiments and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0186] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute the method described in any of the foregoing embodiments.

[0187] The computer-readable medium of this embodiment includes permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information that can be accessed by a computing device.

[0188] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute the method described in any of the above embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0189] Based on the same concept, corresponding to the method of any of the above embodiments, the present application also provides a computer program product, including computer program instructions. When the computer program instructions run on a computer, the computer is caused to execute the method described in any of the above embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0190] It can be understood that before using the technical solutions of the various embodiments of the present application, the types, usage scopes, usage scenarios, etc. of the personal information involved will be informed to the user in an appropriate manner, and the user's authorization will be obtained.

[0191] For example, in response to receiving an active request from the user, a prompt message is sent to the user to clearly prompt the user that the operation requested by the user will require obtaining and using the user's personal information. Thus, the user can autonomously choose whether to provide personal information to software or hardware such as an electronic device, application program, server, or storage medium that performs the operations of the technical solutions of the present application according to the prompt message.

[0192] As an optional but non-limiting implementation, in response to receiving an active request from a user, the way of sending a prompt message to the user can be, for example, in the form of a pop-up window, and the prompt message can be presented in text in the pop-up window. In addition, the pop-up window can also carry selection controls for the user to choose to "agree" or "disagree" to provide personal information to the electronic device.

[0193] It can be understood that the above notification and user authorization acquisition process is only illustrative and does not limit the implementation manner of the present application. Other ways that meet relevant laws and regulations can also be applied to the implementation manner of the present application.

[0194] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the idea of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, and they are not provided in detail for the sake of brevity.

[0195] In addition, for simplicity of explanation and discussion, and in order not to make the embodiments of the present application difficult to understand, the well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. In addition, the device can be shown in the form of a block diagram to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that the details of the implementation manner of these block diagram devices highly depend on the platform on which the embodiments of the present application are to be implemented (that is, these details should be completely within the understanding of those skilled in the art). In the case where specific details (such as circuits) are set forth to describe the exemplary embodiments of the present application, it is obvious to those skilled in the art that the embodiments of the present application can be implemented without these specific details or with variations of these specific details. Therefore, these descriptions should be considered illustrative rather than restrictive.

[0196] Although the present application has been described in conjunction with specific embodiments of the present application, many substitutions, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art based on the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) can be used with the embodiments discussed.

[0197] The embodiments of the present application are intended to cover all such substitutions, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the embodiments of the present application shall be included within the protection scope of the present application.

Claims

1. A method for extracting plant point cloud based on octree and connectivity analysis, characterized in that, Including: Determine the point cloud data of the plant, perform filtering processing on the point cloud data to obtain filtered point cloud data; Use an octree data structure to hierarchically segment the filtered point cloud data to obtain point cloud spatial structure information; Obtain the leaf nodes at multiple heights in the point cloud spatial structure information, and determine the target height at which the plant is separated from the ground from the multiple heights; Determine the ground point cloud according to the target height, and remove the ground point cloud from the point cloud spatial structure information to obtain plant point cloud spatial structure information; Perform connectivity analysis on the leaf nodes in the plant point cloud spatial structure information to obtain multiple connected leaf node groups, and determine the connected components of each connected leaf node group; Extract the point cloud corresponding to the connected leaf node group with the largest connected component as the plant point cloud extraction result; The obtaining the leaf nodes at multiple heights in the point cloud spatial structure information and determining the target height at which the plant is separated from the ground from the multiple heights includes: Project the center points of the leaf nodes of each leaf node in the point cloud spatial structure information onto a vertical plane, and there are corresponding projection points for each leaf node in the vertical plane; Remove the repeated projection points in the vertical plane, and combine all the projection points in the vertical plane to obtain a projection point set; Determine the mode of the projection point set; Determine the height corresponding to the mode, and obtain the side length of the leaf node of the leaf node in the point cloud spatial structure information; Add the height corresponding to the mode to the side length of the leaf node at a predetermined ratio to obtain the target height; The performing connectivity analysis on the leaf nodes in the plant point cloud spatial structure information to obtain multiple connected leaf node groups and determining the connected components of each connected leaf node group includes: Construct at least one adjacent undirected graph according to the adjacency relationship between the leaf nodes in the plant point cloud spatial structure information; For each adjacent undirected graph, combine the leaf nodes in the adjacent undirected graph to obtain a connected leaf node group corresponding to the adjacent undirected graph; Count the connected components of each connected leaf node group.

2. The method according to claim 1, characterized in that, The using an octree data structure to hierarchically segment the filtered point cloud data to obtain point cloud spatial structure information includes: Determine the nodes of the current layer according to the filtered point cloud data, and determine the 8 leaf nodes of the nodes of the current layer; Perform point cloud allocation on each point cloud of the filtered point cloud data and allocate it to the corresponding leaf nodes of the nodes of the current layer. After determining that all the point clouds of the filtered point cloud data are allocated to the respective leaf nodes of the nodes of the current layer, obtain the point cloud structure information of the current layer; Iterative process: For each leaf node of the nodes of the current layer, re-use this leaf node as the node of the next layer, and re-determine the 8 leaf nodes of the next layer, and re-allocate the point clouds belonging to this leaf node according to the process of point cloud allocation to obtain the point cloud structure information of the next layer; During the iterative process, count the iterative levels, determine that the iterative level is greater than or equal to the level threshold, stop the iterative process, and use the point cloud structure information of the final layer finally obtained as the point cloud spatial structure information.

3. The method according to claim 2, characterized in that The determination process of the 8 leaf nodes of the nodes in each layer includes: Determine the node center and node side length of the node, where the node includes: the node of the current layer and / or the node of the next layer; Determine the leaf node center point of each leaf node among the 8 leaf nodes according to the node center and node side length, and determine the leaf node side length of each leaf node according to the node side length, where the leaf node includes: the leaf node center point and the leaf node side length.

4. The method according to claim 2, wherein For the leaf nodes of the nodes in any layer, the process of point cloud allocation corresponding includes: Determine the target leaf node that meets the requirements according to the position of each point cloud in the filtered point cloud data, where the target leaf node belongs to each leaf node of the nodes in any layer; Allocate the point cloud to the target leaf node. After determining that all the point clouds in the filtered point cloud data have been allocated, delete the leaf nodes without point clouds to obtain the point cloud structure information of this layer.

5. The method according to claim 1, wherein The construction of at least one adjacent undirected graph according to the adjacency relationship between the leaf nodes in the plant point cloud spatial structure information includes: According to the Euclidean distance between the leaf nodes in the plant point cloud spatial structure information; Obtain the leaf node side length of the leaf nodes in the plant point cloud spatial structure information; Determine that two leaf nodes with an Euclidean distance less than or equal to the leaf node side length of the leaf node are adjacent nodes; Combine the leaf nodes that are adjacent nodes to form an adjacent undirected graph, and the plant point cloud spatial structure information correspondingly obtains at least one adjacent undirected graph.

6. The method according to claim 1, wherein For each adjacent undirected graph, combining the leaf nodes in the adjacent undirected graph to obtain a connected leaf node group corresponding to the adjacent undirected graph includes: Execute for each adjacent undirected graph: Construct an empty connected set, and traverse the unvisited leaf nodes in the adjacent undirected graph; Determine the leaf nodes connected to the unvisited leaf nodes, and add the unvisited leaf nodes and the connected leaf nodes to the connected set. After determining that all the leaf nodes in the adjacent undirected graph have been visited, use the final connected set as a connected leaf node group corresponding to the adjacent undirected graph.

7. An electronic device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that When the processor executes the computer program, it implements the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Single vegetation three-dimensional modeling method based on ground LiDAR point cloud data

    CN105574929A