A method for extracting crown skeleton of fruit trees and analyzing branch structure phenotype
By combining the preprocessing and learning-guided model of fruit tree canopy point cloud with the Laplace contraction energy function, the problems of mixed branches and leaves and topological misconnection in fruit tree canopy point cloud data processing were solved, achieving high-precision branch and trunk structure phenotypic analysis and meeting the needs of modern smart agriculture.
Patent Information
- Application Number
- CN202611301035.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-26
- Publication Date
- 2026-11-24
AI Technical Summary
Existing technologies suffer from complexities in processing fruit tree canopy point cloud data, such as mixed branches and leaves, missing data, and topological misconnections. This results in low accuracy in calculating branch and trunk structure phenotypes, making it difficult to meet the demands of high-throughput and high-precision modern smart agriculture.
A method for extracting the canopy skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks is adopted. The method involves acquiring the point cloud of the canopy of fruit trees and performing noise reduction, downsampling and scale normalization preprocessing. The method uses a learning-guided model to predict structural guidance information, combines the Laplace shrinkage energy function for iterative shrinkage, constructs candidate skeleton nodes and optimizes the topological connection, finally removes redundant end branches, and calculates the phenotypic parameters of branch and trunk structure.
It achieves high-precision, high-continuity, and high-topological-reliability skeleton extraction in complex fruit tree canopy point clouds, improves the calculation accuracy of structural parameters such as branch inclination angle, azimuth angle, and diameter, and supports efficient analysis of fruit tree canopy structure.
Smart Images

