A tree counting method, system, storage medium, computer device and terminal
By combining UAV imagery with DOM and DSM information for segmentation, the problems of recognition window interference, massive point cloud processing, and over-segmentation in tree counting were solved, achieving high-precision tree counting, reducing costs, and improving applicability.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- YANGTZE DELTA REGION INST OF UNIV OF ELECTRONICS SCI & TECH OF CHINE (HUZHOU)
- Filing Date
- 2022-11-15
- Publication Date
- 2026-04-28
AI Technical Summary
Existing tree counting methods suffer from several problems, including the large impact of the identification window size on the results, high processing costs for massive point cloud data, neglect of the underlying structure by optical segmentation methods, oversegmentation by watershed algorithms, high costs, and limited applicability. In particular, they are difficult to accurately distinguish between tree canopy and understory vegetation in complex forest areas and natural forests.
The Otsu's inter-class variance threshold segmentation algorithm is used to extract the shadow background. Combined with Sobel operator edge detection and buffer analysis, the illumination background is separated using DOM and DSM information. Combined with distance transformation and image label segmentation, the tree crown is extracted using the watershed algorithm, and the tree positions are recorded and counted.
It achieves high-precision tree counting in areas with different densities, with an average extraction accuracy of 92.42%, reducing manpower and time costs, solving the over-segmentation problem, and improving the accuracy of single tree recognition.
Smart Images

