A structure weight guided tree point cloud growing type reconstruction method, system, terminal and storage medium
By using a structure weight-guided method, the problems of trunk continuity and lateral branch identification in tree point cloud skeleton extraction were solved, generating a complete hierarchical tree skeleton model containing trunks and multi-level lateral branches, and achieving stable reconstruction of tree structure.
Patent Information
- Application Number
- CN202611173163.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-04
- Publication Date
- 2026-11-06
- Estimated Expiration
- 2046-08-04
AI Technical Summary
Existing technologies suffer from insufficient trunk continuity, difficulty in identifying budding sites, and a lack of integrated modeling of the trunk and lateral branch hierarchical skeletons when extracting tree point cloud skeletons.
By using a structure weight-guided method, tree point cloud data is acquired, the initial seed points for the growth of the main trunk skeleton are determined, the continuous internode structure of the main trunk skeleton is generated, the budding points of lateral branches are identified, the lateral branch skeleton is recursively generated, and a hierarchical tree skeleton model is constructed.
It achieves stable and continuous growth of the main trunk framework and accurate identification of lateral branches, generating a complete hierarchical tree skeleton model containing the main trunk and multi-level lateral branches, while preserving topological connections and hierarchical affiliation information.
Smart Images

Figure CN122695118B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of three-dimensional point cloud processing technology, and in particular to a method, system, terminal, and computer-readable storage medium for the growth-based reconstruction of tree point clouds guided by structure weights. Background Technology
[0002] Tree 3D point cloud skeleton extraction and canopy structure modeling are widely used in digital forestry, landscape modeling, plant phenotypic analysis, and 3D visualization. With the development of LiDAR and photogrammetry technologies, tree point cloud data can more completely reflect the spatial distribution of the trunk, branches, and canopy, providing an important foundation for tree structure analysis. However, tree point clouds typically suffer from complex structures, multiple branching levels, significant local occlusion, uneven density, and strong canopy region dispersion, especially in the extraction of fine branches and the canopy itself, which are difficult to extract stably. While existing methods can achieve tree point cloud skeleton extraction or semantic classification to some extent, they still have shortcomings in areas such as continuous trunk growth, bud identification, and multi-level lateral branch modeling.
[0003] Therefore, existing technologies still need to be improved and developed. Summary of the Invention
[0004] The main objective of this invention is to provide a method, system, terminal, and computer-readable storage medium for tree point cloud growth reconstruction guided by structural weights, aiming to solve the problems of insufficient trunk continuity, difficulty in identifying budding sites, and lack of integrated modeling of the trunk and lateral branch hierarchical skeleton in the prior art when extracting the tree point cloud skeleton.
[0005] To achieve the above objectives, the present invention provides a structure weight-guided tree point cloud growth reconstruction method, which includes the following steps: Acquire tree point cloud data, and determine the initial seed points for the growth of the main trunk framework based on the tree point cloud data; Using the initial seed point as the starting node of the backbone skeleton, a continuous inter-segment structure of the backbone skeleton is generated under the constraint of the backbone point cloud. Based on the spatial correspondence between each internode in the continuous internode structure of the main trunk skeleton and the canopy point cloud, local growth resources are allocated to internodes with branching potential, and the location, germination direction, and germination resource clusters of buds that serve as lateral branch germination points are identified. Using the bud location, the germination direction, and the germination resource cluster as inputs, a lateral branch skeleton is recursively generated under the guidance of local resources, and the lateral branch skeleton is organized into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches.
[0006] Furthermore, the acquisition of tree point cloud data, and the determination of initial seed points for the growth of the main trunk framework based on the tree point cloud data, specifically includes: Acquire tree point cloud data, and based on the hierarchical growth characteristics of the trees represented by the tree point cloud data, establish a basic tree growth structure for recording the skeletal structure, wherein the basic tree growth structure includes buds, internodes, growth branches, and tree axes. Based on the tree point cloud data and skeleton hierarchy attributes, a point-level weight field is constructed. The point-level weight field is obtained by coupling the distance response term from the point to the skeleton with the skeleton hierarchy weight term, and is used to characterize the contribution of each position in the tree point cloud to the subsequent skeleton growth. The tree point cloud data is divided into trunk point cloud and canopy point cloud according to semantic tags. The median neighborhood distance is calculated based on the local neighborhood relationship of the trunk point cloud. The internode length and trunk hard constraint threshold are defined according to the median neighborhood distance. The initial seed point for trunk skeleton growth is extracted from the trunk point cloud in the vertical direction. The tree growth basic structure, the point-level weight field, the internode length, the trunk hard constraint threshold, and the initial seed point are used together as inputs for the trunk skeleton growth.
[0007] Furthermore, any point in the point-level weighted field weight value Represented as: ; in, Point The normalized distance response to the skeleton, This represents the point-level weights obtained by interpolating or mapping the skeleton vertex-level weights. This is the fusion coefficient between hierarchical weights and distance response. This is the hierarchical weight enhancement coefficient.
[0008] Furthermore, the step of using the initial seed point as the starting node of the backbone skeleton and generating a continuous inter-segment structure of the backbone skeleton under the constraints of the backbone point cloud specifically includes: Define a trunk grower, and use the initial seed point as the current bud point of the trunk grower. The input of the trunk grower includes the trunk point cloud, point-level weight, trunk growth step size, vertical direction, sensing cone angle, direction fusion parameter and hard constraint threshold. During each main stem extension process, a local spherical sensing domain is constructed with the current bud position as the center. Within the local spherical sensing domain, directional constraints are applied according to the sensing cone angle. Points located in the cone region in front of the current growth direction are retained as candidate sensing points. Points whose distance from the current bud position is less than a preset distance threshold are removed from the candidate sensing points to obtain effective sensing points. According to the point-level weight, the weight value corresponding to each effective sensing point is obtained. The unit direction vector of each effective sensing point relative to the current bud position is used as the weighted vector, and the weight value corresponding to each effective sensing point is used as the weighting coefficient. After weighted averaging and normalization, the dominant sensing direction is obtained. The existing growth direction of the current bud is taken as the default direction, the vertical direction is taken as the vertical directional direction, and the default direction, the dominant sensing direction and the vertical directional direction are weighted, summed and normalized according to the direction fusion parameter to obtain the final growth direction. Based on the final growth direction, using the main stem growth step size as the internode length, candidate positions are predicted, and the nearest distance from the candidate position to the main stem point cloud is calculated. The candidate position is then subjected to a hard constraint check based on the relationship between the nearest distance and the hard constraint threshold. If the candidate position passes the hard constraint check, it is accepted as a valid growth position. If the candidate position fails the hard constraint check, the main stem growth step size is shortened, the final growth direction is deflected toward the dominant sensing direction, and the candidate position is re-predicted. The hard constraint check is then re-executed until it passes or the maximum number of retries is reached, at which point the growth of the current branch is terminated, and the target candidate position is obtained. Centered on the target candidate position, search for the main points located in the neighborhood of the surrounding sphere in the main point cloud, construct a thin section along the final growth direction, include the main points within the coverage area of the thin section into the section point set, calculate the centroid of the section point set, and pull the target candidate position back towards the centroid direction to obtain the target growth position; A sub-bud is generated based on the target growth position. Internodes are constructed using the lines connecting the current bud and the sub-bud. The internode length, internode direction, and trunk point cloud index covered by the internode are recorded. The sub-bud is updated to the current bud in the next trunk extension process. Trunk extension continues until the current bud can no longer grow or a preset termination condition is reached, resulting in a continuous internode structure of the trunk skeleton.
[0009] Furthermore, the final growth direction is defined as: ; in, As the final growth direction, This indicates the current growth direction of the bud. This refers to the dominant sensing direction. Let be a unit vector pointing vertically upwards. and These are the weighting coefficients for the perceptual direction and the directional direction, respectively.
[0010] Furthermore, the process of allocating local growth resources to internodes with branching potential based on the spatial correspondence between each internode in the continuous internode structure of the main trunk framework and the canopy point cloud, and identifying the bud locations, germination directions, and germination resource clusters that serve as lateral branch germination points, specifically includes: Obtain each internode in the continuous internode structure of the trunk skeleton and its corresponding trunk point cloud index. Extract the local trunk point set corresponding to the internode from the trunk point cloud according to the trunk point cloud index. Using the local trunk point set as a reference, search for canopy points in the canopy point cloud whose distance from the local trunk point set is less than a preset resource mapping threshold as candidate resource points. Remove the canopy points that have been allocated to other internodes from the candidate resource points to obtain the local canopy resource points allocated to the internodes. Establish the resource mapping relationship between the internodes and the local canopy resource points. From the non-empty internodes of the local canopy resource point set, traverse adjacent internodes sequentially according to the growth order of the main stem, calculate the average symmetric nearest neighbor distance between the local canopy resource point sets of two adjacent internodes, and divide adjacent internodes whose average symmetric nearest neighbor distance is less than the internode length into the same resource group. After traversal, multiple resource groups are obtained. For each resource group, the positions of parent buds and child buds of all nodes within the resource group are collected. The principal axis is fitted based on the parent bud positions and child bud positions to obtain the principal axis direction vector of the resource group. A local reference axis segment of the resource group is constructed based on the principal axis direction vector. All canopy resource points in the resource group are projected onto a local two-dimensional plane perpendicular to the local reference axis segment to obtain the two-dimensional projection point set of the resource group. The number of sectors is adaptively determined based on the radius range of the two-dimensional projection point set. The local two-dimensional plane is divided into sectors according to the number of sectors. Each projection point in the two-dimensional projection point set is assigned to the corresponding sector according to its polar angle. The projection points in each sector are clustered. The clustering results are used as local resource clusters of the resource group. Each local resource cluster corresponds to a spatially independent side branch resource unit. For each local resource cluster, calculate the spatial centroid of all canopy resource points within the local resource cluster. Find the internode closest to the spatial centroid in the resource group to which the local resource cluster belongs. Determine the parent bud of the found internode as the starting node for lateral branch sprouting. Assign a valid sprouting mark to the parent bud. Assign the unit direction vector from the parent bud to the spatial centroid as the sprouting direction of the parent bud. Assign the coordinates of the spatial centroid as the sprouting position of the parent bud. Record all canopy resource points contained in the local resource cluster as the sprouting resource cluster of the parent bud.
[0011] Furthermore, the process of recursively generating a lateral branch skeleton under the guidance of local resources, using the bud location, the germination direction, and the germination resource cluster as inputs, and organizing the lateral branch skeleton into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches, specifically includes: Define a lateral branch grower. With the bud position, the germination direction and the germination resource cluster as input, iterate through the buds with valid germination marks in the current tree axis. For each germination direction, initialize a new lateral branch starting bud. The level of the lateral branch starting bud is the current tree axis level plus one, the initial spatial position is the corresponding germination position, and the initial growth direction is the corresponding germination direction. For each lateral branch initiation bud, the corresponding germination resource cluster is used as the initial frontier resource set. The process is expanded outward in a queue-style recursive manner. In each expansion, candidate points whose attention values meet the consistency condition are selected from the neighboring unvisited points. A comprehensive score is calculated based on the distance from the candidate point to the frontier and the attention value of the candidate point. The candidate point with the smallest comprehensive score is selected to be added to the frontier. After each round of expansion, the candidate points obtained in this round of screening are clustered. Candidate points that meet the clustering conditions are merged into resource clusters. The three-dimensional centroid of the resource cluster is calculated as the new bud position. A new growth direction is generated based on the current lateral branch terminal bud position and the three-dimensional centroid. Sub-buds and internode units are generated. The resource cluster is used as the resource basis for continued recursion until the lateral branch termination condition is met. The lateral branch axis structure is formed by organizing all the new buds and internodes that are formed after each lateral branch growth. The hierarchy of the lateral branch axis structure is the parent tree axis level plus one. All the lateral branch axis structures together with the main trunk axis form a hierarchical tree skeleton model.
[0012] Furthermore, to achieve the above objectives, the present invention also provides a structure weight-guided tree point cloud growth reconstruction system, which is used to implement the structure weight-guided tree point cloud growth reconstruction method described above. The structure weight-guided tree point cloud growth reconstruction system includes: The initial point determination module is used to acquire tree point cloud data and determine the initial seed point for the growth of the main trunk skeleton based on the tree point cloud data. The backbone generation module is used to generate a continuous inter-segment structure of the backbone under the constraints of the backbone point cloud, using the initial seed point as the starting node of the backbone. The budding site identification module is used to allocate local growth resources to internodes with branching potential based on the spatial correspondence between each internode in the continuous internode structure of the main trunk skeleton and the canopy point cloud, and to identify the bud location, budding direction and budding resource cluster as the budding point of lateral branches. The skeleton model generation module is used to recursively generate lateral branch skeletons under the guidance of local resources, taking the bud point position, the germination direction and the germination resource cluster as inputs, and organize the lateral branch skeletons into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches.
[0013] In addition, to achieve the above objectives, the present invention also provides a terminal, wherein the terminal includes: a memory, a processor, and a structure weight-guided tree point cloud growth reconstruction program stored in the memory and executable on the processor, wherein when the structure weight-guided tree point cloud growth reconstruction program is executed by the processor, it implements the steps of the structure weight-guided tree point cloud growth reconstruction method as described above.
[0014] Furthermore, to achieve the above objectives, the present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a structure weight-guided tree point cloud growth reconstruction program, which, when executed by a processor, implements the steps of the structure weight-guided tree point cloud growth reconstruction method as described above.
[0015] The beneficial effects of this invention are as follows: Acquiring tree point cloud data and determining the initial seed point provides a clear starting point and spatial reference for subsequent skeletal growth. Based on this, using the seed point as the starting node, the continuous internode structure generated under the geometric constraints of the trunk point cloud ensures that the trunk skeleton extends stably from the base to the tip along the tree's true morphology, avoiding skeleton breakage or deviation from the main point cloud. By establishing the spatial correspondence between each internode and the canopy point cloud, the determination of budding positions no longer relies on empirical thresholds or random sampling, but is based on the true spatial mapping between internodes and canopy resources, achieving precise positioning of branch initiation positions and rational allocation of local growth resources. Finally, using the identified bud locations, germination directions, and resource clusters as input, the lateral branch skeleton recursively generated under the guidance of local resources, together with the trunk skeleton, constitutes a complete hierarchical tree axis structure. This ensures that the final output tree model not only includes a single trunk line but also retains the topological connections and hierarchical affiliation information between the trunk and lateral branches at all levels. Attached Figure Description
[0016] Figure 1 This is a flowchart of a preferred embodiment of the tree point cloud growth reconstruction method guided by structure weights of the present invention; Figure 2 This is the overall flowchart of the tree point cloud growth reconstruction method guided by structural weights of the present invention; Figure 3 This is a flowchart of the definition of the basic structure, weight field and initial growth point of the tree growth in the tree point cloud growth reconstruction method guided by structural weights of the present invention. Figure 4 This is a flowchart of the perception-guided and constraint-corrected growth process in the tree point cloud growth reconstruction method guided by structural weights of the present invention. Figure 5 This is a flowchart of the budding site identification and resource allocation process in the tree point cloud growth reconstruction method guided by structural weights of the present invention. Figure 6 This is a flowchart of the lateral branch recursive growth and hierarchical skeleton output in the tree point cloud growth reconstruction method guided by structural weights of the present invention. Figure 7 This is a structural diagram of a preferred embodiment of the tree point cloud growth reconstruction system guided by structural weights of the present invention. Figure 8 This is a structural diagram of a preferred embodiment of the terminal of the present invention. Detailed Implementation
[0017] This application provides a method, system, terminal, and storage medium for tree point cloud growth reconstruction guided by structure weights. To make the objectives, technical solutions, and effects of this application clearer and more explicit, the following detailed description is provided with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only for explaining this application and are not intended to limit this application.
[0018] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have the same meaning as in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0019] Furthermore, if the embodiments of this invention involve descriptions such as "first" or "second," these descriptions are for descriptive purposes only and should not be construed as indicating or implying their relative importance or implicitly specifying the number of technical features indicated. Therefore, a feature defined with "first" or "second" may explicitly or implicitly include at least one of those features. Additionally, the technical solutions of the various embodiments can be combined with each other, but this must be based on the ability of those skilled in the art to implement them. If the combination of technical solutions is contradictory or impossible to implement, it should be considered that such a combination of technical solutions does not exist and is not within the scope of protection claimed by this invention.
[0020] The preferred embodiment of the present invention describes a structure weight-guided tree point cloud growth reconstruction method, such as... Figure 1 As shown, the structure weight-guided tree point cloud growth reconstruction method includes the following steps: Step S10: Obtain tree point cloud data, and determine the initial seed point for the growth of the main trunk skeleton based on the tree point cloud data.
[0021] Furthermore, the acquisition of tree point cloud data, and the determination of initial seed points for the growth of the main trunk framework based on the tree point cloud data, specifically includes: Step S101: Obtain tree point cloud data. Based on the hierarchical growth characteristics of the trees represented by the tree point cloud data, establish a basic tree growth structure for recording the skeletal structure. The basic tree growth structure includes buds, metamers, shoots, and axes.
[0022] In this embodiment, the program first reads the input tree point cloud data, which includes the spatial coordinates, color information, and semantic labels of each point. Based on the hierarchical growth characteristics of trees, the program establishes a unified tree growth structure representation model in memory.
[0023] A bud represents a point on a tree where it can continue to grow or sprout new branches at a given time. For each bud, the program records at least its unique ID, spatial location, current growth direction, parent node ID, age, and hierarchical level. In addition, the bud records its associated resource point index and budding-related information, including whether budding has occurred, budding direction, budding location, and budding resources. A bud is not only a geometric location point but also a control node for subsequent growth decisions.
[0024] A metamer represents a basic growth unit formed by the growth from a parent bud to a child bud. This structure records the parent bud, child bud, metamer length, and metamer direction, and further stores the corresponding trunk point cloud index and resource information. The metamer describes both a geometric edge in the tree skeleton and serves as a bridge between the point cloud and the skeleton.
[0025] A shoot is used to organize several consecutive internodes, representing a segment of growth formed in a particular growth cycle. It primarily records the tree axis number, cycle number, set of included internode numbers, and start and end nodes. This definition facilitates organizing growth according to a certain rhythm during simulation, rather than modeling it as isolated line segments.
[0026] A tree axis represents the trunk or a branch of a certain order in a tree, and is a higher-level hierarchical structure. The tree axis contains multiple internodes and buds, used to uniformly manage the continuous skeleton at the same order. The trunk can be considered a zero-order tree axis, and the branches can be considered higher-order tree axes. The tree axis structure clearly represents the hierarchical topology of the entire tree.
[0027] After adopting the above definition of the basic structure of tree growth, the node relationships, edge relationships, directional relationships, hierarchical relationships and resource relationships in the tree growth process can all be expressed in a unified data structure, laying the foundation for subsequent trunk growth, bud site identification and lateral branch recursive growth.
[0028] Step S102: Based on the tree point cloud data and skeleton hierarchical attributes, construct a point-level weight field. The point-level weight field is obtained by coupling the distance response term from the point to the skeleton with the skeleton hierarchical weight term, and is used to characterize the contribution of each position in the tree point cloud to the subsequent skeleton growth. Any point in the point-level weighted field weight value Represented as: ; in, Point The normalized distance response to the skeleton, This represents the point-level weights obtained by interpolating or mapping the skeleton vertex-level weights. This is the fusion coefficient between hierarchical weights and distance response. This is the hierarchical weight enhancement coefficient.
[0029] In this embodiment, the program first reads the tree skeleton model, point cloud data, and skeleton attribute file. The skeleton attributes include at least the spatial coordinates, width, hierarchical order, and component affiliation of the skeleton points. Using this information, the program organizes the skeleton vertices into an attributed skeleton graph structure.
[0030] The program assigns a basic level weight to each skeleton point based on the level to which the skeleton vertex belongs. Skeleton points at the same level have the same basic weight. Within the same level, the weight gradually decreases along the branch from the base to the tip. That is, the closer to the tip, the weaker the structural support and the less guiding effect on subsequent growth. This forms the hierarchical weight at the skeleton vertex level.
[0031] For any point in the point cloud, the program calculates the normalized distance response from that point to the nearest skeleton location. The closer the point is, the closer it is to the existing tree skeleton and the more likely it is to participate in subsequent skeleton extension; the farther the point is, the lower its reliability as a basis for current growth guidance. Therefore, the distance response value is between 0 and 1, with the closer the point is to the skeleton, the closer the distance response value is to 1.
[0032] Building upon this, the program maps the hierarchical weights at the skeletal vertex level to point-level hierarchical weights, then couples these weights with the normalized distance response to obtain the weight values for each point in the point cloud. These weight values are primarily used in subsequent processing for three purposes: as an attraction factor when selecting the growth direction of the main trunk, as a factor in resource competition during branch sprouting, and as a fundamental quantity constraining both spatial occupancy and structural attention. The weight field possesses both geometric proximity constraints and hierarchical guidance capabilities based on biological structures, ensuring that subsequent trunk extension and branch sprouting preferential responses better align with the structural characteristics of the tree.
[0033] Step S103: Divide the tree point cloud data into trunk point cloud and canopy point cloud according to semantic tags, calculate the median neighborhood distance based on the local neighborhood relationship of the trunk point cloud, define the internode length and trunk hard constraint threshold according to the median neighborhood distance, and extract the initial seed point for trunk skeleton growth from the trunk point cloud in the vertical direction. The expression for the internode length is: ; in, Indicates internode length. This is a control factor for intersegmental length. This represents the median neighborhood spacing of the backbone point cloud. This represents a truncation function used to limit the internode length to a preset range of 0.02 to 2.0. The backbone hard constraint threshold is defined as follows: ; in, This represents the threshold for hard constraints on the main branch.
[0034] In this embodiment, the program reads tree point cloud data containing semantic labels and weight information, and divides the point cloud into trunk point cloud and canopy point cloud according to the labels. Simultaneously, the program extracts the corresponding trunk weight and canopy weight. The significance of this division method is that the trunk growth stage mainly relies on the trunk point cloud as the geometric constraint object, while the lateral branch sprouting and canopy expansion stages mainly rely on the canopy point cloud as the perception object, thus allowing different growth stages to use corresponding data support.
[0035] The program calculates the median neighborhood distance based on the local neighborhood relationships of the backbone point cloud, which can be regarded as a scale benchmark under the current point cloud density. Based on this, the program further defines the inter-node length and the backbone hard constraint threshold. The inter-node length is limited to a preset range by multiplying the median neighborhood distance by an inter-node length control factor and then applying a truncation function. The backbone hard constraint threshold is defined as 1.5 times the median neighborhood distance. This threshold is used to constrain the maximum allowable deviation distance between the newly generated skeleton nodes and the real backbone point cloud, thereby ensuring that the generated skeleton does not deviate from the original backbone geometry.
[0036] Based on this, the program extracts initial seed points from the trunk point cloud along the vertical direction. Specifically, the program uses the vertical direction (i.e., the Z-axis direction) as the upward growth direction of the tree, selects a certain percentage (e.g., 2%) of a strip-shaped area at the bottom of the overall height range, and determines the initial growth point of the trunk within this area. The seed points obtained in this way are usually located near the geometric center of the lower part of the tree trunk, which can be used as a relatively stable starting position for the growth of the trunk skeleton.
[0037] Step S104: The tree growth basic structure, the point-level weight field, the internode length, the trunk hard constraint threshold, and the initial seed point are used together as inputs for the growth of the trunk skeleton.
[0038] In this embodiment, steps S101 to S103 are not sequential but rather three preprocessing tasks executed in parallel. After each task completes its preprocessing, the program merges and outputs the tree growth basic structure, point-level weight field, internode length, trunk hard constraint threshold, and initial seed point as the unified input to the trunk grower in step S20, jointly driving the gradual growth of the trunk skeleton.
[0039] Step S20: Using the initial seed point as the starting node of the backbone skeleton, generate the continuous inter-segment structure of the backbone skeleton under the constraint of the backbone point cloud.
[0040] The purpose of this step is to ensure that the generated skeleton can extend upwards along the overall growth trend of the tree and fit the geometric center area of the real trunk point cloud, avoiding deviation, jumping or drifting of the skeleton.
[0041] Furthermore, the step of using the initial seed point as the starting node of the backbone skeleton and generating a continuous inter-segment structure of the backbone skeleton under the constraints of the backbone point cloud specifically includes: Step S201: Define a trunk grower, using the initial seed point as the current bud point of the trunk grower. The input of the trunk grower includes trunk point cloud, point-level weights, trunk growth step size, vertical direction, sensing cone angle, direction fusion parameters, and hard constraint threshold.
[0042] In this embodiment, the program defines a trunk grower, which is used to start from the current bud point in the trunk point cloud, gradually find the next growth position that meets the directional and geometric constraints, and simultaneously construct new bud points and internode units. The program uses the initial seed point determined in step S10 as the current bud point of the trunk grower, that is, the starting position of the trunk skeleton growth.
[0043] The trunk grower receives the following inputs: trunk point cloud, serving as the baseline data for geometric constraints; point-level weights, derived from the weight field constructed in step S102, used to guide direction selection; trunk growth step size, derived from the internode length defined in step S103; vertical direction, i.e., the Z-axis direction, serving as the default upward growth trend of the tree as a whole; sensing cone angle, used to constrain the directional range of the local sensing domain; direction fusion parameters, used to control the weight of each directional component during direction synthesis; and hard constraint threshold, used to control the maximum allowable deviation distance between the candidate position and the trunk point cloud.
[0044] Inside the trunk grower, the program first constructs a vertically upward directional vector as the default trend for the tree's overall upward growth. Simultaneously, based on the local principal orientation and neighborhood consistency of the trunk point cloud, it estimates the local principal orientation and geometric weights of the point cloud. Since the input includes the attention weights from step S102, the program normalizes them and multiplies them with the geometric weights, resulting in final point weights that possess both geometric consistency and structural guidance.
[0045] Step S202: During each main stem extension process, a local spherical sensing domain is constructed with the current bud position as the center. Within the local spherical sensing domain, directional constraints are applied according to the sensing cone angle. Points located in the cone region in front of the current growth direction are retained as candidate sensing points. Points whose distance from the current bud position is less than a preset distance threshold are removed from the candidate sensing points to obtain effective sensing points. According to the point-level weight, the weight value corresponding to each effective sensing point is obtained. The unit direction vector of each effective sensing point relative to the current bud position is used as the weighted vector, and the weight value corresponding to each effective sensing point is used as the weighting coefficient. After weighted averaging and normalization, the dominant sensing direction is obtained.
[0046] In this embodiment, during each trunk extension process, the program first constructs a local spherical sensing domain centered on the current bud location. The radius of this sensing domain is not a fixed value, but is adaptively calculated based on the bud age, internode length, and tree height range, thus allowing the trunk to have different sensing ranges at different growth stages.
[0047] Within the local spherical sensing domain, the program further applies directional constraints. Specifically, the program first retrieves candidate points within the sphere's radius, then calculates the angle between the candidate points and the current bud's direction, retaining only points with angles less than a preset half-angle threshold (i.e., half the angle of the sensing cone) as candidate sensing points. This ensures that the trunk growth is not interfered with by the point cloud behind or to the side, but primarily responds to the trunk points in the forward region.
[0048] After obtaining candidate sensing points, the program further removes points that are too close to the current bud point (i.e., points whose distance is less than half the radius of the sensing domain) to avoid local repetitive responses, thus obtaining valid sensing points. For these valid sensing points, the program calculates the unit direction vector of each valid sensing point relative to the current bud point position, and obtains the corresponding weight value for each valid sensing point according to the point-level weight. Using each unit direction vector as the weighted vector and each weight value as the weighting coefficient, a weighted average is performed and normalized to obtain the dominant sensing direction. This dominant direction essentially reflects the main extension trend of the point cloud in front of the current bud point in a weighted sense.
[0049] Step S203: Take the existing growth direction of the current bud as the default direction, take the vertical direction as the vertical directional direction, and normalize the default direction, the dominant sensing direction and the vertical directional direction after weighted summation according to the direction fusion parameter to obtain the final growth direction; The expression for the final growth direction is: ; in, Indicates the final growth direction. This indicates the current growth direction of the bud. This refers to the dominant sensing direction. Let be a unit vector pointing vertically upwards. and These are the weighting coefficients for the perceptual direction and the directional direction, respectively. This represents the vector normalization operation.
[0050] In this embodiment, when relying solely on the perceived direction, the generated skeleton is easily affected by local noise. Therefore, the program further introduces a default direction term and a directional term, which are combined with the dominant perceived direction. The default direction is the existing growth direction of the current bud point, the dominant perceived direction is obtained by weighting the aforementioned local perceived points, and the vertical directional direction is a unit vector along the Z-axis, used to express the overall upward growth trend of the tree trunk.
[0051] The program weights and sums the default direction, the dominant sensing direction, and the vertical directional direction according to the direction fusion parameters, and then normalizes the result to obtain the final growth direction. The direction fusion parameters include the sensing direction weight coefficient and the directional direction weight coefficient. This design ensures that the main growth direction neither completely deviates from the existing growth inertia nor ignores the true direction of the local point cloud, while maintaining the overall upward growth trend.
[0052] Step S204: Based on the final growth direction, using the trunk growth step size as the internode length, predict candidate positions, calculate the nearest distance from the candidate position to the trunk point cloud, and perform a hard constraint check on the candidate position based on the relationship between the nearest distance and the hard constraint threshold. If the candidate position passes the hard constraint check, it is accepted as a valid growth position. If the candidate position fails the hard constraint check, shorten the trunk growth step size, deflect the final growth direction toward the dominant sensing direction, and re-predict the candidate position. Re-execute the hard constraint check until it passes or the maximum number of retries is reached, then terminate the growth of the current branch to obtain the target candidate position.
[0053] In this embodiment, the program predicts new candidate locations from the current bud position based on the final growth direction and using the main stem growth step length as the internode length. These candidate locations may not necessarily fall within a reasonable area of the actual main stem point cloud, therefore the program further applies hard constraint checks.
[0054] The specific rules for hard constraint checking are as follows: The program calculates the Euclidean distance from the candidate location to the nearest backbone point cloud. If this distance is not greater than the hard constraint threshold, the candidate location is directly accepted as a valid growth location. If the distance is greater than the hard constraint threshold but not more than twice the hard constraint threshold, the candidate location is allowed to be projected or snapped to the nearest backbone point. If the distance exceeds twice the hard constraint threshold, the candidate location is considered unreasonable, and the growth attempt is rejected.
[0055] If a candidate position is rejected, the program enters a retry mechanism: it successively shortens the main stem growth step size and appropriately shifts the final growth direction towards the dominant sensing direction, then attempts to generate new candidate positions and re-executes the hard constraint check. If multiple attempts still fail, it is considered that the current bud can no longer continue to grow stably, and the growth of the current branch is terminated. Finally, the program outputs the target candidate position that passes the hard constraint check.
[0056] Step S205: Using the target candidate position as the center, search for the main points located in the neighborhood of the surrounding sphere in the main point cloud, construct a thin section along the final growth direction, include the main points within the coverage area of the thin section into the section point set, calculate the centroid of the section point set, and pull the target candidate position back towards the centroid direction to obtain the target growth position.
[0057] In this embodiment, while simply using hard constraints to attract the nearest point can prevent the generated skeleton from deviating from the main point cloud, it can also cause new skeleton nodes to attach to the edge of the point cloud instead of stably landing in the central region of the main trunk. Therefore, after accepting candidate points, the program further incorporates a cross-sectional centroid pullback correction.
[0058] Specifically, the program searches for backbone points within the neighborhood of the surrounding spheres in the backbone point cloud, centered on the target candidate location, and then constructs a thin-layer cross-section along the final growth direction. For any backbone point around the target candidate location, the program first calculates its axial projection distance and vertical distance relative to the final growth direction. Only when the axial projection distance does not exceed half of the axial window parameter and the vertical distance does not exceed half the cross-section thickness parameter is the point included in the cross-section point set.
[0059] When the number of points in the cross-sectional point set is not less than the minimum point threshold, the program calculates the centroid of the cross-sectional point set and pulls the target candidate position back towards the centroid according to a certain proportion (i.e., the pullback coefficient) to obtain the target growth position. After the pullback correction, the program will perform another hard constraint confirmation to ensure that the corrected points are still located in a reasonable area of the backbone point cloud. This step further converges the skeleton nodes towards the center position of the local cross-section, thereby improving the stability and biological rationality of the backbone centerline extraction.
[0060] Step S206: Generate sub-buds according to the target growth position, construct internode units by connecting the current bud and the sub-bud, record the internode length, internode direction and trunk point cloud index covered by the internode unit, update the sub-bud to the current bud in the next trunk extension process, continue trunk extension until the current bud can no longer grow or reaches the preset termination condition, and obtain the continuous internode structure of the trunk skeleton.
[0061] In this embodiment, once the target growth location is determined, the program generates a new sub-bud based on that location and adds it to the bud sequence. Subsequently, a new internode unit is constructed using the line connecting the current bud and the sub-bud, recording its internode length (i.e., the Euclidean distance between the parent and child buds), internode direction (i.e., the unit vector of the line connecting them), and the index of the trunk point cloud covered by that internode. Specifically, the program calls functions related to line segment cylinder coverage to extract the index of the trunk point cloud within the cylinder of that internode and records it in the internode unit. This establishes a connection between each internode and its corresponding real trunk point cloud region.
[0062] The program updates the sub-buds to the current buds in the next trunk extension process, continues the trunk extension, and repeats the sensing domain selection, direction synthesis, hard constraint correction and cross-sectional centroid pullback correction described in steps S202 to S205 until the current buds can no longer grow (i.e., multiple consecutive retries fail) or the preset termination condition is reached, finally obtaining a continuous internode structure of the trunk skeleton composed of multiple buds and multiple internodes.
[0063] Step S30: Based on the spatial correspondence between each internode in the continuous internode structure of the main trunk skeleton and the canopy point cloud, allocate local growth resources to internodes with branching potential, and identify the bud location, germination direction and germination resource cluster as the budding point of lateral branches.
[0064] The purpose of this step is to transform the discrete spatial information in the canopy point cloud into the budding triggering conditions and branching resource units required for subsequent lateral branch growth.
[0065] Furthermore, the step of allocating local growth resources to internodes with branching potential based on the spatial correspondence between each internode in the continuous internode structure of the main trunk framework and the canopy point cloud, and identifying the bud locations, germination directions, and germination resource clusters that serve as lateral branch germination points, specifically includes: Step S301: Obtain each internode in the continuous internode structure of the trunk skeleton and its corresponding trunk point cloud index. Extract the trunk local point set corresponding to the internode from the trunk point cloud according to the trunk point cloud index. Using the trunk local point set as a reference, search for canopy points in the canopy point cloud whose distance from the trunk local point set is less than a preset resource mapping threshold as candidate resource points. Remove the canopy points that have been allocated to other internodes from the candidate resource points to obtain the local canopy resource points allocated to the internodes. Establish the resource mapping relationship between the internodes and the local canopy resource points.
[0066] In this embodiment, the program first obtains each intersegment in the continuous intersegment structure of the trunk skeleton and its corresponding trunk point cloud index. For each intersegment, the program uses the trunk point cloud index already recorded for that intersegment to extract the corresponding local trunk point set from the trunk point cloud. Then, using these trunk points as a reference, the program searches for canopy points in the canopy point cloud whose distance from the local trunk point set is less than a preset resource mapping threshold as candidate resource points.
[0067] To prevent the same canopy point from being repeatedly occupied by multiple internodes, the program maintains an array of occupancy markers to exclusively control the occupancy of canopy points that have already been allocated. The program removes canopy points already allocated to other internodes from the candidate resource points, and assigns the remaining canopy points as local canopy resource points to the current internode, establishing a resource mapping relationship between the internode and these local canopy resource points. If the resource set obtained by an internode is not empty, it indicates that there are canopy resources nearby that can support lateral branch growth, and it can be considered a potential sprouting internode; otherwise, it is considered that the internode currently does not have the conditions for sprouting.
[0068] Step S302: From the non-empty internodes of the local canopy resource point set, traverse adjacent internodes in the order of trunk growth, calculate the average symmetrical nearest neighbor distance between the local canopy resource point sets of two adjacent internodes, and divide adjacent internodes whose average symmetrical nearest neighbor distance is less than the internode length into the same resource group. After traversal, multiple resource groups are obtained. The formula for calculating the symmetric nearest neighbor average distance between the local canopy resource point sets of two adjacent segments is as follows: ; in, Indicates the first The first segment and the first Symmetric nearest neighbor average distance between resource point sets in each node Indicates the first Resource point set between sections Indicates the first Resource point set between sections Indicates the first The number of points in a resource point set. Indicates the first The number of points in a resource point set. Point Time Euclidean distance, This indicates taking the minimum value.
[0069] In this embodiment, since the canopy resource points corresponding to adjacent internodes may belong to the same local canopy region in space, the program further groups the internodes with resources continuously to avoid adjacent internodes repeatedly triggering multiple budding events with similar meanings.
[0070] The program iterates through adjacent internodes in the order of trunk growth from non-empty local canopy resource point sets, calculating the average symmetric nearest neighbor distance between the local canopy resource point sets of two adjacent internodes. This distance is defined as follows: for each resource point set of two adjacent internodes, calculate the average of the minimum distances from each point in the first resource point set to the second resource point set, and the average of the minimum distances from each point in the second resource point set to the first resource point set, and then take the average of the two.
[0071] If the average distance between the symmetrical nearest neighbors is less than the internode length, the program groups these two adjacent internodes into the same resource group; otherwise, it processes them separately. After traversal, the program obtains several resource groups. Through this grouping process, multiple discrete resource internodes distributed along the trunk can be integrated into several spatially continuous local resource groups, providing a more stable regional basis for subsequent budding site identification.
[0072] Step S303: For each resource group, collect the positions of the parent buds and child buds of all nodes within the resource group, perform principal axis fitting based on the parent bud positions and child bud positions to obtain the principal axis direction vector of the resource group, construct a local reference axis segment of the resource group based on the principal axis direction vector, and project all canopy resource points in the resource group onto a local two-dimensional plane perpendicular to the local reference axis segment to obtain the two-dimensional projection point set of the resource group.
[0073] In this embodiment, for each resource group, the program first collects the positions of parent buds and child buds between all nodes within the group, and then performs principal axis fitting on the group based on these skeleton points. Specifically, the program uses Principal Component Analysis (PCA) to calculate the principal direction vector of the point set within the group, and constructs the local reference axis segment of the resource group accordingly.
[0074] After obtaining the local reference axis segment, the program projects all canopy resource points in the resource group onto a local two-dimensional plane perpendicular to the axis segment, resulting in a two-dimensional projection point set. The purpose of this two-dimensional projection is to transform the three-dimensional canopy resource distribution into a cross-sectional distribution unfolded around the local axis of the trunk, thereby making it easier to identify potential lateral branch resource areas in different spatial directions.
[0075] Step S304: Adaptively determine the number of sectors based on the radius range of the two-dimensional projection point set, divide the local two-dimensional plane into sectors according to the number of sectors, assign each projection point in the two-dimensional projection point set to the corresponding sector according to its polar angle, perform clustering processing on the projection points in each sector, and use the clustering results as local resource clusters of the resource group, with each local resource cluster corresponding to a spatially independent side branch resource unit. The formula for calculating the number of sectors is: ; in, Indicates the number of sectors. This represents the average radius of the resource group in the two-dimensional projection plane. Indicates the arc length of the target sector. This represents the floor function. This represents the truncation function. Indicates the minimum number of sectors. This indicates the maximum number of sectors.
[0076] In this embodiment, the program uses the two-dimensional origin corresponding to the starting point of the local reference axis segment as the center, adaptively determines the number of sectors based on the radius range of the two-dimensional projection point set, and divides the two-dimensional plane into sectors. Specifically, the program calculates the polar radius of each point in the two-dimensional projection point set and obtains the average radius, calculates the number of target sectors based on the arc length of the target sector and the average radius, and limits the number of sectors to a preset minimum and maximum value through a truncation function.
[0077] After determining the number of sectors, the program calculates the sector angle width and assigns each projection point in the 2D projection point set to its corresponding sector according to its polar angle. Within each sector, density-based spatial clustering (DBSCAN) is used for clustering. During clustering, the neighborhood radius is determined by multiplying the median distance of the k-th nearest neighbor of each point by a scaling factor, and the minimum number of points is determined based on the proportion of points within the sector. If the number of points in a sector is less than the minimum requirement, it is not formed as a separate resource cluster but is merged into the cluster of sectors with the closest adjacent angles and a centroid distance smaller than the neighborhood radius; if no mergeable objects exist, they are discarded as noise resource points. After clustering, the program uses the clustering results as local resource clusters for that resource group, with each local resource cluster corresponding to a spatially independent side resource unit.
[0078] ; in, Represents the neighborhood radius of density-based spatial clustering. This is the scaling factor. Indicates the first The projection point of the first Proximity distance Represents the first projection point for all projection points. The median of the nearest neighbor distance is used.
[0079] ; in, This represents the minimum number of points required for density-based spatial clustering. Indicates the first The set of projection points within each sector Indicates the first The number of points within each sector.
[0080] Step S305: For each local resource cluster, calculate the spatial centroid of all canopy resource points within the local resource cluster. Find the internode closest to the spatial centroid in the resource group to which the local resource cluster belongs. Determine the parent bud of the found internode as the starting node for lateral branch sprouting. Assign the sprouting mark of the parent bud as valid. Assign the unit direction vector from the parent bud to the spatial centroid as the sprouting direction of the parent bud. Assign the coordinates of the spatial centroid as the sprouting position of the parent bud. Record all canopy resource points contained in the local resource cluster as the sprouting resource cluster of the parent bud.
[0081] The formula for calculating the germination direction is: ; in, Indicates the first The germination direction corresponding to each resource cluster Indicates the first The spatial centroid of a resource cluster Indicates the first The position of the parent bud point of the internode closest to the centroid in the resource group to which the resource cluster belongs.
[0082] In this embodiment, for each three-dimensional local resource cluster, the program calculates the spatial centroid of all canopy resource points within the cluster and finds the internode closest to the spatial centroid in the resource group to which the cluster belongs. Instead of directly binding the resource cluster to the midpoint of the internode, the program binds it to the parent bud of the nearest internode, using the parent bud as the starting node for subsequent lateral branch sprouting.
[0083] The program assigns the following germination attributes to the parent bud: a germination flag of "valid" (True) is assigned, indicating that the bud meets the germination conditions; the unit direction vector pointing from the parent bud to the spatial centroid is assigned as the germination direction of the parent bud; the coordinates of the spatial centroid are assigned as the germination position of the parent bud; and all canopy resource points contained in the local resource cluster are recorded as the germination resource cluster of the parent bud. Since a bud may correspond to multiple resource clusters in different directions simultaneously, the same bud can record multiple germination directions and multiple resource clusters, which more closely resembles the spatial distribution characteristics of multi-directional branching in the canopy of real trees.
[0084] Step S40: Using the bud location, the germination direction, and the germination resource cluster as input, a lateral branch skeleton is recursively generated under the guidance of local resources, and the lateral branch skeleton is organized into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches.
[0085] The purpose of this step is to generate a lateral branch skeleton under the guidance of local resources, and to organize the generated lateral branches into a new higher-order tree axis structure, thereby forming a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches.
[0086] Furthermore, the process of recursively generating a lateral branch skeleton under the guidance of local resources, using the bud location, the germination direction, and the germination resource cluster as input, and organizing the lateral branch skeleton into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches, specifically includes: Step S401: Define a branch grower. With the bud position, the germination direction, and the germination resource cluster as input, traverse the buds with valid germination marks in the current tree axis. For each germination direction, initialize a new branch starting bud. The level of the branch starting bud is the current tree axis level plus one, the initial spatial position is the corresponding germination position, and the initial growth direction is the corresponding germination direction.
[0087] In this embodiment, the program defines a lateral branch grower, which is used to generate a lateral branch skeleton under the guidance of local resources. The input of the lateral branch grower includes a set of canopy resource points, point-level weights, lateral branch growth step size, and the tree axis to be grown. The tree axis already contains a set of buds from step S30. If each bud has been marked as having a valid germination marker, it indicates that the bud has the conditions for lateral branch germination.
[0088] The program takes the bud location, germination direction, and germination resource cluster identified in step S30 as input, and traverses the buds with valid germination markings in the current tree axis. For each bud marked as having valid germination markings, the program further traverses the multiple germination directions, germination locations, and germination resource clusters recorded for that bud. For each germination direction, the program initializes a new lateral branch initiation bud. The level of this lateral branch initiation bud is one level higher than the current tree axis level (i.e., one level higher relative to the current tree axis), the initial spatial location is the corresponding germination location, and the initial growth direction is the corresponding germination direction. This new bud sprouts from the current main trunk or mother branch bud, and its growth age increases relative to the mother bud. Thus, each germination event is converted into a new lateral branch growth starting point.
[0089] Step S402: For each lateral branch starting bud, the corresponding germination resource cluster is used as the initial frontier resource set. The buds are expanded outward in a queue-style recursive manner. In each expansion, candidate points whose attention values meet the consistency condition are selected from the neighboring unvisited points. A comprehensive score is calculated based on the distance from the candidate point to the frontier and the attention value of the candidate point. The candidate point with the smallest comprehensive score is selected to be added to the frontier.
[0090] The formula for calculating the comprehensive score is as follows: ; in, Indicates the first The overall score of each candidate point Indicates the first Normalized distances from each candidate point to the current frontier point Indicates the first The normalized result of the attention values of each candidate point.
[0091] In this embodiment, for each lateral branch starting bud obtained during initialization, the program uses the germination resource cluster corresponding to the bud as the initial frontier resource set, and pushes the initial frontier resource set into the growth queue, gradually expanding outward in a queue-style recursive manner.
[0092] In each iterative expansion, the program first queries several nearest neighbors for each point in the current frontier resource set, and then selects candidate points only from those points that have not yet been visited. Simultaneously, using the attention value of the geometric centroid of the current frontier resource set as a reference value, the program compares the attention differences between neighboring candidate points, retaining only those candidate points whose difference from the reference value is less than an attention threshold. Points exceeding the threshold are directly marked as unsuitable for further expansion.
[0093] For the selected candidate points, the program further considers both the distance from the candidate point to the current frontier resource set and the candidate point's own attention value to calculate a comprehensive score. The comprehensive score is a weighted sum of normalized distance and normalized attention value, with a distance weight of 0.6 and an attention weight of 0.4. The program selects the point with the smallest comprehensive score from the candidate points as a new expansion point and adds it to the frontier resource set, continuously updating the frontier and repeating this process until the upper limit of a single expansion step is reached or there are no more resource points to expand.
[0094] Step S403: After each round of expansion, the candidate points obtained in this round of screening are clustered. The candidate points that meet the clustering conditions are merged into resource clusters. The three-dimensional centroid of the resource cluster is calculated as the new bud position. A new growth direction is generated based on the current lateral branch terminal bud position and the three-dimensional centroid. Sub-buds and internode units are generated. The resource cluster is used as the resource basis for continued recursion until the lateral branch termination condition is met.
[0095] In this embodiment, after each round of expansion, the program first clusters the candidate points obtained in this round through distance constraints and attention consistency filtering. Specifically, the program constructs a k-nearest neighbor graph on the candidate points obtained in this round. If the distance between two candidate points is less than the merging distance threshold and the difference in attention values is less than the attention threshold, then the two are connected in the graph, and the connected candidate points are merged into a resource cluster.
[0096] The program calculates the three-dimensional centroid of the resource cluster as the new bud location, and uses the direction from the current lateral branch's terminal bud location to this three-dimensional centroid as the new growth direction. New sub-buds are generated based on this new bud location and growth direction. Subsequently, a new internode unit is constructed by connecting the previous bud and the new bud, recording its tree axis number, parent and sub-bud locations, internode length, growth direction, and corresponding resource point index or resource cluster information. Each time a new internode is generated, the program appends it to the internode sequence of the current lateral branch and pushes the resource cluster formed in this round back into the growth queue as the resource basis for subsequent forward iterations.
[0097] Repeat the above expansion, clustering, and centroid update process until the preset expansion step limit is reached or there are no more resource points to expand, to obtain all buds and internodes of the current lateral branch.
[0098] Furthermore, to ensure that buds at different ages and locations have varying germination sensitivities, the program applies decay control to the attention threshold based on the bud's age before lateral branch growth begins. Specifically, the age of each bud is first normalized, and then the attention threshold for the current bud is calculated using an exponential decay method. This design prevents a completely uniform threshold from being applied during resource selection for buds at different locations and ages. Instead, it dynamically adjusts resource consistency requirements based on their growth stage, thereby improving the hierarchy and rationality of lateral branch generation.
[0099] The formula for calculating the attention threshold of the current bud is: ; in, This represents the attention threshold of the current bud. This represents the initial attention difference threshold. This represents the lower limit of the minimum threshold. Indicates the threshold attenuation coefficient. This represents the normalized bud age. This indicates the attenuation intensity.
[0100] Step S404: Organize all new buds and internodes formed after each lateral branch growth into a lateral branch tree axis structure. The hierarchy of the lateral branch tree axis structure is the parent tree axis level plus one. Combine all the lateral branch tree axis structures with the main trunk tree axis to form a hierarchical tree skeleton model.
[0101] In this embodiment, after the lateral branches have completed their recursive growth, the program organizes all new buds and internodes formed during the current germination process into a new higher-order tree axis structure. Since the initial level of the lateral branches is defined as the level of the mother tree axis plus one, the first-order lateral branches generated after the trunk has completed its growth can be recorded as the first-order tree axis, and the branches that sprout again on the first-order tree axis can be further recursively formed into the second-order tree axis.
[0102] The program organizes all new buds and internodes formed after lateral branch growth in each budding direction into an independent lateral branch axis structure. The hierarchy of each lateral branch axis structure is one level higher than that of its parent tree axis. Ultimately, the program outputs not just a single trunk line, but a complete tree skeleton structure containing the trunk, lateral branches, and their hierarchical relationships—a hierarchical tree skeleton model composed of the trunk axis and multiple levels of lateral branch axes.
[0103] right Figures 2 to 6 The explanation is as follows: Figure 2 The overall flow of the method described in this invention is illustrated. First, tree point cloud data, skeleton attributes, and semantic labels are acquired as input. Then, three preprocessing operations are performed in parallel: defining the basic tree growth structure, constructing a point-level weight field, and determining the initial growth point. If a valid initial trunk cannot be obtained, the input data needs to be re-examined or the initialization parameters adjusted before attempting again. After obtaining a valid initial trunk, the method enters the trunk skeleton growth stage. Under the constraint of the trunk point cloud, the trunk is gradually extended through perception guidance and constraint correction until trunk growth is complete. After trunk growth is complete, budding site identification and canopy resource allocation are performed to determine if a valid budding site exists. If not, only the main skeleton result is output; if it exists, lateral branches are recursively generated and a hierarchical skeleton is constructed until the lateral branches cease growth. Finally, a complete tree skeleton model containing the trunk and multi-level lateral branches is output.
[0104] Figure 3 The detailed process of defining the basic tree growth structure, constructing the point-level weight field, and extracting the initial growth point in step S10 is illustrated. This stage first reads the tree point cloud, skeleton model, and skeleton attribute data as input; then, three preprocessing tasks are executed in parallel: first, defining the basic tree growth structure, including the definitions of buds, internodes, growth branches, and the tree axis; second, constructing the point-level weight field based on the skeleton hierarchy information and the distance response from points to the skeleton; and third, dividing the tree point cloud into trunk point cloud and canopy point cloud, calculating growth scale parameters, and extracting the initial growth point from the trunk point cloud along the vertical direction. If a valid initial growth point is not successfully obtained, the data input needs to be checked again or the initialization parameters adjusted before trying again; if the initial growth point is successfully obtained, the basic structure, weight field, and initial growth point are output as input for trunk skeleton growth.
[0105] Figure 4 The detailed process of trunk skeleton perception-guided and constraint-corrected growth in step S20 is illustrated. This stage starts with the initial growth point output in step S10, initializes the trunk grower, and uses this initial growth point as the current bud point. During each trunk extension, a local perception domain is first constructed centered on the current bud point, and valid trunk points located ahead of the current growth direction are selected as perception objects. Then, the default direction of the current bud point, the dominant perception direction obtained by weighting the perception points, and the vertical directional direction are fused to obtain the final growth direction. After predicting new candidate growth positions based on this final growth direction, a hard constraint check is performed on the candidate position. If the candidate position does not meet the hard constraint conditions, the step size is shortened and the direction is adjusted before retrying; if the hard constraint conditions are met, a cross-sectional centroid pullback correction is performed, causing the candidate position to converge towards the center of the local cross-section. After correction, it is confirmed that the corrected position is still valid, and then new buds and internodes are generated, recording the trunk point cloud index covered by the internode. If the trunk continues to grow, the above extension process is repeated; if the trunk no longer grows, the trunk skeleton result is output.
[0106] Figure 5 The detailed process of budding site identification and resource allocation in step S30 is shown. This stage takes the trunk skeleton output from step S20 as input. First, it traverses each internode in the trunk skeleton, searching for neighboring canopy resource points in the canopy point cloud to establish a mapping relationship between internodes and canopy resource points. Then, from the non-empty resource point sets of internodes, it traverses adjacent internodes sequentially according to the trunk growth order, performing continuous grouping on non-empty resource internodes. If the average distance between the symmetrical nearest neighbors of the resource point sets of adjacent internodes is less than the internode length, they are assigned to the same resource group; if no effective resource group is formed, the internode is skipped and the traversal continues. For each formed resource group, the positions of parent buds and child buds of the internodes within the group are collected and fitted along the principal axis. The canopy resource points in the resource group are projected onto a two-dimensional plane perpendicular to the principal axis, and then sector division and clustering are performed on the two-dimensional projection results. If no valid resource cluster is found, the process returns to re-divide or continues traversing the next internode. If a valid resource cluster is found, the centroid of each resource cluster is mapped to the parent bud of the nearest internode in its resource group, and the germination attribute is assigned to that parent bud. Finally, the valid germination position, germination direction, and corresponding germination resource cluster are output.
[0107] Figure 6The detailed process of lateral branch recursive growth and hierarchical skeleton output in step S40 is shown. This stage takes the budding position information output in step S30 as input. First, it traverses the buds in the current tree axis that meet the budding conditions, determining whether the current bud has effective budding resources. If the current bud does not have effective budding resources, it skips that bud and continues traversing the next bud. For buds with effective budding resources, a new lateral branch starting bud is initialized for each budding direction, including setting the lateral branch starting position, initial growth direction, and local resource front. Then, neighborhood exploration and attention consistency filtering are performed in the local resources to determine whether candidate resource points that meet the conditions are found. If no candidate resource points that meet the conditions are found, the recursive growth of the current lateral branch is terminated; if a candidate resource point that meets the conditions is found, the three-dimensional centroid of the resource cluster is calculated, and new buds and internodes are generated based on this centroid, using the resource cluster as the resource basis for continued recursion. If the current lateral branch continues to grow, the neighborhood exploration, clustering, and centroid update processes are repeated. If the current lateral branch stops growing, the newly generated lateral branch is organized into a higher-order tree axis structure, with its level being one level higher than the parent tree axis. Finally, it is determined whether there are any remaining unprocessed buds. If so, the process continues to traverse and process the next bud. If there are no remaining unprocessed buds, a complete hierarchical tree skeleton model containing the trunk and multiple levels of lateral branches is output.
[0108] Furthermore, such as Figure 7 As shown, based on the above-mentioned structure weight-guided tree point cloud growth reconstruction method, this invention also provides a structure weight-guided tree point cloud growth reconstruction system, which includes: The initial point determination module 51 is used to acquire tree point cloud data and determine the initial seed point for the growth of the main trunk skeleton based on the tree point cloud data. The backbone generation module 52 is used to generate a continuous inter-segment structure of the backbone under the constraint of the backbone point cloud, using the initial seed point as the starting node of the backbone. The budding site identification module 53 is used to allocate local growth resources to internodes with branching potential based on the spatial correspondence between each internode in the continuous internode structure of the main trunk skeleton and the canopy point cloud, and to identify the bud point location, budding direction and budding resource cluster as the budding point of lateral branches. The skeleton model generation module 54 is used to recursively generate a lateral branch skeleton under the guidance of local resources, taking the bud point position, the germination direction and the germination resource cluster as input, and organize the lateral branch skeleton into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches.
[0109] Furthermore, such as Figure 8As shown, based on the above-mentioned tree point cloud growth reconstruction method and system guided by structural weights, the present invention also provides a terminal, which includes a processor 10, a memory 20 and a display 30. Figure 8 Only some of the terminal components are shown; however, it should be understood that it is not required to implement all of the components shown, and more or fewer components may be implemented instead.
[0110] In some embodiments, the memory 20 may be an internal storage unit of the terminal, such as a hard disk or memory. In other embodiments, the memory 20 may be an external storage device of the terminal, such as a plug-in hard disk, smart media card (SMC), secure digital card (SD), flash card, etc. Further, the memory 20 may include both internal and external storage devices. The memory 20 is used to store application software and various types of data installed on the terminal, such as the program code installed on the terminal. The memory 20 can also be used to temporarily store data that has been output or will be output. In one embodiment, the memory 20 stores a structure weight-guided tree point cloud growth reconstruction program 40, which can be executed by the processor 10 to implement the structure weight-guided tree point cloud growth reconstruction method of this application.
[0111] In some embodiments, the processor 10 may be a central processing unit (CPU), a microprocessor, or other data processing chip, used to run program code stored in the memory 20 or process data, such as executing the structure weight-guided tree point cloud growth reconstruction method.
[0112] In some embodiments, the display 30 may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, or an OLED (Organic Light-Emitting Diode) touchscreen. The display 30 is used to display information on the terminal and to display a visual user interface. The components of the terminal communicate with each other via a system bus.
[0113] The present invention also provides a computer-readable storage medium, wherein the computer-readable storage medium stores a structure weight-guided tree point cloud growth reconstruction program, which, when executed by a processor, implements the steps of the structure weight-guided tree point cloud growth reconstruction method as described above.
[0114] It should be noted that, in this document, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or terminal. Unless otherwise specified, an element defined by the phrase "comprising one" does not exclude the presence of other identical elements in the process, method, article, or terminal that includes that element.
[0115] Of course, those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, storage, databases, or other media used in the embodiments provided by this invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0116] It should be understood that the application of the present invention is not limited to the examples above. Those skilled in the art can make improvements or modifications based on the above description, and all such improvements and modifications should fall within the protection scope of the appended claims.
Claims
1. A method for structural weight-guided tree point cloud growth reconstruction, characterized in that, The structure weight-guided tree point cloud growth reconstruction method includes the following steps: Acquire tree point cloud data, and determine the initial seed points for the growth of the main trunk framework based on the tree point cloud data; Using the initial seed point as the starting node of the backbone skeleton, a continuous inter-segment structure of the backbone skeleton is generated under the constraint of the backbone point cloud. Based on the spatial correspondence between each internode in the continuous internode structure of the main trunk skeleton and the canopy point cloud, local growth resources are allocated to internodes with branching potential, and the location, germination direction, and germination resource clusters of buds that serve as lateral branch germination points are identified. Using the bud location, the germination direction and the germination resource cluster as input, the lateral branch skeleton is recursively generated under the guidance of local resources, and the lateral branch skeleton is organized into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches. The acquisition of tree point cloud data, and the determination of initial seed points for the growth of the main trunk framework based on the tree point cloud data, specifically includes: Acquire tree point cloud data, and based on the hierarchical growth characteristics of the trees represented by the tree point cloud data, establish a basic tree growth structure for recording the skeletal structure, wherein the basic tree growth structure includes buds, internodes, growth branches, and tree axes. Based on the tree point cloud data and skeleton hierarchy attributes, a point-level weight field is constructed. The point-level weight field is obtained by coupling the distance response term from the point to the skeleton with the skeleton hierarchy weight term, and is used to characterize the contribution of each position in the tree point cloud to the subsequent skeleton growth. The tree point cloud data is divided into trunk point cloud and canopy point cloud according to semantic tags. The median neighborhood distance is calculated based on the local neighborhood relationship of the trunk point cloud. The internode length and trunk hard constraint threshold are defined according to the median neighborhood distance. The initial seed point for trunk skeleton growth is extracted from the trunk point cloud in the vertical direction. The tree growth basic structure, the point-level weight field, the internode length, the trunk hard constraint threshold, and the initial seed point are used together as inputs for the trunk skeleton growth.
2. The tree point cloud growth reconstruction method guided by structure weights according to claim 1, characterized in that, Any point in the point-level weighted field weight value Represented as: ; in, Point The normalized distance response to the skeleton, This represents the point-level weights obtained by interpolating or mapping the skeleton vertex-level weights. This is the fusion coefficient between hierarchical weights and distance response. This is the hierarchical weight enhancement coefficient.
3. The tree point cloud growth reconstruction method guided by structure weights according to claim 1, characterized in that, The process of generating a continuous inter-segment structure of the backbone skeleton, using the initial seed point as the starting node and under the constraints of the backbone point cloud, specifically includes: Define a trunk grower, and use the initial seed point as the current bud point of the trunk grower. The input of the trunk grower includes the trunk point cloud, point-level weight, trunk growth step size, vertical direction, sensing cone angle, direction fusion parameter and hard constraint threshold. During each main stem extension process, a local spherical sensing domain is constructed with the current bud position as the center. Within the local spherical sensing domain, directional constraints are applied according to the sensing cone angle. Points located in the cone region in front of the current growth direction are retained as candidate sensing points. Points whose distance from the current bud position is less than a preset distance threshold are removed from the candidate sensing points to obtain effective sensing points. According to the point-level weight, the weight value corresponding to each effective sensing point is obtained. The unit direction vector of each effective sensing point relative to the current bud position is used as the weighted vector, and the weight value corresponding to each effective sensing point is used as the weighting coefficient. After weighted averaging and normalization, the dominant sensing direction is obtained. The existing growth direction of the current bud is taken as the default direction, the vertical direction is taken as the vertical directional direction, and the default direction, the dominant sensing direction and the vertical directional direction are weighted, summed and normalized according to the direction fusion parameter to obtain the final growth direction. Based on the final growth direction, using the main stem growth step size as the internode length, candidate positions are predicted, and the nearest distance from the candidate position to the main stem point cloud is calculated. The candidate position is then subjected to a hard constraint check based on the relationship between the nearest distance and the hard constraint threshold. If the candidate position passes the hard constraint check, it is accepted as a valid growth position. If the candidate position fails the hard constraint check, the main stem growth step size is shortened, the final growth direction is deflected toward the dominant sensing direction, and the candidate position is re-predicted. The hard constraint check is then re-executed until it passes or the maximum number of retries is reached, at which point the growth of the current branch is terminated, and the target candidate position is obtained. Centered on the target candidate position, search for the main points located in the neighborhood of the surrounding sphere in the main point cloud, construct a thin section along the final growth direction, include the main points within the coverage area of the thin section into the section point set, calculate the centroid of the section point set, and pull the target candidate position back towards the centroid direction to obtain the target growth position; A sub-bud is generated based on the target growth position. Internodes are constructed using the lines connecting the current bud and the sub-bud. The internode length, internode direction, and trunk point cloud index covered by the internode are recorded. The sub-bud is updated to the current bud in the next trunk extension process. Trunk extension continues until the current bud can no longer grow or a preset termination condition is reached, resulting in a continuous internode structure of the trunk skeleton.
4. The tree point cloud growth reconstruction method guided by structure weights according to claim 3, characterized in that, The final growth direction is defined as: ; in, As the final growth direction, This represents the vector normalization operation. This indicates the current growth direction of the bud. This refers to the dominant sensing direction. Let be a unit vector pointing vertically upwards. and These are the weighting coefficients for the dominant perception direction and the vertical orientation direction, respectively.
5. The tree point cloud growth reconstruction method guided by structure weights according to claim 1, characterized in that, The process of allocating local growth resources to internodes with branching potential based on the spatial correspondence between each internode in the continuous internode structure of the main trunk framework and the canopy point cloud, and identifying the bud locations, germination directions, and germination resource clusters that serve as lateral branch germination points, specifically includes: Obtain each internode in the continuous internode structure of the trunk skeleton and its corresponding trunk point cloud index. Extract the local trunk point set corresponding to the internode from the trunk point cloud according to the trunk point cloud index. Using the local trunk point set as a reference, search for canopy points in the canopy point cloud whose distance from the local trunk point set is less than a preset resource mapping threshold as candidate resource points. Remove the canopy points that have been allocated to other internodes from the candidate resource points to obtain the local canopy resource points allocated to the internodes. Establish the resource mapping relationship between the internodes and the local canopy resource points. From the non-empty internodes of the local canopy resource point set, traverse adjacent internodes sequentially according to the growth order of the main stem, calculate the average symmetric nearest neighbor distance between the local canopy resource point sets of two adjacent internodes, and divide adjacent internodes whose average symmetric nearest neighbor distance is less than the internode length into the same resource group. After traversal, multiple resource groups are obtained. For each resource group, the positions of parent buds and child buds of all nodes within the resource group are collected. The principal axis is fitted based on the parent bud positions and child bud positions to obtain the principal axis direction vector of the resource group. A local reference axis segment of the resource group is constructed based on the principal axis direction vector. All canopy resource points in the resource group are projected onto a local two-dimensional plane perpendicular to the local reference axis segment to obtain the two-dimensional projection point set of the resource group. The number of sectors is adaptively determined based on the radius range of the two-dimensional projection point set. The local two-dimensional plane is divided into sectors according to the number of sectors. Each projection point in the two-dimensional projection point set is assigned to the corresponding sector according to its polar angle. The projection points in each sector are clustered. The clustering results are used as local resource clusters of the resource group. Each local resource cluster corresponds to a spatially independent side branch resource unit. For each local resource cluster, calculate the spatial centroid of all canopy resource points within the local resource cluster. Find the internode closest to the spatial centroid in the resource group to which the local resource cluster belongs. Determine the parent bud of the found internode as the starting node for lateral branch sprouting. Assign a valid sprouting mark to the parent bud. Assign the unit direction vector from the parent bud to the spatial centroid as the sprouting direction of the parent bud. Assign the coordinates of the spatial centroid as the sprouting position of the parent bud. Record all canopy resource points contained in the local resource cluster as the sprouting resource cluster of the parent bud.
6. The tree point cloud growth reconstruction method guided by structure weights according to claim 1, characterized in that, The process involves using the bud location, germination direction, and germination resource cluster as inputs to recursively generate a lateral branch skeleton under the guidance of local resources. This lateral branch skeleton is then organized into a new higher-order tree axis structure, generating a hierarchical tree skeleton model composed of a trunk and multiple levels of lateral branches. Specifically, this includes: Define a lateral branch grower. With the bud position, the germination direction and the germination resource cluster as input, iterate through the buds with valid germination marks in the current tree axis. For each germination direction, initialize a new lateral branch starting bud. The level of the lateral branch starting bud is the current tree axis level plus one, the initial spatial position is the corresponding germination position, and the initial growth direction is the corresponding germination direction. For each lateral branch initiation bud, the corresponding germination resource cluster is used as the initial frontier resource set. The process is expanded outward in a queue-style recursive manner. In each expansion, candidate points whose attention values meet the consistency condition are selected from the neighboring unvisited points. A comprehensive score is calculated based on the distance from the candidate point to the frontier and the attention value of the candidate point. The candidate point with the smallest comprehensive score is selected to be added to the frontier. After each round of expansion, the candidate points obtained in this round of screening are clustered. Candidate points that meet the clustering conditions are merged into resource clusters. The three-dimensional centroid of the resource cluster is calculated as the new bud position. A new growth direction is generated based on the current lateral branch terminal bud position and the three-dimensional centroid. Sub-buds and internode units are generated. The resource cluster is used as the resource basis for continued recursion until the lateral branch termination condition is met. The lateral branch axis structure is formed by organizing all the new buds and internodes that are formed after each lateral branch growth. The hierarchy of the lateral branch axis structure is the parent tree axis level plus one. All the lateral branch axis structures together with the main trunk axis form a hierarchical tree skeleton model.
7. A structure weight-guided tree point cloud growth reconstruction system, characterized in that, The structure weight-guided tree point cloud growth reconstruction system is used to implement the structure weight-guided tree point cloud growth reconstruction method as described in any one of claims 1-6, wherein the structure weight-guided tree point cloud growth reconstruction system comprises: The initial point determination module is used to acquire tree point cloud data and determine the initial seed point for the growth of the main trunk skeleton based on the tree point cloud data. The backbone generation module is used to generate a continuous inter-segment structure of the backbone under the constraints of the backbone point cloud, using the initial seed point as the starting node of the backbone. The budding site identification module is used to allocate local growth resources to internodes with branching potential based on the spatial correspondence between each internode in the continuous internode structure of the main trunk skeleton and the canopy point cloud, and to identify the bud location, budding direction and budding resource cluster as the budding point of lateral branches. The skeleton model generation module is used to recursively generate lateral branch skeletons under the guidance of local resources, taking the bud point position, the germination direction and the germination resource cluster as inputs, and organize the lateral branch skeletons into a new higher-order tree axis structure to generate a hierarchical tree skeleton model composed of the trunk and multi-level lateral branches.
8. A terminal, characterized in that, The terminal includes: a memory, a processor, and a structure weight-guided tree point cloud growth reconstruction program stored in the memory and executable on the processor. When the structure weight-guided tree point cloud growth reconstruction program is executed by the processor, it implements the steps of the structure weight-guided tree point cloud growth reconstruction method as described in any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a structure weight-guided tree point cloud growth reconstruction program, which, when executed by a processor, implements the steps of the structure weight-guided tree point cloud growth reconstruction method as described in any one of claims 1-6.
Citation Information
Patent Citations
Tree three-dimensional model reconstruction method based on growth domain division
CN116612236A
Forest structure reconstruction system based on three-dimensional laser scanning point cloud modeling
CN122391514A
