A method for extracting vegetation coverage and a computer-readable storage medium
By setting up drone flight paths and acquisition nodes in the target area, and using the decision tree algorithm to classify digital orthophotos, the problem of insufficient accuracy in monitoring of low-short vegetation coverage is solved, and higher accuracy of vegetation coverage measurement is achieved.
Patent Information
- Application Number
- CN202111334021.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-11
- Publication Date
- 2025-06-27
- Estimated Expiration
- 2041-11-11
AI Technical Summary
When monitoring the vegetation coverage of low vegetation such as sparse grasslands, the spatial resolution of satellite remote sensing images is insufficient, resulting in low extraction accuracy.
By setting the preset flight path and acquisition node of the drone in the target area, the drone obtains the original color images and geographical coordinates, generates digital orthophotos, and classifies the images using the decision tree algorithm to calculate the vegetation coverage.
The accuracy of vegetation coverage is improved, and images and coordinates are collected by drones are enhanced, image clarity and standard accuracy are overcome, and the problem of insufficient resolution of satellite remote sensing images is overcome.
Smart Images

Figure CN114219966B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing technology, and in particular, to a method for extracting vegetation coverage and a computer-readable storage medium. Background Art
[0002] Vegetation coverage refers to the percentage of the vertical projection area of the above-ground part of plants to the total area of the sample plot. It is a major component of the terrestrial ecosystem and an indicator of regional ecological environment change. Vegetation coverage is an important quantitative evaluation factor for studying the ecological environment change in a region.
[0003] Ground measurement and satellite remote sensing inversion are two main ways to estimate grassland vegetation coverage. Ground measurement mainly includes photographic method, sampling method, instrumental method and visual estimation method. Since it is difficult to extend the traditional ground observation method to the entire study area and it is affected by personal subjective factors, it is difficult to estimate the vegetation growth status in the entire area. Satellite remote sensing measurement has a wide monitoring range, saves time and effort, and provides convenience for large-scale vegetation coverage monitoring. However, limited by the spatial resolution of satellite remote sensing images, for low-growing vegetation such as sparse grassland, the extraction accuracy is relatively low. Therefore, there is an urgent need to provide a method for extracting vegetation coverage and a computer-readable storage medium to at least partially solve the above technical problems. Summary of the Invention
[0004] The purpose of the present invention is to provide a method for extracting vegetation coverage and a computer-readable storage medium, which can at least partially overcome the deficiencies in the prior art.
[0005] According to one aspect of the present invention, there is provided a method for extracting vegetation coverage, including the following steps:
[0006] Select a target area, and set a preset flight path and acquisition nodes located on the preset flight path in the target area;
[0007] Control the unmanned aerial vehicle to move along the preset flight path, and obtain the original color image of the target area and the geographical coordinates of the acquisition nodes through the unmanned aerial vehicle;
[0008] Based on the original color image and the geographical coordinates, obtain the digital orthophoto of the target area;
[0009] Select sample vegetation pixels and sample bare land pixels in the digital orthophoto to establish a training sample
[0010] Based on the training sample, use the decision tree algorithm to obtain a decision tree model for distinguishing vegetation pixels and bare land pixels;
[0011] Classify the digital orthophoto image based on the decision tree model, and calculate the vegetation coverage of the target area based on the classification result.
[0012] Preferably, the selection of the target area and the setting of the preset flight path and the acquisition nodes on the preset flight path in the target area include:
[0013] Obtain the historical rainfall data of the target area, and divide the target area into at least two or more sub-areas according to the level of the historical rainfall data;
[0014] Set the preset flight path and the acquisition nodes in each of the sub-areas respectively, and the length of the preset flight path per unit area in the sub-area with higher historical rainfall is not less than 1.5 times the length of the preset flight path per unit area in the sub-area with lower historical rainfall.
[0015] Preferably, the average distance between the acquisition nodes on the preset flight path per unit area in the sub-area with higher historical rainfall is not higher than 0.8 times the average distance between the acquisition nodes on the preset flight path per unit area in the sub-area with lower historical rainfall.
[0016] Preferably, the obtaining of the digital orthophoto image of the target area based on the original color image and the geographic coordinates includes:
[0017] Stitch based on the original color image, and perform orthorectification based on the geographic coordinates to obtain a stitched orthoimage;
[0018] Based on the RGB information of each pixel of the stitched image, expand it to a color space including at least one of RGB, HSV, L*a*b*, and XYZ to obtain the digital orthophoto image.
[0019] Preferably, based on the RGB information of each pixel of the stitched image, expand it to a color space including RGB, HSV, L*a*b*, and XYZ.
[0020] Preferably, the decision tree is a classification and regression decision tree.
[0021] Preferably, the obtaining of the decision tree model for distinguishing vegetation pixels and bare land pixels based on the training samples and using the decision tree algorithm includes:
[0022] Based on the training samples, use the decision tree algorithm and perform pruning optimization to obtain a decision tree model for distinguishing vegetation pixels and bare land pixels.
[0023] Preferably, classifying the digital orthophoto image based on the decision tree model and calculating the vegetation coverage of the target area based on the classification result includes:
[0024] Classifying the digital orthophoto image into bare land pixels and vegetation pixels based on the decision tree model, and calculating the vegetation coverage of the target area based on the number of the bare land pixels and the vegetation pixels.
[0025] Preferably, the preset flight path of the partition with a relatively high historical rainfall has at least one intersection point.
[0026] According to another aspect of the present invention, there is also provided a computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the above-mentioned vegetation coverage extraction method is implemented.
[0027] According to the embodiments of the present invention, the vegetation coverage extraction method provided by the present invention sets a preset flight path of an unmanned aerial vehicle and acquisition nodes located on the preset flight path in a target area, so that the original color image of the target area and the geographical coordinates of the acquisition nodes can be obtained by using the unmanned aerial vehicle, and a digital orthophoto image can be obtained. Then, the decision tree is used to classify the digital orthophoto image, and further the vegetation coverage of the target area can be obtained. The present invention collects images and coordinates by using an unmanned aerial vehicle, improves the convenience of collection while effectively improving the clarity of the collected images and the accuracy of the coordinates, and finally improves the accuracy of the obtained vegetation coverage. Description of the Drawings
[0028] By reading the detailed description of the non-limiting embodiments with reference to the following drawings, other features, objects and advantages of the present invention will become more apparent:
[0029] Figure 1 is a flowchart of the vegetation coverage extraction method according to the embodiments of the present application;
[0030] Figure 2 is a flowchart of the zoning operation in the vegetation coverage extraction method according to the embodiments of the present application. Detailed Embodiments
[0031] The present invention will be further described in detail below with reference to the drawings and embodiments. It can be understood that the specific embodiments described herein are only used to explain the related invention, rather than limiting the invention. For the convenience of description, only the parts related to the invention are shown in the drawings.
[0032] It should be noted that, without conflict, the embodiments in the present invention and the features in the embodiments can be combined with each other.
[0033] In this application, the vegetation coverage refers to the percentage of the vertical projection area of vegetation (including leaves, stems, and branches) on the ground in the total area of the target region. Of course, limited by the detection conditions, the detection result of this vertical projection area cannot be completely consistent with the true result. The unmanned aerial vehicle (UAV) used in the embodiments of this application is a UAV with functions of shooting, positioning, moving along a predetermined path, and moving according to a remote control signal. It can be a fixed-wing UAV or other various forms such as a rotary-wing UAV. Its specific setting form is well-known to those skilled in the art, and this application does not impose too many restrictions. As long as it can meet functions such as shooting, positioning, moving along a predetermined path, and moving according to a remote control signal. The present invention mainly utilizes the advantage of the relatively high detection resolution of the UAV. For example, in cooperation with a high-definition imaging device, the detection resolution of the UAV for the ground can reach about 1 centimeter, and it can more accurately distinguish various plants and bare land.
[0034] The preset flight path in the embodiments of this application refers to the UAV navigation route constructed based on a certain landmark or a certain point coordinate. It can only include necessary parameters such as relative direction, altitude, and speed, or can also include other parameters such as the relative distance from the landmark that are convenient for the UAV to determine the flight path. The preset flight path may not include specific coordinates, and they can be measured during the flight process.
[0035] The embodiments of this application provide a method for extracting vegetation coverage, including the following processes:
[0036] S101: Select a target region, set a preset flight path and collection nodes on the preset flight path in the target region;
[0037] S102: Control the UAV to move along the preset flight path, and obtain the original color image of the target region and the geographical coordinates of the collection nodes through the UAV;
[0038] S103: Based on the original color image and geographical coordinates, obtain the digital orthophoto of the target region;
[0039] S104: Select sample vegetation pixels and sample bare land pixels in the digital orthophoto to establish a training sample;
[0040] S105: Based on the training sample, use the decision tree algorithm to obtain a decision tree model for distinguishing vegetation pixels and bare land pixels;
[0041] S106: Classify the digital orthophoto based on the decision tree model, and calculate the vegetation coverage of the target region based on the classification result.
[0042] In process S101, the specific implementation of selecting the target area can be based on the pre-acquired geographical survey range. For example, a target area can be delineated within a certain geographical survey range, or it can be based on specific landmarks, such as within a certain range around a certain mountain peak. After selecting the target area, a preset flight path and acquisition nodes located on the preset flight path can be set within the target area. Among them, the preset flight path is used to restrict the flight route of the drone, so as to be able to conduct as full a survey of the target area as possible, and the acquisition nodes are used to detect specific coordinates, so as to be able to form a digital orthophoto image. The digital orthophoto image in this application refers to the image data generated by correcting the projection difference of each pixel of the digitized aerial photo / remote sensing image using the digital elevation model, then mosaicking the images, and cropping according to the map sheet range, which can more accurately describe the image information within the target area.
[0043] In process S102, the mode of the drone collecting the original color image can be that the drone collects once every fixed distance on the preset flight path, or the drone collects once every fixed time, as long as the collection requirements can be met. The way for the drone to obtain the geographical coordinates of the acquisition nodes can be through GPS positioning, or other positioning systems such as Beidou positioning, as long as the geographical coordinates corresponding to or related to the original color image can be obtained.
[0044] In process S103, the specific implementation of obtaining the digital orthophoto image of the target area based on the original color image and geographical coordinates can be to perform equalization processing on the original color image, import it into the Inpho image processing platform, automatically match and splice multiple images after aerial triangulation, and combine with the geographical coordinates obtained in process S102 according to the generated dense point cloud. After orthorectification, the digital orthophoto image can be obtained. Of course, other image processing platforms can also be used, which are well-known to those skilled in the art and will not be elaborated here.
[0045] In process S104, the way of selecting sample vegetation pixels and sample bare land pixels can be by manual visual selection, or by using a pre-trained sample selection model, such as selecting pixels with a relatively large proportion of certain color values, etc. After selecting the sample vegetation pixels and sample bare land pixels, for example, 100 sample vegetation pixels and 100 bare land pixels, model training can be carried out.
[0046] In process S105, based on training samples, using the decision tree algorithm, the specific implementation of obtaining a decision tree model for distinguishing vegetation pixels and bare land pixels can be, for example, using the existing ID3 algorithm based on the principle of Occam's razor, and through continuous iterative processing of the training samples obtained in S104, finally obtaining an available decision tree. It can also be using common decision tree algorithms well-known to those skilled in the art such as the C4.5 algorithm or the CART algorithm, and then obtaining a decision tree model for distinguishing vegetation pixels and bare land pixels, which can be a classification tree or a classification and decision tree. The discrimination degree of the decision tree model here for vegetation pixels and bare land pixels can be set according to specific needs, as long as it can meet the specific requirements, and it does not have to be completely strictly able to distinguish vegetation pixels and bare land pixels. Preferably, before specific application, pruning optimization can also be performed to reduce the computational amount during specific classification.
[0047] In process S106, one implementation of calculating the vegetation coverage of the target area can be, after classifying the digital orthophoto image using the decision tree model obtained in S105, counting the number of vegetation pixels and bare land pixels obtained. It can be dividing the number of vegetation pixels by the sum of the two numbers and using the value as the vegetation coverage. It can also be further processing the vegetation pixels, for example, assigning different weights according to their color values, with higher weights for those with a higher proportion of green, etc., and re-assigning the number of vegetation pixels according to the weights, and calculating the vegetation coverage by combining the two numbers and other implementation methods.
[0048] According to the embodiments of the present invention, the method for extracting vegetation coverage provided by the present invention sets a preset flight path of the unmanned aerial vehicle and acquisition nodes on the preset flight path within the target area, so that the original color image of the target area and the geographical coordinates of the acquisition nodes can be obtained by using the unmanned aerial vehicle, and a digital orthophoto image can be obtained. Then, the digital orthophoto image is classified using the decision tree, and further the vegetation coverage of the target area is obtained. The present invention performs image acquisition and coordinate acquisition by using an unmanned aerial vehicle, which improves the convenience of acquisition while effectively improving the clarity of the acquired image and the accuracy of the coordinates, and finally improves the accuracy of the obtained vegetation coverage.
[0049] As a preferred embodiment, in process S101, one implementation of selecting the target area and setting a preset flight path and acquisition nodes on the preset flight path within the target area can include the following processing:
[0050] S1011: Obtain the historical rainfall data of the target region, and divide the target area into at least two or more sub-regions according to the level of the historical rainfall data;
[0051] S1012: Set a preset flight path and collection nodes in each sub-region respectively. The length of the preset flight path per unit area in the sub-region with a higher historical rainfall is not less than 1.5 times, preferably 2 times, the length of the preset flight path per unit area in the sub-region with a lower historical rainfall.
[0052] Preferably, the average spacing between the collection nodes on the preset flight path per unit area in the sub-region with a higher historical rainfall is not higher than 0.8 times, preferably 0.5 times, the average spacing between the collection nodes on the preset flight path per unit area in the sub-region with a lower historical rainfall.
[0053] In process S1011, the historical rainfall data can be the rainfall in a period of time before the measurement date in this area, or the average rainfall in the same time period of the past year, etc., as long as it can provide a certain predictive effect on the vegetation coverage. The way to set the sub-regions can be to set a certain threshold according to the rainfall, and the areas within a certain threshold range are classified into one sub-region. Here, the sub-region can be a closed area or a set containing multiple closed areas. For example, if the average rainfall in a target area in the past six months is distributed between 20 mm and 80 mm, then the target area is divided into two sub-regions with rainfall of 40 mm to 80 mm and 20 to 40 mm. Of course, each sub-region may include multiple non-adjacent small areas. In this way, when planning the UAV flight path in sub-regions with different rainfall amounts, the processing can be carried out according to the following process S1012.
[0054] In process S1012, the length of the preset flight path within the unit area of a partition refers to the ratio of the total length of the preset flight path within that partition to the area of that partition. The larger this ratio, the more thorough the detection of the partition by the drone. Similarly, the average spacing between the acquisition nodes of the preset flight path refers to the ratio of the length of the preset flight path within that partition to the number of acquisition nodes located thereon. The smaller this ratio, the denser the acquisition nodes, and the higher the obtained accuracy. In this way, in some areas with high altitudes or complex landforms, when the rainfall in the area varies greatly, the accuracy of vegetation coverage can be effectively improved. For example, in the Tibet or Xinjiang regions of China, there may be altitude changes of hundreds or even thousands of meters within a small area. When conducting statistics on the vegetation coverage rate in this area, if treated uniformly, a large amount of the drone's flight time may be wasted in areas where the rainfall is insufficient to support vegetation growth, while in areas where vegetation can grow but is relatively short and sparse, there will be insufficient statistics. Therefore, this preferred implementation method can better solve this problem. If the partition obtained in process S1011 contains multiple small closed areas, it can be that the flight paths in each closed area satisfy the above setting relationship, or it can be that the average value of the flight paths in all the closed areas satisfies the above setting relationship, as long as the flight paths and subsequent acquisition nodes can be targeted according to the rainfall in this partition.
[0055] Preferably, in process S103, stitching can be performed based on the original color image. For example, the original color image can be stitched through an image stitching process using the RANSAC algorithm or the SURF matching algorithm, etc., which are well-known to those skilled in the art. After that, the result obtained from the stitching is orthorectified based on the geographic coordinates to obtain a stitched orthoimage, and based on the RGB information of each pixel in the stitched image, it is extended to a color space including at least one of RGB and HSV, L*a*b*, and XYZ to obtain a digital orthoimage. The color space extension can be carried out using conversion formulas well-known to those skilled in the art such as the RGB-HSV conversion formula. Preferably, the RGB information of each pixel can also be extended to a color space including RGB, HSV, L*a*b*, and XYZ. The digital orthoimage obtained in this way can provide more sparse vegetation information, such as some desert plants with colors close to those of sandy soil, thereby improving the classification accuracy.
[0056] As a preferred implementation method, after partitioning the target area based on historical rainfall, there is at least one intersection point in the preset flight path within the partition with a relatively high historical rainfall, which can further improve the detection accuracy.
[0057] The above describes specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than in the embodiments and still achieve the desired result. Additionally, the processes depicted in the figures do not necessarily require the particular order or sequential order shown to achieve the desired result. In certain embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0058] This application also provides a computer-readable medium having stored thereon a computer program, which when executed by a processor implements the vegetation coverage extraction method described above. The computer-readable medium includes permanent and non-permanent, removable and non-removable media, and the media can be implemented by any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transitory medium that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media such as modulated data signals and carrier waves.
[0059] The above description is only for the preferred embodiments of this application and the explanation of the applied technical principles. Those skilled in the art should understand that the scope of the invention involved in this application is not limited to the technical solutions formed by the specific combination of the above technical features, and should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the inventive concept. For example, the technical solutions formed by mutually replacing the above features with (but not limited to) the technical features having similar functions disclosed in this application.
Claims
1. A method for extracting vegetation coverage, characterized in that, Including the following steps: Select a target area, set a preset flight path within the target area and acquisition nodes located on the preset flight path; Control the unmanned aerial vehicle (UAV) to move along the preset flight path, and obtain the original color image of the target area and the geographical coordinates of the acquisition nodes through the UAV; Based on the original color image and the geographical coordinates, obtain the digital orthophoto of the target area; Select sample vegetation pixels and sample bare land pixels in the digital orthophoto to establish a training sample; Based on the training sample, use the decision tree algorithm to obtain a decision tree model for distinguishing vegetation pixels and bare land pixels; Classify the digital orthophoto based on the decision tree model, and calculate the vegetation coverage of the target area based on the classification result; The step of selecting a target area, setting a preset flight path within the target area and acquisition nodes on the preset flight path includes: Obtain the historical rainfall data of the target area, and divide the target area into at least two or more sub-areas according to the level of the historical rainfall data; Set the preset flight path and the acquisition nodes in each sub-area respectively. The length of the preset flight path per unit area in the sub-area with higher historical rainfall is not less than 1.5 times the length of the preset flight path per unit area in the sub-area with lower historical rainfall; Wherein, each sub-area is a closed area or a set containing multiple closed areas; For each sub-area, the length of the preset flight path per unit area refers to the ratio of the total length of the preset flight path in the sub-area to the area of the sub-area, and the average spacing between the acquisition nodes on the preset flight path refers to the ratio of the length of the preset flight path in the sub-area to the number of acquisition nodes located thereon; 2. The vegetation coverage extraction method according to claim 1, wherein The average spacing between the acquisition nodes on the preset flight path per unit area in the sub-area with higher historical rainfall is not higher than 0.8 times the average spacing between the acquisition nodes on the preset flight path per unit area in the sub-area with lower historical rainfall; 3. The vegetation coverage extraction method according to claim 1, characterized in that, The preset flight path in the sub-area with higher historical rainfall has at least one intersection point; 4. The vegetation coverage extraction method according to claim 1, characterized in that The step of obtaining the digital orthophoto of the target area based on the original color image and the geographical coordinates includes: Perform stitching based on the original color image, and perform orthorectification based on the geographical coordinates to obtain a stitched orthoimage; Based on the RGB information of each pixel of the stitched image, expand it to a color space including at least one of RGB, HSV, L*a*b*, and XYZ to obtain the digital orthophoto; 5. The vegetation coverage extraction method according to claim 4, wherein Based on the RGB information of each pixel of the stitched image, expand it to a color space including RGB, HSV, L*a*b*, and XYZ; 6. The vegetation coverage extraction method according to claim 1, characterized in that The decision tree is a classification and regression decision tree; 7. The vegetation coverage extraction method according to claim 1, wherein The step of obtaining a decision tree model for distinguishing vegetation pixels and bare land pixels based on the training sample and using the decision tree algorithm includes: Based on the training samples, using the decision tree algorithm and through pruning optimization, a decision tree model for distinguishing vegetation pixels and bare land pixels is obtained.
8. The vegetation coverage extraction method according to claim 1, characterized in that Classifying the digital orthophoto image based on the decision tree model, and calculating the vegetation coverage of the target area based on the classification results includes: Classifying the digital orthophoto image into bare land pixels and vegetation pixels based on the decision tree model, and calculating the vegetation coverage of the target area based on the quantities of the bare land pixels and the vegetation pixels.
9. A computer-readable storage medium, characterized in that, A computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the vegetation coverage extraction method according to any one of claims 1 to 8 is implemented.