Method and system for analyzing tree crown canopy based on point cloud data
By constructing an octree index and using a connectivity clustering algorithm to separate individual trees, and generating variable 3D clipping boxes for layered slicing, the problem of traditional point cloud clipping techniques being unable to accurately determine forestry parameters is solved, thus achieving efficient and accurate analysis of forestry surveys.
Patent Information
- Application Number
- CN202510445591.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-10
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2045-04-10
AI Technical Summary
Existing technologies cannot accurately determine forestry parameters, and traditional point cloud cropping techniques lack adaptability to terrain and tree morphology, resulting in low accuracy in forestry surveys.
A canopy analysis method based on point cloud data is adopted. The space is divided by constructing an octree index, and individual trees are separated by a connectivity clustering algorithm. Point cloud segmentation results with labels are generated, tree parameters are extracted, and variable 3D clipping boxes are generated based on user input for clipping and layering slicing, and the total canopy volume is calculated.
It improves the speed and efficiency of extracting regions of interest from large-scale forest point cloud data, thereby enhancing the accuracy and efficiency of forestry surveys.
Smart Images

Figure CN119964014B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to point cloud data processing technology, specifically to a method and system for analyzing tree canopy layers based on point cloud data. Background Technology
[0002] Currently, handheld lidar is widely used in forestry surveys to measure parameters such as forest structure, canopy coverage, tree height, and diameter.
[0003] Typically, point cloud data acquired by handheld LiDAR systems contains a large amount of background information (such as ground, shrubs, and unrelated trees). Directly processing these raw point clouds can lead to problems such as high computational costs and difficulty in target recognition. Therefore, it is necessary to crop the point cloud data.
[0004] Traditional point cloud cropping techniques are usually based on regular shapes, such as using rectangular or spherical cropping frames. They lack the ability to adapt to terrain and tree morphology, and therefore cannot accurately crop point cloud data, thus failing to accurately determine forestry parameters. Summary of the Invention
[0005] The purpose of this invention is to address the problem of inaccurate determination of forestry parameters in existing technologies by providing a canopy layer analysis method and system based on point cloud data, which can accurately determine forestry parameters based on forestry point cloud data.
[0006] To solve the above-mentioned technical problems, the present invention adopts the following technical solution:
[0007] In a first aspect, the present invention provides a method for analyzing tree canopy layers based on point cloud data. The method includes: acquiring an original point cloud dataset of forestry resources; preprocessing the original point cloud dataset to obtain a preprocessed point cloud dataset; constructing an octree index to partition the space based on the preprocessed point cloud dataset, and using a connectivity clustering algorithm to separate individual trees, generating labeled point cloud segmentation results; extracting tree parameters based on the segmentation data of each tree in the point cloud segmentation results, generating a structured parameter table; the tree parameters include at least one of the following: diameter at breast height (DBH), height, and trunk diameter; in cases where there is a need for single-tree analysis, generating a 3D clipping box in real time based on user input; filtering and outputting a clipped point cloud subset of the target region based on the 3D clipping box and the single tree; and performing equal-thickness layered slicing along the vertical direction based on the clipped point cloud subset, calculating the projected area layer by layer and accumulating the volume of each layer to generate the total canopy volume.
[0008] Optionally, the cropped point cloud subset and / or slice distribution can be rendered in real time via an interactive interface, and the processing results can be exported as a standardized point cloud format file.
[0009] Optionally, feature extraction is performed based on the normal vector, curvature, and covariance matrix of the neighborhood point set of each point to determine the surface features of the trunk, branches, and leaves; and the trees and background are determined based on the shape and density of the point cloud.
[0010] Optionally, the preprocessed point cloud data is recursively divided into an octree structure, and an octree index is established. Based on the octree index, the center point of each block inside the octree is extracted to generate center point cloud data. The K nearest neighbors of each center point cloud data are searched, where K is a positive integer. A maximum neighborhood distance threshold is set, and points that meet the conditions are clustered into the same connected component. A unique color label is assigned to each connected component to generate a visual segmentation result of the point cloud.
[0011] Optionally, an initial clipping box is defined in three-dimensional space; an affine transformation matrix is generated based on the user's input, and the initial clipping box is translated, scaled, or rotated based on the affine transformation matrix.
[0012] Optionally, slicing parameters are set; slicing parameters include slice thickness and interlayer gap; point clouds are assigned to corresponding slice layers based on the set slicing parameters; two-dimensional projection is performed on each slice layer to calculate the area and cumulative volume.
[0013] Optionally, the clipping point cloud subset and / or slice distribution are rendered in real time through an interactive interface, including at least one of the following: updating the display of the clipping result and / or slice distribution in real time according to the user's adjustment action on the 3D clipping frame; assigning color labels according to independent tags; and setting transparency gradients according to slice layers.
[0014] Optionally, the number of slice layers to which a point belongs is determined based on the point's height, the height of the lowest point of the clipping frame, the slice thickness, and the interlayer gap height; if the absolute value of the difference between the point's height and the minimum height of the generated slice layer is less than or equal to the slice thickness, then the point belongs to the corresponding slice layer.
[0015] Optionally, if the absolute value of the difference between the height of a point and the minimum height of the generated slice layer is greater than the slice thickness, then the point belongs to the gap.
[0016] Secondly, this invention provides a tree canopy analysis system based on point cloud data. The analysis system includes: a data acquisition module, a preprocessing module, a monocular segmentation module, a cropping module, a slicing module, and an area and volume calculation module. The data acquisition module is used to acquire the original point cloud dataset of forestry resources. The preprocessing module is used to preprocess the original point cloud dataset acquired by the data acquisition module to obtain a preprocessed point cloud dataset. The monocular segmentation module is used to construct an octree index to partition the space based on the preprocessed point cloud dataset processed by the preprocessing module, and to separate individual trees using a connectivity clustering algorithm to generate point cloud segmentation results with labels. The cropping module is used to generate a 3D cropping box in real time based on user input when there is a need for analyzing a single tree. Based on the 3D cropping box and the single tree segmented by the monocular segmentation module, the cropped point cloud subset of the target area is selected and output. The slicing module is used to crop the point cloud subset based on the cropping module and perform equal-thickness layered slicing along the vertical direction. The area and volume calculation module is used to calculate the projected area layer by layer and accumulate the volume of each layer to generate the total canopy volume.
[0017] Optionally, the analysis system also includes: a display module and a file export module; the display module is used to render and / or slice distributions of the cropped point cloud in real time through an interactive interface; the file export module is used to export the processing results as a standardized point cloud format file.
[0018] Optionally, the monocular segmentation module is specifically used to: extract features based on the normal vector, curvature, and covariance matrix of the neighborhood point set of each point to determine the surface features of the trunk, branches, and leaves; and determine the trees and background based on the shape and density of the point cloud.
[0019] Optionally, the monocular segmentation module is specifically used for: recursively dividing the preprocessed point cloud data into an octree structure and establishing an octree index; based on the octree index, extracting the center point of each block within the octree to generate center point point cloud data, searching for the K nearest neighbors of each center point point cloud data, where K is a positive integer; setting a maximum neighborhood distance threshold and clustering points that meet the conditions into the same connected component; assigning a unique color label to each connected component and generating a visual segmentation result of the point cloud.
[0020] Optionally, the clipping module is specifically used to: define an initial clipping box in three-dimensional space; generate an affine transformation matrix based on user input; and perform translation, scaling, or rotation operations on the initial clipping box based on the affine transformation matrix.
[0021] Optionally, the slicing module is specifically used to: set slicing parameters; the slicing parameters include slicing thickness and interlayer gap, and allocate point clouds to corresponding slicing layers based on the set slicing parameters; the area and volume calculation module is specifically used to: perform two-dimensional projection on each slicing layer, and calculate the area and cumulative volume.
[0022] Optionally, the display module is specifically used to: update the display of cropping results and slice distribution in real time based on the user's adjustment actions on the 3D cropping frame; assign color labels according to independent tags; and set transparency gradients according to slice layers.
[0023] Optionally, the slicing module is specifically used to: determine the number of slice layers to which a point belongs based on the point's height, the height of the lowest point of the clipping frame, the slice thickness, and the interlayer gap height; if the absolute value of the difference between the point's height and the minimum height of the generated slice layer is less than or equal to the slice thickness, then the point belongs to the corresponding slice layer.
[0024] Optionally, the slicing module is specifically used to: if the absolute value of the difference between the height of a point and the minimum height of the generated slice layer is greater than the slice thickness, then the point belongs to the gap.
[0025] According to a third aspect of the present invention, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the tree canopy analysis method based on point cloud data as described in the first aspect.
[0026] According to a fourth aspect of the present invention, a computer device apparatus is provided, comprising a memory, a processor, and computer-readable instructions stored in the memory and executable on the processor, wherein the computer-readable instructions, when executed by the processor, implement the tree canopy analysis method based on point cloud data as described in the first aspect.
[0027] The technical solutions provided by the embodiments of the present invention may include the following beneficial effects:
[0028] In this embodiment of the invention, firstly, the original point cloud dataset of forestry resources can be acquired and preprocessed. Then, based on the preprocessed point cloud dataset, an octree index is constructed to partition the space. Next, a connectivity distance algorithm is used to separate individual trees from the point cloud dataset, generating labeled point cloud segmentation results. Tree parameters can be accurately extracted based on the point cloud segmentation results, generating a structured parameter table. When analyzing a single tree, a 3D clipping box with freely changing shape can be generated based on user input. Based on this 3D clipping box, the single tree is sliced layer by layer. Then, the projected area of each layer is calculated and accumulated to obtain the volume of each layer, thereby accurately generating the total canopy volume. Compared to traditional analysis methods, this improves the speed and efficiency of extracting regions of interest (such as individual trees, tree groups in specific areas, or terrain) from large-scale forest point cloud data, enhancing the accuracy and efficiency of forestry surveys.
[0029] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit the invention. Attached Figure Description
[0030] Figure 1 This is a schematic diagram of a tree canopy analysis system architecture based on point cloud data, provided as an embodiment of the present invention.
[0031] Figure 2 This is a flowchart illustrating a tree canopy analysis method based on point cloud data, provided as an embodiment of the present invention.
[0032] Figure 3 This is a schematic diagram illustrating the visualization of forestry point cloud data provided in an embodiment of the present invention.
[0033] Figure 4 This is a schematic diagram illustrating another visualization of forestry point cloud data provided in an embodiment of the present invention.
[0034] Figure 5 This is a schematic diagram illustrating another visualization of forestry point cloud data provided in an embodiment of the present invention.
[0035] Figure 6 This is a schematic diagram of an interactive 3D clipping frame provided in an embodiment of the present invention.
[0036] Figure 7 This is a schematic diagram of point cloud data of a single tree after monocular segmentation, provided as an embodiment of the present invention.
[0037] Figure 8 This is a schematic diagram of an interface for setting slice parameters provided in an embodiment of the present invention.
[0038] Figure 9 This is a schematic diagram illustrating how to determine slices based on a 3D selection box, as provided in an embodiment of the present invention.
[0039] Figure 10 This is a hardware structure diagram of a computer device used in an embodiment of the present invention to provide a tree canopy analysis system based on point cloud data.
[0040] Figure 11 This is a schematic diagram of the hardware structure of a tree canopy analysis system based on point cloud data, provided in an embodiment of the present invention. Detailed Implementation
[0041] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatuses and methods consistent with some aspects of the invention as detailed in the appended claims.
[0042] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. The singular forms “a,” “the,” and “the” used in this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise. It should also be understood that the term “and / or” as used herein refers to and includes any or all possible combinations of one or more of the associated listed items.
[0043] It should be understood that although the terms first, second, third, etc., may be used in this invention to describe various information, this information should not be limited to these terms. These terms are only used to distinguish information of the same type from one another. For example, first information may also be referred to as second information without departing from the scope of this invention, and similarly, second information may also be referred to as first information. Depending on the context, the word "if" as used herein may be interpreted as "when," "when," or "in response to a determination."
[0044] The embodiments of the present invention will now be described in detail.
[0045] Figure 1 This invention provides a tree canopy analysis system architecture based on point cloud data, such as... Figure 1 As shown, system architecture 100 may include one or more terminal devices such as smartphone 101, portable computer 102, and desktop computer 103, network 104, and server 105. Network 104 is used as a medium to provide a communication link between the terminal devices and server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, etc.
[0046] The terminal device can be any electronic device with data processing capabilities, equipped with a display screen for showing the user point cloud datasets, 3D clipping boxes, slices, etc. This electronic device includes, but is not limited to, desktop computers, laptops, smartphones, and tablets.
[0047] It should be understood that Figure 1 The number of terminal devices, networks, and servers shown is merely illustrative. Depending on implementation needs, any number of terminal devices, networks, and servers can be included.
[0048] The method provided in this embodiment of the invention can be executed by a terminal device, and correspondingly, the apparatus can be installed in the terminal device. However, it is readily understood by those skilled in the art that the tree canopy analysis method based on point cloud data provided in this embodiment of the invention can also be executed by a server, and correspondingly, the apparatus can also be installed in the server. This exemplary embodiment does not impose any special limitations on this.
[0049] Figure 2 This is a flowchart illustrating a tree canopy analysis method based on point cloud data, provided as an embodiment of the present invention. Figure 2 As shown, the method includes the following steps S201 to S206:
[0050] S201. Obtain the original point cloud dataset of forestry resources.
[0051] For example, a 3D scan of a forest area is performed using a lidar device to generate a raw point cloud dataset that includes geometric information about the tree surfaces.
[0052] It should be noted that the original point cloud dataset consists of a large collection of three-dimensional points, each represented by (x, y, z, a1, a2, ...).
[0053] Where “x, y, z” are spatial coordinates; “a1, a2, …” are additional attributes, such as: reflection intensity, color value (RGB, Red Green Blue), timestamp, etc.
[0054] It should be noted that after obtaining the original point cloud dataset, the point cloud dataset can be loaded through the visualization module.
[0055] For example, in an embodiment of the present invention, a visualization module of a software platform that uses an octree structure can be selected to load point cloud data in different formats.
[0056] Optionally, the point cloud data can be in formats such as LAZ, LAS, XYZ, and E57.
[0057] Figure 3 This is a schematic diagram illustrating the visualization of forestry point cloud data provided in an embodiment of the present invention. Figure 4 This is a schematic diagram illustrating another visualization of forestry point cloud data provided in an embodiment of the present invention. For example... Figure 3 The image shown is forestry point cloud data. Figure 4 It is Figure 3 Forestry point cloud data after rotating the image by an angle.
[0058] S202. Preprocess the original point cloud dataset to obtain a preprocessed point cloud dataset.
[0059] The preprocessing includes at least one of the following: denoising, filtering, and normal estimation operations.
[0060] It should be noted that the collected raw point cloud dataset can be preprocessed before tree segmentation to improve the accuracy and efficiency of segmentation.
[0061] For example, statistical filtering algorithms (SOR filters) or low-pass filtering algorithms (Noise filters) can be used to remove noisy points from the original point cloud dataset. Filters from the PCL (Point Cloud Library) are used to downsample and smooth the original point cloud dataset.
[0062] S203. Based on the preprocessed point cloud dataset, an octree index is constructed to partition the space, and a connectivity clustering algorithm is used to separate individual trees, generating point cloud segmentation results with labels.
[0063] It should be noted that by establishing a spatial index structure for the point cloud data, it is possible to quickly query and crop the data in subsequent steps.
[0064] In this embodiment of the invention, when processing large-scale dense point cloud data, an octree algorithm structure is used as the index optimization structure for the point cloud.
[0065] Specifically, the point cloud space is recursively divided into eight subspaces, and each subspace is recursively processed to obtain the final structure. In subsequent clipping based on the 3D clipping box, points outside the 3D clipping box can be quickly removed, improving clipping efficiency.
[0066] It is understandable that in this step, each tree can be identified and distinguished by different colors in order to perform monocular segmentation of the trees.
[0067] Specifically, monocular segmentation can be achieved by performing ground point extraction, elevation normalization, trunk extraction, and diameter at breast height (DBH) point extraction based on the preprocessed point cloud dataset, thereby obtaining information about each tree.
[0068] It should be noted that clustering methods based on distance calculations between objects in the entire dataset are called connectivity-based clustering or hierarchical clustering algorithms.
[0069] S204. Based on the segmentation data of each tree in the point cloud segmentation results, extract the tree parameters and generate a structured parameter table.
[0070] The tree parameters include at least one of the following for each tree: diameter at breast height (DBH), height, and trunk diameter.
[0071] It is understandable that tree information statistics can be performed at this step.
[0072] For example, the data of each tree can be divided into cube blocks based on point cloud attributes, where a block can be represented by a center point and eight vertices.
[0073] Tree information can be obtained by acquiring information about the eight vertices, the center point, and the point cloud data contained within the cube.
[0074] Figure 5 This is a schematic diagram illustrating another visualization of forestry point cloud data provided in an embodiment of the present invention.
[0075] in, Figure 5 For based on Figure 3 The diagram shown illustrates the point cloud data after monocular segmentation. Figure 5 China is the counterpart Figure 3 This is a diagram from an overhead view showing the trees after monocular segmentation. Different colors represent different heights. After segmentation, the system automatically numbers each tree and generates tree parameters for each segmented tree.
[0076] Table 1 is an exemplary table of tree information provided in an embodiment of the present invention. The data in Table 1 is based on... Figure 5 The point cloud data shown is segmented monocularly, and tree parameters are extracted to obtain the resulting table. Table 1 uses tree identification document (ID), X coordinate, Y coordinate, tree height, diameter at breast height (DBH), crown diameter (maximum horizontal extension of the crown), north-south crown diameter (maximum horizontal extension of the crown from due north to due south), east-west crown diameter (maximum horizontal extension of the crown from due east to due west), and crown area as examples for illustration.
[0077] Table 1
[0078]
[0079] S205. When there is a need for single tree analysis, generate a 3D clipping box in real time based on the user's input. Based on the 3D clipping box and the single tree, filter and output a subset of clipping point clouds of the target area.
[0080] The target region is the region of interest (ROI).
[0081] Optionally, in this embodiment of the invention, the 3D clipping frame is a three-dimensional collection area that can be adjusted according to the user's needs to define the range of interest in the point cloud data so as to facilitate the extraction of the target area.
[0082] Figure 6 This is a schematic diagram of an interactive 3D clipping frame provided in an embodiment of the present invention, as shown below. Figure 6As shown, the initial coordinates of the 3D clipping frame are (13.9889937, 107.01799774, 29.85741425). The 3D clipping frame can be adjusted according to the arrows pointing in different directions. Users can select a tree from the point cloud data in the visualization interface and precisely clip individual trees by adjusting the size and angle of the 3D clipping frame to obtain the desired result. Figure 7 The results of pruning a single plant are shown.
[0083] It should be noted that in the interactive interface provided in the embodiments of the present invention, one vertex of the 3D clipping box is selected to be placed at the origin of the three-dimensional coordinate axis. The coordinates of each vertex of the 3D clipping box and the length, width and height of the 3D clipping box are represented by the distance between the other vertices and the origin. Similarly, the monocular segmented single tree is displayed based on the origin.
[0084] It should be noted that during the cropping process, users can select the cropping range on a two-dimensional plane, and the actual cropped point cloud is the point cloud in the three-dimensional space within the cropping range.
[0085] Optionally, in embodiments of the present invention, the 3D clipping frame can perform internal clipping and external clipping.
[0086] The internal trimming instruction trims the inside of a tree, while the external trimming instruction trims the outside of a single tree.
[0087] It is understandable that the geometric parameters based on the 3D clipping box can quickly extract the point cloud in the target area (i.e., the area indicated by the geometric parameters).
[0088] S206. Based on the clipped point cloud subset, slice the tree into equal-thickness layers along the vertical direction, calculate the projected area layer by layer, and accumulate the volume of each layer to generate the total volume of the tree canopy.
[0089] Optionally, in this embodiment of the invention, during the canopy analysis process based on point cloud data, the 3D clipping frame and the loaded point cloud data can be displayed in real time on the interactive interface, as well as the adjustment process of the 3D clipping frame based on user operations such as free rotation and scaling, and the result after clipping based on the 3D clipping frame can be visualized in real time.
[0090] This invention provides a canopy analysis method based on point cloud data. First, a raw point cloud dataset of forestry resources is acquired and preprocessed. Then, based on the preprocessed dataset, an octree index is constructed to partition the space. Next, a connectivity distance algorithm is used to separate individual trees from the point cloud dataset, generating labeled point cloud segmentation results. Tree parameters can be accurately extracted based on these results, generating a structured parameter table. When analyzing a single tree, a freely variable 3D clipping box can be generated based on user input. The tree is then sliced layer by layer using this 3D clipping box. The projected area of each layer is calculated and summed to obtain the volume of each layer, thus accurately generating the total canopy volume. Compared to traditional analysis methods, this method improves the speed and efficiency of extracting regions of interest (such as individual trees, tree groups in specific areas, or terrain) from large-scale forest point cloud data, enhancing the accuracy and efficiency of forestry surveys.
[0091] Optionally, the tree canopy analysis method based on point cloud data provided in this embodiment of the invention may further include the following step S207:
[0092] S207. Real-time rendering of cropped point cloud subsets and / or slice distributions via an interactive interface, and exporting the processing results as a standardized point cloud format file.
[0093] It should be noted that, in this embodiment of the invention, after obtaining the original point cloud dataset of forestry resources, the point cloud data can be displayed through an interactive interface. Before cropping based on the 3D clipping box, individual trees can be displayed in real time. When cropping individual trees based on the 3D clipping box, the obtained point cloud subset and slice distribution can be displayed through the interactive interface.
[0094] It should be noted that after cropping, the cropping result can be exported as a standardized point cloud format file, such as a LAS or E57 format file.
[0095] Specifically, in the tree canopy analysis method based on point cloud data provided in the embodiments of the present invention, the above-mentioned S203 may specifically include the following S203a and S203b:
[0096] S203a. Feature extraction is performed based on the normal vector, curvature, and covariance matrix of the neighborhood point set of each point to determine the surface features of the trunk, branches, and leaves.
[0097] S203b: Based on the shape and density of the point cloud, determine the trees and background.
[0098] For example, by calculating the normal vector of each point, points on different surfaces can be distinguished. Trunks and branches usually have relatively consistent normal vectors, while leaves are more scattered; points with higher curvature are usually located at the edges of leaves or branches; the neighborhood point set of points on the trunk or stem usually appears as a surface (cylindrical surface), while the point cloud of leaves is more scattered.
[0099] Based on this scheme, feature extraction can be performed during the canopy analysis of tree canopies based on point cloud data to determine which feature of the tree a point matches, thereby facilitating the differentiation between trees and the background, and identifying the tree trunk, branches, and leaves.
[0100] Optionally, in the tree canopy analysis method based on point cloud data provided in the embodiments of the present invention, the above-mentioned S203 may specifically include the following S203c to S203f:
[0101] S203c: Recursively divide the preprocessed point cloud data into an octree structure and establish an octree index.
[0102] S203d: Based on the octree index, extract the center point of each block inside the octree to generate center point cloud data, and search for the K nearest neighbors of each center point cloud data.
[0103] The K nearest neighbors can be determined by searching based on the K-Nearest Neighbors (KNN) algorithm, where K is a positive integer.
[0104] S203e: Set the maximum neighborhood distance threshold and cluster points that meet the conditions into the same connected region.
[0105] Specifically, the above steps can be repeated recursively on unlabeled point clouds to achieve labeled connected component clustering.
[0106] It should be noted that points whose distance from the center point is equal to or less than the maximum neighborhood distance threshold are considered to meet the condition.
[0107] S203f: Assign a unique color label to each connected component to generate a visualized segmented point cloud result.
[0108] Based on this scheme, an octree index is built on the point cloud data. Based on the octree index and clustering algorithm, point cloud segmentation can be performed quickly. Different color labels are assigned to different connected components, and different point cloud segmentation results can be visualized and displayed.
[0109] Optionally, in the tree canopy analysis method based on point cloud data provided in the embodiments of the present invention, the above-mentioned S205 may specifically include the following S205a to S205c:
[0110] S205a. Define the initial clipping frame in three-dimensional space.
[0111] For example, the point cloud is constrained by six planes to form an axis-aligned cuboid.
[0112] Point p(x, y, z) satisfies the clipping condition: x min ≤x≤x max y min ≤y≤y max , z min ≤z≤z max .
[0113] In this embodiment of the invention, the initial size of the 3D clipping box can be constructed with the maximum value corresponding to the three axes centered at the origin of the point cloud coordinate system as the boundary.
[0114] Right now:
[0115] P0 (0, 0, 0), P1 (X.max, Y.max, Z.min), P2 (X.max, Y.min, Z.min), P3 (X.max, Y.max, Z.min ), P4 (X.min, Y.max, Z.min), P5 (X.max, Y.min, Z.max), P6 (X.min, Y.min, Z.min), P7 (X.max, Y.max, Z.max), P8 (X.min, Y.min, Z.max).
[0116] S205b: Generate an affine transformation matrix based on the user's input, and perform translation, scaling, or rotation operations on the initial clipping frame based on the affine transformation matrix.
[0117] For translation operations, affine transformations include vector... Along The transformed coordinates are obtained by translating and adjusting the position. .
[0118] For scaling operations, the 3D vector is multiplied by the affine transformation matrix (scaling factor). Controlling dimensions, among which, This represents the scaling factor for the x-axis. This represents the scaling factor for the y-axis. This represents the scaling factor for the z-axis.
[0119] For rotation operations, the rotation of an object is determined by its attitude, which is represented by its rotation angles around the x-axis (roll), y-axis (pitch), and z-axis (yaw).
[0120] It can be done through affine transformation matrix Control the rotation.
[0121] Suppose the cropping frame is rotated around the y-axis, x-axis, and z-axis by angles α, β, and γ, respectively. Then the rotation transformation matrix around the y-axis is: The transformation matrix about the x-axis is The rotation transformation matrix around the z-axis is .
[0122] It should be noted that if the system detects user input that adjusts the position, size, and angle of the cropping box on the interface, it can recalculate the set of points within the box in real time and display it visually.
[0123] Optionally, caching techniques can be used to avoid redundant calculations when adjusting 3D clipping box parameters in real time.
[0124] Optionally, the user's adjustment input can be input by dragging, selecting, or panning with the mouse, or by directly inputting X, Y, and Z parameters. This embodiment of the invention does not specifically limit this.
[0125] Optionally, in the tree canopy analysis method based on point cloud data provided in the embodiments of the present invention, after S205b above, the following S205c may also be included:
[0126] S205c, 3D clipping box point cloud removal based on octree index.
[0127] Specifically, the screening process can be accelerated through parallel computing using a graphics processing unit (GPU).
[0128] For example, an octree is used to quickly find the set of points that intersect with the 3D clipping box range, the indexed leaf nodes store the spatial location of the points, and nodes outside the selection are directly discarded.
[0129] It should be noted that for large-scale point cloud data, the efficiency of clipping box processing can be improved through parallelization.
[0130] (1) Block clipping: Divide the point cloud into several sub-regions and perform clipping calculations independently;
[0131] (2) GPU acceleration: CUDA (Compute Unified Device Architecture, a computing platform) is used for parallel computing to determine the inside and outside of the point cloud clipping box.
[0132] Optionally, during the cropping process based on the 3D cropping frame, the cropping results can be visualized. The interactive experience can be improved by displaying the cropped point cloud in real time; the cropping area can be displayed in real time for users to judge; and the cropping area can be stored independently by "cloning" to maintain the integrity of the original data.
[0133] It should be noted that the tree canopy analysis method based on point cloud data provided in this embodiment of the invention can provide a parameterized automatic slicing function, such as initializing the slice trimming thickness, fixing the axial trimming, performing equal-interval trimming based on the trimming interval (for example, by adding a constant a to any axis (x, y, z) of the current trimming frame, and achieving equal-interval multi-level trimming by adding a value of the same axis of the trimming frame to the axis), randomly displaying slice colors, and extracting cross-sectional lines, etc.
[0134] Optionally, in the tree canopy analysis method based on point cloud data provided in the embodiments of the present invention, the above-mentioned S206 may specifically include the following S206a to S206c:
[0135] S206a, Set slice parameters.
[0136] The slicing parameters include slice thickness and interlayer gap.
[0137] Figure 7 This is a schematic diagram of point cloud data for a single tree after monocular segmentation, provided as an embodiment of the present invention. (See diagram below.) Figure 7 As shown in the figure, the interactive interface displays the visualized point cloud data of a single tree with coordinates (4.07099915, 3.37699890, 9.03866673) obtained through monocular segmentation.
[0138] Figure 8 This is a schematic diagram of an interface for setting slicing parameters provided in an embodiment of the present invention. The user can rotate the point cloud data of a segmented single tree around a fixed axis in the left image, and input slicing parameters on the right. The user can set parameters for multiple slices in the interactive interface, select the slicing direction, such as slicing along the X-axis, Y-axis, or Z-axis, and set parameters for slicing gap, slicing color, and extraction contour (i.e., the contour of the slice) in the interactive interface.
[0139] S206b: Assign point clouds to corresponding slice layers based on the set slice parameters.
[0140] For example, it can be based on Assign the point cloud to the corresponding slice layer.
[0141] Where k represents the number of slice layers, Indicates the height of the point. This indicates the height of the lowest point of the clipping frame. Indicates slice thickness. This indicates the height of the interlayer gap.
[0142] Optionally, the number of slice layers to which a point belongs is determined based on the height of the point, the height of the lowest point of the clipping frame, the slice thickness, and the interlayer gap height. If the absolute value of the difference between the height of the point and the minimum height of the generated slice layer is less than or equal to the slice thickness, then the point belongs to the corresponding slice layer. If the absolute value of the difference between the height of the point and the minimum height of the generated slice layer is greater than the slice thickness, then the point belongs to the gap.
[0143] S206c: Perform a two-dimensional projection on each slice and calculate the area and cumulative volume.
[0144] Specifically, the projected area of each layer can be calculated, and the cumulative volume can be determined based on the projected area of each layer, thereby obtaining the total volume of the tree canopy.
[0145] Example:
[0146] Step 1: Calculate the minimum bounding rectangle of the tree and obtain the coordinates of the bottom left corner (MinCorner) and top right corner (MaxCorner) of the minimum bounding rectangle.
[0147] Step 2: Calculate the number of slices
[0148] Number of slices below the clipping frame = (MinCorner.Z - Lowest point of clipping frame.Z) / (Slice thickness + Slice gap);
[0149] Number of slices above the clipping frame = (MaxCorner.Z - Lowest point of clipping frame.Z) / (Slice thickness + Slice gap);
[0150] The final number of slices N = the absolute value of the number of slices below the cropping frame + the absolute value of the number of slices above the cropping frame.
[0151] Create N empty point clouds based on the number of slices.
[0152] Step 3: Calculate the slice layer to which each point (P) in the tree point cloud belongs.
[0153] Where SliceIndex = (PZ - lowest point of the clipping frame.Z) / (slice thickness + slice gap), the slice layer to which it belongs is obtained by rounding down SliceIndex.
[0154] Step 4: Determine if point (P) is within the gap.
[0155] For example, if the height of point (P) satisfies If the condition is met, then the point belongs to the slice; otherwise, the point belongs to the gap.
[0156] Specifically, first calculate the minimum height of the generated slice layer: MinHeight = lowest point of the clipping box.Z + SliceIndex * (slice thickness + slice gap); if the absolute value of (PZ - MinHeight) is less than or equal to the slice thickness, the point belongs to the slice; otherwise, the point belongs to the gap. If the point belongs to the slice, add the point to the empty point cloud created in the second step according to SliceIndex.
[0157] Figure 9 This is a schematic diagram illustrating how to determine slices based on a 3D selection box, as provided in an embodiment of the present invention. Figure 9 As shown in the figure, the interactive interface displays the point cloud data of a single tree with coordinates (4.07099915, 3.37699890, 9.03866577) after slicing on the Z-axis with a thickness of 0.100. Different slices are distinguished by different colors, and the volume of the tree is displayed as 29.240.
[0158] Based on this scheme, the point cloud data of a single tree can be accurately sliced. By performing two-dimensional projection on the sliced point cloud data, when the slices are thin enough, the area of each slice is measured. Finally, by accumulating the surface area of a sufficient number of slices, the crown area and crown volume of the tree can be accurately obtained.
[0159] Optionally, in the tree canopy analysis method based on point cloud data provided in the embodiments of the present invention, the above-mentioned S207 may include at least one of the following S207a to S207c:
[0160] S207a. Based on the user's adjustment actions on the 3D cropping frame, update and display the cropping results and / or slice distribution in real time.
[0161] The adjustment actions can include dragging, rotating, and scaling the cropping frame.
[0162] S207b, Assign color codes according to independent labels.
[0163] S207c, Set the transparency gradient according to the slice layer.
[0164] Based on this scheme, the cropping results and slice distribution can be displayed in real time during the analysis of tree canopy layers in point cloud data. Different trees can be distinguished by different colors, and different slice layers can be distinguished in the display interface by different transparency.
[0165] Corresponding to the embodiments of the foregoing methods, the present invention also provides embodiments of the apparatus and the computer equipment on which it is applied.
[0166] Embodiments of the device of the present invention can be applied to computer devices, such as servers or terminal devices. The device embodiments can be implemented through software, hardware, or a combination of both. Taking software implementation as an example, a logically defined device is formed by the processor of the tree canopy analysis system based on point cloud data loading the corresponding computer program instructions from non-volatile memory into memory for execution. From a hardware perspective, such as... Figure 10 The diagram shown is a hardware structure diagram of a computer device containing the apparatus of this embodiment of the invention. Except for... Figure 10 In addition to the processor 1010, memory 1030, network interface 1020, and non-volatile memory 1040 shown, the server or electronic device where the tree canopy analysis system 1031 based on point cloud data is located in the embodiment may also include other hardware depending on the actual function of the computer device, which will not be described in detail here.
[0167] Figure 11 A schematic diagram of the hardware structure of a tree canopy analysis system based on point cloud data is provided for an embodiment of the present invention, as shown below. Figure 11 As shown, the tree canopy analysis system 1100 based on point cloud data includes: a data acquisition module 1101, a preprocessing module 1102, a monocular segmentation module 1103, a pruning module 1104, a slicing module 1105, and an area and volume calculation module 1106; the data acquisition module 1101 is used to acquire the original point cloud dataset of forestry resources; the preprocessing module 1102 is used to preprocess the original point cloud dataset acquired by the data acquisition module to obtain a preprocessed point cloud dataset; the monocular segmentation module 1103 is used to construct an octree based on the preprocessed point cloud dataset processed by the preprocessing module. The system indexes and partitions the space, and uses a connectivity clustering algorithm to separate individual trees, generating point cloud segmentation results with labels. The clipping module 1104 is used to generate a 3D clipping box in real time based on user input when there is a need for analyzing a single tree. Based on the 3D clipping box and the single tree segmented by the monocular segmentation module, the system filters and outputs a clipped point cloud subset of the target region. The slicing module 1105 is used to clip the point cloud subset based on the clipping module and perform equal-thickness layered slicing along the vertical direction. The area and volume calculation module 1106 is used to calculate the projected area layer by layer and accumulate the volume of each layer to generate the total canopy volume.
[0168] Optionally, the tree canopy analysis system based on point cloud data also includes: a display module and a file export module; the display module is used to render and / or slice distributions of the cropped point cloud in real time through an interactive interface; the file export module is used to export the processing results as a standardized point cloud format file.
[0169] Optionally, the monocular segmentation module is specifically used to: extract features based on the normal vector, curvature, and covariance matrix of the neighborhood point set of each point to determine the surface features of the trunk, branches, and leaves; and determine the trees and background based on the shape and density of the point cloud.
[0170] Optionally, the monocular segmentation module is specifically used for: recursively dividing the preprocessed point cloud data into an octree structure and establishing an octree index; based on the octree index, extracting the center point of each block within the octree to generate center point point cloud data, and searching for the K nearest neighbors of each center point point cloud data; setting a maximum neighborhood distance threshold and clustering points that meet the conditions into the same connected component; assigning a unique color label to each connected component and generating a visual segmentation result of the point cloud.
[0171] Optionally, the clipping module is specifically used to: define an initial clipping box in three-dimensional space; generate an affine transformation matrix based on user input; and perform translation, scaling, or rotation operations on the initial clipping box based on the affine transformation matrix.
[0172] Optionally, the slicing module is specifically used to: set slicing parameters; the slicing parameters include slicing thickness and interlayer gap, and allocate point clouds to corresponding slicing layers based on the set slicing parameters; the area and volume calculation module is specifically used to: perform two-dimensional projection on each layer of slicing, and calculate the area and cumulative volume of each layer of slicing.
[0173] Optionally, the display module is specifically used to: update the display of cropping results and slice distribution in real time based on the user's adjustment actions on the 3D cropping frame; assign color labels according to independent tags; and set transparency gradients according to slice layers.
[0174] Optionally, the slicing module is specifically used to: determine the number of slice layers to which a point belongs based on the point's height, the height of the lowest point of the clipping frame, the slice thickness, and the interlayer gap height; if the absolute value of the difference between the point's height and the minimum height of the generated slice layer is less than or equal to the slice thickness, then the point belongs to the corresponding slice layer.
[0175] Optionally, the slicing module is specifically used to: if the absolute value of the difference between the height of a point and the minimum height of the generated slice layer is greater than the slice thickness, then the point belongs to the gap.
[0176] This invention provides a tree canopy analysis system based on point cloud data. First, a raw point cloud dataset of forestry resources is acquired and preprocessed. Then, based on the preprocessed dataset, an octree index is constructed to partition the space. Next, a connectivity distance algorithm is used to separate individual trees from the point cloud dataset, generating labeled point cloud segmentation results. Tree parameters can be accurately extracted based on these results, generating a structured parameter table. When analyzing a single tree, a freely variable 3D clipping box can be generated based on user input. The single tree is then sliced layer by layer using this 3D clipping box. The projected area of each layer is calculated and accumulated to obtain the volume of each layer, thus accurately generating the total canopy volume. Compared to traditional analysis methods, this system improves the speed and efficiency of extracting regions of interest (such as individual trees, tree groups in specific areas, or terrain) from large-scale forest point cloud data, enhancing the accuracy and efficiency of forestry surveys.
[0177] Accordingly, the present invention also provides a tree canopy analysis system based on point cloud data. This system includes a processor and a memory for storing processor-executable instructions. The processor is configured to: acquire a raw point cloud dataset of forestry resources; preprocess the raw point cloud dataset to obtain a preprocessed point cloud dataset; construct an octree index to partition the space based on the preprocessed point cloud dataset, and use a connectivity clustering algorithm to separate individual trees, generating labeled point cloud segmentation results; extract tree parameters based on the segmentation data of each tree in the point cloud segmentation results, generating a structured parameter table; the tree parameters include at least one of the following: diameter at breast height (DBH), height, and trunk diameter; in cases where there is a need for single tree analysis, generate a 3D clipping box in real time based on user input; filter and output a clipped point cloud subset of the target area based on the 3D clipping box and the single tree; and perform equal-thickness layered slicing along the vertical direction based on the clipped point cloud subset, calculating the projected area layer by layer and accumulating the volume of each layer to generate the total canopy volume.
[0178] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the various steps in the above embodiments of the tree canopy analysis method based on point cloud data.
[0179] The present invention also provides a computer device, the computer device including a memory, a processor and computer-readable instructions stored in the memory and executable on the processor, wherein the computer-readable instructions, when executed by the processor, implement the various steps in the above-described embodiments of the tree canopy analysis method based on point cloud data.
[0180] The specific implementation process of the functions and roles of each module in the above device can be found in the implementation process of the corresponding steps in the above method, and will not be repeated here.
[0181] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative. The modules described as separate components may or may not be physically separate, and the components shown as modules may or may not be physical modules, that is, they may be located in one place or distributed across multiple network modules. Some or all of the modules can be selected to achieve the purpose of the present invention according to actual needs. Those skilled in the art can understand and implement this without creative effort.
[0182] The foregoing has described specific embodiments of the invention. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps described in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired results. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0183] Other embodiments of the invention will readily occur to those skilled in the art upon consideration of the specification and practice of the invention claimed herein. This invention is intended to cover any variations, uses, or adaptations of the invention that follow the general principles of the invention and include common knowledge or customary techniques in the art not claimed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of the invention are indicated by the following claims.
[0184] It should be understood that the present invention is not limited to the precise structure described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of the invention is limited only by the appended claims.
[0185] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for analyzing a tree crown canopy based on point cloud data, characterized by, The method comprises: acquiring an original point cloud data set of forestry resources; preprocessing the original point cloud data set to obtain a preprocessed point cloud data set; based on the preprocessed point cloud data set, constructing an octree index division space, and using a connectivity clustering algorithm to separate single trees to generate a point cloud segmentation result carrying a label; based on each piece of segmentation data in the point cloud segmentation result, extracting tree parameters to generate a structured parameter table; the tree parameters include at least one of the diameter at breast height, height, and stem diameter of each tree; in the case of a single tree analysis requirement, generating a three-dimensional (3D) clipping frame in real time according to user input, including: defining an initial clipping frame in a three-dimensional space; generating an affine transformation matrix according to user input, and adjusting the clipping frame based on the affine transformation matrix; based on the 3D clipping frame and the single tree, filtering and outputting a clipped point cloud subset of a target region; based on the clipped point cloud subset, performing equal-thickness layering slicing in the vertical direction, including: setting slicing parameters, assigning point clouds to corresponding slice layers based on the slicing parameters, the height of the point, and the height of the lowest point of the clipping frame, the slicing parameters including slice thickness and interlayer gap; calculating the projected area layer by layer and accumulating the volume of each layer to generate the total volume of the tree crown.
2. The method of claim 1, wherein, The method further comprises: real-time rendering of the clipped point cloud subset and / or slice distribution through an interactive interface, and exporting the processing result as a standardized point cloud format file.
3. The method of claim 1, wherein, The method of constructing an octree index division space based on the preprocessed point cloud data set, and using a connectivity clustering algorithm to separate single trees to generate a point cloud segmentation result carrying a label, comprises: based on the normal vector, curvature, and covariance matrix of the neighborhood point set of each point, feature extraction is performed to determine the surface features of the trunk, branches, and leaves; based on the shape and density of the point cloud, the tree and the background are determined.
4. The method of claim 3, wherein, The method of constructing an octree index division space based on the preprocessed point cloud data set, and using a connectivity clustering algorithm to separate single trees to generate a point cloud segmentation result carrying a label, comprises: recursively dividing the preprocessed point cloud data into an octree structure to establish an octree index; based on the octree index, extracting the center point of each block in the octree to generate center point point cloud data, searching for K nearest neighbors of each center point point cloud data, K being a positive integer; setting a maximum neighborhood distance threshold, and clustering points that meet the condition into the same connected domain; assigning a unique color label to each connected domain to generate a visual segmentation point cloud result.
5. The method of claim 1, wherein, The method of adjusting the clipping frame based on the affine transformation matrix comprises: performing translation, scaling, or rotation operations on the initial clipping frame based on the affine transformation matrix.
6. The method of claim 1, wherein, The method of calculating the projected area layer by layer and accumulating the volume of each layer to generate the total volume of the tree crown comprises: performing two-dimensional projection on each slice to calculate the area and accumulate the volume.
7. The method of claim 2, wherein, The method of real-time rendering of the clipped point cloud subset and / or slice distribution through an interactive interface comprises at least one of the following: updating the display of the clipping result and / or slice distribution in real time according to user adjustment actions on the 3D clipping frame; assigning color labels according to independent labels; setting a transparency gradient according to slice layers.
8. The method of claim 6, wherein, Based on the slice parameter, the height of the point, and the height of the lowest point of the clipping frame, assign the point cloud to the corresponding slice layer, including: Based on the height of the point, the height of the lowest point of the clipping frame, the slice thickness, and the interlayer gap height, determine the number of slice layers to which the point belongs; If the absolute value of the difference between the height of the point and the minimum height of the generated slice layer is less than or equal to the slice thickness, the point belongs to the corresponding slice layer.
9. The method of claim 8, wherein, The method further includes: If the absolute value of the difference between the height of the point and the minimum height of the generated slice layer is greater than the slice thickness, the point belongs to the gap.
10. A system for analyzing a tree canopy based on point cloud data, the system comprising: The analysis system includes a data acquisition module, a preprocessing module, a monocular segmentation module, a clipping module, a slicing module, and an area-volume calculation module. The data acquisition module is configured to acquire an original point cloud data set of forestry resources. The preprocessing module is configured to preprocess the original data set acquired by the data acquisition module to obtain a preprocessed point cloud data set. The monocular segmentation module is configured to construct an octree index division space based on the preprocessed point cloud data set processed by the preprocessing module, and separate single trees using a connectedness clustering algorithm to generate a point cloud segmentation result carrying labels. The clipping module is configured to generate a three-dimensional (3D) clipping frame in real time according to user input when there is a single tree analysis requirement, and specifically configured to define an initial clipping frame in a three-dimensional space, generate an affine transformation matrix according to user input, adjust the clipping frame based on the affine transformation matrix, and filter and output a clipping point cloud subset of a target region based on the 3D clipping frame and the single tree segmented by the monocular segmentation module. The slicing module is configured to perform equal-thickness slicing along the vertical direction based on the clipping point cloud subset of the clipping module, and specifically configured to set a slice parameter, assign the point cloud to the corresponding slice layer based on the slice parameter, the height of the point, and the height of the lowest point of the clipping frame, and the slice parameter includes a slice thickness and an interlayer gap. The area-volume calculation module is configured to calculate the projected area layer by layer and accumulate the volume of each layer to generate the total volume of the tree crown.
Citation Information
Patent Citations
Method and system for extracting diameter at breast height of trunk by using point cloud data
CN115953607A