Arbor canopy extraction method and system based on unmanned aerial vehicle and radar and medium

UAV laser point cloud data is processed through filtering, rasterization and image segmentation models, which solves the problem of heavy calculation and dependence on ground points, and achieves more accurate tree canopy segmentation.

CN118865166APending Publication Date: 2024-10-29SUZHOU SANRUN LANDSCAPE ENG
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410861810.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-06-28
Publication Date
2024-10-29

AI Technical Summary

Technical Problem

Existing UAV laser point cloud data requires a large amount of calculation in tree canopy segmentation, relies on ground point information, and has low integration of deep learning models, resulting in inaccurate segmentation results.

Method used

After using the filter module to remove noise points, the three-dimensional point cloud data is rasterized, the slope raster data is calculated, and the image segmentation model is used to segment the slope data. Finally, post-processing is performed to filter out the tree canopy data.

Benefits of technology

It reduces the amount of calculation, avoids the problem of missing ground points, improves the accuracy of segmentation results, and is well integrated with existing image segmentation models.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118865166A_ABST
    Figure CN118865166A_ABST
Patent Text Reader

Abstract

The invention provides an arbor canopy extraction method and system based on an unmanned aerial vehicle and a radar, and a medium. The method comprises the following steps: filtering original three-dimensional point cloud data collected by the unmanned aerial vehicle; performing rasterization processing on the filtered three-dimensional point cloud data; obtaining gradient raster data through a gradient calculator; segmenting the gradient raster data through an image segmentation model, and obtaining arbor canopy data from a segmentation result; carrying out post-treatment filtering; according to the design, two-dimensional canopy height data is replaced with gradient raster data information, dependence on ground points is eliminated, gradient information is calculated directly through a digital surface, operation and calculation of any ground points are not involved, the problems of ground point missing and large ground point recognition calculation amount are effectively avoided, and the calculation efficiency is improved. The gradient raster data records sufficient neighborhood information difference, abandons other information which is useless or has little effect on canopy segmentation, and can be well integrated with an existing image segmentation model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical fields of urban sustainable development, remote sensing and target detection, and more specifically to a method, system and medium for extracting tree canopies based on unmanned aerial vehicles and radars. Background Art

[0002] In urban environments, accurate segmentation and analysis of tree canopies are of great significance, and such analysis is crucial for urban planning, environmental monitoring, greening management, and urban microclimate research. The technical background of tree canopy segmentation involves many aspects, including the application of remote sensing technology, segmentation models, and practical needs related to urban sustainable development.

[0003] The application of remote sensing technology is the key to obtaining digital data of urban trees, which is mainly divided into remote sensing images and laser point clouds. Among them, remote sensing images are remote sensing images based on the bird's-eye view obtained by aerial drones, including orthophoto, multispectral and hyperspectral. Laser radar (LiDAR) uses laser ranging to obtain accurate three-dimensional space point cloud data, mainly including point clouds based on aerial drones and point clouds based on ground mobile platforms (such as handheld mobile phones, cars, etc.).

[0004] Among the existing algorithms, there are two canopy segmentation algorithms that use drone point cloud data, namely CHM-based segmentation and point cloud-based segmentation. Among them, the CHM-based segmentation algorithm needs to normalize the point cloud during the CHM extraction process, that is, extract DTM and DSM and calculate the difference to obtain CHM. This requires identifying the ground points in the point cloud, and this process is very computationally intensive and time-consuming. At the same time, the drone's point cloud data cannot penetrate the trees with thick canopies, resulting in missing ground points, which seriously affects the accuracy of CHM and the detection of single trees in subsequent segmentation algorithms. The direct segmentation algorithm based on point clouds also needs to normalize the point cloud data, and it also has the above-mentioned problems of large computational complexity and missing ground points. In addition, due to the discreteness of point clouds and large data volume, there are currently few deep learning models for segmenting point clouds, and the generalization ability is obviously insufficient.

[0005] There are two ways to segment the canopy of laser point cloud data. One is to use point cloud to extract digital terrain (DTM) and digital surface (DSM), and then obtain a two-dimensional canopy height (CHM) data by solving the difference between the two, which is used as input for the next step of segmentation. The more common methods include the CHM-based watershed algorithm, dalponte2016, and other deep learning image segmentation algorithms. Another implementation idea is to directly segment the point cloud to obtain the point cloud of a single tree, and then project the single tree point cloud to generate a single tree canopy. Common algorithms include Euclidean Cluster Extraction, RegionGrowing Segmentation, etc.

