Adaptive Extraction Method and Device for Green Vegetation
The method addresses the misclassification of green non-vegetation objects in UAV imagery by constructing an adaptive vegetation index and determining optimal parameters for threshold setting, enabling accurate green vegetation extraction.
Patent Information
- Application Number
- CN202211605343.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-14
- Publication Date
- 2025-07-15
- Estimated Expiration
- 2042-12-14
AI Technical Summary
When extracting green vegetation from drone RGB images, the non-vegetation green land is prone to misjudging it as vegetation, especially in the presence of green water bodies, green fake grasses, green basketball courts, etc., there is a lack of effective differential feature recognition.
By obtaining the drone RGB image, generating digital orthophoto DOM, performing object-oriented optimal scale segmentation, calculating the average pixel values of the red, green and blue bands of green vegetation and non-vegetation land, constructing an adaptive green vegetation index, finding the optimal parameters, and setting a threshold to extract green vegetation.
It realizes the adaptive extraction of green vegetation in different scenarios, avoids the incorrect extraction of other green land objects, and achieves the purpose of accurately extracting green vegetation.
Smart Images

Figure CN115965880B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular, to a method and device for adaptively extracting green vegetation. Background Art
[0002] This section aims to provide background or context for the embodiments of the present invention described in the claims. The description herein is not admitted to be prior art merely by including it in this section.
[0003] Extracting green vegetation using the visible light band difference vegetation index of an unmanned aerial vehicle (UAV) is an index for extracting green vegetation from UAV RGB images and is commonly used for extracting green vegetation from UAV RGB images. However, during the construction of the visible light band difference vegetation index, the difference characteristics between green non-vegetation ground objects and green vegetation are not well considered. When green ground objects such as green water bodies, green artificial grass, and green basketball courts are included in the UAV RGB image, using the visible light band difference vegetation index to extract green vegetation is likely to misjudge these non-vegetation green ground objects as vegetation. Summary of the Invention
[0004] Embodiments of the present invention provide a method for adaptively extracting green vegetation to accurately extract green vegetation. The method includes:
[0005] Obtain the UAV RGB image within the research area; generate a digital orthophoto map (DOM) based on the UAV RGB image; perform object-oriented optimal scale segmentation processing on the DOM to obtain the DOM containing various ground object segmentation objects;
[0006] Select green vegetation ground object and green non-vegetation ground object in the DOM containing various ground object segmentation objects, determine the mean of the pixel averages of each green non-vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B, and determine the mean of the pixel averages of each green vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B;
[0007] Construct an adaptive green vegetation index based on the mean of the pixel averages of each green vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B;
[0008] Obtain the optimal parameters of the adaptive green vegetation index according to the mean of the pixel averages of each green non-vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B;
[0009] Extract the green vegetation in the research area by setting a threshold according to the optimal parameters.
[0010] An embodiment of the present invention further provides a green vegetation adaptive extraction device for accurately extracting green vegetation. The device includes:
[0011] An acquisition and segmentation unit, configured to acquire the UAV RGB image within the research area; generate a digital orthophoto map (DOM) based on the UAV RGB image; perform object-oriented optimal scale segmentation processing on the DOM to obtain the DOM containing various ground object segmentation objects;
[0012] A mean value determination unit, configured to select green vegetation ground objects and green non-vegetation ground objects in the DOM containing various ground object segmentation objects, and determine the mean value of the pixel average values of each green non-vegetation ground object in the red band R, the mean value of the pixel average values in the green band G, and the mean value of the pixel average values in the blue band B, and determine the mean value of the pixel average values of each green vegetation ground object in the red band R, the mean value of the pixel average values in the green band G, and the mean value of the pixel average values in the blue band B;
[0013] A construction unit, configured to construct an adaptive green vegetation index based on the mean value of the pixel average values of each green vegetation ground object in the red band R, the mean value of the pixel average values in the green band G, and the mean value of the pixel average values in the blue band B;
[0014] An optimal parameter determination unit, configured to obtain the optimal parameters of the adaptive green vegetation index according to the mean value of the pixel average values of each green non-vegetation ground object in the red band R, the mean value of the pixel average values in the green band G, and the mean value of the pixel average values in the blue band B;
[0015] An extraction unit, configured to extract the green vegetation in the research area by setting a threshold according to the optimal parameters.
[0016] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned green vegetation adaptive extraction method is implemented.
[0017] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned green vegetation adaptive extraction method is implemented.
[0018] An embodiment of the present invention further provides a computer program product, including a computer program, and when the computer program is executed by a processor, the above-mentioned green vegetation adaptive extraction method is implemented.
[0019] In the embodiment of the present invention, compared with the prior art in which non-vegetation green ground objects are easily misjudged as vegetation, the adaptive extraction scheme of green vegetation includes: obtaining the UAV RGB image in the study area; generating a digital orthophoto map (DOM) based on the UAV RGB image; performing object-oriented optimal scale segmentation processing on the DOM to obtain a DOM containing various ground object segmentation objects; selecting green vegetation ground object and green non-vegetation ground objects in the DOM containing various ground object segmentation objects, determining the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B, and determining the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B; constructing an adaptive green vegetation index based on the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B; obtaining the optimal parameters of the adaptive green vegetation index according to the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B; extracting the green vegetation in the study area according to the set threshold based on the optimal parameters. It can be realized that after constructing the adaptive green vegetation index based on the UAV RGB image, the optimal parameters of the AVDVI are solved, and the green vegetation can be adaptively extracted according to the optimal parameters, which can avoid mis-extracting other green ground objects and achieve the purpose of accurately extracting green vegetation. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the following will briefly introduce the drawings required for the description of the embodiments or the prior art. Obviously, the following drawings are only some embodiments of the present invention. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings. In the drawings:
[0021] Figure 1 It is the overall flowchart of the method for adaptively extracting green vegetation from UAV RGB images in the embodiment of the present invention;
[0022] Figure 2 It is the UAV orthophoto map of the study area in the embodiment of the present invention;
[0023] Figure 3a It is the schematic diagram of the segmentation result of the local green vegetation and the green water area in the embodiment of the present invention, Figure 3b It is the schematic diagram of the segmentation result of the local green vegetation and the green basketball court area in the embodiment of the present invention, Figure 3cSchematic diagram of the segmentation result of the local green vegetation and the green artificial turf area in the embodiment of the present invention;
[0024] Figure 4 Result diagram of the green vegetation extracted by using AVDVI in the embodiment of the present invention;
[0025] Figure 5 Schematic flow diagram of the green vegetation adaptive extraction method in the embodiment of the present invention;
[0026] Figure 6 Schematic structural diagram of the green vegetation adaptive extraction device in the embodiment of the present invention. Detailed implementation manners
[0027] To make the objectives, technical solutions and advantages of the embodiments of the present invention clearer and more understandable, the embodiments of the present invention will be further described in detail below with reference to the accompanying drawings. Herein, the illustrative embodiments of the present invention and their descriptions are used to explain the present invention, but not to limit the present invention.
[0028] The embodiment of the present invention provides a green vegetation adaptive extraction solution, which is a green vegetation adaptive extraction solution for UAV RGB images. The solution includes: obtaining UAV RGB images; generating UAV digital orthophoto maps (DOM); performing object-oriented optimal scale segmentation on the DOM to obtain various ground object objects; selecting green vegetation and green non-vegetation (i.e., green water bodies, green artificial turf, green basketball courts) in the DOM, and statistically calculating and respectively calculating the mean values of the pixel averages of each green non-vegetation in the red band R, green band G, and blue band B, namely R no-vegetation-mean 、G no-vegetation-mean 、B no-vegetation-mean ; statistically calculating and respectively calculating the mean values of the pixel averages of each green vegetation in the red band R, green band G, and blue band B, namely R vegetation-mean 、G vegetation-mean 、B vegetation-mean ; using R vegetation-mean 、G vegetation-mean 、B vegetation-mean to construct an adaptive green vegetation index; obtaining the optimal parameters of the adaptive green vegetation index; and extracting green vegetation according to the optimal parameters. The green vegetation adaptive extraction solution provided by the embodiment of the present invention can solve the situation of misjudging non-green vegetation as green vegetation and can accurately extract green vegetation. The green vegetation adaptive extraction solution will be introduced in detail below.
[0029] Figure 5 Schematic flow diagram of the green vegetation adaptive extraction method in the embodiment of the present invention, as Figure 5 shown, the method includes the following steps:
[0030] Step 101: Obtain the UAV RGB images within the study area; generate a digital orthophoto map (DOM) based on the UAV RGB images; perform object-oriented optimal scale segmentation on the DOM to obtain the DOM containing various types of ground object segmentation objects.
[0031] Step 102: Select green vegetation ground object and green non-vegetation ground objects in the DOM containing various types of ground object segmentation objects, determine the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B, and determine the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B.
[0032] Step 103: Construct an adaptive green vegetation index based on the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B.
[0033] Step 104: Obtain the optimal parameters of the adaptive green vegetation index according to the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B.
[0034] Step 105: Extract the green vegetation in the study area by setting a threshold according to the optimal parameters.
[0035] The green vegetation adaptive extraction method provided by the embodiment of the present invention, when working: obtains the UAV RGB images within the study area; generates a digital orthophoto map (DOM) based on the UAV RGB images; performs object-oriented optimal scale segmentation on the DOM to obtain the DOM containing various types of ground object segmentation objects; selects green vegetation ground object and green non-vegetation ground objects in the DOM containing various types of ground object segmentation objects, determines the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B, and determines the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B; constructs an adaptive green vegetation index based on the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B; obtains the optimal parameters of the adaptive green vegetation index according to the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B; extracts the green vegetation in the study area by setting a threshold according to the optimal parameters.
[0036] Compared with the prior art solutions that are prone to misjudging non-vegetation green features as vegetation, the green vegetation adaptive extraction method provided by the embodiments of the present invention can, based on UAV RGB images, construct an adaptive green vegetation index, solve the optimal parameters of the AVDVI, and adaptively extract green vegetation according to the optimal parameters, thus avoiding mis-extracting other green features and achieving the purpose of accurately extracting green vegetation. The following provides a detailed introduction to the green vegetation adaptive extraction method provided by the embodiments of the present invention.
[0037] Step S1: Obtain UAV RGB images within the research scope and generate a digital orthophoto map DOM; perform multi-scale segmentation on the DOM using the object-oriented multi-scale segmentation method to obtain multi-scale segmentation objects, that is, the above-mentioned step 101:
[0038] Step S1.1: Obtain UAV RGB images according to the established flight path, and generate a DOM within the research area through a series of UAV image processing.
[0039] Step S1.2: Set the compactness factor, shape factor, and scale factor for multi-scale segmentation according to different feature characteristics of the ground objects in the DOM.
[0040] As can be seen from the above, in one embodiment, obtain UAV RGB images within the research area; generate a digital orthophoto map DOM according to the UAV RGB images; perform object-oriented optimal scale segmentation processing on the DOM to obtain a DOM containing segmentation objects of various ground objects, which may include:
[0041] Obtain UAV RGB images according to the established flight path, and generate a DOM within the research area through a series of UAV image processing;
[0042] Set the compactness factor, shape factor, and scale factor for optimal scale segmentation processing according to different feature characteristics of the ground objects in the DOM to obtain a DOM containing segmentation objects of various ground objects.
[0043] Step S2: Select and statistically calculate the mean of the pixel averages of green non-vegetation ground object and green vegetation ground object in the DOM respectively, that is, the above-mentioned step 102:
[0044] Step S2.1: Select green non-vegetation ground objects such as green water bodies, green artificial grass, and green basketball courts in the DOM, and statistically calculate the pixel averages of green water bodies, green artificial grass, and green basketball courts in the red band R, green band G, and blue band B respectively, which are denoted as: R green-glass ,R artificial-grass ,R basketball-court ,G green-glass ,G artificial-grass ,G basketball-court ,Bgreen-glass , B artificial-grass , B basketball-court ; Calculate the mean of their pixel averages under the red band R, green band G, and blue band B respectively, denoted as: R no-vegetation-mean , G no-vegetation-mean , B no-vegetation-mean , and the calculation expression is:
[0045]
[0046]
[0047]
[0048] Step S2.2: Select the green vegetation object in the DOM, and count the mean of the pixel averages of the green object under the red band R, green band G, and blue band B respectively, denoted as: R vegetation-mean , G vegetation-mean , B vegetation-mean .
[0049] Step S3: According to R vegetation-mean , G vegetation-mean , B vegetation-mean Combine to construct the adaptive green vegetation index AVDVI, that is, the above step 103:
[0050] Step S3.1: The calculation expression of the adaptive green vegetation index AVDVI is as follows:
[0051]
[0052] Among them, AVDVI is the adaptive green vegetation index, R vegetati on-mean is the mean of the pixel averages of each green vegetation object under the red band R, G vegetation-mean is the mean of the pixel averages of each green vegetation object under the green band G, B vegetation-mean is the mean of the pixel averages of each green vegetation object under the blue band B, and x1, x2, and x3 are the parameters to be solved.
[0053] Step S4: Solve the optimal parameters x 1-best , x 2-best , x 3-best , that is, the above step 104:
[0054] Step S4.1: Calculate R no-vegetation-mean , G no-vegetation-mean , B no-vegetation-mean according to the AVDVI expression, denoted as: Index A, and the calculation expression is as follows:
[0055]
[0056] Among them, R no-vegetation-mean is the mean of the mean pixel values of each green non-vegetation object in the red band R, G no-vegetation-mean is the mean of the mean pixel values of each green non-vegetation object in the green band G, B no-vegetation-mean is the mean of the mean pixel values of each green non-vegetation object in the blue band B, and x1, x2, and x3 are the parameters to be solved.
[0057] The above step S4.1 is to calculate the index A according to the expression of the adaptive vegetation index AVDVI with the mean of the mean pixel values of each green non-vegetation object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B.
[0058] Step S4.2: Generate a preset set of AVDVI parameter groups and assign initial values, including:
[0059] Let X = {(x 11 , x 21 , x 31 ), (x 12 , x 22 , x 32 ), …, (x 1j , x 2j , x 3j ), …, (x 1num , x 2num , x 3num )} be the preset set of three AVDVI parameter groups. In (x 1j , x 2j , x 3j ), x 1j represents the parameter x1 of the green band G in the AVDVI of the j-th parameter group, x 2j represents the parameter x2 of the blue band B in the AVDVI of the j-th parameter group, x 3j represents the parameter x3 of the red band R in the AVDVI of the j-th parameter group, num represents the number of the parameter group set. Let X j = (x 1j , x 2j , x 3j ) represent the j-th element in the set X. Let X min be the minimum value of the three parameters x 1j , x 2j , x 3j , and X max be the maximum value of the three parameters x 1j , x 2j , x 3j . For each parameter group (x1j , x 2j , x 3j ) within the range of [X min , X max , randomly generate an initial value according to the following formula, x 1j = X min + (X max - X min ) · rand(0, 1) (6)
[0060] x 2j = X min + (X max - X min ) · rand(0, 1) (7)
[0061] x 3j = X min + (X max - X min ) · rand(0, 1) (8)
[0062] The above step S4.2 is to generate a preset set of AVDVI parameter groups according to the exponent A and give an initial value.
[0063] Step S4.3: According to the above-mentioned preset set of AVDVI parameter groups, calculate the difference set between A and AVDVI of the parameter group set, and establish a mapping relationship between the parameter set and the difference set, including:
[0064] The difference between A and AVDVI can be calculated by the following formula (9),
[0065] e = A - AVDVI (9) According to the above parameter group set X = {(x 11 , x 21 , x 31 ), (x 12 , x 22 , x 32 ), …, (x 1j , x 2j , x 3j ), …, (x 1num , x 2num , x 3num )}, calculate the difference between A and AVDVI of each parameter group set, and record the difference set as E = {e1, e2, …, e j , … e num}, e j represents the difference calculated according to formula (9) for the jth parameter group (x 1j , x 2j , x 3j ), and establish a mapping relationship between the two, denoted as It means that when the parameters x1, x2, and x3 in AVDVI are x 1j , x 2j , x 3j respectively, the difference between the corresponding A-AVDVI is e j . Through the mapping relationship, e 1j can be obtained from (x 2j , x 3j ), and the corresponding parameters x j can be found through e j , x 1j , x 2j , x 3j .
[0066] The above step S4.3 is to calculate the difference set between A and AVDVI of the preset AVDVI parameter group set and establish the mapping relationship between the parameter group set and the difference set.
[0067] Step S4.4: Perform an iterative operation to update the ADVDVI parameter group set, including:
[0068] Denote e max as the value with the largest difference in the set E = {e1, e2,..., e j ,..., e num}, and find the parameter group (x max , x 1max , x 2max , x 3max ) corresponding to e max . Continuously update the parameter group set, the difference set, and e 1-best through iteration to generate the optimal parameters x 2-best , x 3-best .
[0069] The above step S4.4 is to perform an iterative operation starting from the given initial value according to the difference set and the mapping relationship to update the ADVDVI parameter group set until the optimal parameters of ADVDVI are generated.
[0070] The specific process of the iterative operation in the above step S4.4 is as follows:
[0071] (1) Set the optimal parameter iteration number of AVDVI as tryNum, and set the iteration number variable k = 1.
[0072] (2) Set j = 1.
[0073] (3) Take out the j-th element from X, that is, (x 1j , x 2j , x 3j ), and denote it as Xj , update X j value, and the specific operations are as follows:
[0074] (3.1) Set the radius r, step size step, and density v;
[0075] (3.2) Set the number of repetitions nn, and within the radius range of X j , randomly generate X according to the following formula p :
[0076] X p = X j + r·rand(0,1) (10)
[0077] Calculate the corresponding difference e of X p , if e p > e p j , then X p is calculated according to the following formula to obtain X jp , and calculate the corresponding difference e of X according to formula (9) jp . jp
[0078]
[0079] If e p < e j , repeat the above steps nn times. If after repeating nn times, X jp still cannot be obtained, then X p is obtained according to the following formula to obtain X jp .
[0080] X jp = X j + r·rand(0,1) (12)
[0081] (3.3) Search for the number of adjacent elements nc, the central position X j within the radius range of X, and the corresponding e of X c and X c , if e c / nc > v*e c j , then X j is calculated according to the following formula to obtain X js , and calculate the corresponding difference e of X according to formula (9) js . js
[0082]
[0083] Otherwise, execute step 3.2 to calculate X js and ejs .
[0084] (3.4) Search for the number of adjacent elements nf within the radius of X j , and the element X corresponding to the maximum e i . If e i / nf > v * e i , then calculate X according to the following formula j , and calculate the corresponding difference e of X according to formula (9) jf . jf . jf .
[0085]
[0086] Otherwise, execute step 3.2 to calculate X jf and e jf .
[0087] (3.5) Compare the e jp , e js , e jf calculated in steps 3.2, 3.3, and 3.4. If e jp > e js > e jf , then let X j = X jp ; if e js > e jp > e jf , then let X j = X js ; if e jf > e jp > e js , then let X j = X jf .
[0088] (4) Set j = j + 1.
[0089] (5) Determine whether j is less than num. If j ≤ num, repeat steps (3)-(5) until j > num.
[0090] (6) Calculate e max = max{E}, and obtain the element (x max , x 1max , x 2max , x 3max ) corresponding to e
[0091] (7) Set k = k + 1.
[0092] (8) Determine whether k is less than trynum. If k ≤ trynum, repeat steps (3)-(8) until k > trynum.
[0093] The entire process ends. Finally, the calculated e max The corresponding elements (x 1max , x 2max , x 3max ) are the optimal parameters corresponding to those in AVDVI. The optimal parameter x 1-best = x 1max , x 2-best = x 2max , x 3-best = x 3max .
[0094] As can be seen from the above, in one embodiment, according to the mean of the pixel averages of each green non-vegetation object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B, to obtain the optimal parameters of the adaptive green vegetation index, it may include:
[0095] Calculate the index A by calculating the mean of the pixel averages of each green non-vegetation object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B according to the expression of the adaptive green vegetation index AVDVI:
[0096] Generate a preset set of AVDVI parameter groups based on the index A and give an initial value;
[0097] According to the preset set of AVDVI parameter groups, calculate the difference set between the A of the parameter group set and AVDVI, and establish a mapping relationship between the parameter group set and the difference set;
[0098] According to the difference set and the mapping relationship, start iterative operations with the given initial value to update the set of AVDVI parameter groups until the optimal parameters of AVDVI are generated.
[0099] Step S5, calculate the AVDVI of the study area according to the values of the optimal parameters x 1-best , x 2-best , x 3-best . According to R vegetation-mean , G vegetation-mean , B vegetation-mean Set a threshold to extract the green vegetation in the study area, that is, the above step 105.
[0100] To facilitate understanding of how the present invention is implemented, the following will further describe in detail the specific implementation method of the present invention in conjunction with Figures 1 to 4 make a further detailed description.
[0101] The green vegetation adaptive extraction method for UAV RGB images provided by the present invention includes the following steps:
[0102] Step S1: Obtain the UAV RGB images within the research scope and generate a digital orthophoto map (DOM); perform multi-scale segmentation on the DOM using the object-oriented multi-scale segmentation method to obtain multi-scale segmentation objects, that is, the above-mentioned step 101:
[0103] Step S1.1: Obtain the UAV RGB images according to the established flight path, and generate the DOM within the research area through a series of UAV image processing. The specific steps are as follows:
[0104] Step S1.1.1: First, process the acquired UAV visible light RGB images, including aerial triangulation, multi-view image dense matching, irregular triangular network construction, etc., to generate a digital elevation model (DEM) within the research area.
[0105] Step S1.1.2: According to the above DEM, perform digital differential correction on a single UAV image to generate the DOM.
[0106] Step S1.1.3: Perform color and light uniformity processing on the above DOM, and perform mosaicking and cropping according to the research scope to finally obtain a complete DOM of the research area. Figure 2 It is a schematic diagram of the DOM of the research area provided by the present invention.
[0107] Step S1.2: According to the different ground object features in the DOM, set the compactness factor, shape factor, and scale factor for multi-scale segmentation. The specific steps are as follows:
[0108] Step S1.2.1: Perform multi-scale segmentation on the above DOM, set the R, G, and B three layers as the segmentation layers, and their spectral weights are 1:1:1.
[0109] Step S1.2.2: Screen the parameters of the shape factor and compactness factor respectively, including two parts:
[0110] (1) Set the shape factor to 0.1 and the scale factor to 100, and perform tests with compactness factors of 0.3, 0.5, and 0.7 respectively. Combine the segmentation effects of different ground objects in the DOM to determine the final compactness factor.
[0111] (2) Set the obtained compactness factor above and the scale factor to 100, and perform shape factors of 0.1, 0.3, 0.5, and 0.7 respectively. Combine the segmentation effects of different ground objects in the DOM to determine the final shape factor.
[0112] Step S1.2.3: Use the ESP algorithm to adjust the starting scale and the number of cycles to obtain the receiver operating characteristic - local variance rate (ROC-LV) curve:
[0113]
[0114] wherein, LV (L) is the mean value of the local variance LV of the object obtained in the target layer L, and LV (L-1) is the mean value of the local variance LV of the object obtained in the next layer L-1 of the target layer L.
[0115] Among them, when the change rate of LV is the largest, that is, at the peak, this point corresponds to the potential optimal segmentation scale. For different ground objects in the DOM, the obtained potential optimal scale parameters are respectively tested to determine the final scale factor.
[0116] Step 1.2.4: Using the shape factor, compactness factor, and scale factor parameters obtained above, perform multi-scale segmentation on the DOM of the study area, Figures 3a - 3c is the result map obtained from the multi-scale segmentation, where: Figure 3a is the segmentation result of the local green vegetation and green water body areas, Figure 3b is the segmentation result of the local green vegetation and green basketball court areas, Figure 3c is the schematic diagram of the segmentation result of the local green vegetation and green artificial grass areas.
[0117] Step S2: In the DOM, respectively select and statistically calculate the mean value of the pixel averages of the green non-vegetation ground object and the green vegetation ground object, that is, the above-mentioned step 102:
[0118] S2.1: Select green non-vegetation ground objects such as green water bodies, green artificial grass, and green basketball courts in the DOM, and respectively statistically obtain the pixel averages of the green water bodies, green artificial grass, and green basketball courts in the red band R, green band G, and blue band B as: R green-glass = 103.69, R artificial-grass = 95.57, R basketball-court = 104.48, G green-glass = 112.68, G artificial-grass = 102.93, G basketball-court = 146.03, B green-glass = 91.66, B artificial-grass = 75.19, B basketball-court = 110.68; Secondly, calculate the mean value of their pixel averages in the red band R, green band G, and blue band B respectively, denoted as: R no-vegetation-mean 、G no-vegetation-mean 、B no-vegetation-mean , and the calculation expression is:
[0119]
[0120]
[0121]
[0122] The average values of the pixel averages in the R, G, and B bands are: R no-vegetation-mean = 101.25, G no-vegetation-mean = 120.55, B no-vegetation-mean = 92.51.
[0123] S2.2. Select the green vegetation object in the DOM, and count the average values of the pixel averages of the green object in the red band R, green band G, and blue band B respectively, to obtain: R vegetation-mean = 55.90, G vegetation-mean = 70.22, B vegetation-mean = 38.17.
[0124] Step S3. According to R vegetation-mean 、G vegetation-mean 、B vegetation-mean Combine to construct the adaptive green vegetation index AVDVI, that is, the above step 103:
[0125] Step S3.1. Substitute the pixel averages of the R, G, and B bands of the above green vegetation object into the AVDVI calculation expression:
[0126]
[0127] where x1, x2, and x3 are the parameters to be solved.
[0128] Step S4. Solve the optimal parameters x 1-best 、x 2-best 、x 3-best of AVDVI, that is, the above step 104:
[0129] Step S4.1. Substitute R no-vegetation-mean = 101.25, G no-vegetation-mean = 120.55, B no-vegetation-mean = 92.51 into the AVDVI expression for calculation, denoted as: A, and the calculation expression is as follows:
[0130]
[0131] Step S4.2. Generate a set of preset AVDVI parameter groups and give the initial values including:
[0132] Set the number of parameter groups num = 10, and set the minimum value X min = 1, and the maximum value X max= 10. The set of parameter groups X randomly generates initial values within the range of [1, 10] according to the following formula to obtain the initial X = {(7.35, 4.94, 3.48), (1.28, 4.43, 7.11), (3.49, 7.88, 6.89), (1.41, 8.15, 2.46), (1.87, 2.68, 2.07), (8.41, 5.40, 5.48), (7.25, 5.01, 9.63), (3.85, 6.81, 4.06), (9.55, 7.38, 6.26), (1.31, 7.79, 3.01)}, a total of ten parameter groups.
[0133] x 1j = X min +(X max -X min )·rand(0, 1)(21)
[0134] x 2j = X min +(X max -X min )·rand(0, 1)(22)
[0135] x 3j = X min +(X max -X min )·rand(0, 1)(23)
[0136] Step S4.3. According to the preset AVDVI parameter group set described above, calculate the difference set between A and AVDVI of the parameter group set, and establish the mapping relationship between the parameter set and the difference set, including:
[0137] The difference between A and AVDVI can be calculated by the following formula (24),
[0138]
[0139] According to the above parameter group set \(X =\{(7.35, 4.94, 3.48), (1.28, 4.43, 7.11), (3.49, 7.88, 6.89), (1.41, 8.15, 2.46), (1.87, 2.68, 2.07), (8.41, 5.40, 5.48), (7.25, 5.01, 9.63), (3.85, 6.81, 4.06), (9.55, 7.38, 6.26), (1.31, 7.79, 3.01)\}\), calculate the difference between \(A\) and \(AVDVI\) for each parameter group set in \(X\) to obtain \(E=\{0.049, 0.161, 0.030, 0.068, 0.090, 0.019, 0.052, 0.113, 0.097, 0.143\}\), and establish the mapping relationship between set \(X\) and set \(E\). Denote For example, for \((7.35, 4.94, 3.48)\), we can get \(0.049\), and through \(0.049\), we can find the corresponding parameter \((7.35, 4.94, 3.48)\).
[0140] Step S4.4: Perform iterative operations to update the \(ADVDVI\) parameter group set, including:
[0141] e max \(=\max\{E\{0.049, 0.161, 0.030, 0.068, 0.090, 0.019, 0.052, 0.113, 0.097, 0.143\}\}=0.16\). \(e\) max \( = 0.161\) corresponds to the parameter group \((1.28, 4.43, 7.11)\). Continuously update the parameter group set, the difference set, and \(e\) through iteration max , and generate the optimal parameter \(x\) 1-best , \(x\) 2-best , \(x\) 3-best .
[0142] The specific process of the iterative operation is as follows:
[0143] (1) Set the optimal parameter iteration number of \(AVDVI\) to \(tryNum = 100\), and set the iteration number variable \(k = 1\).
[0144] (2) Set \(j = 1\).
[0145] (3) Take out the \(j\)-th element from \(X\), that is, \((x\) 1j , \(x\) 2j , \(x\) 3j ), and denote it as \(X\) j . For example, when \(j = 1\), \(X\) j is \((7.35, 4.94, 3.48)\). Update the value of \(X\) j , and the specific operation is as follows:
[0146] (3.1) Set the radius r = 5, the step size step = 2, and the density v = 0.5;
[0147] (3.2) Set the number of repetitions nn = 10. Within the radius range of X j , randomly generate a value X according to the following formula p ,
[0148] X p = X j + r·rand(0,1) (25)
[0149] Calculate the corresponding difference e of X p , if e p > e p , then X j is calculated according to the following formula to obtain X p , and calculate the corresponding difference e of X jp according to formula (24). jp jp .
[0150]
[0151] If e p < e j , repeat the above steps nn times. If after repeating nn times, X jp still cannot be obtained, then X p is obtained according to the following formula jp , for example, when j = 1, the calculated X jp is (7.76, 3.29, 5.55), and its e jp is 0.0729.
[0152] X jp = X j + r·rand(0,1) (26)
[0153] (3.3) Search for the number of adjacent elements nc, the central position X j and the corresponding e of X c as well as X c within the radius range of X c . If e c / nc > v * e j , then X j is calculated according to the following formula to obtain X js , and calculate the corresponding difference e of X js according to formula (24). js . For example, when j = 1, X j is (7.35, 4.94, 3.48), and e jis 0.049, and there are 3 elements within its radius, namely (8.41, 5.40, 5.48), (3.85, 6.81, 4.06), and (9.55, 7.38, 6.26), so nc = 3, and the central position X c is (7.27, 8.95, 5.26), and its corresponding e c is 0.1027. 0.1027 / 3 > 0.5 * 0.049, X j =(7.35, 4.94, 3.48) is calculated according to the following formula to get X js is (7.5323, 1, 1), and its e js is 0.0497.
[0154]
[0155] Otherwise, execute step 3.2 to calculate X js and e js .
[0156] (3.4) Search for the number of adjacent elements nf within the radius of X j , and the element X i corresponding to the maximum of e i . If e i / n f > v * e j , then calculate X jf according to the following formula, and calculate the difference e jf corresponding to X jf . When j = 1, X j is (7.35, 4.94, 3.48), and its e j is 0.049. There are 3 elements within its radius, namely (8.41, 5.40, 5.48), (3.85, 6.81, 4.06), and (9.55, 7.38, 6.26), so nf = 3. The maximum element X i is (3.85, 6.81, 4.06), and its corresponding e c is 0.0973. 0.0973 / 3 > 0.5 * 0.049, X j =(7.35, 4.94, 3.48) is calculated according to the following formula to get X jf is (10, 1, 2.03), and its e jf is 0.0413.
[0157]
[0158] Otherwise, execute step 3.2 to calculate X jf and e jf .
[0159] (3.5) Compare the e calculated in steps 3.2, 3.3, and 3.4 jp 、e js 、e jf , if e jp >e js >e jf , then let X j =X jp ; if e js >e jp >e jf , then let X j =X js ; if e jf >e jp >e js , then let X j =X jf If j = 1, the e calculated according to steps 3.2, 3.3, and 3.4 is jp =0.0729, e js =0.0497, e jf =0.0413, the largest value is e jp =0.0729, the corresponding X jp is (7.76, 3.29, 5.55), then update X j The value of X j is (7.76, 3.29, 5.55), the updated e j It is 0.0729.
[0160] (4) Set j=j+1.
[0161] (5) Determine whether j is less than num. If j ≤ num, repeat steps (3) to (5) until j > num.
[0162] (6) Calculate e max = max{E}, and get e max The corresponding element (x 1max ,x 2max ,x 3max ), when k = 1, we get e max The corresponding elements are (7.76,3.29,5.55).
[0163] (7) Set k=k+1.
[0164] (8) Determine whether k is less than trynum. If k ≤ trynum, repeat steps (3) to (8) until k > trynum.
[0165] The whole process ends. The final calculated e maxThe corresponding element (7.4569, 1, 10) is the optimal parameter corresponding to AVDVI, and its optimal parameter x 1-best = 7.4569, x 2-best = 1, x 3-best = 10.
[0166] Step S5. According to the optimal parameter x 1-best = 7.4569, x 2-best = 1, x 3-best = 10 and R vegetation-mean = 55.90, G vegetation-mean = 70.22, B vegetation-mean = 38.17, calculate the AVDVI value of the object to be 0.089. After calculating the AVDVI values of all objects, set a threshold to extract the green vegetation in the study area. Figure 4 This is the result of the green vegetation extracted by using AVDVI, that is, the above step 105.
[0167] In summary, the method for adaptively extracting green vegetation for UAV RGB images provided by the embodiments of the present invention constructs an adaptive green vegetation index AVDVI based on the UAV RGB images, and then solves the optimal parameters x 1-best 、x 2-best 、x 3-best of the AVDVI. For different scenarios, it can adaptively extract green vegetation, avoid mis-extracting other green ground objects, and achieve the purpose of accurately extracting green vegetation. For example: when the UAV RGB images contain green water bodies, green artificial grass, green basketball courts and other green vegetation ground objects, the method for adaptively extracting green vegetation for UAV RGB images can solve the optimal parameters according to the average values of the R, G, and B pixels of various types of green non-vegetation ground objects and green vegetation, so as to obtain a suitable AVDVI under different circumstances, and then accurately extract green vegetation based on the suitable AVDVI.
[0168] In the embodiments of the present invention, an apparatus for adaptively extracting green vegetation is also provided, as described in the following embodiments. Since the principle of the apparatus for solving problems is similar to that of the method for adaptively extracting green vegetation, the implementation of the apparatus can refer to the implementation of the method for adaptively extracting green vegetation, and the repeated parts will not be described again.
[0169] Figure 6 This is a schematic structural diagram of the apparatus for adaptively extracting green vegetation in the embodiments of the present invention, as Figure 6 shown. The apparatus includes:
[0170] Obtain a segmentation unit 01 for obtaining UAV RGB images within the research area; generate a digital orthophoto map (DOM) based on the UAV RGB images; perform object-oriented optimal scale segmentation on the DOM to obtain a DOM containing various types of ground object segmentation objects.
[0171] A mean determination unit 02 is used to select green vegetation ground object and green non-vegetation ground objects in the DOM containing various types of ground object segmentation objects, determine the mean of the pixel average values of each green non-vegetation ground object in the red band R, the mean of the pixel average values in the green band G, and the mean of the pixel average values in the blue band B, and determine the mean of the pixel average values of each green vegetation ground object in the red band R, the mean of the pixel average values in the green band G, and the mean of the pixel average values in the blue band B.
[0172] A construction unit 03 is used to construct an adaptive green vegetation index based on the mean of the pixel average values of each green vegetation ground object in the red band R, the mean of the pixel average values in the green band G, and the mean of the pixel average values in the blue band B.
[0173] An optimal parameter determination unit 04 is used to obtain the optimal parameters of the adaptive green vegetation index according to the mean of the pixel average values of each green non-vegetation ground object in the red band R, the mean of the pixel average values in the green band G, and the mean of the pixel average values in the blue band B.
[0174] An extraction unit 05 is used to extract the green vegetation in the research area by setting a threshold according to the optimal parameters.
[0175] In one embodiment, the obtaining and segmentation unit specifically is used for:
[0176] Obtain UAV RGB images according to a pre-determined flight path, and generate a DOM within the research area through a series of UAV image processing.
[0177] According to different ground object features in the DOM, set compactness factors, shape factors, and scale factors for optimal scale segmentation processing to obtain a DOM containing various types of ground object segmentation objects.
[0178] In one embodiment, the expression for the construction unit to construct the adaptive green vegetation index is as follows:
[0179]
[0180] Where AVDVI is the adaptive green vegetation index, R vegetation-mean is the mean of the pixel average values of each green vegetation ground object in the red band R, G vegetation-mean is the mean of the pixel average values of each green vegetation ground object in the green band G, B vegetation-meanis the mean of the pixel averages of each green vegetation object under the blue band B, and x1, x2, and x3 are the parameters to be solved.
[0181] In one embodiment, the optimal parameter determination unit is specifically configured to:
[0182] Calculate the index A according to the expression of the Adaptive Vegetation Index AVDVI using the mean of the pixel averages of each green non-vegetation object under the red band R, the mean of the pixel averages under the green band G, and the mean of the pixel averages under the blue band B:
[0183] Generate a preset set of AVDVI parameter groups based on the index A and give an initial value;
[0184] According to the preset set of AVDVI parameter groups, calculate the difference set between the A of the parameter group set and AVDVI, and establish a mapping relationship between the parameter group set and the difference set;
[0185] According to the difference set and the mapping relationship, start iterative operations with the given initial value to update the set of AVDVI parameter groups until the optimal parameters of AVDVI are generated.
[0186] In one embodiment, the calculation expression of the index A is as follows:
[0187]
[0188] Where, R no-vegetation-mean is the mean of the pixel averages of each green non-vegetation object under the red band R, G no-vegetation-mean is the mean of the pixel averages of each green non-vegetation object under the green band G, B no-vegetation-mean is the mean of the pixel averages of each green non-vegetation object under the blue band B, and x1, x2, x3 are the parameters to be solved;
[0189] Generating a preset set of AVDVI parameter groups based on the index A and giving an initial value includes:
[0190] Let X = {(x 11 , x 21 , x 31 ), (x 12 , x 22 , x 32 ), …, (x 1j , x 2j , x 3j ), …, (x 1num , x 2num , x 3num )} be the preset set of three AVDVI parameter groups, (x 1j , x2j , x 3j ) where x 1j represents the parameter x1 of the green band G in the AVDVI of the jth parameter group, x 2j represents the parameter x2 of the blue band B in the AVDVI of the jth parameter group, x 3j represents the parameter x3 of the red band R in the AVDVI of the jth parameter group, num represents the number of parameter group sets, and denote X j =(x 1j , x 2j , x 3j ), representing the jth element in the set X, and denote X min as x 1j , x 2j , x 3j the minimum value of the three parameters, X max as x 1j , x 2j , x 3j the maximum value of the three parameters, and each parameter group (x 1j , x 2j , x 3j ) is within the range of [X min , X max , and the initial values are randomly generated according to the following formula:
[0191] x 1j = X min +(X max - X min )·rand(0, 1);
[0192] x 2j = X min +(X max - X min )·rand(0, 1);
[0193] x 3j = X min +(X max - X min )·rand(0, 1);
[0194] According to the preset set of AVDVI parameter groups, calculate the difference set between the set of parameter groups A and AVDVI, and establish the mapping relationship between the set of parameter groups and the difference set, including:
[0195] Calculate the difference between A and AVDVI through the following formula:
[0196] e = A - AVDVI;
[0197] According to the set of parameter groups X = {(x 11 , x 21,x 31 ),(x 12 ,x 22 ,x 32 ),…,(x 1j ,x 2j ,x 3j ),…,(x 1num ,x 2num ,x 3num )}, calculate the difference between A and AVDVI for each set of parameter groups, and denote the set of differences as E = {e1, e2, …, e j ,…e num}, where e j represents the difference calculated according to the formula for calculating the difference between A and AVDVI for the j-th set of parameters (x 1j ,x 2j ,x 3j ). Establish the mapping relationship between the two, and denote as the difference of A - AVDVI corresponding to when the parameters x1, x2, x3 in AVDVI are x 1j ,x 2j ,x 3j respectively, which is e j . Through the mapping relationship, obtain e 1j ,x 2j ,x 3j ) to get e j , and find the corresponding parameters x j through e 1j ,x 2j ,x 3j .
[0198] In one embodiment, according to the set of differences and the mapping relationship, start iterative operations with the given initial value to update the set of AVDVI parameter groups until the optimal parameters of AVDVI are generated, including: Denote e max as the maximum value among the differences in the set of differences E = {e1, e2, …, e j ,…e num}, and find the set of parameters (x max corresponding to e 1max ,x 2max ,x 3max ). Continuously update the set of parameter groups, the set of differences, and e max through iteration to generate the optimal parameters x 1-best 、x 2-best 、x 3-best .
[0199] An embodiment of the present invention further provides a computer device, including a memory, a processor, and a computer program stored on the memory and executable on the processor. When the processor executes the computer program, the above-mentioned adaptive extraction method for green vegetation is implemented.
[0200] An embodiment of the present invention further provides a computer-readable storage medium storing a computer program, and when the computer program is executed by a processor, the above-mentioned adaptive extraction method for green vegetation is implemented.
[0201] An embodiment of the present invention further provides a computer program product including a computer program, and when the computer program is executed by a processor, the above-mentioned adaptive extraction method for green vegetation is implemented.
[0202] In an embodiment of the present invention, compared with the prior art technical solution that is prone to misjudging non-vegetation green ground objects as vegetation, the adaptive extraction solution for green vegetation includes: obtaining the UAV RGB image in the research area; generating a digital orthophoto map (DOM) according to the UAV RGB image; performing object-oriented optimal scale segmentation processing on the DOM to obtain a DOM including various ground object segmentation objects; selecting green vegetation ground object and green non-vegetation ground objects in the DOM including various ground object segmentation objects, determining the mean of the pixel averages of each green non-vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B, and determining the mean of the pixel averages of each green vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B; constructing an adaptive green vegetation index according to the mean of the pixel averages of each green vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B; obtaining the optimal parameters of the adaptive green vegetation index according to the mean of the pixel averages of each green non-vegetation ground object in the red band R, the mean of the pixel averages in the green band G, and the mean of the pixel averages in the blue band B; and extracting the green vegetation in the research area according to the set threshold based on the optimal parameters. It can be realized that after constructing the adaptive green vegetation index according to the UAV RGB image, the optimal parameters of the AVDVI are solved, and according to the optimal parameters, the green vegetation can be adaptively extracted, other green ground objects can be avoided from being misextracted, and the purpose of accurately extracting the green vegetation can be achieved.
[0203] Those skilled in the art should understand that the embodiments of the present invention can be provided as a method, a system, or a computer program product. Therefore, the present invention can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present invention can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0204] The present invention is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the embodiments of the present invention. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0205] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0206] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are performed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0207] The specific embodiments described above further elaborate on the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above are only specific embodiments of the present invention and are not used to limit the protection scope of the present invention. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention should be included in the protection scope of the present invention.
Claims
1. An adaptive extraction method for green vegetation, characterized in that, Including: Obtain the UAV RGB images within the study area; generate a digital orthophoto image DOM based on the UAV RGB images. Perform object-oriented optimal scale segmentation on the DOM to obtain a DOM containing various types of ground object segmentation objects. Select green vegetation ground object and green non-vegetation ground object in the DOM containing various types of ground object segmentation objects, determine the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B, and determine the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B. Construct an adaptive green vegetation index according to the mean of the mean pixel values of each green vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B. The expression is as follows: Among them, AVDVI is the Adaptive Vegetation Index, and R vegetation-mean is the mean of the average pixel values of each green vegetation object in the red band R, and G vegetation-mean is the mean of the average pixel values of each green vegetation object in the green band G, and B vegetation-mean is the mean of the average pixel values of each green vegetation object in the blue band B. x1, x2, and x3 are the parameters to be solved; Obtain the optimal parameters of the adaptive green vegetation index according to the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B. Extract the green vegetation in the study area by setting a threshold according to the optimal parameters.
2. The method according to claim 1, wherein Obtain the UAV RGB images within the study area; generate a digital orthophoto image DOM based on the UAV RGB images; perform object-oriented optimal scale segmentation on the DOM to obtain a DOM containing various types of ground object segmentation objects, including: Obtain the UAV RGB images according to the established flight path, and generate a DOM within the study area through a series of UAV image processing. Set the compactness factor, shape factor, and scale factor according to different ground object characteristics in the DOM for optimal scale segmentation processing to obtain a DOM containing various types of ground object segmentation objects.
3. The method according to claim 1, wherein Obtain the optimal parameters of the adaptive green vegetation index according to the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B, including: Calculate index A by calculating the mean of the mean pixel values of each green non-vegetation ground object in the red band R, the mean of the mean pixel values in the green band G, and the mean of the mean pixel values in the blue band B according to the expression of the adaptive green vegetation index AVDVI. Generate a preset set of AVDVI parameter groups according to index A and give an initial value. Calculate the difference set between A of the parameter group set and AVDVI according to the preset set of AVDVI parameter groups, and establish a mapping relationship between the parameter group set and the difference set. Perform iterative operations starting from the given initial value according to the difference set and the mapping relationship to update the set of AVDVI parameter groups until the optimal parameters of AVDVI are generated.
4. The method according to claim 3, wherein The calculation expression of index A is as follows: Among them, R no-vegetation-mean is the mean of the average pixel values of each green non-vegetation object in the red band R, G no-vegetation-mean is the mean of the average pixel values of each green non-vegetation object in the green band G, B no-vegetation-mean is the mean of the average pixel values of each green non-vegetation object in the blue band B, and x1, x2, and x3 are the parameters to be solved; Generate a preset set of AVDVI parameter groups according to index A and give an initial value, including: Let \(X =\{(x 11 ,x 21 ,x 31 ),(x 12 ,x 22 ,x 32 ),\cdots,(x 1j ,x 2j ,x 3j ),\cdots,(x 1num ,x 2num ,x 3num )\}\) be the preset set of three parameter groups of AVDVI. In \((x 1j ,x 2j ,x 3j )\), \(x 1j \) represents the parameter \(x1\) of the green band \(G\) in the AVDVI of the \(j\)-th parameter group, \(x 2j \) represents the parameter \(x2\) of the blue band \(B\) in the AVDVI of the \(j\)-th parameter group, \(x 3j \) represents the parameter \(x3\) of the red band \(R\) in the AVDVI of the \(j\)-th parameter group. num represents the number of parameter group sets. Let \(X j =(x 1j ,x 2j ,x 3j )\), representing the \(j\)-th element in the set \(X\). Let \(X min \) be the minimum value of the three parameters \(x 1j ,x 2j ,x 3j \), and \(X max \) be the maximum value of the three parameters \(x 1j ,x 2j ,x 3j \). Each parameter group \((x 1j ,x 2j ,x 3j )\) is within the range of \([X min ,X max \), and the initial value is randomly generated according to the following formula: x 1j = X min + (X max - X min ) × rand(0,1); x 2j = X min + (X max - X min ) × rand(0,1); x 3j = X min + (X max - X min ) × rand(0,1); Calculate the difference set between A of the parameter group set and AVDVI according to the preset set of AVDVI parameter groups, and establish a mapping relationship between the parameter group set and the difference set, including: Calculate the difference between A and AVDVI by the following formula: e = A - AVDVI; According to the set of parameter groups \(X =\{(x 11 ,x 21 ,x 31 ),(x 12 ,x 22 ,x 32 ),…,(x 1j ,x 2j ,x 3j ),…,(x 1num ,x 2num ,x 3num )}\), calculate the difference between \(A\) and \(AVDVI\) for each set of parameter groups, and denote the difference set as \(E=\{e_1,e_2,\ldots,e j ,\ldots,e num \}\), where \(e j \) represents the difference calculated according to the formula for calculating the difference between \(A\) and \(AVDVI\) for the \(j\)-th parameter group \((x 1j ,x 2j ,x 3j )\). Establish the mapping relationship between the two. Denote as the difference \(A - AVDVI\) corresponding to when the parameters \(x_1,x_2,x_3\) in \(AVDVI\) are \(x 1j ,x 2j ,x 3j \) respectively, which is \(e j \). Through the mapping relationship, obtain \(e 1j \) from \((x 2j ,x 3j )\), and find the corresponding parameters \(x j ,x j ,x 1j ,x 2j ,x 3j \) through \(e j \).
5. The method according to claim 4, characterized in that, Based on the difference set and the mapping relationship, starting from the given initial value, perform iterative operations to update the ADVDVI parameter group set until the optimal parameters of ADVDVI are generated, including: Denote e max as the value with the largest difference in the difference set E = {e1, e2, …, e j , … e num}, and find the parameter group (x max , x 1max , x 2max , x 3max ) corresponding to e max . Continuously update the parameter group set, the difference set, and e max through iteration to generate the optimal parameters x 1-best , x 2-best , x 3-best .
6. An adaptive extraction device for green vegetation, characterized in that, Including: Obtain a segmentation unit for obtaining UAV RGB images within the study area; generate a digital orthophoto map DOM based on the UAV RGB images; Perform object-oriented optimal scale segmentation processing on the DOM to obtain a DOM containing various types of ground object segmentation objects; A mean value determination unit for selecting green vegetation ground object and green non-vegetation ground objects in the DOM containing various types of ground object segmentation objects, determining the mean value of the pixel average values of each green non-vegetation ground object under the red band R, the mean value of the pixel average values under the green band G, and the mean value of the pixel average values under the blue band B, and determining the mean value of the pixel average values of each green vegetation ground object under the red band R, the mean value of the pixel average values under the green band G, and the mean value of the pixel average values under the blue band B; A construction unit for constructing an adaptive green vegetation index according to the mean value of the pixel average values of each green vegetation ground object under the red band R, the mean value of the pixel average values under the green band G, and the mean value of the pixel average values under the blue band B, and its expression is as follows: Among them, AVDVI is the Adaptive Vegetation Index, and R vegetation-mean is the mean of the mean pixel values of each green vegetation object in the red band R, G vegetation-mean is the mean of the mean pixel values of each green vegetation object in the green band G, B vegetation-mean is the mean of the mean pixel values of each green vegetation object in the blue band B, and x1, x2, x3 are the parameters to be solved; An optimal parameter determination unit for obtaining the optimal parameters of the adaptive green vegetation index according to the mean value of the pixel average values of each green non-vegetation ground object under the red band R, the mean value of the pixel average values under the green band G, and the mean value of the pixel average values under the blue band B; An extraction unit for extracting the green vegetation in the study area by setting a threshold according to the optimal parameters; 7. A computer device, comprising a memory, a processor, and a computer program stored on the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements the method according to any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 5.
9. A computer program product, characterized in that, The computer program product includes a computer program, and when the computer program is executed by a processor, it implements the method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Water body information extraction method and device for unmanned aerial vehicle visible light image
CN110717413A
Forest fire forest damage degree extraction method based on light and small unmanned aerial vehicle
CN111274871A