A high canopy forest single tree segmentation method, device, medium and equipment
By generating gradient pointing maps and iteratively extracting tree vertices with multi-scale windows, and combining water flow path segmentation with the watershed algorithm, the over-segmentation and under-segmentation problems of single tree segmentation in high-density forests are solved, and the segmentation accuracy is improved.
Patent Information
- Application Number
- CN202510236277.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-28
- Publication Date
- 2025-10-17
- Estimated Expiration
- 2045-02-28
AI Technical Summary
Existing technologies cannot accurately normalize airborne lidar point cloud data in high-density forests, resulting in over-segmentation or under-segmentation of tree vertex detection, and the watershed algorithm produces erroneous results in overlapping areas of tree crowns.
A digital surface model is used to generate a gradient pointing map, and tree vertices are extracted iteratively through a multi-scale window. The results are then combined with the water flow path segmentation and watershed algorithm to generate a single tree segmentation result.
The accuracy of single tree segmentation is significantly improved, over-segmentation and under-segmentation are reduced, and the erroneous segmentation results of the watershed algorithm in the overlapping areas of tree crowns are reduced.
Smart Images

Figure CN120182597B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing information extraction, and in particular to a method, device, medium and equipment for segmenting single trees in a high-canopy density forest. Background Art
[0002] Forests play a vital role in ecosystem services, providing critical services such as carbon cycling, water cycling, energy exchange, and habitat for many species. Individual tree segmentation is a crucial step when conducting detailed forestry surveys using airborne LiDAR data. The currently widely used method for individual tree segmentation is the watershed algorithm. This method generates a canopy height model (CHM) from normalized point cloud data, followed by tree vertex detection and individual tree segmentation. The watershed algorithm requires normalized point cloud data, and point cloud normalization relies on a high-precision digital terrain model (DTM). However, in high-canopy forests, airborne LiDAR cannot penetrate the canopy to reach the ground, making it difficult to accurately depict the terrain and generate a continuous and accurate DTM. Furthermore, the traditional watershed algorithm uses a local maximum method to detect tree vertices. In broadleaf forests, due to the multiple protruding branches in the canopy, this method is prone to over-segmentation. In areas with denser canopies, the boundaries between adjacent tree vertices are blurred, making under-segmentation more likely. Finally, when the classic watershed algorithm performs water dilation at the seed point, the dilation directions occur in a random order at the same height interval. This randomness may lead to erroneous results.
[0003] In summary, the problems and defects of the existing technology are as follows:
[0004] (1) In the high-density forest point cloud collected by airborne lidar, the point cloud cannot be accurately normalized due to the missing ground points.
[0005] (2) The existing local maximum tree vertex detection algorithm is prone to over-segmentation in broad-leaved forests and under-segmentation in areas with dense tree crowns.
[0006] (3) The classic watershed algorithm is prone to produce erroneous results in areas where tree crowns overlap at the same height interval. Summary of the Invention
[0007] The present invention provides a method, device, medium and equipment for splitting single trees in a high-canopy forest, aiming to solve one of the technical problems in the related art at least to a certain extent.
[0008] To this end, a first aspect of an embodiment of the present invention provides a method for segmenting a single tree in a high-canopy forest, comprising the following steps:
[0009] Step 1: Collect forest point cloud data of the target forest;
[0010] Step 2, ground points and non-ground points are classified after pre-processing of the forest point cloud data, and a digital terrain model of the target forest is generated based on the classified complete point cloud data;
[0011] Step 3, the neighborhood pixels corresponding to each pixel are obtained, the local gradient vector of the neighborhood pixels and the pointing concentration degree of the corresponding pixel are calculated based on the digital terrain model, and a gradient pointing graph of the target forest is generated;
[0012] Step 4, a preset tree vertex detection algorithm is used to extract the tree vertex;
[0013] Step 5, the pixel value of the gradient pointing graph is inverted, the flow of water on each pixel is simulated, and the flow paths converging in the same pixel are classified into one class, and a water flow path segmentation result is generated;
[0014] Step 6, based on the gradient pointing graph and the extracted tree vertex, a watershed algorithm is executed, the water flow path segmentation result is merged and overlaid with the execution result of the watershed algorithm, and a single tree segmentation result of the target forest is generated.
[0015] Another object of the present application is to provide a computer readable storage medium storing a computer program, which, when executed by a processor, implements the above-mentioned high-coverage forest single tree segmentation method.
[0016] To achieve the above object, a third aspect of an embodiment of the present application provides a high-coverage forest single tree segmentation device, comprising a computer readable storage medium and a processor, wherein the processor executes a computer program on the computer readable storage medium to implement the steps of the above-mentioned high-coverage forest single tree segmentation method.
[0017] A fourth aspect of an embodiment of the present application provides a high-coverage forest single tree segmentation device, comprising an acquisition module, a first construction module, a second construction module, an extraction module, a segmentation module and a merging module,
[0018] The acquisition module is used to acquire forest point cloud data of a target forest;
[0019] The first construction module is used to classify ground points and non-ground points after pre-processing of the forest point cloud data, and generate a digital terrain model of the target forest based on the classified complete point cloud data;
[0020] The second construction module is used to obtain neighborhood pixels corresponding to each pixel, calculate the local gradient vector of the neighborhood pixels and the pointing concentration degree of the corresponding pixel based on the digital terrain model, and generate a gradient pointing graph of the target forest;
[0021] The extraction module is configured to extract the tree top point by using a preset tree top point detection algorithm.
[0022] The segmentation module is configured to invert pixel values of the gradient direction map, simulate water flow on each pixel, and classify catchments converging on the same pixel into one class to generate a water flow path segmentation result.
[0023] The merging module is configured to perform a watershed algorithm based on the gradient direction map and the extracted tree top point, and merge the water flow path segmentation result with an execution result of the watershed algorithm to generate a single tree segmentation result of the target forest.
[0024] The present application provides a high canopy forest single tree segmentation method, device, medium and equipment, based on gradient direction map and multi-scale seed point extraction method, first, using digital terrain model (DSM) to count the direction of local gradient vector of neighborhood point cloud, and generating gradient direction map (Gradient Convergence Map, GCM), which is used to replace CHM for tree crown segmentation, this method is not affected by terrain. Then, preferably using a multi-scale window to extract the tree top point from the gradient direction map, and according to the geometric characteristics between the tree crowns, the real tree top point is iteratively screened and the false tree top point is deleted, which effectively suppresses the over-segmentation and under-segmentation phenomenon, and significantly improves the single tree segmentation accuracy. Finally, the water flow path segmentation and post-processing merging segmentation method is adopted, which reduces the error segmentation result of the same height interval caused by the overlap of the watershed algorithm on the tree crown.
[0025] In order to make the above-mentioned purposes, characteristics and advantages of the application more obvious and easy to understand, the following will describe the preferred embodiments of the application, and the accompanying drawings will be described in detail as follows. BRIEF DESCRIPTION OF DRAWINGS
[0026] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following will briefly introduce the drawings needed to be used in the embodiments, and it should be understood that the following drawings only show some embodiments of the present application, and therefore should not be regarded as a limitation to the scope, and for those skilled in the art, other related drawings can also be obtained without creative labor on the basis of these drawings.
[0027] Figure 1 It is a flowchart of the high canopy forest single tree segmentation method provided by an embodiment;
[0028] Figure 2 It is a gradient direction map calculated according to forest point cloud data in an embodiment;
[0029] Figure 3 It is a tree top point extracted by a multi-window iterative method in an embodiment;
[0030] Figure 4 is a schematic diagram of the result of a segmentation algorithm based on water flow paths in an embodiment;
[0031] Figure 5 is a comparison chart of the effects of a method based on the application and a marker-controlled watershed method in an embodiment;
[0032] Figure 6 is a structural schematic diagram of a high-coverage forest single-tree segmentation device provided in an embodiment;
[0033] Figure 7 is a structural schematic diagram of a high-coverage forest single-tree segmentation device provided in an embodiment. DETAILED DESCRIPTION
[0034] In order to make the objects, technical solutions and advantages of the present application clearer, the present application will be further described in detail below with reference to the drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and do not limit the present application. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor are within the scope of protection of the present application.
[0035] It should be noted that the various features in the embodiments of the present application can be combined with each other without conflict, and are within the scope of protection of the present application. In addition, although the functional modules are divided in the device schematic diagram, and the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in a different order than the module division in the device or the order in the flowchart. Furthermore, the "first", "second", "third" and the like used in the present application do not limit the data and execution order, but only distinguish the same items or similar items with basically the same function and effect.
[0036] Figure 1 is a flowchart of a high-coverage forest single-tree segmentation method provided in embodiment 1. As shown in Figure 1 , the method includes but is not limited to the following steps:
[0037] Step 1, collecting forest point cloud data of a target forest;
[0038] Step 2, classifying ground points and non-ground points after pre-processing the forest point cloud data, and generating a digital terrain model of the target forest based on the classified complete point cloud data;
[0039] Step 3, obtaining a neighborhood pixel corresponding to each pixel, calculating the local gradient vector of the neighborhood pixel and the directional concentration of the corresponding pixel based on the digital terrain model, and generating a gradient direction map of the target forest;
[0040] Step 4, extracting tree top points by using preset tree top point detection algorithm;
[0041] Step 5, inverting pixel values of the gradient direction map, simulating water flow on each pixel, and merging catchments converging on the same pixel to generate water flow path segmentation results.
[0042] Step 6, based on the gradient direction map and the extracted tree top points, performing a watershed algorithm, merging the water flow path segmentation results with the execution results of the watershed algorithm, and generating single tree segmentation results of the target forest.
[0043] The above embodiment provides a single tree segmentation method for high canopy forest, which uses a digital terrain model (DSM) to count the directionality of local gradient vectors of neighborhood point clouds and generates a gradient convergence map (GCM) to replace the CHM for tree crown segmentation. This method is not affected by terrain. Then, the segmentation method of water flow path segmentation and post-processing merging is used to reduce the false segmentation results that may be generated by the watershed algorithm on the overlapping tree crown in the same height interval.
[0044] The above steps are described in detail through specific embodiments.
[0045] For example, in one embodiment, the unmanned aerial vehicle can be controlled to fly in a terrain-following manner in an area with large terrain undulations, and high-density point cloud data of the target forest can be obtained by using an airborne laser radar to fully depict the three-dimensional structure information of the forest canopy. Then, the point cloud data is preprocessed, such as denoising, point cloud classification, etc. to separate ground points and non-ground points, and a digital terrain model (DTM) and a digital surface model (DSM) of the target forest are established. The digital terrain model DTM represents the bare ground without any objects (such as plants and buildings), and the digital surface model DSM represents the earth surface and includes all objects thereon.
[0046] In a preferred embodiment, the above step 2 specifically includes but is not limited to the following steps:
[0047] S201, using a preset statistical filtering method (SOR) to remove noise points of the forest point cloud data, so as to remove reflection signals of birds or other flying objects caused by errors in the laser radar system.
[0048] S202, based on a preset cloth simulation algorithm (CSF), separating the forest point cloud data after removing noise into ground points and non-ground points, and the non-ground points include vegetation points, building points, etc.
[0049] S203: generating a target resolution of the digital surface model according to the target point density, dividing the ground points and the non-ground points based on the target resolution, and constructing a digital surface model (DSM) of the target forest based on the complete point cloud data, wherein the target point density includes at least 4 lidar points within the range of each pixel, thereby ensuring a trade-off between empty pixels and retaining sufficient details to describe forest canopy characteristics.
[0050] In the above embodiments, ground points can be used to construct an irregular triangulated network (TIN) to represent the local features of the terrain. For sparse ground points, an interpolation method can be used to generate a continuous terrain surface and converted into a regular grid (raster) format to generate the final DTM model. For the DSM model, the pre-processed point cloud data can be divided into a regular grid of a certain resolution, and each grid cell is assigned an elevation value that reflects the top features of the terrain and landforms. At the same time, interpolation methods such as nearest neighbor interpolation, linear interpolation, or inverse distance weighted method are used for irregularly distributed point cloud data to generate a continuous DSM model. The specific methods will not be repeated here.
[0051] For example, in a preferred embodiment, step 3 determines the pixels (ground pixels) below the height threshold in the DTM model and DSM model of the bare ground area so as to exclude the influence of the bare ground when calculating the gradient vector. Then, the gradient vector of the window size of each pixel is calculated, the gradient vector of the pixel is divided into two vertical components, and a convolution kernel is constructed to calculate them separately. Specifically, the following steps are included but are not limited to:
[0052] S301: Construct a convolution kernel and use it to convolve the data of the target forest's digital surface model in two perpendicular directions to generate a local gradient vector for each pixel and its neighborhood. The convolution kernel and local gradient vector calculation formula are as follows:
[0053] K x =[1 0 -1] (1)
[0054]
[0055] G x =DSM×K x (3)
[0056] G y =DSM×K y (4)
[0057] G=(G x ,G y ) (5)
[0058] Among them, K x Represents the convolution kernel for calculating the x-direction component of the gradient vector, Gx represents the component of the gradient vector in the x direction, K y Represents the convolution kernel for calculating the y-direction component of the gradient vector, G y Represents the component of the gradient vector in the y direction, and G is the local gradient vector of the pixel.
[0059] S302: Construct a direction vector from the central pixel to the neighboring pixels, and calculate the angle difference between the gradient vector of the neighboring pixels and the direction vector from the central pixel to the neighboring pixels.
[0060] Specifically, the direction vector from the central pixel to the neighboring pixel is constructed and divided into two components in mutually perpendicular directions. The gradient vector components from the central pixel to the neighboring pixel are:
[0061]
[0062] D=(D x ,D y ) (8)
[0063] Among them, (x a ,y a ) is the center pixel coordinate, D x is the component of the direction vector from the center pixel to the neighboring pixel in the x direction, (x b ,y b ) is the coordinate of the neighboring pixel, D y is the y-direction component of the direction vector from the central pixel to the neighboring pixels, and D is the direction vector from the central pixel to the neighboring pixels.
[0064] Therefore, the angle difference between the gradient vector of the neighborhood pixel and the direction vector from the central pixel to the neighborhood pixel is:
[0065]
[0066] in, and Represent the magnitude of the direction vector and the local gradient vector respectively.
[0067] Then, S303 is executed to set weights for neighborhood pixels at different distances based on a two-dimensional Gaussian kernel function, calculate the pixel value of each pixel, and generate a gradient pointing map of the target forest according to the pixel value.
[0068] In a specific embodiment, due to the differences in tree crown sizes, pixels closer to the highest point of the crown are more likely to be within the crown range. Therefore, a preferred embodiment of the present invention uses a two-dimensional Gaussian kernel function as the weight, so that pixels closer to the center point have higher weights, and pixels farther from the center point have lower weights. The weight calculation formula is:
[0069]
[0070] where σ is a scale parameter to control the weight decay, the larger the value of σ, the slower the weight decays with distance.
[0071] The central pixel value can be expressed as:
[0072]
[0073] where θ i,j is the angle difference of the neighborhood pixel (i,j), w i,j is the corresponding distance weight.
[0074] Three adjustable parameters are involved in the above algorithm, the first one is the window size to calculate the local gradient vector, the larger the window value, the larger the range represented by the calculated gradient vector, the resolution of the DSM and the size of the forest canopy should be considered to set in order to capture the tree crown detail features while avoiding the influence of small fluctuations. The second one is the neighborhood window size, the larger the value, the larger the neighborhood range when calculating the weighted angle difference, the value should be set according to the average tree crown diameter. The third one is the weight decay parameter σ, the larger the parameter, the higher the weight of the pixel far away from the center point, which should be adjusted according to the actual size of the canopy in the region.
[0075] Figure 2 is the gradient direction map calculated according to the collected forest point cloud data in an embodiment, as shown in Figure 2 The higher the pixel value, the more concentrated the local gradient vector of the neighborhood pixel points to the pixel, according to the geometric characteristics of the tree crown, the value is the highest at the tree top point and the lowest at the tree crown boundary.
[0076] In an embodiment of the present application, a variety of methods can be used to extract the tree top point, such as using the local maximum value method to detect the tree top point, specifically using a fixed size square window to move on each grid, identifying whether the CHM value of the grid at the center of the window is the maximum value in the window, if it is the maximum value, it is considered that the grid may contain the tree top point, and the center of the grid is extracted as the possible tree top point position. However, this method is easy to over-segment for broad-leaved forests, and easy to under-segment in dense crown areas. Therefore, the preferred embodiment of the present application uses a multi-scale iterative extraction method, which uses at least two windows of different scale sizes to extract tree top points from the gradient direction map or the canopy height model CHM, and according to the geometric characteristics between the tree crowns, the remaining tree top points are iteratively found from the real tree top point, and the false tree top points are deleted, thereby effectively suppressing the over-segmentation and under-segmentation phenomenon, and significantly improving the single tree segmentation accuracy.
[0077] For example, in a preferred embodiment, step 4 includes but is not limited to the following steps:
[0078] S401, obtaining a gradient direction map of a target forest;
[0079] S402, extracting local maximum values of the gradient direction map using at least two windows of different scales to generate a plurality of local maximum value sets;
[0080] S403, comparing the plurality of local maximum value sets, determining points repeated in the sets as real tree top points and the remaining points as candidate points, and establishing a real tree top point set and a candidate point set;
[0081] S404, identifying inter-crown geometric features of the target forest according to the gradient direction map or a digital terrain model of the target forest, iteratively screening real tree top points from the candidate point set based on the inter-crown geometric features, and updating the real tree top point set and the candidate point set according to the screening result until a preset iteration end condition is reached.
[0082] In one embodiment, the step S404 is specifically:
[0083] S4041, constructing a Delaunay triangulation using all points in the real tree top point set and the candidate point set;
[0084] S4042, traversing each edge of each triangle to obtain a target candidate point connected by a real tree top point, and determining whether the corresponding edge meets a preset condition, if so, adding the target candidate point to the real tree top point set, otherwise removing the target candidate point;
[0085] S4043, repeating steps S4041-S4042 until a preset iteration end condition is reached, the preset iteration end condition including that all points in the candidate point set are processed.
[0086] For example, the step S4042 includes a first preset condition, a second preset condition and a third preset condition, and if the corresponding edge meets any one of the first preset condition, the second preset condition and the third preset condition, the target candidate point is added to the real tree top point set.
[0087] Specifically, in one embodiment, the first preset condition is that a ratio of a minimum value and an end point value of the connection line is obtained based on the gradient direction map, and the ratio is less than a preset ratio. This condition uses the gradient direction map to check the ratio of the minimum value and the end point value of the connection line. If the ratio of the minimum value and the end point value is less than the preset ratio, it is considered that the connection meets the condition. This condition considers that the directions of the neighborhood gradient vectors of the two crown boundary points are opposite, so there is a local low value, and at the same time, considering the sizes of the two crowns, the end point value of the small crown is small, and the end point value of the large crown is large. Satisfying the condition means that the connection line may pass through a boundary (pixel), indicating that the path is an effective connection of the real tree top point.
[0088] In another embodiment, the second preset condition is that an angle difference between a lowest point of the connection line and two end point vectors of a line segment is obtained based on a digital surface model of the target forest, and the angle difference is less than a preset angle threshold. This condition uses the digital surface model (DSM) to check whether the angle difference between the lowest point of the connection line and the two end point vectors of the line segment is less than the preset angle threshold, while considering the distance between the two tree top points and the low point that may exist at the boundary. If the angle difference of the connection line is less than the threshold, it indicates that the connection meets the geometric relationship between the real tree top points.
[0089] In another embodiment, the third preset condition is that a length of the connection line is obtained, and the length of the connection line is greater than a first preset length threshold. This condition checks whether the length of the connection line is greater than the first preset length threshold, which is generally set as the maximum crown diameter. If the length of the connection line exceeds the threshold, it indicates that the two end points of the connection are real tree top points.
[0090] The present application also provides another preferred embodiment, that is, when the Delaunay triangulation is constructed in step S401, edges with lengths exceeding a second preset length threshold are obtained and removed to avoid the edges of any triangle in the Delaunay triangulation result crossing multiple crowns, further improving the accuracy of tree top point extraction.
[0091] For example, two windows can be used to extract the local maximum values of the gradient direction map or the canopy height model, respectively, and the window values of the two windows are the minimum crown diameter and the maximum crown diameter in the region, so as to balance the extraction efficiency and accuracy of the real tree top point. The final iterative extraction result is as shown in Figure 2
[0092] In the traditional watershed algorithm, the water expansion is isotropic, and the water expansion in each tree crown occurs in a random order at the same height interval. This randomness can lead to false results, especially when adjacent tree crowns intersect at the same height interval. For example, the preferred embodiment of the present application proposes a water flow simulation algorithm based on a gradient direction map and seed points for tree crown segmentation. First, all protruding tree clusters are segmented, and then the tree clusters are merged into the correct single tree range according to geometric features, avoiding errors caused by the randomness of water expansion in the watershed. Specifically, but not limited to, the following steps are included:
[0093] S501, difference operation is performed on the pixel value of each pixel in the gradient direction map and the maximum value in the image to perform pixel value inversion. Specifically, after reading the gradient direction map, the pixel values in the image are inverted to simulate the water flow from high to low, that is, by performing difference operation on the value of each pixel and the maximum value in the image, a new image is generated, so that the high pixel value region corresponds to a lower value.
[0094] Then perform S502, calculate the flow direction of each pixel by the preset eight-neighborhood method, and generate the final convergence point of each pixel. Specifically, when water is poured into a pixel, its flow direction is the direction in which the adjacent pixel value drops fastest. By traversing the adjacent pixels of the current pixel, the adjacent pixel with the smallest value is selected as the next target of the water flow until the local minimum value is reached. The flow direction of each pixel is recorded, and the final attribution area of the water flow is determined by path tracking. The present application assigns a unique label to each local minimum value and marks all pixels on the path as the same region, and then performs S503 to finally divide all pixels with the same final convergence point into a watershed, generating a water flow path segmentation result, that is, all pixels are assigned to their respective watershed regions.
[0095] Finally, the watershed algorithm is performed according to the extracted seed points, and the shape coverage area obtained by the watershed algorithm merges the initial shape corresponding to the water flow path segmentation result to obtain the final segmentation result. Figure 4 is a schematic diagram of the result of the water flow path segmentation algorithm based on the above-mentioned water flow path in an embodiment, wherein the light gray is the water flow path segmentation result, and the dark gray is the merged result, as shown in Figure 4 The method obtains all complete convex shapes by water flow path segmentation, and then combines the water flow path segmentation result with the watershed segmentation result to merge the water flow path segmentation result into complete tree crowns, reducing the segmentation error caused by the randomness of water expansion in the watershed algorithm, avoiding the segmentation randomness when adjacent tree crowns are in the same height interval, and improving the segmentation accuracy.
[0096] The application is implemented in a high canopy density forest in Hubei Jingmen City Jingshan City Huzhao Mountain Forest Farm, the canopy density of the region is about 0.95, the terrain slope is about 23°, and the main tree species is Schima superba. In order to comprehensively evaluate the performance of the single tree segmentation method proposed in the application, the Intersection over Union (IoU) index is used to automatically match the segmentation results. Specifically, the algorithm segmentation result is matched with the manually annotated tree crown shape, and the IoU greater than 50% is set as the threshold of correct matching, that is, when the overlap area of the segmentation result and the manually annotated tree crown shape is more than 50%, the tree segmentation is considered correct.
[0097] On this basis, a plurality of evaluation indexes are further calculated to comprehensively measure the performance of the segmentation algorithm, specifically including:
[0098] Precision (P): focuses on the accuracy of predicting positive samples;
[0099] Recall (R): focuses on the proportion of true positive samples correctly identified;
[0100] F1 score (F1): balances precision and recall, and provides an index that comprehensively considers both;
[0101] Accuracy Index (AI): evaluates the closeness of the algorithm segmentation result to the actual tree situation as a whole, and considers the influence of missed and false segmented trees on the result, which can comprehensively reflect the accuracy of the algorithm in this task.
[0102] The calculation formulas of IoU and each index are as follows:
[0103]
[0104] In the formula, A and B represent the areas of two regions, A∩B represents the intersection area of two regions, A∪B represents the union area of two regions, TP (True Positives) represents the correct tree vertex, FP (False Positives) represents the false tree vertex, FN (False Negatives) represents the tree vertex not detected, and N is the total number of manually annotated single trees.
[0105] The results show that the application uses non-normalized point cloud to calculate gradient direction graph, successfully extracts the single tree crown range in high canopy density and high slope area according to the gradient direction graph, and effectively reduces the over-segmentation phenomenon in broad-leaved forest by multi-scale iterative seed point extraction, such as Figure 5 a, 5b, 5c, and under-segmentation phenomenon when the canopy is dense, such as Figure 5d, 5e. At the same time, the results of the quantitative evaluation show that the method of the present application is superior to the marker-controlled watershed algorithm in the prior art in various evaluation indexes, as shown in Table 1 below.
[0106] Table 1 Comparison results of the method of the present application and the marker-controlled watershed algorithm
[0107]
[0108] The above embodiment provides a single tree segmentation method suitable for more types and a wider range, based on airborne laser radar data and without using normalized point clouds, which is not only applicable to high-coverage forests, has a wider range of application, and improves the accuracy of the existing method, and provides a basis for large-scale forestry investigation.
[0109] It should be understood that the size of the serial number of each step in the above embodiment does not mean the order of execution, and the execution order of each process should be determined according to its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present application.
[0110] The embodiment of the present application also provides a computer readable storage medium storing a computer program, wherein the computer program is executed by a processor to realize the single tree segmentation method for high-coverage forests described above.
[0111] Figure 6 is a structural schematic diagram of a single tree segmentation device for high-coverage forests provided by an embodiment, as shown in Figure 6 includes an acquisition module 100, a first construction module 200, a second construction module 300, an extraction module 400, a segmentation module 500, and a merging module 600,
[0112] The acquisition module 100 is configured to acquire forest point cloud data of a target forest;
[0113] The first construction module 200 is configured to separate ground points after preprocessing the forest point cloud data, and generate a digital terrain model of the target forest based on the ground points;
[0114] The second construction module 300 is configured to obtain a neighborhood pixel corresponding to each pixel, calculate a local gradient vector of the neighborhood pixel and a direction concentration degree of the corresponding pixel based on the digital terrain model, and generate a gradient direction map of the target forest;
[0115] The extraction module 400 is configured to extract a tree top point by using a preset tree top point detection algorithm;
[0116] The segmentation module 500 is configured to invert a pixel value of the gradient direction map, simulate the flow of water on each pixel, and classify the catchment area of the water flow finally converging in the same pixel into a class, to generate a water flow path segmentation result;
[0117] The merging module 600 is configured to perform a watershed algorithm based on the gradient direction map and the extracted tree top points, merge and cover the water flow path segmentation result with the execution result of the watershed algorithm, and generate a single-tree segmentation result of the target forest.
[0118] In a preferred embodiment, the second constructing module 300 specifically comprises:
[0119] A first constructing unit is configured to construct a convolution kernel, and perform convolution processing on data of a digital terrain model of the target forest in two vertical directions by using the convolution kernel, to generate a local gradient vector of each pixel and its neighborhood;
[0120] A second constructing unit is configured to construct a direction vector from a center pixel to a neighborhood pixel, and calculate an angle difference between the gradient vector of the neighborhood pixel and the direction vector from the center pixel to the neighborhood pixel;
[0121] A gradient direction map generating unit is configured to set a weight for neighborhood pixels at different distances based on a two-dimensional Gaussian kernel function, calculate a pixel value of each pixel, and generate a gradient direction map of the target forest according to the pixel value.
[0122] In a preferred embodiment, the extracting module 400 specifically comprises:
[0123] An obtaining unit is configured to obtain a gradient direction map of a target forest;
[0124] An extracting unit is configured to extract local maximum values of the gradient direction map by using at least two windows of different scales respectively, to generate a plurality of local maximum value sets;
[0125] A first judging unit is configured to compare the plurality of local maximum value sets, judge points that are repeated in the plurality of local maximum value sets as real tree top points, and judge remaining points as candidate points, and establish a real tree top point set and a candidate point set;
[0126] An iterative screening unit is configured to identify inter-crown geometric features of the target forest according to the gradient direction map or the digital terrain model of the target forest, iteratively screen real tree top points from the candidate point set based on the inter-crown geometric features, and update the real tree top point set and the candidate point set according to a screening result until a preset iteration end condition is reached.
[0127] In a further preferred embodiment, the iterative screening unit comprises:
[0128] A third constructing unit is configured to construct a Delaunay triangulation by using all points in the real tree top point set and the candidate point set;
[0129] The second judging unit is configured to traverse each edge of each triangle, obtain a target candidate point connected by a real tree vertex, and determine whether the corresponding edge meets a preset condition, if yes, add the target candidate point to the real tree vertex set, otherwise remove the target candidate point, until a preset iteration end condition is reached, and the preset iteration end condition includes that all points in the candidate point set are processed.
[0130] In one preferred embodiment, the segmentation module specifically includes:
[0131] The processing unit is configured to perform pixel value inversion by performing difference operation on the pixel value of each pixel in the gradient direction map and the maximum value in the image.
[0132] The calculation unit is configured to calculate the flow direction of each pixel by using a preset eight-neighborhood method, and generate the final convergence point of each pixel.
[0133] The result generation unit is configured to divide all pixels with the same final convergence point into a flow domain, and generate a water flow path segmentation result.
[0134] The above embodiment provides a high-coverage forest single tree segmentation device, which uses a digital surface model (DSM) to count the directionality of local gradient vectors of neighborhood point clouds, and generates a gradient direction map (GCM) to replace a CHM to perform tree crown segmentation, and the method is not affected by terrain; then, a segmentation method of water flow path segmentation and post-processing combination is adopted, so that the error segmentation result caused by the overlapping tree crown in the same height interval of the watershed algorithm is reduced.
[0135] The embodiment of the present application also provides a high-coverage forest single tree segmentation device, which includes a computer readable storage medium and a processor, and the processor implements the steps of the above-mentioned high-coverage forest single tree segmentation method when executing the computer program on the computer readable storage medium.
[0136] Figure 7 is a structural schematic diagram of the high-coverage forest single tree segmentation device provided by one embodiment of the present application, as Figure 7 shown, the high-coverage forest single tree segmentation device 8 of this embodiment includes a processor 80, a readable storage medium 81, and a computer program 82 stored in the readable storage medium 81 and executable on the processor 80. The processor 80 implements the steps in each of the above method embodiments when executing the computer program 82, for example Figure 1 shown steps. Alternatively, the processor 80 implements the functions of each module in each of the above device embodiments when executing the computer program 82, for example Figure 6 shown module functions.
[0137] For example, the computer program 82 can be divided into one or more modules, which are stored in the readable storage medium 81 and executed by the processor 80 to complete the present application. The one or more modules can be a series of computer program instruction segments capable of completing a specific function, which are used to describe the execution process of the computer program 82 in the high canopy forest single tree segmentation device 8.
[0138] The high canopy forest single tree segmentation device 8 can include, but is not limited to, the processor 80 and the readable storage medium 81. Those skilled in the art can understand that the high canopy forest single tree segmentation device 8 can further include other components, such as a power management module, an operation processing module, an input / output device, a network access device, a bus, etc. Figure 7 The high canopy forest single tree segmentation device 8 is only an example and does not constitute a limitation on the high canopy forest single tree segmentation device 8, which can include more or fewer components than those shown, or combine certain components, or different components, for example, the high canopy forest single tree segmentation device can also include a power management module, an operation processing module, an input / output device, a network access device, a bus, etc.
[0139] The processor 80 can be a central processing unit (CPU), and can also be other general-purpose processors, digital signal processors (DSP), application specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or the processor can also be any conventional processor.
[0140] The readable storage medium 81 can be an internal storage unit of the high-density forest single tree segmentation device 8, such as a hard disk or a memory of the high-density forest single tree segmentation device 8. The readable storage medium 81 can also be an external storage device of the high-density forest single tree segmentation device 8, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, and the like equipped on the high-density forest single tree segmentation device 8. Further, the readable storage medium 81 can also include both the internal storage unit and the external storage device of the high-density forest single tree segmentation device 8. The readable storage medium 81 is used to store the computer program and other programs and data required by the high-density forest single tree segmentation device. The readable storage medium 81 can also be used to temporarily store data that has been output or will be output.
[0141] It can be clearly understood by those skilled in the art that, for the convenience and brevity of description, only the division of the above functional units and modules is exemplified, and in actual application, the above functions can be completed by different functional units and modules according to needs, that is, the internal structure of the device is divided into different functional units or modules to complete all or part of the functions described above. Each functional unit and module in the embodiment can be integrated in one processing unit, or each unit can exist physically, or two or more units can be integrated in one unit. The integrated unit can be realized in the form of hardware or in the form of a software functional unit. In addition, the specific names of each functional unit and module are only for easy distinction, and do not limit the protection scope of the present application. The specific working process of the units and modules in the system can refer to the corresponding process in the foregoing method embodiments, which will not be described here.
[0142] In the above embodiments, the description of each embodiment has its own emphasis, and the parts not described or recorded in detail in a certain embodiment can be referred to the related description of other embodiments.
[0143] Those skilled in the art can realize that the units and method steps of the examples described in combination with the embodiments disclosed herein can be realized in electronic hardware or a combination of computer software and electronic hardware. Whether the functions are realized in hardware or software depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to realize the described functions for each specific application, but such implementation should not be considered beyond the scope of the present application.
[0144] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For example, the division of the modules or units is merely a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0145] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0146] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0147] The present invention is not limited to what is described in the specification and embodiments, and additional advantages and modifications will be readily apparent to those skilled in the art. Therefore, the present invention is not limited to the specific details, representative devices, and illustrative examples shown and described herein without departing from the spirit and scope of the general concept defined by the claims and their equivalents.
Claims
1. A method for segmenting single trees in a high-density forest, characterized in that: The following steps are involved: Step 1: Collect forest point cloud data of the target forest; Step 2: pre-processing the forest point cloud data to classify ground points and non-ground points, and generating a digital surface model of the target forest based on the classified complete point cloud data; Step 3: Obtaining the neighboring pixels corresponding to each pixel, calculating the local gradient vector of the neighboring pixels and the degree of directional concentration of the corresponding pixels based on the digital surface model, and generating a gradient directional map of the target forest; Step 4, extracting tree vertices using a preset tree vertex detection algorithm; Step 5: Invert the pixel values of the gradient pointing map to simulate the flow of water in each pixel, and classify the watersheds that eventually converge on the same pixel into one category to generate a water flow path segmentation result; Step 6: executing a watershed algorithm based on the gradient pointing map and the extracted tree vertices, merging and overlaying the water flow path segmentation result with the execution result of the watershed algorithm to generate a single tree segmentation result of the target forest; In step 4, a preset tree vertex detection algorithm is used to extract tree vertices, specifically: S401, obtaining a gradient pointing map of the target forest; S402, using at least two windows of different scales to respectively extract local maxima of the gradient pointing graph to generate multiple local maximum sets; S403, comparing the multiple local maximum sets, determining repeated points therein as true tree vertices and the remaining points as candidate points, and establishing a true tree vertex set and a candidate point set; S404, identifying the geometric features between tree crowns of the target forest based on the gradient pointing map or digital surface model of the target forest, and iteratively screening out real tree vertices from the candidate point set based on the geometric features between tree crowns, and updating the real tree vertex set and the candidate point set according to the screening results until a preset iteration end condition is reached.
2. The method for segmenting single trees in a high-density forest according to claim 1, characterized in that: The step 2 is specifically as follows: S201, using a preset statistical filtering method to remove noise points from the forest point cloud data; S202, separating the forest point cloud data after noise removal into ground points and non-ground points based on a preset cloth simulation algorithm; S203, generating a target resolution of the digital surface model according to the target point density, dividing the ground points and the non-ground points based on the target resolution, and constructing a digital surface model of the target forest, wherein the target point density includes at least 4 lidar points within each pixel.
3. The method for segmenting single trees in a high-density forest according to claim 1, characterized in that: The step 3 is specifically as follows: S301, constructing a convolution kernel, and using the convolution kernel to perform convolution processing on the data of the digital surface model of the target forest in two perpendicular directions to generate a local gradient vector for each pixel and its neighborhood; S302, constructing a direction vector from the central pixel to the neighboring pixels, and calculating the angle difference between the local gradient vector of the neighboring pixels and the direction vector from the central pixel to the neighboring pixels; S303 , setting weights for neighborhood pixels at different distances based on a two-dimensional Gaussian kernel function, calculating a pixel value of each pixel, and generating a gradient pointing map of the target forest according to the pixel value.
4. The method for segmenting single trees in a high-density forest according to claim 1, characterized in that: The step S404 is specifically as follows: S4041, constructing a Delaunay triangulation using the real tree vertex set and all points in the candidate point set; S4042, traversing each edge of each triangle, obtaining a target candidate point connected by a vertex of the real tree, and determining whether the corresponding edge meets a preset condition; if so, adding the target candidate point to the real tree vertex set; otherwise, removing the target candidate point; S4043, repeating steps S4041-S4042 until a preset iteration end condition is reached, wherein the preset iteration end condition includes that all points in the candidate point set are processed.
5. The method for segmenting single trees in a high-density forest according to claim 4, characterized in that: Step S4042 includes a first preset condition, a second preset condition, and a third preset condition. If the corresponding edge meets any one of the first preset condition, the second preset condition, and the third preset condition, the target candidate point is added to the real tree vertex set. The first preset condition is: obtaining a ratio of a minimum value to an endpoint value of a connecting line based on the gradient directivity graph, and the ratio is less than a preset ratio; The second preset condition is: obtaining an angle difference between the lowest point in the connecting line and the two endpoint vectors of the line segment based on the digital surface model of the target forest, and the angle difference is less than a preset angle threshold; The third preset condition is: obtaining the length of the connection line, and the length of the connection line is greater than a first preset length threshold.
6. The method for segmenting single trees in a high-density forest according to claim 1, characterized in that: The step 5 is specifically as follows: S501, performing a difference operation between the pixel value of each pixel in the gradient pointing image and the maximum value in the image to perform pixel value inversion; S502, calculating the flow direction of each pixel using a preset eight-neighborhood method and generating a final convergence point for each pixel; S503: All pixels with the same final convergence point are divided into a watershed to generate a water flow path segmentation result.
7. A device for splitting single trees in a high-canopy forest, based on the method for splitting single trees in a high-canopy forest according to any one of claims 1 to 6, characterized in that: It includes an acquisition module, a first construction module, a second construction module, an extraction module, a segmentation module and a merging module. The acquisition module is used to collect forest point cloud data of the target forest; The first construction module is used to classify ground points and non-ground points after pre-processing the forest point cloud data, and generate a digital surface model of the target forest based on the classified complete point cloud data; The second construction module is used to obtain the neighboring pixels corresponding to each pixel, calculate the local gradient vectors of the neighboring pixels and the degree of directional concentration of the corresponding pixels based on the digital surface model, and generate a gradient directional map of the target forest; The extraction module is used to extract tree vertices using a preset tree vertex detection algorithm; The segmentation module is used to invert the pixel values of the gradient pointing map, simulate the flow of water on each pixel, and classify the watersheds that eventually converge on the same pixel into one category, thereby generating a water flow path segmentation result; The merging module is used to execute a watershed algorithm based on the gradient pointing map and the extracted tree vertices, merge and overlay the water flow path segmentation result with the execution result of the watershed algorithm, and generate a single tree segmentation result of the target forest.
8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method for segmenting single trees in a high-canopy density forest according to any one of claims 1 to 6 is implemented.
9. A device for splitting single trees in a high-density forest, comprising a computer-readable storage medium and a processor, characterized in that: When the processor executes the computer program on the computer-readable storage medium, the processor implements the steps of the method for segmenting a single tree in a high-canopy forest according to any one of claims 1 to 6.
Citation Information
Patent Citations
Laser radar technology-based method for acquiring forest growing stock in high-canopy-density area
CN106815850A
High-canopy-closure forest sample plot tree height extraction method combining UAV image and TLS point cloud
CN110033484A