[0006] The existing tree canopy segmentation algorithms based on UAV point clouds have the following problems:

[0007] 1. Large amount of calculation. Although a large number of discrete point clouds record detailed three-dimensional spatial information, it also brings difficulties to subsequent data processing;

[0008] 2. Highly dependent on ground points. Whether it is canopy segmentation based on CHM or segmentation based on point cloud, it is highly dependent on the information of ground points. However, the drone laser point cloud will inevitably have problems with canopy thickness and laser penetration, resulting in missing ground points, which greatly affects the subsequent segmentation results;

[0009] 3. Low integration with deep learning models. Since the breakthrough in graphics card computing power and the accumulation of basic data sets, deep learning segmentation algorithms in the field of two-dimensional images have grown explosively, and there are many image segmentation models with high robustness and strong generalization capabilities that can be used. Existing algorithms have little development of deep learning models for three-dimensional point clouds, and the application of deep learning models for two-dimensional images is also relatively superficial.

[0010] The invention patent with announcement number CN 117893924A discloses a method for segmenting single trees from drone lidar point cloud based on tree crown morphology. This method uses forest data obtained by drone lidar. First, the initial tree crown area is extracted from CHM based on the region growing algorithm. Then, the number of local density maximum points in each tree crown is used to determine whether the initial tree crown is a correctly segmented tree crown. Then, the incorrectly segmented tree crown is finely segmented according to the crown morphology to obtain an updated tree vertex set. Finally, the updated tree vertex is used as a seed point to apply the region growing algorithm to obtain the final single tree segmentation result. This scheme is still based on the canopy segmentation of CHM, so it is still highly dependent on the information of ground points, which greatly affects the subsequent segmentation results.

[0011] Therefore, it is necessary to provide a new tree canopy extraction method, system and medium based on drones and radar to solve the shortcomings of existing algorithms. Summary of the invention

[0012] In view of this, in order to solve the above problems, the present invention proposes a method, system and medium for extracting tree canopies based on drones and radars. The method comprises: filtering the original drone laser point cloud data; rasterizing the filtered three-dimensional point cloud data; obtaining slope raster data through a slope calculator; segmenting the slope raster data through an image segmentation model, and obtaining tree canopy data from the segmentation results; and post-processing and filtering.

[0013] A method for extracting tree canopy based on drone and radar, the method comprising the following steps:

[0014] Step S1, passing the original three-dimensional point cloud data collected by the drone through a filter module to filter out noise points and obtain filtered three-dimensional point cloud data;

[0015] Step S2, rasterizing the filtered three-dimensional point cloud data to obtain two-dimensional digital surface data;

[0016] Step S3, passing the two-dimensional digital surface data through a slope calculator to obtain slope grid data;

[0017] Step S4, input the slope grid data into the image segmentation model for segmentation, perform post-processing and filtering on the fragments appearing in the image segmentation model and the unfiltered low buildings, street lights, signboards, trash cans, cars and other objects, and obtain tree canopy data.

[0018] Furthermore, in step S1, due to the vibration of the drone, the influence of moving objects such as birds and vehicles, and the measurement error of the laser itself, there are abnormal outliers, which will reduce the extraction accuracy of height information in the subsequent rasterization processing. The original three-dimensional point cloud data collected by the drone needs to be removed by the filter module in the preprocessing stage. At the same time, objects such as buildings and wires in the urban scene also need to be removed as noise points.

[0019] Furthermore, the filter module is composed of a height threshold filter and a statistical outlier removal filter, the height threshold filter is used to filter out the building point cloud, and the statistical outlier removal filter is used to filter out outliers. The specific process of step S1 is:

[0020] Step S11, traverse the point cloud, calculate the average Z value of the first 5% of the points, add 25 as the threshold of the first filter, traverse each point in the point cloud again, and judge the difference between the Z value of the point and the threshold. If it is greater than the threshold, discard it, otherwise keep it;

[0021] Step S12, traverse the results of step S11, calculate the average distance between each point and the K nearest points, then calculate the mean and standard deviation of the distances of all these points, determine the distance threshold, compare the mean of the distance between each point and the K nearest neighboring points with the distance threshold, if it is greater than the threshold, it is judged as an outlier and discarded, otherwise it is an inline point and retained.

[0022] Furthermore, in step S2, the rasterization process is to create a grid as large as the four-dimensional coordinate range of the point cloud, traverse each point in the point cloud to determine its position in the grid, and retain the maximum value of the Z value of each point as the grid value, so as to realize the data conversion from three-dimensional point cloud data to two-dimensional digital surface, realize data dimensionality reduction, and greatly reduce the amount of calculation. The specific process of step S2 is:

