A method for identifying the types of branches in the three-dimensional structure of fruit trees
By constructing a directed graph of the three-dimensional structure of the fruit tree and using graph theory algorithm to identify various functional branches in the fruit tree, the problem of lack of automatic identification methods in the existing technology is solved, and accurate acquisition of functional information of the fruit tree branch and trunk and quantitative description of topological relationships is realized.
Patent Information
- Application Number
- CN202510309374.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-17
- Publication Date
- 2025-06-10
- Estimated Expiration
- 2045-03-17
AI Technical Summary
The prior art lacks a method to automatically identify various functional branches in the three-dimensional structure of fruit trees, which makes it difficult to align the branch type information in the fruit tree digital model with the branch functions defined by horticultural cultivation management.
By constructing a directed graph that expresses the topological structure of branches and trunks, using graph theory algorithm and similarity calculation, various functional branches and trunks in the three-dimensional structure of fruit trees, including fruit branches, main branches, main branches and sub-main branches.
It realizes accurate, efficient and automatic acquisition of functional information of fruit tree branches, quantitatively describes the distribution and topological relationship of various types of fruit tree branches, and enriches the semantic information of the three-dimensional structure data of fruit tree.
Smart Images

Figure CN119832167B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of digital modeling and growth monitoring of fruit trees, and particularly to a method for identifying the types of branches and trunks in the three-dimensional structure of fruit trees. Background Art
[0002] For modern standardized cultivated fruit trees, during the production cycle, by regularly shaping and pruning the branches and trunks, a reasonable combination of the number, length of the branches and trunks, and the proportion of branches and trunks with different functions is formed to achieve the purposes of controlling the growth trend of fruit trees, ensuring light transmission in the canopy, flowering and fruiting, and reasonable distribution of nutrients, so as to realize high-quality and high-yield fruits. Identifying the types and functional attributes of fruit tree branches and trunks, extracting their quantity and spatial distribution information, and constructing a digital model of fruit trees can accurately evaluate the effect of cultivation management, predict the number of flowers and fruits of fruit trees, and is one of the key links in digital and intelligent cultivation management. The main types of branches and trunks that make up the standard tree shape include the main trunk, main branches, fruiting branches, etc. For some tree shapes with more complex structures, the branches connected to the main branches are further divided into sub-main branches, lateral branches, etc., and each type of branch and trunk has corresponding main functions.
[0003] At present, in the practice of fruit tree cultivation management, the method for identifying the functional types of fruit tree branches and trunks mainly relies on manual on-site observation and identification based on experience, lacking an automatic identification and judgment method. With the development of smart agriculture, the demand for using new digital and information technologies to collect accurate information on the structure and functional attributes of branches and trunks is increasing. Technologies and models related to fruit tree digitization have been continuously developed, such as technologies for reconstructing the three-dimensional structure of the fruit tree surface by obtaining point cloud data using a laser scanner and quantitative structural models of trees. However, there is still a lack of a method for accurately identifying various functional branches and trunks from three-dimensional data, resulting in difficulty in aligning the branch and trunk type information in the fruit tree digital model with the branch and trunk functions defined in horticultural cultivation management. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for identifying the types of branches and trunks in the three-dimensional structure of fruit trees. According to the topological relationships, attribute differences between the starting point, ending point, and bifurcation point in different types of branches, and the similarity of adjacent parts within the branch in terms of diameter and direction vector, the graph theory algorithm and similarity are used to gradually determine and identify the parts included in each type of branch and trunk, so as to realize the automatic identification of the functional branch and trunk types through the three-dimensional data of fruit tree branches and trunks and the division of the nodes included in each functional branch and trunk.
[0005] To achieve the above purpose, the present invention adopts the following technical solutions:
[0006] A method for identifying the types of branches and trunks in the three-dimensional structure of fruit trees, comprising the following steps:
[0007] Construct a directed graph expressing the topological structure of the branches and trunks using the three-dimensional structure data of the fruit tree;
[0008] Identify the nodes included in the resulting branches;
[0009] Identify the nodes included in the main trunk;
[0010] Identify the sorting of each main branch and the nodes it contains;
[0011] Identify the sorting of each sub-main branch on the main branch and the nodes it contains;
[0012] In some embodiments, the three-dimensional structure data of the fruit tree is a set of cylinders that fit the surface of the branches. The data includes the radius, length, starting position, direction vector, and adjacency relationship of the cylinders. The construction of a directed graph representing the topological structure of the branches includes: using the set of cylinders as the nodes of the directed graph, creating the edges of the directed graph according to the adjacency relationship; creating node attributes to store the cylinder radius, length, starting position, direction vector, and node type.
[0013] In some embodiments, the nodes included in the identified result branches include: starting from the node with an out-degree of 0 (the end point) in the directed graph, querying the path from the end point to the nearest first bifurcation point (the node with an out-degree > 1). The nodes included in the path are the nodes included in the result branches. The node adjacent to the bifurcation point is the starting point of the result branch. Update the node type to the result branch to complete the identification of the result branch.
[0014] In some embodiments, the identification of the nodes included in the main trunk includes:
[0015] Using the node with an in-degree of 0 in the directed graph as the first parent node of the main trunk, searching for child nodes, selecting the nodes with a node type other than the result branch, calculating the similarity using the diameters and direction vectors of the parent and child nodes, and determining whether the child nodes belong to the main trunk according to the similarity. If the similarity of one child node is greater than the threshold, it is identified as a main trunk node. If the similarities of two or more child nodes with the parent node are greater than the threshold, select the one with the greatest similarity as the main trunk node. After updating the node type to the main trunk, continue to search and identify the next main trunk node in this way. If the similarities of all child nodes with the parent node are less than the threshold, it is determined that no child node belongs to the main trunk, and the identification of the main trunk nodes is completed.
[0016] In some embodiments, the identification of the sorting of each main branch and the nodes it contains includes: searching for the nodes with a node type of the main trunk and an out-degree greater than 1. Using this node as the parent node to search for child nodes, then selecting the nodes with a node type other than the main trunk and the result branch as the starting points of the main branches. Calculate the distances from the starting points of the main branches to the root node, sort them in ascending order from small to large, and sequentially identify the main branch nodes starting from each starting point of the main branch according to the similarities of the diameters and direction vectors of the parent and child nodes. Mark the main branch type according to the condition that the similarity is greater than the threshold or the similarity is the greatest and the node type is not the result branch.
[0017] In some embodiments, identifying the sorting of each sub-main branch and the nodes it contains includes: finding nodes with a main branch node type and an out-degree greater than 1, using this node as the parent node to find its child nodes, and then selecting nodes with a node type other than the main branch and the fruiting branch as the starting points of the sub-main branches. Calculate the distances from the starting points of each sub-main branch to the starting point of the main branch where they are located, and sort them in ascending order from small to large; sequentially start from the starting points of the sub-main branches to identify the sub-main branch nodes based on the comprehensive similarity of the diameters and direction vectors of the parent and child nodes, and mark the sub-main branch types according to the condition that the similarity is greater than the threshold or the similarity is the largest and the node type is not the fruiting branch.
[0018] The beneficial effects that may be brought about by a method for identifying the types of branches and trunks of the three-dimensional structure of fruit trees disclosed in this application include, but are not limited to:
[0019] The data processed by the present invention quantitatively describes the distribution of the main trunk, main branches, fruiting branches, sub-main branches, etc. of the fruit tree, as well as the adjacency and inclusion relationships of each branch. The final result obtained is information reflecting the quantity, distribution, and topological relationship of each type of branch and trunk of the fruit tree, realizing the accurate and efficient automatic acquisition of the functional information of the fruit tree branches and trunks.
[0020] Combined with the identification of branch and trunk types in the field of fruit tree cultivation and management, it realizes the further excavation of the three-dimensional structure data of fruit tree branches, enriches the semantic information of the three-dimensional structure data of fruit trees, and helps to better carry out work such as fruit tree breeding and cultivation management using three-dimensional data.
[0021] Compared with the existing method of reconstructing the three-dimensional structure of fruit trees from point cloud data, the method of the present invention further realizes the accurate quantitative expression of the structure and function information of fruit tree branches. The present invention has better adaptability to fruit trees under standardized management and obtains stable identification results for the three-dimensional structure data of deciduous fruit tree branches and trunks from dormancy to before germination and flowering. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] Figure 1 It is a flowchart of a method for identifying the types of fruit tree branches and trunks according to an embodiment of the present invention;
[0023] Figure 2 It is a schematic diagram of the principle of identifying the types of fruit tree branches and trunks according to an embodiment of the present invention;
[0024] Figure 3 It is a schematic diagram of the three-dimensional structure of fruit tree branches and trunks according to an embodiment of the present invention
[0025] Figure 4 It is a directed graph of the topological structure of fruit tree branches and trunks according to an embodiment of the present invention;
[0026] Figure 5 It is a schematic diagram of the identification effect of fruiting branches, main trunks, main branches, and sub-main branches of a fruit tree according to an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0027] To make the objectives, technical solutions and advantages of the present application more clearly understood, the present application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining the present application and are not used to limit the present application.
[0028] On the contrary, the present application covers any alternatives, modifications, equivalent methods and solutions made within the spirit and scope of the present application as defined by the claims. Further, in order to enable the public to have a better understanding of the present application, some specific details are described in detail in the following description of the details of the present application. Those skilled in the art can fully understand the present application without the description of these details.
[0029] The following will detail a method for identifying the branch types of the three-dimensional structure of fruit trees involved in the embodiments of the present application. As Figure 1 shown, a method for identifying the branch types of the three-dimensional structure of fruit trees includes the following steps:
[0030] Step 1: Use the three-dimensional structure data of fruit trees to construct a directed graph expressing the branch topological structure. The three-dimensional structure data set of fruit trees includes the serial number Sn of the cylinder, r radius, l length, start ( x, y, z ) starting position, direction ( x, y, z ) direction vector, P and adjacency relationship P ; create a directed graph G, add nodes (G.add_node( Sn, r, l, start ( x, y, z ) , direction ( x, y, z ) , node_type )), and store the corresponding cylinder radius, length, starting position, direction vector, and node type in the attributes of each node; according to P add edges between nodes (G.add_edge()).
[0031] Step 2: Identify the nodes included in the result branches, including: find the nodes with an out-degree of 0 in the directed graph G (G.node(out_degree(node)==0)) to obtain the end point list, and query the parent nodes of the nodes starting from each end point one by one (G.predecessors(node)), and judge the out-degree of the parent nodes. If the out-degree is greater than 1 (bifurcation point), stop. The nodes included in the path from the end point to the bifurcation point are the nodes included in the result branches, and update the node type to the result branch ( node_type = 3 ), and complete the identification of the result branches.
[0032] Step 3: Identify the nodes included in the main trunk. First, find the nodes in the directed graph G with an in-degree of 0 (G.node(in_degree(node)==0)) as the first node of the main trunk; then find its child nodes (children = list(G.neighbors(current_node))). If there are several child nodes, select the nodes that are not result branches according to the node type (G.nodes(node_type!=3)), and calculate the comprehensive similarity of the radius and direction vector between the parent node and each child node. Among them, the radius similarity is calculated using the formula ; the direction similarity is calculated using cosine similarity and linearly transformed to the range of 0 to 1; a 1 、a 2 are the weights of different similarities respectively. Further, determine whether the child node belongs to the main trunk according to the similarity: if the similarity of one child node is greater than the threshold, it is identified as the main trunk node; if the similarities of more than two child nodes and the parent node are greater than the threshold, select the one with the maximum similarity as the main trunk node; update the node type to the main trunk ( node_type = 0 ), and continue to find the next main trunk node with this node; if the similarities of all child nodes and the parent node are less than the threshold, it is determined that no child node belongs to the main trunk, and the identification of the main trunk node is completed.
[0033] Step 4: Identify the sorting of each main branch and the nodes it contains, including: first, find the nodes with the main trunk node type and an out-degree greater than 1 (G.nodes[(node_type==0) and out_degree(node)>1)]); then find the child nodes of the node (children = list(G.neighbors(current_node))), and select the nodes with the node type not being the main trunk and not being the result branch (G.nodes[(node_type!=0) and (node_type!=3) ]) as the starting point of the main branch. Use the z value in the node start ( x, y, z ) to calculate the distance between each child node and the root node, and sort them in ascending order from small to large; according to the sorting of the main branches, calculate the comprehensive similarity of the diameter and direction vector of the parent and child nodes one by one from the starting point. According to the condition that the similarity is greater than the threshold or the similarity is the largest and the node type is not the result branch, identify the main branch nodes and mark the main branch type (node_type==1);
[0034] Step 5: Identify the sorting of each sub-main branch and the nodes it contains, including: finding nodes with the main branch node type and an out-degree greater than 1 (G.nodes[(node_type == 1) and out_degree(node) > 1]), and finding the child nodes of the nodes; then selecting nodes with a node type that is neither the main branch nor the fruiting branch (G.nodes[(node_type!= 1) and (node_type!= 3)]) as the starting points of the sub-main branches, and using the z value in the nodes start ( x, y, z ) to calculate the distance from each child node to the starting point of the main branch where it is located, and sorting them in ascending order from small to large; starting from the starting point of the sub-main branch in sequence, according to the comprehensive similarity of the diameters and direction vectors of the parent and child nodes, and according to the condition that the similarity is greater than the threshold or the similarity is the largest and the node type is not the fruiting branch, identify the sub-main branch nodes and mark the sub-main branch type (node_type == 2).
[0035] The following is an illustration with a specific embodiment:
[0036] After three-dimensional surface reconstruction of the point cloud data of Y-shaped peach trees with standardized cultivation management, a series of cylinders with different radii, lengths, starting positions, and direction vectors, as well as the serial numbers of adjacent cylinders, are obtained. This embodiment uses this data to represent the three-dimensional structure of the fruit tree, and the effect can be seen in Figure 3 . To identify the branch types of the three-dimensional structure of the fruit tree, according to Figure 2 the principle of branch type identification, use graph theory algorithms and similarity algorithms to process the data of each cylinder in the three-dimensional structure of the fruit tree, and obtain the branch type Node_type information of each cylinder according to the discrimination conditions of different branch types. Finally, a data set containing the results of the identified branch types is obtained .
[0037] Step 1: Use the three-dimensional structure data of the fruit tree to construct a directed graph G that represents the branch topology. Each cylinder is used as a node of the directed graph, and edges are added between the nodes according to the parent node information shown in the data P . The visualization effect of the nodes and edges of the directed graph G can be seen in Figure 4 ;
[0038] Step 2: Identify the nodes included in the fruiting branches. Select the nodes with an out-degree of 0 in the directed graph G, query the parent nodes of the nodes one by one from the end points, and judge the out-degree of the parent nodes. If the out-degree is greater than 1, that is, if the parent node has other bifurcations, stop. The nodes included in the path from the end point to the bifurcation point are the nodes included in the fruiting branches, and update the nodes( node_type = 3 ). The distribution of the fruiting branch nodes can be seen in the red part of Figure 5 ;
[0039] Step 3: Identify the nodes included in the main trunk. Search for the nodes with an in-degree of 0 in the directed graph G as the first parent node of the main trunk, and search for child nodes. Then calculate the comprehensive similarity of the radius and direction vector between the parent node and each child node, and further determine whether the child node belongs to the main trunk based on the similarity: If the similarity of one child node is greater than the threshold, it is identified as a main trunk node; if the similarity of more than two child nodes and the parent node is greater than the threshold, select the one with the maximum similarity as the main trunk node; continue to search for the next main trunk node with this node; if the similarity of all child nodes and the parent node is less than the threshold, it is determined that no child node belongs to the main trunk. The recognition effect of the main trunk node is shown in Figure 5 the blue part in
[0040] Step 4: Identify the sorting of each main branch and the nodes it contains. First, search for the nodes with the node type of main trunk and an out-degree greater than 1; then search for the child nodes of the nodes, and select the nodes with the node type of neither main trunk nor result branch as the starting point of the main branch. Calculate the distance between each child node and the root node, and sort them in ascending order from small to large; according to the sorting of the main branches, calculate the comprehensive similarity of the diameter and direction vector of the parent and child nodes one by one from the starting point. Based on the condition that the similarity is greater than the threshold or the similarity is the maximum and the node type is not the result branch, the recognition effect of the main branch node is shown in Figure 5 the green part in
[0041] Step 5: Identify the sorting of each sub-main branch and the nodes it contains. Search for the nodes with the node type of main branch and an out-degree greater than 1, search for the child nodes, and then select the nodes with the node type of neither main branch nor result branch as the starting point of the sub-main branch. Calculate the distance from each child node to the starting point of the main branch where it is located, and sort them in ascending order from small to large; starting from the starting point of the sub-main branch in sequence, based on the comprehensive similarity of the diameter and direction vector of the parent and child nodes, according to the condition that the similarity is greater than the threshold or the similarity is the maximum and the node type is not the result branch, the recognition effect of the sub-main branch node is shown in Figure 5 the yellow part in
[0042] The above are only the preferred embodiments of the present invention and are not intended to limit the present invention. Any modifications, equivalent replacements, and improvements made within the spirit and principles of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for identifying the three-dimensional structure of branches and trunks of fruit trees, characterized in that: The following steps are involved: Use the three-dimensional structure data of fruit trees to construct a directed graph expressing the topological structure of branches and trunks; Identify the nodes contained in the result branch; Identify the nodes that the trunk contains; Identify the order of each main branch and the nodes it contains; Identify the order of each sub-branch on the main branch and the nodes they contain; The fruit tree three-dimensional structure data is a data set that uses a set of cylinders to fit the surface of branches and trunks, including the radius, length, starting point position, direction vector and adjacency relationship of the cylinders; The construction of the directed graph expressing the branch topology structure includes: using a cylinder set as a node of the directed graph, creating edges of the directed graph according to adjacency relationships; creating node attributes, storing the cylinder radius, length, starting point position, direction vector, and node type; The nodes included in the identification trunk include: taking the node with the in-degree of the directed graph being 0, that is, the root node, as the first parent node of the trunk, searching for child nodes, selecting nodes whose node type is not a fruit branch, using the radius and direction vector of the parent node and each child to calculate the similarity, and judging whether the child node belongs to the trunk according to the similarity: if there is a child node whose similarity is greater than a threshold, it is identified as a trunk node; if the similarity between two or more child nodes and the parent node is greater than the threshold, the node with the greatest similarity is selected as the trunk node; after updating the child node type to the trunk, continue to search and identify the next trunk node; if the similarity between all child nodes and the parent node is less than the threshold, it is judged that no child node belongs to the trunk, and the trunk node identification is completed.
2. A method for identifying the type of branches and trunks of three-dimensional structures of fruit trees according to claim 1, characterized in that: The nodes included in the identification result branches include: starting from the node with an out-degree of 0 in the directed graph, that is, the end point, querying the path from the end point to the nearest first bifurcation point, wherein the first bifurcation point is a node with an out-degree greater than 1, the node adjacent to the bifurcation point is the starting point of the result branch, the nodes included in the path are the nodes included in the result branch, the node type is updated to the result branch, and the result branch identification is completed.
3. A method for identifying the type of branches and trunks of three-dimensional structures of fruit trees according to claim 1, characterized in that: Calculate similarity using the radius and direction vectors of the parent node and each child ,include: ; in: Radius Similarity Use the formula ( )calculate; Direction similarity Using cosine similarity calculation, the values are linearly converted to the range of 0 to 1; a 1 、a 2 are weights of different similarities, satisfying ; is the parent node radius, is the radius of the child node.
4. A method for identifying the type of branches and trunks of three-dimensional structures of fruit trees according to claim 1, characterized in that: The identification and sorting of each main branch and the nodes contained therein include: searching for a node whose node type is a trunk and whose out-degree is greater than 1, searching for its child node with this node as the parent node, and then selecting a node whose node type is not a trunk and a non-fruit branch as the starting point of the main branch, calculating the distance from the starting point of each main branch to the root node, and sorting the distance in ascending order from small to large; identifying the main branch node according to the similarity of the diameter and direction vector of the parent and child nodes starting from the starting point of each main branch according to the sorting, and marking the main branch type according to the condition that the similarity is greater than a threshold or the similarity is the largest and the node type is not a fruit branch.
5. The method for identifying the three-dimensional structure of a fruit tree according to claim 1, characterized in that: The method for identifying and sorting sub-main branches on a main branch and the nodes they contain comprises: searching for a node whose node type is a main branch and whose out-degree is greater than 1 in each main branch, searching for its child nodes with this node as the parent node, and then selecting a node whose node type is not a main branch or a fruit-bearing branch as a sub-main branch starting point, calculating the distance from each child node to the starting point of the main branch, and sorting the nodes in ascending order of distance; identifying sub-main branch nodes according to the similarity of the diameter and direction vector of the parent and child nodes from the starting point of each sub-main branch according to the sorting, and marking the sub-main branch type according to the condition that the similarity is greater than a threshold or the similarity is the largest and the node type is not a fruit-bearing branch.
Citation Information
Patent Citations
Three-dimensional framework fast extraction method based on branch feathers
CN101763652A
Light-weight three-dimensional tree model building method supporting skeleton personalization edition
CN103914869A