Figure CN115690081B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of data measurement technology, and in particular relates to a tree counting method, system, storage medium, computer equipment and terminal. Background Technology
[0002] Currently, several methods can be used for single-tree identification. The first type is the CHM-based segmentation method. This method filters the input raw image data to determine the target and non-target regions; through morphological processing, the required DSM and Digital Elevation Model (DEM) are obtained, and the CHM is calculated using a difference method. The canopy edge is confirmed by identifying local maxima and minima. However, this method has a drawback—the size of the identification window greatly affects the number of canopies identified in the test area. If the identification window is large, undersegmentation occurs, and closely spaced trees are easily identified as a single tree, resulting in a lower identification count than the actual number. If the identification window is small, oversegmentation occurs, and a single tree is identified as multiple trees, resulting in a higher identification count than the actual number. Analysis shows that while canopy extraction can be achieved in sparse forest areas by setting a height threshold for the CHM, in more complex natural forests, due to the lack of understory topography, it remains difficult to distinguish between canopies and understory vegetation. This is especially true for mixed forests and broad-leaved forests with high canopy density, where the canopy shading significantly reduces the effectiveness.
[0003] The second type of method utilizes the spatial information of discrete echo lidar data, focusing on single-tree segmentation based on point cloud distribution. This mainly includes voxel-based clustering, triangulation, K-means clustering, and local maximum clustering. Wang et al. layered the point cloud based on elevation data within each voxel, mapping it to the horizontal canopy layer to obtain the tree canopy outline. Triangulation uses local extrema to generate target points, then extracts the tree canopy using region-based image segmentation. K-means clustering based on Euclidean distance segmented the point cloud into multiple feature spaces. Local maximum clustering was used to smooth the DSM, and local extrema were used for canopy identification. The method identifies the target tree's point clusters based on canopy characteristics, deletes them, and repeats this process until all points are segmented into their corresponding clusters. Compared to the two methods, point cloud-based single-tree segmentation has higher single-tree recognition rate and accuracy, and can identify more trees. However, this method requires processing massive amounts of point cloud data, significantly increasing time costs and making it unsuitable for large-area forest resource surveys.
[0004] Besides utilizing point cloud data, individual tree identification can also be achieved through optical data. Hamman et al. proposed a non-parametric tree identification method based on DSM (Digital Structure Model) under conditions of unknown forest vertical structure and topographic information. This method is relatively stable in practical applications, achieving a tree identification accuracy of 77%. However, this method only focuses on surface data during tree segmentation, easily neglecting information about the underlying tree structure.
[0005] To identify and extract the tree canopy, it is necessary to separate the canopy from the image background, which is an image segmentation technique. Currently, the main methods for tree image segmentation based on UAV data include the following:
[0006] (1) Threshold-based image segmentation method
[0007] Threshold-based image segmentation extracts targets based on the varying pixel brightness at different locations. First, an initial threshold T needs to be set as a reference standard for image segmentation. Areas below T can be considered background, or areas above T can be considered background; the former often yields better results. The key to threshold-based image segmentation is determining the initial threshold T, which directly affects the segmentation outcome. Currently, there are three main types of T values: the first is a global threshold, which considers every part of the image; the second is a local threshold, which considers only certain attributes; and the third is an adaptive threshold, which, compared to the second, also considers the location factor.
[0008] The Otsu's maximum inter-class variance thresholding algorithm determines the optimal threshold by maximizing the difference between the target and the background. This method is widely used in image segmentation due to its simplicity, computational ease, and good segmentation results. However, it is not suitable for extracting images where pixel grayscale differences are minimal, as this can lead to image information loss and may result in inaccurate or unsatisfactory results.
[0009] (2) Image segmentation method based on edge detection
[0010] The gray values of pixels in an image are not continuous, and there are often abrupt changes at the edges of the image. The principle of this type of image segmentation method lies in the discontinuity of the gray values of image pixels.
[0011] The Sobel operator is a discrete difference operator that combines Gaussian smoothing and differential differentiation. Two sets of 3×3 matrices in two different directions are convolved with the image to obtain two different brightness difference approximations GX and GY. A represents the image involved in the operation, and the calculation formulas are shown in (1) and (2). The gradient estimate G for each point can be obtained, and the calculation formula is shown in (3). This type of processing method uses the maximum value as the edge, and the image processing effect is relatively ideal in the case of noise and gradual brightness changes.
[0012]
[0013]
[0014]
[0015] The Roberts operator, also known as the cross-differential algorithm, is a slanted bias gradient operator. This type of method is highly applicable to steep, low-noise images.
[0016] The Laplacian operator is a second-order differential operator widely used in image processing, such as image enhancement and edge extraction. This operator is independent of edge direction and can highlight edge information in an image, but it can exacerbate interference from other factors, producing a series of chain reactions. In practical applications, it may remove some orientation information, resulting in discontinuous extraction and potentially leading to two-pixel boundaries.
[0017] The Canny operator is a non-differential edge detection operator. Edges are classified into two categories: strong and weak, and it can detect both types of edges using two different thresholds. This method can eliminate noise interference and obtain ideal weak edge extraction results.
[0018] (3) Region-based image segmentation method
[0019] Region-based image segmentation methods can be categorized as follows. The first category uses manually defined criteria to absorb regions that meet the criteria, forming a larger area. As new pixels are added, they are continuously absorbed or discarded according to the established criteria, and this process continues until all information has been processed. This type of method is called seed region growing. Its key lies in the defined criteria, because all pixels are processed according to these criteria; the better the criteria, the more ideal the image processing effect. In addition, there are region splitting and merging methods, which involve indiscriminately segmenting and merging regions that satisfy similarity criteria.
[0020] (4) Image segmentation method based on specific theories
[0021] With the continuous advancement of technology, image segmentation methods based on specific theories have emerged one after another, and target recognition algorithms are also constantly evolving. The watershed algorithm is a region-based image segmentation method. Due to its ease of implementation, it is widely used in medical imaging, pattern recognition, and other scenarios. Traditional watershed partitioning is a geometric morphological partitioning method based on topology. The basic idea of this algorithm is to view the image as a topographic map, where the gray value of each pixel represents the elevation of that point; brighter pixels represent higher elevations. Each local minimum, i.e., the location of the lowest elevation, and its influence range are called a catchment basin. The boundary formed at the edge of each catchment area is the watershed, which represents the maximum value of the image.
[0022] Watershed segmentation algorithms mainly include the following commonly used methods.
[0023] (1) Watershed Algorithm Based on Distance Transformation
[0024] First proposed in 1966, distance transform now holds a prominent place in various fields, primarily applied in image analysis and processing, intelligent detection, and target monitoring. This algorithm can be used for accurate localization, contour construction, and segmentation and extraction of overlapping objects. This type of segmentation method calculates the distance from each non-zero pixel in a known image to the nearest zero pixel, resulting in a grayscale image, i.e., a distance image. Existing distance transform algorithms mainly include Euclidean distance and non-Euclidean distance algorithms.
[0025] (2) Label-based watershed segmentation
[0026] The watershed segmentation method based on graphic labeling constrains the allowed graphic regions by incorporating a preprocessing step. Both the target area and other non-extractable regions in the image are labeled, and the classification is modified based on these two types of labels before watershed segmentation. The key to this method lies in the processing of the gradient map.
[0027] (3) Gradient-based watershed segmentation
[0028] The watershed algorithm obtains the minimum value, which is the catchment area of the target, and the boundary of the catchment area represents the watershed. Based on the trend of image pixel grayscale change shown by the gradient magnitude map, that is, the pixel value of the target edge is higher than the pixel value of other parts, watershed segmentation is performed after smoothing. As shown in formula (4), gradient operation is performed on the image, where f(x,y) represents the initial image before processing, f(x-1,y) and f(x,y-1) represent the difference operators in two directions, and g(x,y) represents the image after processing.
[0029]
[0030] In practical applications, the watershed algorithm may lead to oversegmentation, often resulting in unsatisfactory results. To avoid oversegmentation, there are usually three solutions. The first solution is to preprocess the image based on prior knowledge to remove interference from irrelevant edge information, i.e., image denoising. The second solution is region fusion, which merges the segmented regions according to certain criteria. The key to this method is to select appropriate criteria. The third solution is to modify the gradient function to respond only to specified information, i.e., to separate the target and background parts in the image through artificially labeled image segmentation algorithms. Therefore, the gradient map is used as the input image during processing. If there are no high requirements for the experimental results, the image processing can be performed by changing the gradient function, as shown in formula (5), where gθ represents the threshold, f(x,y) represents the initial image before processing, and g(x,y) represents the image after processing.
[0031] g(x,y)=max{grad(f(x,y)),gθ}#(5)
[0032] In this method, even small changes in grayscale values can affect the segmentation results, with oversegmentation being a prominent issue. This can be addressed by setting a minimum value point, whose influence boundary forms a watershed, allowing for image flooding processing from low to high values. When thresholding gradient images, choosing an appropriate threshold significantly impacts the final segmentation result. If the real image contains weak edges, selecting an excessively high threshold will weaken them.
[0033] In recent years, to address the time-consuming and labor-intensive nature of manual inspections, many studies have utilized lidar data or high-resolution satellite imagery to assess forest canopy cover. However, the assessment scope is limited to local landscape scales, or the accuracy is constrained by the inherent uncertainties of the reference dataset. While domestic and international scholars have conducted various exploratory studies on tree identification and counting, these have not yet been put into practical application. Research primarily focuses on using computer image processing and machine vision methods for tree counting, with experimental subjects including wheat ears, corn, citrus trees, nursery potted plants, and ground-planted trees.
[0034] Cai et al. used UAV-based LiDAR data and a canopy height model (CHM) to estimate the number of trees in 18 samples of 25m in size in temperate forests. The actual results were close to the estimated results, with an RMSE of 1.49%. Haakess et al. attempted to count seedlings using barcodes combined with RFID tags, but the high cost made this method difficult to promote. Formm et al. used a convolutional neural network (CNN) to extract the number of trees in forest areas of Alberta, Canada. Mohamad et al. successfully separated sycamore trees that were stuck together using a sycamore tree identification model based on the Deeplabv3+ network, thus extracting the number of sycamore trees. Maghsoud et al. used eCognition Developer software combined with the GoogLeNet model to separate and extract the crowns of peach trees and automatically count the number of peach trees. Esmaeel used a convolutional neural network (CNN) to extract the crowns of citrus trees and count their density, but the size of the citrus trees had a significant impact on the experimental results; different sizes would lead to large deviations in the results. Although drone imagery can be used to count the number of trees and generate high-precision canopy coverage datasets, the results are often biased because it is difficult to distinguish between canopy and understory vegetation in natural forests lacking understory topography.
[0035] The survey results show that current tree counting methods do not significantly reduce time and financial costs compared to traditional manual counting, and many methods lack applicability. Therefore, it is of great significance to utilize image processing technology to quickly obtain effective information on forestry resources and achieve efficient management of these resources.
[0036] Based on the above analysis, the problems and shortcomings of the existing technology are as follows:
[0037] (1) Traditional forest tree quantity acquisition mainly relies on manual field surveys, which involve a small area, high labor intensity, and hard work. Surveyors need to have good physical and mental qualities, and due to personal subjectivity, the accuracy of the survey cannot be guaranteed. For special areas, such as wetland areas, the problem of information collection and data detection difficulties is more prominent due to the difficulty of manpower to go deep into the forest resources.
[0038] (2) Among the existing single tree identification methods, the size of the identification window of the CHM-based segmentation method has a great influence on the number of tree canopies identified in the test area. In more complex natural forests, due to the lack of understory topography, it is currently difficult to distinguish between tree canopies and understory vegetation. Especially for mixed forests and broad-leaved forests with high canopy closure, the effect is very poor due to the shading of the canopy.
[0039] (3) Existing tree segmentation methods based on point cloud distribution require processing massive amounts of point cloud data, resulting in a significant increase in time costs and making them unsuitable for large-scale forest resource surveys. Methods that use optical data to identify individual trees only focus on surface data during the tree segmentation process, easily neglecting information about the underlying tree structure.
[0040] (4) Existing threshold-based image segmentation methods are not suitable for extracting images with small gray-level differences between pixels, resulting in loss of image information and failure to meet accuracy requirements; the Laplacian operator may cause double-pixel boundaries; when the edge is connected to a strong edge, the Canny operator will exhibit weak edge phenomena.
[0041] (5) Existing watershed algorithms do not yield ideal results in practical applications and may lead to oversegmentation; existing methods using lidar data or high-resolution satellite images have evaluation ranges limited to local landscape scales or evaluation accuracy limited by the uncertainty of the reference dataset itself.
[0042] (6) Existing tree counting methods are costly and difficult to promote; in natural forests lacking understory topography, the canopy and understory vegetation are difficult to distinguish, and the results are often biased; compared with traditional manual counting, the time and money costs are not significantly reduced, and many methods are not very applicable. Summary of the Invention
[0043] To address the problems existing in the prior art, the present invention provides a tree counting method, system, storage medium, computer equipment and terminal, and particularly relates to a tree counting method, system, storage medium, computer equipment and terminal based on UAV imagery.
[0044] This invention is implemented as follows: a tree counting method, comprising: extracting occluded shadow backgrounds within the analysis area using a maximum inter-class variance threshold segmentation algorithm; separating the pseudo-identification area's illumination background based on structural analysis using a digital surface model; determining the boundary between the illumination background and the canopy area using Sobel edge detection; extracting unoccluded illumination backgrounds using buffer analysis; extracting forest nodes from experimental images using distance transform and image tagging segmentation to achieve canopy extraction, recording tree positions and counting individual trees; and verifying the individual tree recognition rate and accuracy using field measurement data.
[0045] Furthermore, the tree counting method includes the following steps:
[0046] Step 1: Extract two types of backgrounds: occluded shadow backgrounds and unoccluded illuminated backgrounds; use DOM information and DSM information to detect the two types of backgrounds respectively;
[0047] Step 2, Canopy extraction based on object hierarchy: The watershed algorithm is used to obtain segmented objects containing canopies or canopy clusters, and segmented objects containing illumination background are regarded as sparse objects; based on the ground elevation of the illumination background, a small amount of residual background in the transition area is excluded by using a height threshold, and the canopy is extracted.
[0048] Step 3: Record the location of the trees and quantify the number of individual trees to obtain preliminary results of the individual tree count; verify the individual tree recognition rate and recognition accuracy through field measurement data;
[0049] Step 4: Extract tree canopies from different density regions; conduct experiments on high, medium, and low density regions of trees respectively, analyze the experimental results, and dissect the impact of density on individual tree segmentation and identification.
[0050] Furthermore, the background extraction in step one includes the acquisition and processing of analysis area data.
[0051] (1) Data acquisition using UAVs: Prepare for UAV aerial photography, including flight plan development, weather conditions and equipment checks; set up and mark ground control points; plan flight routes, set flight altitude and lateral overlap; start UAV flight; after the flight, transmit data and check the integrity of the photographs taken in the test area.
[0052] (2) Generation of DOM and DSM: Import the photos and related data taken by the drone into the computer, create a coordinate system and select the standard, wait for the project to be generated and then process the data; view the processing report, export the DOM and DSM, and stitch the generated orthophotos of the forest area into a complete image.
[0053] Furthermore, the background extraction in step one includes:
[0054] Based on the DOM and DSM of forest images acquired by UAVs, a background analysis method based on target segmentation is proposed to identify the tree canopy of the sampling area. With tree canopy extraction as the target, the understory vegetation can be regarded as the background, and the background is divided into occluded shadow background and unoccluded illuminated background. The occluded shadow background and unoccluded illuminated background are detected by using DOM information and DSM information respectively.
[0055] Furthermore, the background extraction in step one also includes:
[0056] (1) DOM-based shadow background extraction
[0057] The maximum inter-class variance thresholding algorithm is used to automatically determine the threshold, and the part below the threshold is selected as the shadow background. After processing by the maximum inter-class variance thresholding algorithm, the image is divided into the target area and the background with no value, the shadow background is eliminated, and the area with tree information is kept bright.
[0058] (2) Illumination background extraction based on DSM
[0059] The boundary between the illumination background and the canopy area is detected by an edge detection algorithm. The Sobel operator is used to determine potential recognition areas with small elevation changes, and a conservative threshold is selected to detect potential recognition areas.
[0060] Based on the boundary of each potential recognition area, inner and outer buffer zones with a width of 1m are set along the boundary. If there is a significant increase in elevation from the inner buffer zone to the outer buffer zone, it is identified as a real illuminated background; otherwise, it is a "false recognition area," thus identifying the unobstructed illuminated background in the image.
[0061] Furthermore, the object-level-based canopy extraction in step two includes:
[0062] Morphological reconstruction techniques are used to label the foreground, employing a labeling-then-segmentation approach. By identifying internal markers within the target object and external markers in the background, the gradient map is corrected to achieve accurate image segmentation. The tree crown centers are marked by extracting centroids, and the number of crown centers is counted to determine the number of trees. The distance transformation scheme involves inputting the image, binarizing the grayscale image, performing distance transformation, finding seeds, generating markers, and inputting the watershed algorithm. The watershed segmentation process based on image markers involves calculating the segmentation function, calculating foreground markers, calculating background markers, modifying the segmentation function, and determining the watershed.
[0063] Another object of the present invention is to provide a tree counting system applying the tree counting method described above, the tree counting system comprising:
[0064] The background extraction module is used to extract occluded shadow backgrounds and unoccluded lit backgrounds; it uses DOM information and DSM information to detect the two types of backgrounds respectively.
[0065] The canopy extraction module is used to obtain segmented objects containing tree canopies or canopy clusters through the watershed algorithm, and to treat segmented objects containing illumination background as sparse objects; based on the ground elevation of the illumination background, a small amount of residual background in the transition area is excluded by using a height threshold to extract the tree canopy;
[0066] The single tree counting module is used to record the location of trees and quantify the number of individual trees to obtain preliminary results of single tree counting; the single tree recognition rate and recognition accuracy are verified by field measurement data;
[0067] The experimental verification module is used to extract tree canopies in regions with different densities. Experiments were conducted in three density regions of trees: high, medium, and low. The experimental results were analyzed, and the impact of density on individual tree segmentation and recognition was dissected.
[0068] Another object of the present invention is to provide a computer device including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the tree counting method.
[0069] Another object of the present invention is to provide a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the tree counting method.
[0070] Another object of the present invention is to provide an information data processing terminal for implementing the tree counting system described above.
[0071] Based on the above technical solutions and the technical problems solved, the advantages and positive effects of the technical solution to be protected by this invention are as follows:
[0072] This invention, based on forest area images captured by drones and combined with optimized image segmentation technology, solves the over-segmentation problem in the watershed algorithm and establishes a single-tree separation method to mark the location of trees and realize tree counting within the area.
[0073] To extract occluded shadow backgrounds within digital orthophotos based on spectral brightness information, this invention employs a maximum inter-class variance thresholding algorithm. Structural analysis using a digital surface model separates the "pseudo-identification area" of the illumination background. Sobel edge detection is used to detect the boundary between the illumination background and the canopy area, and buffer analysis is combined to extract the true unoccluded illumination background. Simultaneously, to address over-segmentation, this invention combines distance transform and image tagging to segment the image, extracting tree nodes and achieving accurate canopy extraction. Tree positions are recorded, and individual tree counts are performed. The recognition rate and accuracy of individual trees are verified using field measurement data. This invention selected two sets of UAV-captured images from each of the low, medium, and high density regions for testing. The six extracted results were compared with field survey results to analyze the applicability of the algorithm to different density regions. Experimental results show that the average extraction accuracy for the three density regions reaches 92.42%, effectively solving the counting errors caused by over-segmentation.
[0074] This invention develops a method for automatic tree detection, localization, and counting using UAV imagery as the data source. By proposing a forest canopy identification algorithm that collaboratively utilizes DOM (Domain of Trees) and DSM (Difference of Tree Surface) information, accurate canopy extraction is achieved. This method was applied to UAV sampling data from a forest area near the library of a university campus, obtaining the number of trees in different density areas, and the experimental results were analyzed and summarized. This invention solves the key technical problem of how to correctly separate tree canopy and understory vegetation, and analyzes the mechanism affecting single-tree segmentation. The specific content is as follows:
[0075] (1) Establish a method for separating individual wood.
[0076] Based on images acquired by drones, the phenomenon of two or more tree canopies merging can be observed. By dividing the region of interest (ROI) and constructing a single-tree segmentation model based on DOM and DSM information, experiments were conducted on the ROI. The segmentation accuracy and error rate of individual trees were analyzed, as were the recognition rates and accuracy rates of individual trees in different density areas, ultimately determining a suitable method for single-tree separation.
[0077] (2) Record the location of the trees
[0078] After achieving the goal of separating individual trees within the region of interest, the locations of the segmented trees and the unsegmented trees are marked in the image, and the recognition accuracy is obtained by comparing them with the actual tree locations.
[0079] (3) Count the trees in the area.
[0080] The number of segmented trees was counted, and the experimental results were compared with the actual number of trees. Based on the experimental results, the individual tree recognition rate and overall segmentation effect of the method were evaluated. The results were analyzed and summarized to evaluate the practicality and applicability of the forest canopy recognition algorithm that collaboratively utilizes DOM and DSM structural information.
[0081] Extracting the number of trees within a region plays a crucial role in forest resource management. This invention uses a forest area near the library of a university campus, captured by a drone, as the experimental area. By coordinating DOM (Domain of Dependent Occurrence) and DSM (Digital Shading) information based on drone data to distinguish between canopy and understory vegetation, the accuracy of individual tree identification is improved, and the location and counting of trees are achieved. The advantage of this algorithm is that it is independent of understory vegetation topography and unaffected by terrain and weather. This invention uses several image processing algorithms, including the maximum inter-class variance thresholding (MOV) segmentation algorithm, Sobel edge detection, and the DSM watershed algorithm, but it is not a simple combination of them. The MOV segmentation algorithm can effectively detect small shadow gaps but cannot detect large illuminated backgrounds. Edge detection using the Sobel operator can obtain potential illuminated background areas, but these detected areas can be real illuminated backgrounds or "pseudo" backgrounds with minimal elevation changes caused by the forest canopy. Maintaining the real illuminated background while eliminating pseudo-identified backgrounds is a challenge. The watershed algorithm, on the other hand, has both canopy and background for each segmented object. Finding an accurate method for identifying tree canopies based on these imperfect results is an innovation.
[0082] The method proposed in this invention is unaffected by weather, avoiding losses caused by delays in actual measurement plans due to weather conditions. Furthermore, it significantly reduces the number of personnel required for drone surveys, thereby greatly reducing time and economic costs. The main analytical results of this invention regarding the tree counting method based on drone images are as follows: (1) Separation and extraction of two types of backgrounds. The separation of shadow and illumination backgrounds in drone-captured images is achieved through the coordinated use of DOM and DSM information. Shadow backgrounds are extracted based on DOM information, and illumination backgrounds are successfully extracted by combining Sobel edge detection and buffer analysis with DSM information, eliminating interference from pseudo-identification areas in the "potential identification area." (2) Accurate extraction, labeling, and counting of tree numbers are achieved. After extracting the shadow and illumination backgrounds, a solution to the oversegmentation problem, namely distance transformation, is proposed to reduce tree counting errors caused by oversegmentation. The feasibility of the proposed solution is verified by selecting forest areas of different densities in drone-captured images. The average extraction accuracy of the six sample plots reached 92.42%.
[0083] The tree counting method provided by this invention is based on UAV imagery and explores a tree count extraction algorithm that is more widely applicable, more practical, and lower cost, aiming to contribute to forestry resource surveys. Attached Figure Description
[0084] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the embodiments of the present invention will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0085] Figure 1 This is a flowchart of the tree counting method provided in an embodiment of the present invention;
[0086] Figure 2 This is a schematic diagram of the tree counting method provided in an embodiment of the present invention;
[0087] Figure 3 This is a flowchart of drone image capture provided in an embodiment of the present invention;
[0088] Figure 4 This is a digital orthophoto map of the library area provided in an embodiment of the present invention;
[0089] Figure 5 This is a digital surface model diagram of the library area provided in an embodiment of the present invention;
[0090] Figure 6 This is a flowchart of the illumination background extraction process provided in an embodiment of the present invention;
[0091] Figure 7 This is a diagram illustrating the shadow background extraction process provided in an embodiment of the present invention;
[0092] Figure 8 This is a diagram illustrating the illumination background extraction process provided in an embodiment of the present invention;
[0093] Figure 9 This is a comparison diagram of the potential illumination recognition area and the test area provided in the embodiments of the present invention;
[0094] Figure 10 The buffer analysis provided in this embodiment of the invention yields a true lighting background image;
[0095] Figure 11 This is a schematic diagram of the test area provided in an embodiment of the present invention;
[0096] Figure 12 This is a diagram illustrating the morphological processing steps provided in an embodiment of the present invention;
[0097] Figure 13 This is a schematic diagram of obtaining foreground markers provided in an embodiment of the present invention;
[0098] Figure 14 This is a flowchart of a distance transformation scheme provided in an embodiment of the present invention;
[0099] Figure 15 This is a flowchart of the watershed algorithm based on image tagging provided in an embodiment of the present invention;
[0100] Figure 16 This is a schematic diagram of the experimental results after the improvement of the watershed algorithm provided in the embodiment of the present invention;
[0101] Figure 17 This is a schematic diagram of the test results for plot A provided in an embodiment of the present invention;
[0102] Figure 18 This is a schematic diagram of the test results for plot B provided in an embodiment of the present invention;
[0103] Figure 19 This is a schematic diagram of the C-plot test results provided in an embodiment of the present invention;
[0104] Figure 20 This is a schematic diagram of the test results of plot D provided in an embodiment of the present invention;
[0105] Figure 21 This is a schematic diagram of the E-sample plot test results provided in an embodiment of the present invention;
[0106] Figure 22 This is a schematic diagram of the F-sample plot test results provided in an embodiment of the present invention;
[0107] Figure 23This is a comparison chart of the recognition results and real data provided in the embodiments of the present invention. Detailed Implementation
[0108] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0109] To address the problems existing in the prior art, the present invention provides a tree counting method, system, storage medium, computer device, and terminal. The present invention will be described in detail below with reference to the accompanying drawings.
[0110] like Figure 1 As shown, the tree counting method provided in this embodiment of the invention includes the following steps:
[0111] S101, extraction of two types of backgrounds: occluded shadow backgrounds and unoccluded illuminated backgrounds; detection of the two types of backgrounds using DOM information and DSM information;
[0112] S102, Canopy extraction based on object hierarchy: The watershed algorithm is used to obtain segmented objects containing canopies or canopy clusters, and segmented objects containing illumination background are regarded as sparse objects; based on the ground elevation of illumination background, a small amount of residual background in the transition area is excluded by height thresholding, and the canopy is extracted.
[0113] S103: Record tree locations and quantify the number of individual trees to obtain preliminary results of individual tree counting; verify the individual tree recognition rate and recognition accuracy through field measurement data;
[0114] S104, canopy extraction was performed in regions with different densities; experiments were conducted in three density regions of trees (high, medium, and low) to analyze the experimental results and dissect the influence of density on individual tree segmentation and identification.
[0115] The background extraction step S101 provided in this embodiment of the invention further includes analysis area data acquisition and processing before the background extraction, specifically including:
[0116] (1) Data acquisition using UAVs: Prepare for UAV aerial photography, including flight plan development, weather conditions and equipment checks; set up and mark ground control points; plan flight routes, set flight altitude and lateral overlap; start UAV flight; after the flight, transmit data and check the integrity of the photographs taken in the test area.
[0117] (2) Generation of DOM and DSM: Import the photos and related data taken by the drone into the computer, create a coordinate system and select the standard, wait for the project to be generated and then process the data; view the processing report, export the DOM and DSM, and stitch the generated orthophotos of the forest area into a complete image.
[0118] The background extraction in step S101 provided in this embodiment of the invention includes:
[0119] Based on the DOM and DSM of forest images acquired by UAVs, a background analysis method based on target segmentation is proposed to identify the tree canopy of the sampling area. With tree canopy extraction as the target, the understory vegetation can be regarded as the background, and the background is divided into occluded shadow background and unoccluded illuminated background. The occluded shadow background and unoccluded illuminated background are detected by using DOM information and DSM information respectively.
[0120] The background extraction in step S101 provided in this embodiment of the invention further includes:
[0121] (1) DOM-based shadow background extraction
[0122] The maximum inter-class variance thresholding algorithm is used to automatically determine the threshold, and the part below the threshold is selected as the shadow background. After processing by the maximum inter-class variance thresholding algorithm, the image is divided into the target area and the background with no value, the shadow background is eliminated, and the area with tree information is kept bright.
[0123] (2) Illumination background extraction based on DSM
[0124] The boundary between the illumination background and the canopy area is detected by an edge detection algorithm. The Sobel operator is used to determine potential recognition areas with small elevation changes, and a conservative threshold is selected to detect potential recognition areas.
[0125] Based on the boundary of each potential recognition area, inner and outer buffer zones with a width of 1m are set along the boundary. If there is a significant increase in elevation from the inner buffer zone to the outer buffer zone, it is identified as a real illuminated background; otherwise, it is a "false recognition area," thus identifying the unobstructed illuminated background in the image.
[0126] The tree canopy extraction based on object hierarchy in step S102 of this embodiment of the invention includes:
[0127] Morphological reconstruction techniques are used to label the foreground, employing a labeling-then-segmentation approach. By identifying internal markers within the target object and external markers in the background, the gradient map is corrected to achieve accurate image segmentation. The tree crown centers are marked by extracting centroids, and the number of crown centers is counted to determine the number of trees. The distance transformation scheme involves inputting the image, binarizing the grayscale image, performing distance transformation, finding seeds, generating markers, and inputting the watershed algorithm. The watershed segmentation process based on image markers involves calculating the segmentation function, calculating foreground markers, calculating background markers, modifying the segmentation function, and determining the watershed.
[0128] The tree counting system provided in this embodiment of the invention includes:
[0129] The background extraction module is used to extract occluded shadow backgrounds and unoccluded lit backgrounds; it uses DOM information and DSM information to detect the two types of backgrounds respectively.
[0130] The canopy extraction module is used to obtain segmented objects containing tree canopies or canopy clusters through the watershed algorithm, and to treat segmented objects containing illumination background as sparse objects; based on the ground elevation of the illumination background, a small amount of residual background in the transition area is excluded by using a height threshold to extract the tree canopy;
[0131] The single tree counting module is used to record the location of trees and quantify the number of individual trees to obtain preliminary results of single tree counting; the single tree recognition rate and recognition accuracy are verified by field measurement data;
[0132] The experimental verification module is used to extract tree canopies in regions with different densities. Experiments were conducted in three density regions of trees: high, medium, and low. The experimental results were analyzed, and the impact of density on individual tree segmentation and recognition was dissected.
[0133] Figure 2 This is a technical roadmap for separating tree canopy from understory vegetation provided by embodiments of the present invention. The technical roadmap provided by embodiments of the present invention specifically includes the following parts:
[0134] The first part involves extracting two types of backgrounds: occluded shadow backgrounds and unoccluded illuminated backgrounds. DOM information and DSM information are used to detect these two types of backgrounds respectively.
[0135] The second part is canopy extraction based on object hierarchy. The watershed algorithm can obtain segmented objects containing canopies or canopy clusters. Segmented objects containing lighting background are regarded as sparse objects. Based on the ground elevation provided by the lighting background, a small amount of residual background existing in the transition area is further excluded by using a height threshold, and finally the accurate canopy is extracted.
[0136] The third part involves recording tree locations and quantifying the number of individual trees to obtain preliminary results in tree counting. The tree identification rate and accuracy are then verified using field measurement data.
[0137] The fourth part involves canopy extraction in different density regions. Experiments were conducted in three density regions: high, medium, and low. The results were analyzed, and the impact of density on individual tree segmentation and identification was dissected.
[0138] The analysis area of this invention embodiment is a campus of a certain university of science and technology (coordinates 103°55′53″E, 30°44′56″N), located in Chengdu, Sichuan Province. The experimental area is centered on a forest area, and the main buildings nearby include the library and the main building. The tree species in the analysis area are mainly shrubs, and the terrain is flat.
[0139] The specific procedures for using drones to photograph the test area are as follows: Figure 3 As shown: First, sufficient preparations must be made for aerial photography, including flight plan development, weather conditions, and equipment checks; then, ground control points should be deployed and marked; next, flight paths should be planned, and flight altitude and lateral overlap should be set. After completing the above preparations, the UAV can begin flight. After the flight, data should be transmitted, and the integrity of the photos taken in the test area should be checked.
[0140] The images were captured using a DJI Phantom 4 drone, with a flight altitude of 50m, a forward overlap of 60%, and a lateral overlap of 70%, resulting in an image resolution of 1.37cm.
[0141] This invention creates a DOM and a DSM. First, the photos and related data taken by the drone are imported into the computer, a coordinate system is created and a suitable standard is selected, and data processing is performed after the project is generated. Next, the DOM and DSM can be exported by viewing the processing report. Finally, the generated orthophotos of the forest area near the library are stitched together to form a complete image. The following is the complete DOM of the area captured by the drone, as shown below. Figure 4 As shown, DSM Figure 5 As shown.
[0142] In this embodiment of the invention, the Sobel operator is used for edge detection to determine potential recognition regions with small elevation changes. Considering that the elevation change of the illuminated background region is lower than that of the transition zone, a conservative threshold is selected to detect potential recognition regions. However, conservative threshold detection can lead to some canopy areas being misidentified as illuminated background. Therefore, further structural analysis is needed to obtain the true illuminated recognition regions from the potential illuminated recognition regions.
[0143] Based on the boundary of each potential recognition area, inner and outer buffer zones with a width of 1m are set along the boundary. If there is a significant increase in elevation from the inner buffer zone to the outer buffer zone, it is identified as a real illuminated background; otherwise, it is a "pseudo-recognition area." This method identifies unobstructed illuminated backgrounds in the image.
[0144] Image 7 illustrates the extraction process for the first type of occluded shadow background. From Figure 4 A portion of the area was selected for testing, such as... Figure 7 As shown in (a); the maximum inter-class variance thresholding algorithm is applied to Figure 7 (b) Results obtained from the grayscale image Figure 7 (c) The white area in the image represents the target area. Observation reveals that, in addition to tree canopies, the target area also includes large areas of grassland, concrete surfaces, and some buildings. Figure 7 (c) It can be found that spectral brightness information can effectively separate the shadow background and the tree canopy, but cannot separate large areas of illuminated background.
[0145] The Otsu's inter-class variance thresholding algorithm is used to detect small shadow gaps and automatically determines the threshold based on the histogram of pixel values. Therefore, some image preprocessing is necessary when the contrast between the sunlit canopy and the shadowed areas is too strong. Otherwise, the shadowed areas of the canopy may blend into the shadow gaps.
[0146] Image 8 illustrates the extraction process of the potential illumination background recognition region. The first image is the Distance Model Slab (DSM) of the experimental area. The second image shows the result obtained by edge detection and elevation edge quantification of the DSM using the Sobel operator. Significant elevation changes occur between transition zones, forming interfaces between areas of different surface elevations. The obtained edge results are relatively good, with minimal information loss, and can be used for subsequent experiments. The third image shows the obtained potential illumination recognition region. The determination of the potential illumination recognition region is based on the smoothness of the elevation change. Therefore, it can be observed that in addition to the true illumination background, the potential recognition region also contains false illumination backgrounds caused by canopy identification errors, such as areas in the canopy area and buildings. The potential illumination recognition region includes all areas with small elevation changes and requires further buffer analysis to obtain the true illumination background.
[0147] pass Figure 10 (a) Buffer analysis reveals the true illumination background. The average elevation of the canopy buffer is 574.23 m, and the average elevation of the illumination background buffer is 560.82 m. Based on the boundary of the potential illumination identification zone, a significant increase in elevation from the inner buffer to the outer buffer is required to identify it as a true illumination background. Finally, we obtain... Figure 10 (b) shows the actual lighting background, which is consistent with the lighting background observed visually.
[0148] The watershed algorithm is used for target segmentation on the inverted DSM. It is anticipated that the tree canopy forms lowlands and accumulates moisture, while the understory background becomes a drainage area. By analyzing whether pixels contain sunlight background, the segmented objects are further divided into sparse and dense categories. For each sparse target, pixels located within the intersection of sunlight and background are considered lower-layer pixels, providing ground elevation. Therefore, a height threshold is used to remove background pixels in the transition region. To reduce the influence of terrain, the average elevation of the inner buffer layer is considered as the understory height, rather than considering all sunlight-exposed background within the object. Then, pixels whose elevation is lower than the height threshold relative to the understory vegetation elevation are identified as additional sunlight background. After completely removing the sunlight background, shadow gaps still exist in the segmented objects. Therefore, the first background distribution is used to further exclude these gaps from sparse and dense objects. The stitching of all processed objects forms the canopy recognition of the sampled region.
[0149] After extracting the two types of backgrounds, a portion of the image was cropped for a watershed experiment. The experimental area is as follows: Figure 11 As shown. To better highlight the difference in grayscale between the foreground and background in the image, i.e., to emphasize edge information, a gradient map is chosen instead of a grayscale image for the watershed algorithm. The gradient magnitude map is obtained using the first-order derivative Sobel operator. Next, the image undergoes an erosion-dilation operation (i.e., opening) to filter out small noise and burrs, extracting different features from the image. Morphological techniques are used to label the foreground objects, i.e., a reconstruction opening operation is used to eliminate noise in the image while ensuring that the edge information remains unchanged. After separating the two types of background, the target tree canopy is obtained as the foreground marker by calculating the maximum value of the image region obtained from the experimental results. The foreground marker is then overlaid with the original image, and the watershed algorithm is directly applied to attempt to segment the tree canopy.
[0150] Figure 12 (a) shows the gradient map, which highlights the difference in gray levels between the target region and the background in the image. First, morphological reconstruction techniques are used to mark the foreground objects, and then an opening operation is performed on the image to obtain the following result: Figure 12 As shown in (b). The image is first eroded, and then morphological reconstruction is performed, i.e., the reconstruction opening operation yields the following result. Figure 12 As shown in (c), the experimental results clearly show that, compared with the opening operation, the reconstruction opening operation can eliminate minor imperfections without affecting the overall shape of the object. Figure 13 (a) is the foreground label obtained by calculating the maximum value of the region in the reconstruction result. Figure 13 (b) is the result of overlaying the foreground markers with the original image.
[0151] Regarding the improvement of the over-segmentation problem, the main principle of this invention is as follows: Figure 14 and 15 The process is as shown. Morphological reconstruction techniques are used to mark the foreground, and the specific operation flow for distance transformation is as follows: Figure 14 As shown. Figure 15 This demonstrates a label-based watershed segmentation process. It merges local minima and removes background points as much as possible, employing a label-then-segmentation approach. By identifying the internal markers of the target object in the image and the external markers in the background, the gradient map is corrected to achieve accurate image segmentation. The tree canopy centers are identified by extracting centroids, and the final count of these canopy centers represents the number of trees.
[0152] Figure 16 (a) shows the original map of the test area. Figure 16 (b) shows the extracted tree node image after improving the oversegmentation problem. The image shows that the extraction results are basically consistent with visual interpretation, indicating that the results are quite accurate. Figure 16 (c) is the image canopy center marker map of the extracted nodes. Figure 16 (d) shows the overlay of the tree canopy center and the extracted tree canopy foreground, with the circled area representing the tree canopy center. It can be seen that the image effectively identifies situations where two trees are joined together, significantly improving the oversegmentation problem. However, the identification of more than two joined trees is not ideal, easily mistaking them for a single tree.
[0153] To further verify the effectiveness and feasibility of this scheme, two images were selected from each of the low, medium, and high density forest areas for canopy labeling and tree counting analysis. It can be seen that the experimental plots all contain both canopies and background; therefore, it is necessary to combine the two background extraction methods mentioned earlier to further extract accurate canopies based on object hierarchy. Figures 17 to 22 Each of the six test plots corresponds to an original test image, a node extraction image, an overlay of the canopy center and nodes, and an overlay of the canopy center and canopy area for each plot.
[0154] The experimental results of these 6 sets of sample plots selected from the analysis area were compared and analyzed with the visual interpretation data. The statistical table of the experimental results is shown in Table 1.
[0155] Table 1 Statistical Table of Experimental Results
[0156]
[0157] Table 1 shows that plot E had the highest overall identification accuracy at 96.25%, while plot A had the lowest misclassification and omission errors, at 0.00% and 5.12%, respectively. The table also reveals that plot B's overall accuracy was significantly lower than the other plots, indicating numerous omissions during canopy extraction. The original map of plot B shows that many trees were clustered together, significantly interfering with the experimental results; the experimental design needs further improvement in this regard. However, the forest density in the experimental area did not significantly affect the results.
[0158] Figure 23 The figure shows a comparison between the actual number of trees and the number of trees identified in the experiment in six sample plots. Further calculations yielded R... 2 The mean square error was 0.9895, the root mean square error (RMSE) was 4.2817%, and the mean absolute error (MAE) was 4.00%.
[0159] This invention, based on an inverted DSM (Distributed Tree Model), uses a watershed algorithm to obtain segmented objects containing tree canopies and canopy clusters. For segmented regions containing illumination background, these are treated as sparse objects. Based on the ground elevation provided by the illumination background, a height threshold is used to further exclude a small amount of residual background existing in transition areas, ultimately extracting accurate tree canopies. The original watershed algorithm causes over-segmentation in UAV forest images, resulting in numerous segmented regions. Distance transformation and a label-based watershed algorithm can achieve accurate canopy extraction. Canopy extraction and automated counting were performed on six different density scenes, yielding counting results for low, medium, and high density tree areas. The average overall extraction accuracy for the six sample plots was 92.42%, the average misclassification error was 3.12%, and the average omission error was 11.52%. Finally, the experimental results were analyzed for individual tree recognition rate and accuracy to verify the feasibility of the algorithm. The experimental results show that the improved algorithm significantly improves the over-segmentation problem.
[0160] Compared with traditional manual counting, the method proposed in this invention is not affected by weather, which can avoid losses caused by the delay of the actual measurement plan due to weather. In addition, the number of staff required for drone surveys is significantly reduced, which can greatly reduce time, economic and other costs.
[0161] This invention achieves the separation and extraction of two types of backgrounds. By combining the spectral brightness information of the DOM with the structural analysis of the DSM, the separation of shadow background and illuminated background in UAV-captured images is successfully achieved. The shadow background is extracted based on the spectral information of the DOM, and the illuminated background is extracted based on the structural analysis of the DSM, combined with Sobel operator edge detection and buffer analysis, successfully eliminating the interference of false recognition areas from the "potential recognition area".
[0162] This invention achieves accurate extraction, labeling, and counting of tree numbers. After extracting both shadow and illuminated backgrounds, a solution to the oversegmentation problem, namely distance transformation, is proposed to reduce tree counting errors caused by oversegmentation. The feasibility of the proposed solution is verified by selecting forest areas of different densities from UAV-collected images. The average extraction accuracy of the six sample plots reached 92.42%.
[0163] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any modifications, equivalent substitutions, and improvements made by those skilled in the art within the scope of the technology disclosed in the present invention, and within the spirit and principles of the present invention, should be covered within the scope of protection of the present invention.
Claims
1. A method for counting trees, characterized in that, The tree counting method includes the following steps: Step 1: Extract two types of backgrounds: occluded shadow backgrounds and unoccluded illuminated backgrounds; use DOM information and DSM information to detect the two types of backgrounds respectively; Step 2, Canopy extraction based on object hierarchy: The watershed algorithm is used to obtain segmented objects containing canopies or canopy clusters, and segmented objects containing illumination background are regarded as sparse objects; based on the ground elevation of the illumination background, a small amount of residual background in the transition area is excluded by using a height threshold, and the canopy is extracted. Step 3: Record the location of the trees and quantify the number of individual trees to obtain preliminary results of the individual tree count; verify the individual tree recognition rate and recognition accuracy through field measurement data; Step 4: Extract tree canopies in regions with different densities; conduct experiments in three density regions (high, medium, and low) of trees, analyze the experimental results, and dissect the impact of density on individual tree segmentation and identification. The background extraction in step one also includes the acquisition and processing of analysis area data; (1) Data acquisition using UAVs: Prepare for UAV aerial photography, including flight plan formulation, weather conditions and equipment checks; set up and mark ground control points; plan flight routes, set flight altitude and lateral overlap; start UAV flight; after the flight, transmit data and check the integrity of the photos taken in the test area; (2) Generation of DOM and DSM: Import the photos and related data taken by the drone into the computer, create a coordinate system and select the standard, wait for the project to be generated and then process the data; view the processing report, export the DOM and DSM, and stitch the generated orthophotos of the forest area into a complete image; The background extraction in step one also includes: (1) DOM-based shadow background extraction The maximum inter-class variance threshold segmentation algorithm is used to automatically determine the threshold, and the part below the threshold is selected as the shadow background. After processing by the maximum inter-class variance threshold segmentation algorithm, the image is divided into the target area and the background with no value, the shadow background is eliminated, and the area with tree information is kept bright. (2) Illumination background extraction based on DSM The boundary between the illumination background and the canopy area is detected by an edge detection algorithm. The Sobel operator is used to detect potential recognition areas with small elevation changes, and a conservative threshold is selected to detect potential recognition areas. Based on the boundary of each potential recognition area, inner and outer buffer zones with a width of 1m are set along the boundary. If there is a significant increase in elevation from the inner buffer zone to the outer buffer zone, it is identified as a real lighting background; otherwise, it is a "pseudo-recognition area," thereby identifying the unobstructed lighting background in the image.
2. The tree counting method as described in claim 1, characterized in that, The background extraction in step one includes: Based on the DOM and DSM of forest images acquired by UAVs, a background analysis method based on target segmentation is proposed to identify the tree canopy of the sampling area. With tree canopy extraction as the target, the understory vegetation can be regarded as the background, and the background is divided into occluded shadow background and unoccluded illuminated background. Using DOM information and DSM information, the occluded shadow background and the unoccluded illuminated background are detected respectively.
3. The tree counting method as described in claim 1, characterized in that, The object-level-based canopy extraction in step two includes: Morphological reconstruction techniques are used to label the foreground, employing a labeling-then-segmentation approach. By identifying internal markers within the target object and external markers in the background, the gradient map is corrected to achieve accurate image segmentation. The tree crown centers are marked by extracting centroids, and the number of crown centers is counted to determine the number of trees. The distance transformation scheme involves inputting the image, binarizing the grayscale image, performing distance transformation, finding seeds, generating markers, and inputting the watershed algorithm. The watershed segmentation process based on image markers involves calculating the segmentation function, calculating foreground markers, calculating background markers, modifying the segmentation function, and determining the watershed.
4. A tree counting system applying the tree counting method as described in any one of claims 1 to 3, characterized in that, The tree counting system includes: The background extraction module is used to extract occluded shadow backgrounds and unoccluded lit backgrounds; it uses DOM information and DSM information to detect the two types of backgrounds respectively. The canopy extraction module is used to obtain segmented objects containing tree canopies or canopy clusters through the watershed algorithm, and to treat segmented objects containing illumination background as sparse objects; based on the ground elevation of the illumination background, a small amount of residual background in the transition area is excluded by using a height threshold to extract the tree canopy; The single tree counting module is used to record the location of trees and quantify the number of individual trees to obtain preliminary results of single tree counting; the single tree recognition rate and recognition accuracy are verified by field measurement data; The experimental verification module is used to extract tree canopies in regions with different densities. Experiments were conducted in three density regions of trees: high, medium, and low. The experimental results were analyzed, and the impact of density on individual tree segmentation and recognition was dissected.
5. A computer device, characterized in that, The computer device includes a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the tree counting method as described in any one of claims 1 to 3.
6. A computer-readable storage medium storing a computer program, which, when executed by a processor, causes the processor to perform the steps of the tree counting method as described in any one of claims 1 to 3.
7. An information data processing terminal, characterized in that, The information data processing terminal is used to implement the tree counting system as described in claim 4.