[0023] Step S21, traverse the point cloud and determine the four coordinates of the point cloud, that is, [Xmax, Xmin, Ymax, Ymin];

[0024] Step S22, according to the four coordinates of the point cloud, create a grid with the same range, the grid resolution is 0.1m, and the grid initialization value is empty;

[0025] Step S23, traverse the point cloud, determine the grid where each point is located, compare the Z value of the point with the value recorded in the grid, and if it is greater than the grid value, replace the grid record value with the Z value.

[0026] Further, in step S3, the two-dimensional digital surface data is two-dimensional grid data, and each grid in the grid data records the maximum value of the point cloud in the Z direction, that is, the maximum altitude. Each grid in the grid data is traversed to calculate the height difference between it and the surrounding 8 grids, so as to calculate the slope. The slope calculation formula is as follows:

[0027]

[0028] In the formula, and Represent the partial derivatives of height in the x-direction and y-direction respectively, which can be approximately calculated as follows:

[0029]

[0030] In the formula, cellsize represents the size of the grid cell.

[0031] Furthermore, in step S4, the image segmentation model is a Segment Anything segmentation model, which includes an image encoder, a prompt encoder and a mask decoder; the image encoder is responsible for converting the input image into an image embedding to capture the feature information of the image; the prompt encoder is responsible for converting the input prompt information into a prompt embedding so that the model understands the prompt content. In order to avoid human-computer interaction, the prompt encoder automatically generates grid points as image prompt information without giving manual prompts; the mask decoder is responsible for combining the image embedding and prompt embedding information, and obtaining the predicted segmentation mask, and finally calculating the loss function based on the actual segmentation annotation.

[0032] Furthermore, the SegmentAnything segmentation model supports automatic generation of grid points as image prompt information without giving manual prompts; the parameters of the automatically generated grid points are adjustable, which are used to adjust the prompt embedding information required by the model. The parameter value will directly affect the results of the model. The adjustable parameters include the number of points per side, the number of points per batch, the grid point downsampling factor, and the grid matrix.

[0033] Furthermore, the segmentation preset parameters of the SegmentAnything segmentation model are adjustable and used to control the quality of the model output results. The parameter value will directly affect the results of the model. The adjustable parameters include the intersection-over-union ratio threshold, stability threshold, stability bias, and minimum area threshold.

[0034] Further, in step S4, the post-processing filtering includes area threshold filtering, height threshold filtering, and manual removal. The specific process of step S4 is:

[0035] Step S41, the fragments and the unfiltered street lights and signboards are filtered out by calculating the area and setting a threshold;

[0036] Step S42: The trash cans, cars and other low objects on the ground are filtered out by setting a height threshold;

[0037] Step S43: The few remaining low buildings are removed manually.

[0038] The present invention also provides a tree canopy extraction system based on drone aerial photography data, which is used in the tree canopy extraction method based on drone and radar, and the system includes:

[0039] The pre-processing module is used to filter and rasterize the original three-dimensional point cloud data collected by the UAV to generate digital surface data;

[0040] The ground object segmentation module is used to extract the target objects on the digital surface by inputting the calculated slope grid data into the image segmentation model, and the target objects include all ground object spots that can be segmented by the image segmentation model;

[0041] The canopy recognition module is used for post-processing and filtering to remove debris in the SAM output and unfiltered low buildings, street lights, signboards, trash cans, cars and other objects.

[0042] The present invention also provides a tree canopy extraction medium based on drone aerial photography data, which is a computer-readable storage medium for storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the tree canopy extraction method based on drone and radar as described in any of the aforementioned implementations.

[0043] Beneficial effects of the invention: The invention proposes a method, system and medium for extracting tree canopies based on drones and radars, the method comprising: filtering the original three-dimensional point cloud data collected by the drone; rasterizing the filtered three-dimensional point cloud data; obtaining slope raster data through a slope calculator; segmenting the slope raster data through an image segmentation model, and obtaining tree canopy data from the segmentation results; post-processing and filtering; the method comprises the following beneficial effects:

[0044] 1. Grid processing of point cloud data. For the original point cloud data, after simple noise point filtering, it is projected onto a two-dimensional grid. Each grid records the height of the highest point in the grid, i.e., the digital surface model (DSM) data.