Figure CN123160766A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of agricultural information technology, and in particular to a method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks. Background Technology
[0002] The canopy structure of fruit trees, especially the topology, spatial distribution, and geometric parameters (such as branch inclination angle, azimuth angle, and diameter), is a crucial foundation for evaluating tree vigor, conducting pruning and shaping, optimizing light management, predicting yield, and carrying out fruit tree genetics and phenomics research. Traditionally, obtaining phenotypic parameters of branch structure has relied primarily on manual measurement and experience-based judgment, such as using protractors and calipers for tree-by-tree and branch-by-branch contact measurements. This method is not only inefficient and labor-intensive but also highly subjective, making it difficult to acquire large-scale, standardized three-dimensional topological information and failing to meet the demands of modern smart agriculture and precision management for high-throughput, high-precision phenotypic data.
[0003] In recent years, the rapid development of mobile lidar technology has provided a new technical approach for the automated acquisition of three-dimensional structural information of fruit trees. Compared with airborne or ground-based fixed-station lidar, handheld or backpack-mounted MLS devices are characterized by flexible operation and multiple viewing angles, enabling multi-angle surround scanning from the base of the tree to the top of the canopy, and have unique advantages in acquiring woody structures such as branches and trunks. Based on the high-density three-dimensional point cloud acquired by MLS, the digital reconstruction of the fruit tree canopy can be realized, providing a data foundation for subsequent automated structural analysis.
[0004] Based on point cloud data, skeleton models are widely considered to be the key bridge connecting discrete point clouds and tree topology. An accurate skeleton graph (composed of nodes and edges) can not only express the spatial connectivity between the trunk, main branches, and lateral branches in a simplified form, but is also a necessary prerequisite for subsequent calculations of structural phenotypic parameters such as branch inclination angle, azimuth angle, branching level, and branch diameter, as well as for organ-scale analytical tasks such as branch-leaf separation.
[0005] Currently, methods for extracting the skeleton from plant point clouds can be broadly categorized into three types: first, methods based on geometric contraction, such as Laplacian contraction and its variants, which iteratively aggregate point clouds towards local centers to extract the curve skeleton; second, methods based on median or local clustering and graph connectivity, such as the L1-median algorithm and ROSA; and third, quantitative structure model (QSM) methods for parametric modeling of trees, such as TreeQSM, which reconstruct the geometric and topological structure of the tree trunk by fitting a cylinder. These methods have achieved certain results on trees, corn, tomatoes, and other crops with relatively clear structures and minimal canopy shading.
[0006] However, when applied to point clouds of complex fruit tree canopies, the aforementioned existing technologies still have significant shortcomings and challenges. Taking citrus trees as an example, firstly, as evergreen fruit trees, citrus has dense foliage that often severely obscures branches and trunks, resulting in numerous holes, localized gaps, and uneven density in the scanned point cloud data within the branch and trunk regions. Traditional geometric shrinkage methods, lacking prior structural information, are prone to centerline shifts, skeletal breaks, or endpoint drifts in missing areas. Secondly, adjacent branches are often spatially close and even intersecting, while existing methods mostly rely solely on Euclidean distance, local curvature, or cylindrical fitting residuals for connection judgments, lacking a high-level perception of the plant's inherent branching logic and topological consistency. This easily leads to false cross-branch connections, pseudo-forking, and the introduction of redundant short branches. Furthermore, the generalization ability and robustness of existing methods still need improvement when dealing with canopies of different ages, varieties, and canopy closure levels. These topological errors and geometric distortions will directly affect the accuracy of subsequent skeleton-based structural phenotypic calculations, such as causing deviations in branch inclination estimation, distortions in branch azimuth distribution analysis, and failures in trunk diameter estimation.
[0007] Therefore, there is an urgent need for a new method for extracting the canopy skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks, which can effectively deal with complex situations such as mixed branches and leaves, missing data and topological misconnections, and achieve high-precision, high-continuity and high-topological reliability extraction of the canopy skeleton of fruit trees. Summary of the Invention
[0008] This invention provides a method for extracting the canopy skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks, which can effectively deal with complex situations involving mixed branches and leaves and realize the extraction of the canopy skeleton of fruit trees.
[0009] To solve the above-mentioned technical problems, this application provides the following technical solution: A method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks includes the following steps: S1. Obtain the point cloud of the fruit tree canopy, perform noise reduction, downsampling and scale normalization preprocessing on the point cloud, and calculate the local geometric features of each point; S2. Using local geometric features as input, a pre-trained learning guidance model is used to predict the structural guidance information of each point. The structural guidance information includes the probability of branch structure, the probability of bifurcation point, the probability of endpoint, the local radius, and the displacement of the shrinkage target. S3. Introduce structural guidance information into the Laplace contraction energy function to iteratively contract the point cloud. The Laplace contraction energy function includes a Laplace smooth contraction term, a position preservation term, and a learning guidance term. The learning guidance term makes points with high probability of branch structure approach the learning guidance target point indicated by the contraction target displacement. After iterative convergence, the set of contracted points is obtained. S4. Sample candidate skeleton nodes for the shrinking point set, and inherit and map the local adjacency relationships in the shrinking point set to the candidate skeleton nodes to construct a candidate adjacency matrix. S5. Map the branch structure probabilities at the point level to the candidate skeleton nodes and candidate edges, calculate the effective support of the candidate edges by combining the candidate adjacency matrix, construct the connection cost function based on the geometric length of the candidate edges and the effective support, filter the skeleton connections according to the connection cost function, and obtain the candidate skeleton graph after topology optimization. S6. Determine the root node based on the candidate skeleton diagram and protect the root region. Identify the branch paths starting from the skeleton endpoints. Determine the branch paths with a length less than the set threshold and without high-bidding-point probability nodes or high-end-point probability nodes as redundant branches and prune them to obtain the final skeleton diagram.
[0010] Furthermore, it also includes S7, calculating branch structure phenotypic parameters based on the final skeleton diagram, including branch inclination angle, branch azimuth angle and / or branch diameter; The branch inclination angle is the angle between the branch direction vector and the vertical direction, the branch azimuth angle is the angle between the projection of the branch direction vector onto the horizontal plane and the set horizontal direction, and the branch diameter is obtained by extracting cross-sectional points at a fixed height above the ground and performing circle fitting.
[0011] Furthermore, step S1 specifically includes: The fruit trees are scanned around an S-shaped path using a data acquisition device to obtain raw point cloud data containing spatial coordinate information; after the raw point cloud data is solved and registered, individual tree segmentation is performed to obtain the canopy point cloud of individual fruit trees; Statistical outlier filtering is used to denoise single-tree point clouds. The denoised single-tree point cloud was downsampled and scaled. For the normalized point cloud Use a KD-tree to search each point Search for its k nearest neighbors and construct a local neighborhood. ; The covariance matrix of the point cloud is calculated in the local neighborhood, and the eigenvalues are obtained through principal component analysis. ,in ; Based on the eigenvalues, local geometric descriptors such as linearity, flatness, and curvature are further calculated to characterize the linearity, flatness, and geometric complexity of the local structure of the point cloud. Calculate local linearity, flatness, and curvature: ; Local linearity, flatness, and curvature are defined as follows: ; ; in, , and Let represent the linearity, flatness, and curvature of the local neighborhood of the i-th point, respectively; It also extracts normalized spatial coordinates, local point density, neighborhood average distance, neighborhood distance standard deviation, vertical position, and normalized height features, which together constitute point-level local geometric features.
[0012] Furthermore, S2 specifically includes: Vectors of local geometric features Using random forest-like models as input, a learning-guided model is constructed to predict the probability of branch structure, branching point probability, and endpoint probability, as well as estimate the local radius and shrinkage target displacement. For the i-th point, the structural guidance information output by the learning guidance model is represented as: ; in, For the probability of branch structure, The probability of the bifurcation point. For endpoint probabilities, This is a local radius estimate. To learn the target displacement of the contraction predicted by the model; The structural guidance information predicted by the learning guidance model for each point is used as the point-level learning guidance result. The learning guidance target point of the i-th point under learning guidance Defined as: .
[0013] Furthermore, S3 specifically includes: For the point cloud coordinates Pᵗ at the t-th iteration, construct an energy function containing a Laplace smoothing contraction term and a position-preserving term, expressed as: ; in, Let be the point cloud coordinates at the t-th iteration. Let L be the updated shrinking point cloud coordinates, and L be the discrete Laplacian matrix constructed from the local neighborhood. For Laplace shrinkage weights, Maintain weight for position; The Laplacian smoothing contraction term is used to drive the point cloud to contract toward the local central structure, while the position preservation term is used to limit the point cloud from deviating excessively from its original geometry during the contraction process; A learning guide term is introduced into the basic Laplace contraction model to guide points with higher branch structure probabilities toward the learning guide target point predicted by the learning guide model. The energy function after learning guide is defined as: ; in, To learn the set of target points predicted by the guided model, To learn the guiding weight matrix, for the th The learning guidance weight is defined as follows: (Points are given) ; In the formula, To learn the guiding strength coefficient, For the first The probability of branch structure at each point To prevent the lower bound constant from being too small; The above optimization problem is transformed into a sparse least squares problem to be solved in the implementation: ; During the iteration process, the position preservation weights are dynamically updated based on changes in the local neighborhood scale, and the Laplace shrinkage weights are gradually increased. The shrinkage process stops when the local scale change between adjacent iterations is less than a set threshold, or when the number of iterations reaches the maximum value, resulting in a set of shrinkage points. .
[0014] Furthermore, step S4 specifically includes: Candidate skeleton nodes are generated using the farthest point sampling method under sphere cover constraints, and the sampling radius is defined as:
[0015] In the formula, The sphere covers the sampling radius. The sampling radius coefficient, is the length of the diagonal of the bounding box of the fruit tree canopy point cloud P after downsampling and scale normalization. During the sampling process, the uncovered shrinkage point with the largest distance from the existing candidate skeleton nodes is selected as the new candidate skeleton node, and this node is used as the center of the sphere. Update the attribution of shrinking points within the neighborhood for the radius; Repeat this process until all points in the shrinking point set are covered by candidate skeleton nodes, thus obtaining a candidate skeleton node set. And the mapping of the shrinkage point to the candidate skeleton node. ; For any point of contraction Let the candidate skeleton node to which it belongs be . ,Right now ; If there are points in its local neighborhood Furthermore, the neighboring point belongs to another candidate skeleton node. ,Right now and Then in the candidate skeleton node and Add one more connection support between them: ; In the formula, Represents candidate skeleton nodes and The connection support inherited from local adjacency relationships; The connection support between all candidate skeleton nodes constitutes the initial candidate adjacency matrix. .
[0016] Furthermore, step S5 specifically includes: The point-level learning guidance results are mapped to the candidate skeleton node level. Let the set of its corresponding contraction points be... The branch structure probability of this candidate skeleton node is defined as follows: ; In the formula, Candidate skeleton nodes The probability of branch structure, For the first The probability of the point-level branch structure corresponding to each contraction point, for candidate edges The probability of its side branch structure is represented by the mean of the probabilities of the two end nodes: ; To enhance the preservation of true branch connections, edge support is combined with branch structure probability, and the effective support of candidate edges is defined as: ; In the formula, Candidate edges Effective support, The original connection support obtained from adjacency inheritance. This is the enhancement coefficient for the probability of the branch structure supporting the edge; Short-distance bridging edges are added within the local neighborhood of candidate skeleton nodes. If two candidate skeleton nodes are spatially nearest neighbors and their distance does not exceed the local scale constraint, the connection is added while satisfying the branch structure probability condition. After completing candidate edge selection and local bridging, the candidate edge connection cost function is constructed: ; In the formula, Candidate edges The connection cost, The branch structure penalty strength coefficient, The penalty index; Based on this cost function, a low-cost skeleton connection relationship is constructed in the candidate topology graph so that the final skeleton simultaneously satisfies spatial proximity, adjacency support and branch structure consistency, thus obtaining the candidate skeleton graph.
[0017] Furthermore, step S6 specifically includes: Search for candidate skeleton nodes in the low-height region, and prioritize nodes that are close to the horizontal center of the canopy and have a lower height as the root node; During the short branch pruning process, the nearest branch or trunk node is searched from the skeleton endpoint to obtain the branch path. If the branch path is short and does not contain high-end point probability nodes or high-branch point probability nodes, it is identified as a redundant branch and pruned. Branches with high endpoint probability or containing key branch structures are retained. By protecting the roots and pruning short branches, the final skeleton diagram is obtained.
[0018] Furthermore, step S7 specifically includes: S701, Calculation of the inclination angle of fruit tree branches: Based on the connection relationships between skeleton nodes, a branch segment is represented as a three-dimensional vector composed of adjacent skeleton nodes. For any branch segment, let its starting and ending skeleton nodes be respectively... and Then the branch direction vector can be expressed as: ; The branch inclination angle is calculated from the angle between the branch direction vector and the vertical unit vector: ; In the formula, Represents a unit vector in the vertical direction. This represents the angle between the branch segment and the vertical Z-axis, retaining the effective angles within the range of 0-180° to reflect the complete distribution of the branch segment direction in vertical space. The branch inclination angle parameters of the first-level main branches, second-level lateral branches, and third-level fruiting branches are statistically analyzed in combination with the skeleton topology hierarchy. S702. Calculation of Azimuth and Direction Distribution of Fruit Tree Branches and Trunks: For any branch segment, let the three-dimensional coordinates of its starting and ending skeleton nodes be respectively... and Then the branch segment is horizontal The projection vector on the plane is: ; The azimuth angle of the branch is defined as the sum of the horizontal projection vector and the horizontal projection vector. Angle between the positive directions of the axis: ; In the formula, It is the arctangent function in the fourth quadrant. Indicates the azimuth angle of the branch segment in the horizontal plane. Convert to a range of 0-360° and divide the azimuth intervals into 10° intervals; Calculate the percentage of branch length and the percentage of branch number in different directional intervals, and assume... For the first Azimuth range Let be the set of branch segments whose azimuth angles fall into this interval. Then, the proportion of branch length and the proportion of branch quantity in this interval are respectively: ; The percentage of branches is defined as follows: ; In the formula, The length of the branch segment. For the first The number of branch segments within each directional interval This represents the total number of branch segments included in the statistics; S703, Calculation of branch diameter: Select the preset distance from the ground The section at this height is used as the calculation section for the trunk diameter, and the trunk diameter at this height is denoted as... ; First, extract the set of cross-sectional slice points near the target height: ; In the formula, This is a non-location cloud representing a single fruit tree. For point The height relative to the ground reference plane, where The thickness is half of the cross section. The center of the section is estimated using the median of the coordinates of the points on the section: ; For the cross-section point Calculate its horizontal radial distance from the center of the cross section. ; Retain satisfaction The points constitute a set of radius-constrained sections. ,in The radius threshold is used to remove branch points and noise points that are far from the main trunk, thereby improving the stability of the fit. Will Projecting onto the XY plane yields a two-dimensional point set. The RANSAC fitting model method was used to estimate the cross-sectional parameters, and the parameters were obtained. : ; Radial residuals are used as a consistency measure: ; when When it is determined to be an interior point, among which This is the consistency threshold, used to control the tolerance radius of the interior point set; The circle with the most interior points is selected as the optimal model. And the diameter of the main trunk is obtained.
[0019] This scheme incorporates the structural guidance information predicted by the learning-guided model into the Laplace contraction energy function through steps S2 and S3. The learning guidance term guides points with high branch structure probabilities towards the target point, enhancing the stability of branch centerline contraction and reducing interference from leaf noise and local missing branches. Steps S4 and S5 map point-level probabilities to candidate nodes and edges, constructing a connection cost function by combining adjacency inheritance and effective support, effectively suppressing cross-branch misconnections and false bifurcation. Step S6, with root protection and short end branch pruning, ensures the continuity of the trunk base and reduces redundant end branches. These steps work together to significantly improve topological reliability while maintaining high integrity in the final skeleton, resulting in high skeleton extraction accuracy and providing efficient and accurate technical support for fruit tree canopy structure analysis. Attached Figure Description
[0020] Figure 1 This is a flowchart of an embodiment of a method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks; Figure 2 This is a handheld mobile lidar data acquisition route map from Example 1 of a method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks. Figure 3 Example point cloud diagrams of citrus trees at different ages are shown in Example 1 of a method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks. Figure 4 This is a schematic diagram of the root protection and short-end branch pruning mechanism in Example 1 of a method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks. Figure 5 This is a schematic diagram illustrating the calculation of the inclination angle of citrus branches in Example 1 of a method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches. Detailed Implementation
[0021] The following detailed description illustrates the specific implementation method: Example 1 like Figure 1 As shown, this embodiment uses a citrus tree as an example to illustrate a method for extracting the crown skeleton and analyzing the phenotypic structure of fruit trees, including the following steps: S1. Data Acquisition and Preprocessing of Citrus Tree Canopy Point Clouds. A multi-angle surround scan of the citrus trees was performed along an S-shaped path using a data acquisition device; the scanning speed was controlled at ≤3m / s; raw point cloud data containing spatial coordinate information was acquired.
[0022] This embodiment uses a handheld mobile laser scanner (MLS) as the data acquisition device. Unlike airborne laser scanners, which primarily acquire information from the top of the canopy, MLS can scan from the base of the tree upwards at multiple angles. This makes it more effective at acquiring information about the trunk, main branches, and parts of the canopy's internal structure, making it suitable for evergreen fruit trees like citrus trees with dense canopies and significant foliage obstruction. During data acquisition, closed-loop scanning is performed row by row within the target orchard area. For individual citrus samples, a slow, uniform walking speed (V≤3m / s) is maintained along an S-shaped path centered on the trunk to ensure a relatively complete coverage scan from the base of the tree to the top of the canopy. All acquisition operations are conducted under windless or light wind conditions (below level 2) to minimize noise interference from swaying branches and leaves. To improve point cloud quality and ensure subsequent computational stability, the scanning path is kept closed as much as possible during acquisition to reduce cumulative drift errors. Simultaneously, multi-angle surround scanning is used to improve the information integrity of the trunk, main branches, and canopy edge areas. The MLS point cloud acquisition and scanning path is as follows: Figure 2 As shown.
[0023] After solving and registering the original point cloud data, individual tree segmentation was performed to obtain the point cloud of the canopy of a single citrus tree.
[0024] In this embodiment, the software accompanying a handheld mobile LiDAR is used to perform trajectory calculation, point cloud registration, and orchard 3D scene reconstruction of the raw point cloud data. Subsequently, the open-source software CloudCompare is used to crop the orchard scene point cloud, remove ground points, and segment individual trees to obtain single-tree citrus canopy point clouds for subsequent analysis.
[0025] like Figure 3 As shown, the point cloud results of 1-year-old saplings, 3-4-year-old grafted citrus trees, and mature trees over 10 years old show that as the age of the trees increases, the crown size and branching complexity of citrus trees increase significantly, and the shading of branches and leaves and the overlap of the internal structure of the crown layer in the point cloud are also more significant.
[0026] The citrus canopy point cloud obtained after individual tree segmentation still contains a small number of outliers, floating noise points, and local sparse artifacts. This embodiment uses statistical outlier filtering (SOR) to denoise the individual tree point cloud. SOR identifies and removes outliers that significantly deviate from the neighborhood structure based on the local neighborhood distance distribution. Considering the high density of the citrus canopy point cloud and the susceptibility of fine branch structures to over-filtering, the number of neighborhood points k and the standard deviation threshold n are set. This embodiment comprehensively balances the noise removal effect with the branch structure preservation ability through parameter comparison, ultimately setting the number of neighborhood points k=600 and the standard deviation threshold n=3, which effectively removes noise points.
[0027] Downsampling and scale normalization are performed on the denoised single-tree point cloud to reduce the impact of point cloud density differences and tree scale differences on the calculation of local geometric features.
[0028] For the normalized point cloud Use a KD-tree to search each point Search for its k nearest neighbors and construct a local neighborhood. The point cloud covariance matrix is calculated within a local neighborhood, and eigenvalues are obtained through principal component analysis. ,in Based on the eigenvalues, local geometric descriptors such as linearity, flatness, and curvature are further calculated to characterize the linearity, flatness, and geometric complexity of the local structure of the point cloud.
[0029] Based on the above eigenvalues, the local linearity, flatness, and curvature are further calculated:
[0030] Local linearity, flatness, and curvature are defined as follows:
[0031]
[0032] in, , and Let represent the linearity, flatness, and curvature of the local neighborhood of the i-th point, respectively.
[0033] Linearity reflects whether the local point cloud has a distinct linear distribution; higher linearity typically corresponds to branches or slender structures. Flatness describes the patchy distribution characteristics of the local point cloud. Curvature reflects the degree of local geometric curvature, dispersion, or complexity. In addition to the PCA features mentioned above, this embodiment also extracts features such as normalized spatial coordinates, local point density, average neighborhood distance, standard deviation of neighborhood distance, vertical position, and normalized height. Specifically, a KD-tree is used to search for the 20 nearest neighbors of each point, and the average neighborhood distance and standard deviation of neighborhood distance are calculated based on the distance between these neighbors. The reciprocal of the cube of the average neighborhood distance represents the local point density. The absolute value of the normalized vertical coordinate is used as the descriptor of the vertical position, and the normalized height is calculated based on the relative position of the point within the point cloud height range. These features, together with the three eigenvalues of the local covariance matrix, linearity, flatness, and curvature, constitute a 14-dimensional point-level local geometric feature vector, used in subsequent model predictions of branch structure probability, bifurcation point probability, endpoint probability, local radius, and contraction target displacement.
[0034] S2. Construct a learning guidance model to predict point-level structure guidance information.
[0035] In this embodiment, the artificial reference skeleton is created by labeling the main trunk, main branches and main lateral branches that can be stably identified. The reference skeleton is constructed according to the branch connectivity relationship and consists of nodes and edges. At the same time, the branching points, endpoints and branch levels are recorded.
[0036] For each point Based on its spatial relationship with the bifurcation points, endpoints, and branch levels in the artificial reference skeleton, point-level structural labels are generated, including branch structure labels, bifurcation point labels, endpoint labels, local radii, and contraction target displacements. The branch structure labels are used to represent points. The probability of belonging to a branch region, the bifurcation point label and the endpoint label are used to describe key topological nodes, the local radius is used to characterize the distance scale from the point to the center line of the adjacent branch, and the contraction target displacement is used to indicate the direction and magnitude of the point's convergence towards the center region of the branch.
[0037] Vectors of local geometric features (Each component represents, in order, the normalized spatial coordinates, local point density, neighborhood average distance, neighborhood distance standard deviation, and the three eigenvalues of the local covariance matrix: linearity, flatness, and curvature, as well as the vertical position descriptor and normalized height.) As input, a learning-guided model is constructed using a random forest (RF) model.
[0038] Specifically, the learning-guided model is used to predict the probabilities of branch structures, bifurcation points, and endpoints, and to estimate the local radius and shrinkage target displacement. For the i-th point, the structural guidance information output by the model can be expressed as:
[0039] in, For the probability of branch structure, The probability of the bifurcation point. For endpoint probabilities, This is a local radius estimate. To learn the target displacement of the contraction predicted by the model.
[0040] The structural guidance information predicted by the learning guidance model for each point is used as the point-level learning guidance result.
[0041] Learning guidance objectives are defined as follows:
[0042] in, This represents the learning guidance target point of the i-th point under the learning guidance.
[0043] By using this target point, the structural priors output by the learning-guided model can be transformed into explicit geometric constraints during subsequent Laplace shrinkage, enabling the point cloud to converge towards the branch center region while maintaining local continuity. The branch structure probability, bifurcation point probability, and endpoint probability are further used in topology optimization processes such as candidate edge selection, protection of key topological nodes, and pruning of short branches.
[0044] Existing Laplace shrinkage methods do not include any data-driven structural priors; the shrinkage direction is entirely determined by local geometric smoothness. This scheme predicts structural guidance information from 14-dimensional local geometric features using a random forest model and introduces the guidance target point as an explicit geometric constraint into the shrinkage process. This transforms the shrinkage direction of the branch region from "purely geometrically driven" to "geometric + learning dual-driven," fundamentally solving the problem of blind shrinkage direction in leaf-occupied areas.
[0045] To construct the learning-guided model, this embodiment generates learning samples based on a human-referenced skeleton. Each sample contains information such as local geometric features, branch structure labels, branch point labels, endpoint labels, local radius labels, and shrinkage target displacement. The same decision tree-based learner parameters are used throughout the model training process: the number of ensemble trees (NumLearningCycles) is set to 80, the maximum number of split nodes per tree (MaxNumSplits) is set to 60, the minimum number of samples per leaf node (MinLeafSize) is set to 20, and the random seed is 23, to ensure the reproducibility of model training and experimental results. A maximum of 50,000 valid sample points are extracted from the learning samples for training, and these are divided into training and validation sets at 80% and 20% respectively. This division is mainly used to check the fitting effect of the learning-guided model on local structural information. Finally, the skeleton extraction performance is evaluated using the entire citrus tree point cloud as the evaluation unit, and is assessed using both the human-referenced skeleton and external baseline methods. The samples used for skeleton quality evaluation are statistically analyzed on a per-tree basis to avoid equating the internal validation results of the point-level model with the skeleton extraction performance at the whole-tree scale.
[0046] In this embodiment, the training samples were derived from manually labeled skeleton data of 15 citrus trees at three different age stages (1-year-old saplings, 3-4-year-old grafted trees, and 10+-year-old mature trees). The total number of training samples was approximately 45,000 valid points, covering canopy structures of different varieties and different canopy closure levels.
[0047] S3. Learning-guided Laplace contraction. After obtaining the local geometric features and structural guidance information of the point cloud, this embodiment introduces them into the Laplace contraction process to improve the stability of the contraction of the branch centerline in the complex citrus canopy point cloud.
[0048] For the point cloud coordinates Pᵗ at the t-th iteration, construct an energy function containing a Laplace smoothing contraction term and a position-preserving term, expressed as:
[0049] in, Let be the point cloud coordinates at the t-th iteration. Let L be the updated shrinking point cloud coordinates, and L be the discrete Laplacian matrix constructed from the local neighborhood. For Laplace shrinkage weights, Maintain weights for positions.
[0050] The Laplacian smoothing contraction term is used to drive the point cloud to contract toward the local central structure, while the position preservation term is used to limit the point cloud from deviating excessively from its original geometry during the contraction process.
[0051] For citrus canopy point clouds, leaf noise, local missing parts, and branch interlacing can easily interfere with the contraction process that relies solely on geometric smoothing. Therefore, this embodiment introduces a learning guidance term into the basic Laplace contraction model, causing points with higher branch structure probabilities to move closer to the learning guidance target points predicted by the model. The energy function after learning guidance is defined as:
[0052] in, To learn the set of target points predicted by the guided model, To learn the guiding weight matrix. For the ... The learning guidance weight is defined as follows: (Points are given)
[0053] In the formula, To learn the guiding strength coefficient, For the first The probability of branch structure at each point To prevent the lower bound constant from being too small, this design imposes stronger learning objective constraints on points with higher branch structure probabilities during the shrinkage process, while the influence of leaves or noise regions with lower branch probabilities on centerline shrinkage is relatively weakened.
[0054] The above optimization problem is transformed into a sparse least squares problem to be solved in the implementation:
[0055] During the iteration process, the position preservation weights are dynamically updated based on changes in the local neighborhood scale, and the Laplace shrinkage weights are gradually increased. The shrinkage process stops when the local scale change between adjacent iterations is less than a set threshold, or when the number of iterations reaches its maximum value, resulting in a set of shrunken points. In other words, each point in the origin cloud gains a new position after shrinkage, and all the new positions constitute the shrunken point set. In this embodiment, the threshold is set to 0.01, and the maximum number of iterations is 20. In other embodiments, it can also be set to adaptively limit the maximum number of iterations to no more than 20. Compared with the basic shrinkage model that relies solely on geometric constraints, the learning guide term can introduce branch structure discrimination information during the shrinkage process, making the shrinkage direction of the branch region more stable and reducing the impact of leaf noise, local missing parts, and incomplete bifurcation regions on the skeleton extraction results.
[0056] S4. Candidate skeleton node sampling and adjacency inheritance. After learning-guided Laplace shrinkage, the set of shrunken points... The points have clustered towards the central region of the branches, but still consist of a large number of discrete points and cannot yet be directly represented as a skeleton graph with node and edge relationships. Therefore, candidate skeleton nodes are further sampled on the shrunken point set, and initial candidate connections are constructed based on the local adjacency relationships of the point cloud.
[0057] Candidate skeleton nodes are generated using the farthest point sampling method under sphere cover constraints. The sampling radius is defined as:
[0058] In the formula, The sphere covers the sampling radius. The sampling radius coefficient, Let be the diagonal length of the bounding box of the fruit tree canopy point cloud P after downsampling and scale normalization. A bounding box is the smallest axis-aligned cuboid that can completely enclose the point cloud. That is, the straight-line distance between two opposite vertices of the cuboid. During the sampling process, the uncovered shrinking point with the largest distance to the existing candidate skeleton node is taken as the new candidate skeleton node, and this node is used as the center of the sphere. The attribution relationships of shrinking points within the neighborhood are updated for the radius. In this embodiment, candidate skeleton nodes are used to construct a candidate skeleton graph.
[0059] Repeat this process until all points in the shrinking point set are covered by candidate skeleton nodes, thus obtaining a candidate skeleton node set. And the mapping of the shrinkage point to the candidate skeleton node. .
[0060] After the candidate skeleton nodes are generated, this embodiment does not directly establish connections based on the Euclidean distance between the candidate skeleton nodes, but instead constructs a candidate topology graph by inheriting the local adjacency relationships in the set of contraction points.
[0061] For any point of contraction Let the candidate skeleton node to which it belongs be . ,Right now If there exists a point in its local neighborhood. Furthermore, the neighboring point belongs to another candidate skeleton node. ,Right now and Then in the candidate skeleton node and Add one more connection support between them:
[0062] In the formula, Represents candidate skeleton nodes and The connection support between them is inherited from the local adjacency relationship.
[0063] The connection support between all candidate skeleton nodes constitutes the initial candidate adjacency matrix. For isolated candidate skeleton nodes without non-diagonal connections, connect their nearest candidate skeleton nodes to avoid completely isolated nodes in the candidate graph. The final result is... It serves as input for subsequent branch structure-aware topology optimization, rather than directly as the final skeleton topology.
[0064] S5. Branch-structure-aware topology optimization. Candidate adjacency matrix obtained from adjacency inheritance. While it can preserve local connectivity in the shrunken point cloud, it may still contain weak connections and cross-branch misconnections caused by leaf noise, missing point clouds, or spatial proximity of adjacent branches. Therefore, branch structure probability and edge support are further introduced to perform structure-aware optimization on the candidate topology graph to obtain a skeleton connection that better reflects the growth relationship of citrus canopy branches.
[0065] First, the point-level learning guidance results are mapped to the candidate skeleton node level. For the candidate skeleton nodes... Let the set of its corresponding contraction points be... The branch structure probability of this candidate skeleton node is defined as follows:
[0066] In the formula, Candidate skeleton nodes The probability of branch structure, For the first The probability of the point-level branch structure corresponding to each contraction point. For candidate edges... The probability of its side branch structure is represented by the mean of the probabilities of the two end nodes:
[0067] To enhance the preservation of true branch connections, edge support is combined with branch structure probability to define the effective support of candidate edges:
[0068] In the formula, Candidate edges Effective support, The original connection support obtained from adjacency inheritance. This is the enhancement coefficient for edge support based on branch structure probability. This definition allows candidate connections with higher branch structure probabilities to receive higher weight in subsequent screening, while weak connections with lower branch probabilities are more easily suppressed.
[0069] Subsequently, candidate connections are initially screened based on the effective support quantile threshold and candidate edge length constraints to eliminate candidate edges with low support or abnormal geometric span, thereby reducing the risk of false connections caused by leaf residue, local noise, and spatially neighboring branches.
[0070] Considering the presence of local occlusion and missing branches in complex citrus canopy point clouds, relying solely on candidate adjacency relationships may lead to local skeleton breaks. Therefore, short-distance bridging edges are added within the local neighborhood of candidate skeleton nodes. If two candidate skeleton nodes are spatially nearest neighbors and their distance does not exceed the local scale constraint, the connection is added, provided the branch structure probability condition is satisfied. This step compensates for candidate graph breaks caused by local point cloud defects, but the added edges only participate in subsequent cost optimization as candidate connections and are not directly used as final skeleton edges. After completing candidate edge selection and local bridging, the candidate edge connection cost function is constructed:
[0071] In the formula, Candidate edges The connection cost, The branch structure penalty strength coefficient, This is the penalty index.
[0072] As can be seen from the formula, candidate edges with shorter lengths, higher effective support, and greater probability of branch structure have lower costs and are more likely to be retained in subsequent skeleton connections; conversely, candidate edges with longer lengths, lower support, or weaker probability of branch structure have higher costs.
[0073] Based on this cost function, low-cost skeleton connections are subsequently constructed in the candidate topology graph, so that the final skeleton simultaneously satisfies spatial proximity, adjacency support and branch structure consistency, thus obtaining the candidate skeleton graph.
[0074] Existing methods (such as L1-median algorithm and TreeQSM) mainly rely on Euclidean distance or cylindrical fitting residuals between candidate nodes when constructing skeleton connections, lacking awareness of the branching logic of the plant. The cost function of this scheme simultaneously incorporates information from three dimensions: side length... (Spatial proximity); Adjacency support (Connectivity evidence of shrinking point cloud inheritance); Branch probability (Structural consistency predicted by the learning model). In the denominator This allows support to influence costs in a sublinear manner, preventing high-support edges from becoming overly dominant and preserving low-support but structurally reliable connections.
[0075] S6. Root Protection and Short End Branch Pruning. After completing the topology optimization based on branch and trunk structure perception, the candidate skeleton map may still contain redundant end branches formed by local noise, leaf residue, or short-distance misconnections. Meanwhile, the base of the citrus tree canopy trunk is a critical area for maintaining the tree's topological connectivity; if it is mistakenly deleted during pruning, it will directly affect the trunk's continuity and subsequent structural phenotypic analysis. Therefore, root protection and short end branch pruning are further introduced to perform final topology refinement of the candidate skeleton map.
[0076] First, the root node is determined based on the height position and horizontal centrality of the candidate skeleton nodes in the candidate skeleton diagram. Specifically, candidate skeleton nodes are searched in the low-height region, and nodes that are close to the horizontal center of the canopy and have a relatively low height are preferentially selected as the root node. In this embodiment, the lowest and highest heights of the candidate skeleton nodes are set as follows: and The low-altitude zone is defined as the area that occupies 16% of the entire altitude range, starting from the lowest altitude. The candidate skeleton nodes belong to the low-height region. The root node is then determined only within this region, taking into account the horizontal centrality of the nodes.
[0077] Subsequently, a root protection region is constructed centered on the root node to protect the main trunk base nodes and connections within this region, preventing them from being mistakenly deleted during subsequent pruning. During short branch pruning, the nearest branch path is obtained by searching from the skeleton endpoint to the nearest branching or main trunk node. If the branch path is short and does not contain high-probability nodes or high-branching-probability nodes, it is identified as a redundant branch formed by noise points, leaf remnants, or local misconnections and is pruned. Conversely, branch paths with high endpoint probabilities (a probability threshold can be set based on actual conditions to define high probabilities) or containing key branching structures are retained even if short, to reduce the risk of mistakenly deleting genuine small branches.
[0078] In this embodiment, for the candidate skeleton node at the end of the branch... The endpoint probabilities output by the model As a basis for judgment, The node is defined as a high-end probability node, and the end branch containing this node is protected; when If the endpoint protection condition is not met, further judgment on whether to prune the branch will be made based on the length of the branch path and the probability of the branching point.
[0079] High-end fork probability nodes refer to candidate skeleton nodes whose predicted fork probability exceeds a set threshold. For a terminal branch path P = {v1, v2, ..., vm} formed from the terminal node to the nearest fork node or trunk node, calculate the fork probability of each candidate skeleton node in the path and take the maximum value: ; when When the probability is greater than 0.92, the terminal branch is considered to contain a node with a high probability of branching, and the terminal branch is protected; otherwise, the decision to prune is made based on the endpoint probability and the length of the terminal branch path. Using the maximum path value as the criterion ensures that as long as there is a credible branch structure in the path, it is retained, avoiding the accidental deletion of real branches due to the mean effect of other low-probability nodes.
[0080] By protecting the roots and pruning short branches, a final framework of the citrus canopy was obtained, characterized by good continuity at the base of the main trunk, fewer redundant short branches, and a simpler topological structure. The relevant processes are as follows: Figure 4 As shown, the process of candidate skeleton nodes and candidate skeletons constructed by inheritance and adjacency relationships is illustrated; the root node is determined based on the preset low-height region and horizontal centrality; a root protection region is constructed around the root node to avoid the trunk base being accidentally deleted during the pruning process; short end branches are judged for leaf end paths, and only redundant end branches that are short in length and do not meet the conditions for endpoint protection and bifurcation protection are pruned to obtain the final skeleton topology.
[0081] In this embodiment, the shorter terminal branch is not determined based on a fixed number of meters, but rather adaptively based on the node spacing of the current candidate skeleton. Specifically, the median length of the candidate edge in the candidate skeleton graph is first calculated and used as the baseline length. When the terminal branch path length is less than 5 times the baseline length, the terminal branch is defined as a shorter terminal branch. Then, the endpoint probability and the branching point probability are combined to determine whether the terminal branch is a redundant terminal branch.
[0082] S7. Extraction of branch structure phenotypic parameters based on the skeleton, specifically including: S701, Method for Calculating the Inclination Angle of Citrus Branches To quantitatively characterize the growth posture and spreading characteristics of multi-level branching in citrus, branch inclination angles were calculated based on the extracted three-dimensional skeleton topology. The branch inclination angle is defined as the angle between the branch direction vector and the vertical axis. The angle between axes describes the degree to which a branch is upright or spread out relative to the vertical direction. A diagram illustrating the calculation of branch inclination angle is shown below. Figure 5 As shown, The angle between the branch direction vector and the vertical Z-axis; 1, 2, and 3 represent the primary main branch, secondary lateral branch, and tertiary fruiting branch, respectively; the enlarged view shows the branch inclination angle labeling method.
[0083] Based on the connection relationships between skeleton nodes, branch segments are represented as three-dimensional vectors composed of adjacent skeleton nodes. For any branch segment, let its starting and ending skeleton nodes be respectively... and Then the branch direction vector can be expressed as:
[0084] The branch inclination angle is calculated from the angle between the branch direction vector and the vertical unit vector:
[0085] In the formula, Represents a unit vector in the vertical direction. This represents the angle between the branch segment and the vertical Z-axis. Because... It is a unit vector. The smaller the angle, the closer the branch is to the vertical direction; when the angle is close to 90°, the branch is closer to horizontal development. This embodiment retains the effective angles within the range of 0-180° to reflect the complete distribution of branch direction in vertical space, and statistically analyzes the branch inclination parameters of primary main branches, secondary lateral branches, and tertiary fruiting branches in combination with the skeleton topology hierarchy.
[0086] S702. Calculation Method for Azimuth and Direction Distribution of Citrus Branches and Trunks Branch inclination angle primarily describes the degree of uprightness or spread of a branch relative to the vertical direction, while branch azimuth angle characterizes the spatial extension direction of a branch in the horizontal plane. To further analyze the distribution characteristics of citrus tree canopy branches in different directions, this embodiment calculates branch azimuth angles based on the extracted three-dimensional skeleton topology. For any branch segment, let the three-dimensional coordinates of its starting and ending skeleton nodes be respectively... and Then the branch segment is horizontal The projection vector on the plane is:
[0087] The azimuth angle of the branch is defined as the sum of the horizontal projection vector and the horizontal projection vector. Angle between the positive directions of the axis:
[0088] In the formula, It is the arctangent function in the fourth quadrant. This represents the azimuth angle of the branch segment in the horizontal plane. For ease of statistical analysis, [the following is used:] The range is converted to 0-360°, and the azimuth intervals are divided into 10° intervals. This embodiment calculates the percentage of branch length and the percentage of branch quantity within each azimuth interval. Let... For the first Azimuth range Let be the set of branch segments whose azimuth angles fall into this interval. Then, the proportion of branch length and the proportion of branch quantity in this interval are respectively:
[0089] The percentage of branches is defined as follows:
[0090] In the formula, The length of the branch segment. For the first The number of branch segments within each directional interval This represents the total number of branch segments included in the statistics. The branch length percentage reflects the branch extension intensity in different horizontal directions, while the branch quantity percentage reflects the branching frequency in different directions. For example, by using an azimuth top view and a polar coordinate distribution map, the directional growth characteristics of citrus tree canopy branches can be analyzed from a horizontal spatial perspective.
[0091] S703, Method for Calculating Branch Diameter In fruit tree breeding and production management, researchers typically use vernier calipers to manually measure and statistically analyze branch diameters at a fixed height above the ground or on fixed-level branches (fruiting branches of levels 1-3 or higher) to assess crop growth health and reasonable fruit load. This embodiment uses trunk diameter as an example, as it is a crucial structural phenotypic indicator reflecting the tree's growth vigor, mechanical support capacity, and water and nutrient transport capacity. To maintain consistency with manual measurement locations, this embodiment uses a three-dimensional point cloud of the citrus canopy to extract trunk cross-section points at a fixed height above the ground. A combination of cross-section slicing extraction, radius thresholding, and RANSAC circle fitting is employed to estimate the trunk diameter.
[0092] Considering issues such as shading by branches near the ground, outliers, and uneven density of local point clouds, a predetermined distance above the ground is used as the calculation section for the trunk diameter. The predetermined distance is 0.05~0.3m. In this embodiment, the distance above the ground is selected. The section at this height is used as the calculation section for the trunk diameter, and the trunk diameter at this height is denoted as... First, extract the set of cross-sectional slice points near the target height:
[0093] In the formula, Add clouds to a single citrus tree. For point The height relative to the ground reference plane, where This is the half-thickness of the cross section. To accommodate differences in point cloud density among different samples, this embodiment employs a step-by-step relaxation strategy for adjustment. This is to ensure that the number of cross-section points meets the minimum requirements for circle fitting.
[0094] Subsequently, to suppress the interference of branch points and outliers on the section fitting, the median of the section point coordinates is first used to estimate the section center:
[0095] For the cross-section point Calculate its horizontal radial distance from the center of the cross section.
[0096] Retain satisfaction The points constitute a set of radius-constrained sections. .in The radius threshold is used to remove branch points and noise points that are far from the main trunk, thereby improving the stability of the fit.
[0097] Finally Projecting onto the XY plane yields a two-dimensional point set. The RANSAC fitting model method was used to estimate the cross-sectional parameters, and the parameters were obtained. :
[0098] Using radial residuals as a consistency measure
[0099] when When it is determined to be an interior point, among which The consistency threshold is used to control the tolerance radius of the set of interior points. The circle with the most interior points is selected as the optimal model. The diameter of the main trunk is obtained. By extracting cross-section slices and filtering the radius threshold, the influence of branches, weeds, outliers, and local noise near the ground on the cross-section fitting can be reduced; RANSAC circle fitting can obtain a relatively stable cross-section radius estimate even with a small number of outliers, thus realizing the automatic extraction of the diameter of the citrus main trunk.
[0100] The recommended values for the key parameters in this embodiment are as follows: SOR neighborhood number k=600, standard deviation multiple n=3; KD-tree nearest neighbor number k=20; learning guidance strength coefficient γ=2.0, lower limit constant ε=0.01; sampling radius coefficient κ=0.02; edge support enhancement coefficient β=1.5; branch structure penalty index η=2.0; endpoint probability threshold 0.86; bifurcation point probability threshold 0.92; cross-sectional half thickness Δh=0.01m; radius threshold rg=0.05m; consistency threshold τ=0.005m. These parameters can be adjusted appropriately according to different tree species and scanning conditions.
[0101] Compared to the basic Laplace contraction method, which relies solely on geometrical smoothing constraints, the basic method is prone to centerline shift and skeletal breakage in point cloud missing areas caused by shading from citrus canopy leaves. This invention introduces a learning guide term in steps S2-S3, allowing the contraction direction of the branch region to be guided by structural priors, which is expected to significantly improve the skeletal continuity of missing areas. Compared to TreeQSM: TreeQSM reconstructs the trunk structure by fitting a cylinder, performing well in the main trunk and thick branch regions, but its ability to reconstruct the topology of small branches and complex branching structures is limited. This invention, through adjacency inheritance and multi-constraint topology optimization in steps S4-S5, not only preserves the thick branch structure but also restores the connectivity of small branches through branch probability guidance. Compared to the L1-median algorithm, which relies on local median fitting of the point cloud, the L1-median algorithm is prone to cross-branch misconnections and false forks in mixed branch and leaf regions. This invention avoids the risk of misconnections through pure distance connections by using an adjacency inheritance strategy (step S4), and further eliminates redundant terminal branches through probability-driven pruning in step S6. Overall advantages: The core advantage of this invention lies in the organic combination of data-driven structure awareness (learning-guided model) and a mathematically rigorous geometric optimization framework (Laplacian contraction + graph optimization), forming a complete closed loop of "prediction → contraction → graph construction → pruning". The modules work together to make the final skeleton superior to a single method in terms of completeness, topological correctness and robustness.
[0102] This solution addresses the technical challenges of mixed branches and leaves, local missing branches, and topological misconnections in complex fruit tree canopy point clouds. It constructs a learning-guided model to predict point-level structural guidance information and incorporates this information into the Laplace contraction process. This guides points with higher branch structure probabilities to converge towards the learning-guided target point, effectively improving the stability and accuracy of branch centerline contraction and reducing interference from leaf noise and local missing branches on the contraction direction. Furthermore, the solution employs an adjacency inheritance strategy during candidate skeleton construction, inheriting and mapping local adjacency relationships from the contraction point set to candidate skeleton nodes. It further combines branch structure probabilities and effective support to construct a connection cost function, effectively suppressing cross-branch misconnections and pseudo-bidding during topology optimization. Based on this, root protection and short-terminal branch pruning strategies ensure the topological continuity of the trunk base while reducing redundant terminal branches, ultimately yielding a fruit tree canopy skeleton map with strong continuity and high topological rationality. This solution not only enables high-precision skeleton extraction, but also provides a reliable structural foundation for subsequent calculations of structural phenotypic parameters such as branch inclination angle, branch azimuth angle, and branch diameter, as well as downstream applications such as branch and leaf separation, thus providing effective technical support for smart orchard management and fruit tree phenomics research.
[0103] The above are merely embodiments of the present invention. The invention is not limited to the fields covered by these embodiments. Commonly known structures and characteristics in the solutions are not described in detail here. Those skilled in the art are aware of all common technical knowledge in the field prior to the application date or priority date, are able to access all existing technologies in that field, and have the ability to apply conventional experimental methods prior to that date. Those skilled in the art can, under the guidance of this application, improve and implement this solution in combination with their own capabilities. Some typical known structures or methods should not be obstacles for those skilled in the art to implement this application. It should be noted that those skilled in the art can make several modifications and improvements without departing from the structure of the present invention. These should also be considered within the scope of protection of the present invention, and will not affect the effectiveness of the implementation of the present invention or the practicality of the patent. The scope of protection claimed in this application should be determined by the content of its claims, and the specific embodiments described in the specification can be used to interpret the content of the claims.
Claims
1. A method for extracting the crown framework and analyzing the phenotypic structure of fruit trees, characterized in that, Includes the following steps: S1. Obtain the point cloud of the fruit tree canopy, perform noise reduction, downsampling and scale normalization preprocessing on the point cloud, and calculate the local geometric features of each point; S2. Using local geometric features as input, a pre-trained learning guidance model is used to predict the structural guidance information of each point. The structural guidance information includes the probability of branch structure, the probability of bifurcation point, the probability of endpoint, the local radius, and the displacement of the shrinkage target. S3. Introduce structural guidance information into the Laplace contraction energy function to iteratively contract the point cloud. The Laplace contraction energy function includes a Laplace smooth contraction term, a position preservation term, and a learning guidance term. The learning guidance term makes points with high probability of branch structure approach the learning guidance target point indicated by the contraction target displacement. After iterative convergence, the set of contracted points is obtained. S4. Sample candidate skeleton nodes for the shrinking point set, and inherit and map the local adjacency relationships in the shrinking point set to the candidate skeleton nodes to construct a candidate adjacency matrix. S5. Map the branch structure probabilities at the point level to the candidate skeleton nodes and candidate edges, calculate the effective support of the candidate edges by combining the candidate adjacency matrix, construct the connection cost function based on the geometric length of the candidate edges and the effective support, filter the skeleton connections according to the connection cost function, and obtain the candidate skeleton graph after topology optimization. S6. Determine the root node based on the candidate skeleton diagram and protect the root region. Identify the branch paths starting from the skeleton endpoints. Determine the branch paths with a length less than the set threshold and without high-bidding-point probability nodes or high-end-point probability nodes as redundant branches and prune them to obtain the final skeleton diagram.
2. The method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks according to claim 1, characterized in that: It also includes S7, calculating branch structure phenotypic parameters based on the final skeleton diagram, including branch inclination angle, branch azimuth angle and / or branch diameter; The branch inclination angle is the angle between the branch direction vector and the vertical direction, the branch azimuth angle is the angle between the projection of the branch direction vector onto the horizontal plane and the set horizontal direction, and the branch diameter is obtained by extracting cross-sectional points at a fixed height above the ground and performing circle fitting.
3. The method for extracting the crown framework and analyzing the branch and trunk structure phenotype of fruit trees according to claim 1, characterized in that: Step S1 specifically includes: The fruit trees are scanned around an S-shaped path using a data acquisition device to obtain raw point cloud data containing spatial coordinate information; after the raw point cloud data is solved and registered, individual tree segmentation is performed to obtain the canopy point cloud of individual fruit trees; Statistical outlier filtering is used to denoise single-tree point clouds. The denoised single-tree point cloud was downsampled and scaled. For the normalized point cloud Use a KD-tree to search each point Search for its k nearest neighbors and construct a local neighborhood. ; The covariance matrix of the point cloud is calculated in the local neighborhood, and the eigenvalues are obtained through principal component analysis. ,in ; Based on the eigenvalues, local geometric descriptors such as linearity, flatness, and curvature are further calculated to characterize the linearity, flatness, and geometric complexity of the local structure of the point cloud. Calculate local linearity, flatness, and curvature: ; Local linearity, flatness, and curvature are defined as follows: ; ; in, , and Let represent the linearity, flatness, and curvature of the local neighborhood of the i-th point, respectively; It also extracts normalized spatial coordinates, local point density, neighborhood average distance, neighborhood distance standard deviation, vertical position, and normalized height features, which together constitute point-level local geometric features.
4. The method for extracting the crown framework and analyzing the branch and trunk structure phenotype of fruit trees according to claim 3, characterized in that: S2 specifically includes: Vectors of local geometric features Using random forest-like models as input, a learning-guided model is constructed to predict the probability of branch structure, branching point probability, and endpoint probability, as well as estimate the local radius and shrinkage target displacement. For the i-th point, the structural guidance information output by the learning guidance model is represented as: ; in, For the probability of branch structure, The probability of the bifurcation point. For endpoint probabilities, This is a local radius estimate. To learn the target displacement of the contraction predicted by the model; The structural guidance information predicted by the learning guidance model for each point is used as the point-level learning guidance result. The learning guidance target point of the i-th point under learning guidance Defined as: 。 5. The method for extracting the crown framework and analyzing the branch and trunk structure phenotype of fruit trees according to claim 3, characterized in that: S3 specifically includes: For the point cloud coordinates Pᵗ at the t-th iteration, construct an energy function containing a Laplace smoothing contraction term and a position-preserving term, expressed as: ; in, Let be the point cloud coordinates at the t-th iteration. Let L be the updated shrinking point cloud coordinates, and L be the discrete Laplacian matrix constructed from the local neighborhood. For Laplace shrinkage weights, Maintain weight for position; The Laplacian smoothing contraction term is used to drive the point cloud to contract toward the local central structure, while the position preservation term is used to limit the point cloud from deviating excessively from its original geometry during the contraction process; A learning guide term is introduced into the basic Laplace contraction model to guide points with higher branch structure probabilities toward the learning guide target point predicted by the learning guide model. The energy function after learning guide is defined as: ; in, To learn the set of target points predicted by the guided model, To learn the guiding weight matrix, for the th The learning guidance weight is defined as follows: (Points are given) ; In the formula, To learn the guiding strength coefficient, For the first The probability of branch structure at each point To prevent the lower bound constant from being too small; The above optimization problem is transformed into a sparse least squares problem to be solved in the implementation: ; During the iteration process, the position preservation weights are dynamically updated based on changes in the local neighborhood scale, and the Laplace shrinkage weights are gradually increased. The shrinkage process stops when the local scale change between adjacent iterations is less than a set threshold, or when the number of iterations reaches the maximum value, resulting in a set of shrinkage points. .
6. The method for extracting the crown framework and analyzing the branch and trunk structure phenotype of fruit trees according to claim 5, characterized in that: Step S4 specifically includes: Candidate skeleton nodes are generated using the farthest point sampling method under sphere cover constraints, and the sampling radius is defined as: ; In the formula, The sphere covers the sampling radius. The sampling radius coefficient, is the length of the diagonal of the bounding box of the fruit tree canopy point cloud P after downsampling and scale normalization. During the sampling process, the uncovered shrinkage point with the largest distance from the existing candidate skeleton nodes is selected as the new candidate skeleton node, and this node is used as the center of the sphere. Update the attribution of shrinking points within the neighborhood for the radius; Repeat this process until all points in the shrinking point set are covered by candidate skeleton nodes, thus obtaining a candidate skeleton node set. And the mapping of the shrinkage point to the candidate skeleton node. ; For any point of contraction Let the candidate skeleton node to which it belongs be . ,Right now ; If there are points in its local neighborhood Furthermore, the neighboring point belongs to another candidate skeleton node. ,Right now and Then in the candidate skeleton node and Add one more connection support between them: ; In the formula, Represents candidate skeleton nodes and The connection support inherited from local adjacency relationships; The connection support between all candidate skeleton nodes constitutes the initial candidate adjacency matrix. .
7. The method for extracting the crown skeleton of fruit trees and analyzing the phenotypic structure of branches and trunks according to claim 6, characterized in that: Step S5 specifically includes: The point-level learning guidance results are mapped to the candidate skeleton node level. Let the set of its corresponding contraction points be... The branch structure probability of this candidate skeleton node is defined as follows: ; In the formula, Candidate skeleton nodes The probability of branch structure, For the first The probability of the point-level branch structure corresponding to each contraction point, for candidate edges The probability of its side branch structure is represented by the mean of the probabilities of the two end nodes: ; To enhance the preservation of true branch connections, edge support is combined with branch structure probability, and the effective support of candidate edges is defined as: ; In the formula, Candidate edges Effective support, The original connection support obtained from adjacency inheritance. This is the enhancement coefficient for the probability of the branch structure supporting the edge; Short-distance bridging edges are added within the local neighborhood of candidate skeleton nodes. If two candidate skeleton nodes are spatially nearest neighbors and their distance does not exceed the local scale constraint, the connection is added while satisfying the branch structure probability condition. After completing candidate edge selection and local bridging, the candidate edge connection cost function is constructed: ; In the formula, Candidate edges The connection cost, The branch structure penalty strength coefficient, The penalty index; Based on this cost function, a low-cost skeleton connection relationship is constructed in the candidate topology graph so that the final skeleton simultaneously satisfies spatial proximity, adjacency support and branch structure consistency, thus obtaining the candidate skeleton graph.
8. The method for extracting the crown framework and analyzing the branch and trunk structure phenotype of fruit trees according to claim 7, characterized in that: Step S6 specifically includes: Search for candidate skeleton nodes in the low-height region, and prioritize nodes that are close to the horizontal center of the canopy and have a lower height as the root node; During the short branch pruning process, the nearest branch or trunk node is searched from the skeleton endpoint to obtain the branch path. If the branch path is short and does not contain high-end point probability nodes or high-branch point probability nodes, it is identified as a redundant branch and pruned. Branches with high endpoint probability or containing key branch structures are retained. The final skeleton diagram is obtained by protecting the roots and pruning short branches.
9. The method for extracting the crown framework of fruit trees and analyzing the phenotypic structure of branches and trunks according to claim 2, characterized in that: Step S7 specifically includes: S701, Calculation of the inclination angle of fruit tree branches: Based on the connection relationships between skeleton nodes, a branch segment is represented as a three-dimensional vector composed of adjacent skeleton nodes. For any branch segment, let its starting and ending skeleton nodes be respectively... and Then the branch direction vector can be expressed as: ; The branch inclination angle is calculated from the angle between the branch direction vector and the vertical unit vector: ; In the formula, Represents a unit vector in the vertical direction. This represents the angle between the branch segment and the vertical Z-axis, retaining the effective angles within the range of 0-180° to reflect the complete distribution of the branch segment direction in vertical space. The branch inclination angle parameters of the first-level main branches, second-level lateral branches, and third-level fruiting branches are statistically analyzed in combination with the skeleton topology hierarchy. S702. Calculation of Azimuth and Direction Distribution of Fruit Tree Branches and Trunks: For any branch segment, let the three-dimensional coordinates of its starting and ending skeleton nodes be respectively... and Then the branch segment is horizontal The projection vector on the plane is: ; The azimuth angle of the branch is defined as the sum of the horizontal projection vector and the horizontal projection vector. Angle between the positive directions of the axis: ; In the formula, It is the arctangent function in the fourth quadrant. Indicates the azimuth angle of the branch segment in the horizontal plane. Convert to a range of 0-360° and divide the azimuth intervals into 10° intervals; Calculate the percentage of branch length and the percentage of branch number in different directional intervals, and assume... For the first Azimuth range Let be the set of branch segments whose azimuth angles fall into this interval. Then, the proportion of branch length and the proportion of branch quantity in this interval are respectively: ; The percentage of branches is defined as follows: ; In the formula, The length of the branch segment. For the first The number of branch segments within each directional interval This represents the total number of branch segments included in the statistics; S703, Calculation of branch diameter: Select the preset distance from the ground The section at this height is used as the calculation section for the trunk diameter, and the trunk diameter at this height is denoted as... ; First, extract the set of cross-sectional slice points near the target height: ; In the formula, This is a non-location cloud representing a single fruit tree. For point The height relative to the ground reference plane, where The thickness is half of the cross section. The center of the section is estimated using the median of the coordinates of the points on the section: ; For the cross-section point Calculate its horizontal radial distance from the center of the cross section. ; Retain satisfaction The points constitute a set of radius-constrained sections. ,in The radius threshold is used to remove branch points and noise points that are far from the main trunk, thereby improving the stability of the fit. Will Projecting onto the XY plane yields a two-dimensional point set. The RANSAC fitting model method was used to estimate the cross-sectional parameters, and the parameters were obtained. : ; Radial residuals are used as a consistency measure: ; when When it is determined to be an interior point, among which This is the consistency threshold, used to control the tolerance radius of the interior point set; The circle with the most interior points is selected as the optimal model. And the diameter of the main trunk is obtained.