[0045] 2. Replace the two-dimensional canopy height (CHM) data with slope grid data (Slope) information to get rid of the dependence on ground points. Directly use the digital surface to calculate the slope information without involving any ground point operation and calculation, effectively avoiding the problem of missing ground points and large amount of ground point identification calculation;

[0046] 3. Slope raster data (Slope) records sufficient neighborhood information differences and discards other information that is useless or has little effect on canopy segmentation, which can be well integrated with existing image segmentation models. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] Figure 1 This is an overall flow chart of the tree canopy extraction method based on drone and radar of the present invention.

[0048] Figure 2 This is a filter module flow chart of the tree canopy extraction method based on drone and radar of the present invention. DETAILED DESCRIPTION

[0049] Example:

[0050] A method for extracting tree canopy based on drone and radar, the method comprising the following steps:

[0051] Step S1, passing the original three-dimensional point cloud data collected by the drone through a filter module to filter out noise points and obtain filtered three-dimensional point cloud data;

[0052] Step S2, rasterizing the filtered three-dimensional point cloud data to obtain two-dimensional digital surface data;

[0053] Step S3, passing the two-dimensional digital surface data through a slope calculator to obtain slope grid data;

[0054] Step S4, input the slope grid data into the image segmentation model for segmentation, perform post-processing and filtering on the fragments appearing in the image segmentation model and the unfiltered low buildings, street lights, signboards, trash cans, cars and other objects, and obtain tree canopy data.

[0055] Furthermore, in step S1, due to the vibration of the drone, the influence of moving objects such as birds and vehicles, and the measurement error of the laser itself, there are abnormal outliers, which will reduce the extraction accuracy of height information in the subsequent rasterization processing. The original three-dimensional point cloud data collected by the drone needs to be removed by the filter module in the preprocessing stage. At the same time, objects such as buildings and wires in the urban scene also need to be removed as noise points.

[0056] The filter module is composed of a height threshold filter and a statistical outlier removal filter. The height threshold filter is used to filter out building point clouds, and the statistical outlier removal filter is used to filter out outliers. The specific process of step S1 is:

[0057] Step S11, traverse the point cloud, calculate the average Z value of the first 5% of the points, add 25 as the threshold of the first filter, traverse each point in the point cloud again, and judge the difference between the Z value of the point and the threshold. If it is greater than the threshold, discard it, otherwise keep it;

[0058] Step S12, traverse the results of step S11, calculate the average distance between each point and the K nearest points, then calculate the mean and standard deviation of the distances of all these points, determine the distance threshold, compare the mean of the distance between each point and the K nearest neighboring points with the distance threshold, if it is greater than the threshold, it is judged as an outlier and discarded, otherwise it is an inline point and retained.

[0059] In step S2, the rasterization process is to create a grid as large as the four-dimensional coordinate range of the point cloud, traverse each point in the point cloud to determine its position in the grid, and retain the maximum value of the Z value of each point as the grid value, so as to realize the data conversion from three-dimensional point cloud data to two-dimensional digital surface, realize data dimensionality reduction, and greatly reduce the amount of calculation. The specific process of step S2 is:

[0060] Step S21, traverse the point cloud and determine the four coordinates of the point cloud, that is, [Xmax, Xmin, Ymax, Ymin];

[0061] Step S22, according to the four coordinates of the point cloud, create a grid with the same range, the grid resolution is 0.1m, and the grid initialization value is empty;

[0062] Step S23, traverse the point cloud, determine the grid where each point is located, compare the Z value of the point with the value recorded in the grid, and if it is greater than the grid value, replace the grid record value with the Z value.

[0063] Further, in step S3, the two-dimensional digital surface data is two-dimensional grid data, and each grid in the grid data records the maximum value of the point cloud in the Z direction, that is, the maximum altitude. Each grid in the grid data is traversed to calculate the height difference between it and the surrounding 8 grids, so as to calculate the slope. The slope calculation formula is as follows:

[0064]

[0065] In the formula, and Represent the partial derivatives of height in the x-direction and y-direction respectively, which can be approximately calculated as follows:

[0066]

[0067] In the formula, cellsize represents the size of the grid cell.

[0068] In step S4, the image segmentation model is a Segment Anything segmentation model, which includes an image encoder, a prompt encoder and a mask decoder; the image encoder is responsible for converting the input image into an image embedding to capture the feature information of the image; the prompt encoder is responsible for converting the input prompt information into a prompt embedding so that the model understands the prompt content. In order to avoid human-computer interaction, the prompt encoder automatically generates grid points as image prompt information without giving manual prompts; the mask decoder is responsible for combining the image embedding and the prompt embedding information, and obtaining the predicted segmentation mask, and finally calculating the loss function based on the actual segmentation annotation.

[0069] The SegmentAnything segmentation model supports automatic generation of grid points as image prompt information without giving manual prompts; the parameters of the automatically generated grid points are adjustable, which are used to adjust the prompt embedding information required by the model, and the parameter values ​​​​will directly affect the results of the model. The adjustable parameters include the number of points per side, the number of points per batch, the grid point downsampling factor, and the grid matrix; the segmentation preset parameters of the SegmentAnything segmentation model are adjustable, which are used to control the quality of the model output results. The parameter values ​​​​will directly affect the results of the model. The adjustable parameters include the intersection-over-union ratio threshold, stability threshold, stability bias, and minimum area threshold.

[0070] In step S4, the post-processing filtering includes area threshold filtering, height threshold filtering, and manual removal. The specific process of step S4 is:

[0071] Step S41, the fragments and the unfiltered street lights and signboards are filtered out by calculating the area and setting a threshold;

[0072] Step S42: The trash cans, cars and other low objects on the ground are filtered out by setting a height threshold;

[0073] Step S43: The few remaining low buildings are removed manually.

[0074] The present invention also provides a tree canopy extraction system based on drone aerial photography data, which is used in the tree canopy extraction method based on drone and radar, and the system includes:

[0075] The pre-processing module is used to filter and rasterize the original three-dimensional point cloud data collected by the UAV to generate digital surface data;

[0076] The ground object segmentation module is used to extract the target objects on the digital surface by inputting the calculated slope grid data into the image segmentation model, and the target objects include all ground object spots that can be segmented by the image segmentation model;

[0077] The canopy recognition module is used for post-processing and filtering to remove debris in the SAM output and unfiltered low buildings, street lights, signboards, trash cans, cars and other objects.

[0078] The present invention also provides a tree canopy extraction medium based on drone aerial photography data, which is a computer-readable storage medium for storing computer-executable instructions. When the computer-executable instructions are called and executed by a processor, the computer-executable instructions prompt the processor to implement the tree canopy extraction method based on drone and radar as described in any of the aforementioned implementations.

[0079] Beneficial effects of the invention: The invention proposes a method, system and medium for extracting tree canopies based on drones and radars, the method comprising: filtering the original three-dimensional point cloud data collected by the drone; rasterizing the filtered three-dimensional point cloud data; obtaining slope raster data through a slope calculator; segmenting the slope raster data through an image segmentation model, and obtaining tree canopy data from the segmentation results; post-processing and filtering; the method comprises the following beneficial effects:

[0080] 1. Grid processing of point cloud data. For the original point cloud data, after simple noise point filtering, it is projected onto a two-dimensional grid. Each grid records the height of the highest point in the grid, i.e., the digital surface model (DSM) data.

[0081] 2. Replace the two-dimensional canopy height (CHM) data with slope grid data (Slope) information to get rid of the dependence on ground points. Directly use the digital surface to calculate the slope information without involving any ground point operation and calculation, effectively avoiding the problem of missing ground points and large amount of ground point identification calculation;

[0082] 3. Slope raster data (Slope) records sufficient neighborhood information differences and discards other information that is useless or has little effect on canopy segmentation, which can be well integrated with existing image segmentation models.

[0083] The above-mentioned embodiments only express several implementation methods of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent of the present invention. It should be pointed out that, for ordinary technicians in this field, several variations and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the attached claims.

Claims

1. A method for extracting tree canopy based on drone and radar, characterized in that: The method comprises the following steps: Step S1, passing the original three-dimensional point cloud data collected by the drone through a filter module to filter out noise points and obtain filtered three-dimensional point cloud data; Step S2, the filtered three-dimensional point cloud data is subjected to rasterization processing to obtain two-dimensional digital surface data; Step S3, the two-dimensional digital surface data is passed through a slope calculator to obtain slope grid data; Step S4, input the slope grid data into the image segmentation model for segmentation, perform post-processing and filtering on the fragments appearing in the image segmentation model and the unfiltered low buildings, street lights, signboards, trash cans, cars and other objects, and obtain tree canopy data.

2. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: In step S1, the original three-dimensional point cloud data collected by the drone contains abnormal outliers and noise points, the abnormal outliers include moving objects and laser measurement errors, and the noise points include buildings and wires in urban scenes. The abnormal outliers and noise points are removed by a filter module.

3. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: The filter module is composed of a height threshold filter and a statistical outlier removal filter. The height threshold filter is used to filter out building point clouds, and the statistical outlier removal filter is used to filter out outliers. The specific process of step S1 is: Step S11, traverse the point cloud, calculate the average Z value of the first 5% of the points, add 25 as the threshold of the first filter, traverse each point in the point cloud again, and judge the difference between the Z value of the point and the threshold. If it is greater than the threshold, discard it, otherwise keep it; Step S12, traverse the results of step S11, calculate the average distance between each point and the K nearest points, then calculate the mean and standard deviation of the distances of all these points, determine the distance threshold, compare the mean of the distance between each point and the K nearest neighboring points with the distance threshold, if it is greater than the threshold, it is judged as an outlier and discarded, otherwise it is an inline point and retained.

4. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: In step S2, the rasterization process is to create a grid as large as the four-dimensional coordinate range of the point cloud, traverse each point in the point cloud to determine its position in the grid, and retain the maximum value of the Z value of each point as the grid value, so as to realize the data conversion from three-dimensional point cloud data to two-dimensional digital surface, realize data dimensionality reduction, and greatly reduce the amount of calculation. The specific process of step S2 is: Step S21, traverse the point cloud and determine the four coordinates of the point cloud, that is, [Xmax, Xmin, Ymax, Ymin]; Step S22: Create a grid with the same range according to the four coordinates of the point cloud, with a grid resolution of 0.1m, the grid initialization value is empty; Step S23, traverse the point cloud, determine the grid where each point is located, compare the Z value of the point with the value recorded in the grid, and replace it if it is greater than the grid value.

5. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: In step In S3, the two-dimensional digital surface data is two-dimensional grid data. Each grid in the grid data records the maximum value of the point cloud in the Z direction, that is, the maximum altitude. Each grid in the grid data is traversed to calculate the height difference between it and the surrounding 8 grids, thereby calculating the slope.

6. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: In step In S4, the image segmentation model is a Segment Anything segmentation model, which includes an image encoder, a hint encoder and a mask decoder; the image encoder is responsible for converting the input image into an image embedding to capture feature information of the image; The prompt encoder is responsible for converting the input prompt information into prompt embedding so that the model can understand the prompt content. In order to avoid human-computer interaction, the prompt encoder automatically generates grid points as image prompt information without giving manual prompts; the mask decoder is responsible for combining the image embedding and prompt embedding information, and obtaining the predicted segmentation mask, and finally calculating the loss function based on the actual segmentation annotation.

7. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: The SegmentAnything segmentation model supports automatic generation of grid points as image prompt information without giving manual prompts; the parameters of the automatically generated grid points are adjustable, which are used to adjust the prompt embedding information required by the model, and the parameter values ​​​​will directly affect the results of the model. The adjustable parameters include the number of points per side, the number of points per batch, the grid point downsampling factor, and the grid matrix; the segmentation preset parameters of the SegmentAnything segmentation model are adjustable, which are used to control the quality of the model output results. The parameter values ​​​​will directly affect the results of the model. The adjustable parameters include the intersection-over-union ratio threshold, stability threshold, stability bias, and minimum area threshold.

8. The method for extracting tree canopy based on drone and radar as claimed in claim 1, characterized in that: In step S5, the post-processing filtering includes area threshold filtering, height threshold filtering, and manual removal. The specific process of step S4 is as follows: Step S41, the fragments and the result spots of the street lights and signboards that have not been filtered out are filtered out by calculating the area and setting a threshold; Step S42: The trash cans and cars are filtered out by setting a height threshold; Step S43: The low buildings are removed manually.

9. A tree canopy extraction system based on drone aerial photography data, the system being used in the tree canopy extraction method based on drone and radar as claimed in any one of claims 1 to 8, characterized in that: The system comprises: The pre-processing module is used to filter and rasterize the original three-dimensional point cloud data collected by the UAV to generate digital surface data; The ground object segmentation module is used to extract the target objects on the digital surface by inputting the calculated slope grid data into the image segmentation model, and the target objects include all ground object spots that can be segmented by the image segmentation model; The canopy recognition module is used for post-processing and filtering to remove debris in the SAM output as well as unfiltered low buildings, street lights, signboards, trash cans, and car result spots.

10. A tree canopy extraction medium based on drone aerial photography data, characterized in that: The medium is a computer-readable storage medium for storing computer-executable instructions. When the computer-executable instructions are called and executed by the processor, the computer-executable instructions prompt the processor to implement the tree canopy extraction method based on drone and radar as described in any of the aforementioned implementations.