A method for extracting green patch in non-agricultural habitat of agricultural landscape and related equipment

Obtaining visible light orthophotos of agricultural landscapes through UAVs and constructing and extracting index grayscale images, using optimal threshold segmentation information, solves the problem of low resolution of satellite remote sensing images, and realizes the detection of agricultural landscapes and non-agricultural habitats and green spaces in small geographical areas. Accurate and rapid extraction of plaques.

CN115082812BActive Publication Date: 2024-08-27BEIJING ACADEMY OF AGRICULTURE & FORESTRY SCIENCES
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210658361.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-06-10
Publication Date
2024-08-27
Estimated Expiration
2042-06-10

AI Technical Summary

Technical Problem

Existing satellite remote sensing images have low resolution and time lag defects, which are not suitable for accurate extraction of agricultural landscape non-agricultural habitat green space information in small geographical areas.

Method used

A drone equipped with a visible light digital camera is used to obtain the visible light orthophoto image of the agricultural landscape of the target area, and a grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index is constructed, and the image is segmented through the optimal threshold, and the non-agricultural habitat is extracted. Habitat green space patches.

Benefits of technology

It achieves accurate and rapid extraction of green space patches in agricultural landscapes and non-agricultural habitats, and improves the efficiency and accuracy of obtaining green space information in small geographical areas.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115082812B
    Figure CN115082812B
Patent Text Reader

Abstract

The present invention provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes and related equipment thereof. The method comprises the following steps: determining the shooting period of a visible light remote sensing image of an unmanned aerial vehicle (UAV) according to the phenological period of crops in the agricultural landscape and vegetation in non-agricultural habitats, and obtaining a visible light orthophoto of the agricultural landscape in a target area; constructing an index grayscale image of green space patches extracted from the agricultural landscape based on the visible light orthophoto of the agricultural landscape; performing information segmentation of farmland and non-agricultural green space on the index grayscale image of green space patches extracted from the agricultural landscape according to an optimal threshold, so as to extract green space patches in non-agricultural habitats of the agricultural landscape; and realizing accurate and rapid extraction of green space patches in non-agricultural habitats of the agricultural landscape by obtaining the visible light orthophoto of the agricultural landscape in the target area.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of landscape ecology, and in particular to a method for extracting green space patches in non-agricultural habitats of agricultural landscapes and related equipment. Background Art

[0002] Agricultural landscape is one of the most important landscape types on the earth's land surface. It is a mosaic of farmland and natural and semi-natural non-agricultural habitats. The green patches of non-agricultural habitats in agricultural landscapes include natural and semi-natural types such as woodland, hedgerows, field edges, and grasslands under the background of farmland matrix. They can provide more complementary resources and suitable habitats for different species, and play a vital role in agricultural production, biodiversity conservation, and the function and service of agricultural ecosystems. They are receiving more and more attention in the construction of ecological agricultural landscapes and the research on biodiversity conservation. The accurate acquisition of green patches of non-agricultural habitats in agricultural landscapes is the basic link in the construction and management of agricultural landscapes, and is also a key parameter in many research hotspots such as landscape ecology and biodiversity.

[0003] Since the green patches of non-agricultural habitats in agricultural landscapes are small in area and scattered in distribution, they are mainly obtained by traditional GPS field survey methods in research. This method is time-consuming and labor-intensive. In addition, due to the influence of complex terrain characteristics and habitat heterogeneity, it is difficult to conduct direct and long-term ground surveys of non-agricultural habitat patches in agricultural landscapes in small geographical areas. A simple and accurate acquisition method is urgently needed to realize the intuitive display and long-term monitoring of green patches of non-agricultural habitats in agricultural landscapes. With the rapid development of remote sensing technology, remote sensing images with multiple resolutions provide a more accurate information source for the acquisition of spatial information data. However, due to the low resolution of satellite remote sensing images and the existence of time lag defects, they are not suitable for the accurate extraction of non-agricultural habitat green space information in agricultural landscapes in small geographical areas. Summary of the invention

[0004] The present invention provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes and related equipment, which solves the problem that existing satellite remote sensing images have low resolution and time lag defects and are not suitable for accurate extraction of green space information in non-agricultural habitats of agricultural landscapes in small geographical areas. Visible light orthophotos of agricultural landscapes in target areas are obtained by using an unmanned aerial vehicle equipped with a visible light digital camera; based on the visible light orthophotos of the agricultural landscape, a grayscale image of an extraction index of green space patches in non-agricultural habitats of agricultural landscapes is constructed; and information of farmland and non-agricultural habitat green space is segmented on the grayscale image of the extraction index of green space patches in non-agricultural habitats of agricultural landscapes according to an optimal threshold value, so as to extract green space patches in non-agricultural habitats of agricultural landscapes, that is, the visible light orthophotos of agricultural landscapes in target areas are obtained, so as to realize accurate and rapid extraction of green space patches in non-agricultural habitats of agricultural landscapes.

[0005] In a first aspect, the present invention provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes, the method comprising:

[0006] Determine the shooting period of UAV visible light remote sensing images according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation, and obtain visible light orthophotos of agricultural landscapes in the target area;

[0007] Based on the visible light orthophoto of the agricultural landscape, construct a grayscale image of the green patch extraction index of the non-agricultural habitat of the agricultural landscape;

[0008] According to the optimal threshold, the information of farmland and non-agricultural habitat green space patch extraction index grayscale image of the agricultural landscape is segmented to extract the non-agricultural habitat green space patches of the agricultural landscape.

[0009] Furthermore, the method of determining the shooting period of the UAV visible light remote sensing image according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation to obtain the visible light orthophoto of the agricultural landscape in the target area specifically includes:

[0010] Determine the shooting period of the drone visible light remote sensing image according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation, and obtain multiple original images of agricultural landscape land in the target area through the drone remote sensing image during the shooting period;

[0011] Splicing the multiple original images of agricultural landscape land in the target area to generate an initial visible light orthophoto of the agricultural landscape in the target area;

[0012] The visible light orthophoto of the agricultural landscape in the initial target area is corrected to obtain a visible light orthophoto of the agricultural landscape in the target area.

[0013] Furthermore, the calculation formula of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is as follows:

[0014] NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 );

[0015] Wherein, G and B represent the pixel brightness values ​​of the green light band and the blue light band in the visible light orthophoto respectively;

[0016] According to the calculation formula of the extraction index NDSGBVI, a grayscale image of the green patch extraction index of non-agricultural habitats in agricultural landscapes is obtained.

[0017] Furthermore, the method further comprises:

[0018] A preset iterative algorithm is used to determine the optimal threshold for extracting green space patches in non-agricultural habitats of the agricultural landscape.

[0019] Furthermore, the preset iterative algorithm specifically includes:

[0020] Step 101), select the initial threshold T k , and based on the initial threshold T k Segmenting the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions;

[0021] Step 102), according to the similar non-agricultural habitat green space pixel area and the non-similar non-agricultural habitat green space pixel area, respectively calculate the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area;

[0022] Step 103), according to the mean gray value Z1 of the similar non-agricultural habitat green space pixel area and the mean gray value Z2 of the non-similar non-agricultural habitat green space pixel area, calculate the first threshold value T k+1 ;

[0023] Step 104), at the first threshold T k+1 ≠T k In the case of k+1 Segment the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions, and repeat steps 102) and 103);

[0024] Step 105), at the first threshold T k+1 =T k In the case of k+1 is the optimal threshold.

[0025] Further, the information of farmland and non-agricultural habitat green space is segmented on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract the agricultural landscape non-agricultural habitat green space patch, specifically including:

[0026] Performing mask classification on non-agricultural habitat green space pixels and farmland pixels in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index according to the optimal threshold value to obtain a mask classification result;

[0027] The mask classification result is put into remote sensing software for extraction processing to obtain the agricultural landscape non-agricultural habitat green space patches in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index.

[0028] Further, after segmenting the information of farmland and non-agricultural habitat green space on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract the agricultural landscape non-agricultural habitat green space patch, the method further includes:

[0029] Construct the Kappa coefficient of accuracy evaluation for green patch extraction in non-agricultural habitats of agricultural landscapes; the specific formula is as follows:

[0030]

[0031] Among them, P0 is the actual consistency rate, P e is the theoretical consistency rate;

[0032] Based on the accuracy evaluation coefficient Kappa, the extracted green patch of the non-agricultural habitat of the agricultural landscape is compared with the visible light orthophoto of the agricultural landscape to obtain the accuracy evaluation result of the extraction of the green patch of the non-agricultural habitat of the agricultural landscape.

[0033] In a second aspect, the present invention also provides a device for extracting green patches in non-agricultural habitats of agricultural landscapes, including an acquisition module, a construction module and an extraction module, wherein:

[0034] An acquisition module, used to acquire visible light orthophotos of agricultural landscapes in target areas;

[0035] A construction module, used to construct a grayscale image of green patch extraction index of non-agricultural habitats in the agricultural landscape based on the visible light orthophoto of the agricultural landscape;

[0036] The extraction module is used to segment the information of farmland and non-agricultural habitat green space on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract the agricultural landscape non-agricultural habitat green space patch.

[0037] In a third aspect, the present invention also provides an electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps of the method for extracting green space patches in non-agricultural habitats of agricultural landscapes as described in any one of the above-mentioned methods are implemented.

[0038] In a fourth aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of any of the above-described methods for extracting green space patches in non-agricultural habitats of agricultural landscapes.

[0039] In a fifth aspect, the present invention further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of any of the above-mentioned methods for extracting green space patches in non-agricultural habitats in agricultural landscapes.

[0040] The present invention provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes and related equipment, which obtain visible light orthophotos of agricultural landscapes in target areas; construct an index grayscale image of green space patches in non-agricultural habitats of agricultural landscapes based on the visible light orthophotos of agricultural landscapes; and perform information segmentation of farmland and non-agricultural green space on the index grayscale image of green space patches in non-agricultural habitats according to an optimal threshold value to extract green space patches in non-agricultural habitats of agricultural landscapes. By acquiring visible light orthophotos of agricultural landscapes in target areas, accurate and rapid extraction of green space patches in non-agricultural habitats of agricultural landscapes is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 It is a flow chart of a method for extracting green space patches in non-agricultural habitats of agricultural landscapes provided by an embodiment of the present invention;

[0043] Figure 2 It is a collection of visible light images of a drone during two test shooting periods provided by another embodiment of the present invention;

[0044] Figure 3 A visible light orthophoto map of agricultural landscape in a target area provided by another embodiment of the present invention;

[0045] Figure 4 It is a grayscale image schematic diagram of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI provided by another embodiment of the present invention;

[0046] Figure 5 is a schematic diagram of a green patch of non-agricultural habitat in an agricultural landscape provided by another embodiment of the present invention;

[0047] Figure 6 is a flow chart of a method for extracting green space patches in non-agricultural habitats of agricultural landscapes provided by another embodiment of the present invention;

[0048] Figure 7 It is a structural block diagram of a device for extracting green space patches in non-agricultural habitats of agricultural landscapes provided by an embodiment of the present invention;

[0049] Figure 8 It is a structural block diagram of an electronic device for extracting green space patches in non-agricultural habitats of agricultural landscapes provided by another embodiment of the present invention. DETAILED DESCRIPTION

[0050] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0051] Figure 1 This is a flow chart of a method for extracting green patches in non-agricultural habitats of agricultural landscapes provided in this embodiment. Figure 1 , the method comprising:

[0052] Step 101: Determine the shooting period of the UAV visible light remote sensing image according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation, and obtain the visible light orthophoto of the agricultural landscape in the target area.

[0053] Among them, the target area is a test area selected by technical personnel in this field according to needs for the extraction of green patches in non-agricultural habitats of agricultural landscapes. Agricultural landscape is one of the most important landscape types on the earth's land surface, and is a mosaic of alternating farmland and natural and semi-natural non-agricultural habitats.

[0054] It should be further explained that before obtaining the visible light orthophoto of the agricultural landscape of the target area, staff are required to investigate the phenological periods of farmland crops and non-agricultural habitat vegetation in the agricultural landscape to determine the shooting period of the drone. During the shooting period, multiple original images of agricultural landscape land in the target area are obtained through agricultural landscape drone remote sensing images, and the multiple original images of agricultural landscape land in the target area are stitched together to generate an initial visible light orthophoto of the agricultural landscape in the target area; the initial visible light orthophoto of the agricultural landscape in the target area is corrected to obtain the final visible light orthophoto of the agricultural landscape in the target area. Among them, drone remote sensing has low cost, simple operation, high ground resolution, and is not affected by atmospheric factors during the image acquisition process.

[0055] For example, a 200×200m sample plot area is set up in the agricultural landscape as an experimental area. The staff investigates the types and planting times of farmland crops in the experimental area, and investigates the greening period of vegetation in non-agricultural habitats in the experimental area. The period when farmland is bare (farmland crops are not planted or planted but not sprouted) and the vegetation in non-agricultural habitat patches has turned green and grown in patches is selected as the period for drone image shooting, and visible light drone remote sensing images are used to obtain visible light orthophotos of the agricultural landscape in the experimental area.

[0056] Step 102: Based on the visible light orthophoto of the agricultural landscape, a grayscale image of green patch extraction index of non-agricultural habitats of the agricultural landscape is constructed.

[0057] It can be understood that the grayscale image of the patch extraction index of non-agricultural habitat green space in agricultural landscape includes information of farmland and non-agricultural habitat green space.

[0058] It should be further explained that based on the visible light orthophoto of the agricultural landscape, which has three visible light bands of red, green and blue, the grayscale image of the green patch extraction index NDSGBVI of the non-agricultural habitat of the agricultural landscape is obtained by band calculation.

[0059] In this embodiment, the calculation formula for constructing the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is as follows:

[0060] NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 );

[0061] Among them, G and B represent the DN values ​​of the green light band and the blue light band, respectively, that is, the brightness value of the remote sensing image pixel. The green patch extraction index of non-agricultural habitats in agricultural landscapes NDSGBVI reflects the normalized difference between the square reflectance of the green light channel and the square reflectance of the blue light channel.

[0062] Step 103: segmenting the information of farmland and non-agricultural green space on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract the agricultural landscape non-agricultural habitat green space patches.

[0063] Among them, the optimal threshold is determined by using a preset iterative algorithm, which can minimize the pixels of the wrongly segmented image, making the green patches of non-agricultural habitats in the agricultural landscape extracted in the end more accurate.

[0064] The present embodiment provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes, which obtains a visible light orthophoto of an agricultural landscape in a target area; constructs an index grayscale image of green space patches in non-agricultural habitats of agricultural landscapes based on the visible light orthophoto of the agricultural landscape; and performs information segmentation of farmland and non-agricultural green space on the index grayscale image of green space patches in non-agricultural habitats according to an optimal threshold value to extract green space patches in non-agricultural habitats of agricultural landscapes. By acquiring the visible light orthophoto of the agricultural landscape in the target area, accurate and rapid extraction of green space patches in non-agricultural habitats of agricultural landscapes is achieved.

[0065] Based on the content of the above embodiment, in this embodiment, the step 101 determines the best period for shooting visible light remote sensing images of drones as the shooting period according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation, and obtains the visible light orthophoto of the agricultural landscape in the target area, specifically including:

[0066] Step 201: Determine the shooting period of the drone visible light remote sensing image according to the phenological period of the investigated agricultural landscape farmland crops and non-agricultural habitat vegetation, and obtain multiple original images of the agricultural landscape land in the target area through the drone remote sensing image during the shooting period.

[0067] It should be further explained that since vegetation grows in both farmland and non-agricultural habitats in agricultural landscapes, in order to distinguish farmland from non-agricultural habitats and quickly and accurately extract green patches of non-agricultural habitats in agricultural landscapes, it is necessary to select bare farmland, that is, farmland crops are not planted or have been planted but not sprouted, and the vegetation in non-agricultural habitat patches has turned green and grown in patches, based on the phenological period of crops planted in the farmland and the greening period of vegetation in non-agricultural habitats. This is the best period for drone image shooting. That is, the shooting period here is determined based on the types and planting times of farmland crops in the target area, as well as the greening period of vegetation in non-agricultural habitats.

[0068] In addition, before obtaining multiple original images of agricultural landscape land in the target area through UAV remote sensing images during the best shooting period, the flight time and attitude of the UAV are controlled to ensure the best flight state of the UAV, so that the image shooting is clearer and more accurate. For example, a 200×200m sample area is set as the test area in the agricultural landscape. According to the geographic coordinates of the boundary points of the sample area in the test area, the flight route is planned by calculating the waypoint position. The UAV flight route overlaps 70% in the lateral direction and 75% in the heading direction. The flight shooting height is 100m. Aerial photography is carried out from 11:00 to 14:00, when the sky conditions are the best, the ground shadows are the smallest, and the images obtained are not affected by atmospheric factors.

[0069] Specifically, multiple original images of agricultural landscape land in the target area are obtained by drone photography during the period when the farmland is exposed and the vegetation in the non-agricultural habitat patches has turned green and grown in patches.

[0070] For example, through the investigation of the test area, it was found that the main crops planted in the farmland in the test area were oats, broad beans, sesame, and potatoes. The planting time was from the end of May to the beginning of June, and the seedling time was from mid to late June. The green vegetation in the non-agricultural habitat of the agricultural landscape gradually turned green in late May. Therefore, the drone image collection experiment was selected on May 27 and June 17. The collected images are shown in Figure 2 . Figure 2 a is the image taken on May 27. Since the vegetation in non-agricultural habitats has begun to turn green, but the vegetation coverage is low, the accurate extraction of green space in non-agricultural habitats is limited; Figure 2 b shows that the green vegetation coverage of non-agricultural habitats is relatively high, and farmland crops have not yet sprouted. Therefore, June 17 was selected as the best shooting period for extracting green patches of non-agricultural habitats from drone images, that is, the best shooting period, that is, multiple original images of agricultural landscape land in the target area were obtained by drone shooting on June 17.

[0071] Step 202: stitching the plurality of original images of agricultural landscape land in the target area to generate an initial visible light orthophoto of the agricultural landscape in the target area.

[0072] It should be further explained that the Pix4Dmapper software was used to stitch the original images and generate the visible light orthophoto of the agricultural landscape in the initial target area.

[0073] Among them, Pix4Dmapper software is a fully automatic and fast drone data processing software. It is a unique drone data and aerial image processing software that integrates full automaticity, speed, and professional precision. It does not require professional knowledge or human intervention, and can quickly turn thousands of images into professional and accurate two-dimensional maps and three-dimensional models. It can perform orthophoto stitching and inclined three-dimensional modeling. The software can use the principles of photogrammetry and multi-eye reconstruction to quickly obtain point cloud data from aerial photos, and perform post-processing.

[0074] Step 203: Correcting the visible light orthophoto of the agricultural landscape in the initial target area to obtain a visible light orthophoto of the agricultural landscape in the target area.

[0075] It should be further explained that, since the generated visible light orthophoto of the agricultural landscape in the initial target area has geometric distortion, it is necessary to perform geometric precision correction on the visible light orthophoto of the agricultural landscape in the initial target area.

[0076] Specifically, Figure 3 As shown, Figure 3 For the visible light orthophoto map of the agricultural landscape in the target area, ground control points are selected in combination with high-resolution remote sensing satellite images, and the orthophoto is geometrically corrected using ENVI software to form a centimeter-level ultra-high-resolution visible light orthophoto with projection coordinate information.

[0077] Among them, ENVI software is a full-featured remote sensing image processing system. It is an advanced tool for processing, analyzing and displaying multispectral data, hyperspectral data and radar data. ENVI can fully extract image information, perform file processing, image enhancement, masking, preprocessing, image calculation and statistics, complete classification and post-processing tools, as well as image transformation and filtering tools, image mosaicking, fusion and other functions.

[0078] The present embodiment provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes. During the optimal shooting period, a plurality of original images of agricultural landscape land in a target area are acquired by an unmanned aerial vehicle; the plurality of original images of agricultural landscape land in the target area are spliced ​​to generate an initial visible light orthophoto of the agricultural landscape in the target area; the initial visible light orthophoto of the agricultural landscape in the target area is corrected to obtain a visible light orthophoto of the agricultural landscape in the target area. By splicing and correcting the original images of the agricultural landscape land in the target area, a more accurate visible light orthophoto of the agricultural landscape in the target area is obtained, which is more conducive to the subsequent accurate and rapid extraction of green space patches in non-agricultural habitats of the agricultural landscape.

[0079] Based on the content of the above embodiment, in this embodiment, the calculation formula for constructing the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is as follows:

[0080] NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 );

[0081] Among them, G and B represent the pixel brightness values ​​of the green light band and the blue light band in the visible light orthophoto respectively; NDSGBVI reflects the normalized difference between the square of the reflectance of the green light channel and the square of the reflectance of the blue light channel.

[0082] According to the calculation formula of the extraction index NDSGBVI, a grayscale image of the green patch extraction index of non-agricultural habitats in agricultural landscapes is obtained.

[0083] It should be further explained that the construction of the non-agricultural habitat green patch extraction index NDSGBVI is based on two ideas: one is based on the reflection and absorption characteristics of green vegetation in non-agricultural habitat patches in different bands, and the combination of different bands in visible light is used to enhance the information of green vegetation in non-agricultural habitats; the other is to take the square of the brightness value of the pixel of remote sensing images in the visible light red, green and blue bands to amplify the difference between the red, green and blue reflectances.

[0084] For example, if Figure 4 As shown, Figure 4 It is the grayscale image of the green patch extraction index NDSGBVI of non-agricultural habitats in agricultural landscapes. The grayscale image of the green patch extraction index NDSGBVI of non-agricultural habitats in agricultural landscapes is obtained by band calculation.

[0085] The present embodiment provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes. By obtaining a grayscale image of the extraction index of green space patches in non-agricultural habitats of agricultural landscapes according to the calculation formula of the extraction index NDSGBVI, it is not only convenient for determining the subsequent optimal threshold, but also enhances the vegetation information of green space in non-agricultural habitats, which is more conducive to the accurate and rapid extraction of green space patches in non-agricultural habitats of agricultural landscapes.

[0086] Based on the content of the above embodiment, in this embodiment, a preset iterative algorithm is used to determine the optimal threshold for extracting green space patches in non-agricultural habitats of the agricultural landscape.

[0087] The preset iterative algorithm specifically includes:

[0088] Step 101), select the initial threshold T k , and based on the initial threshold T k Segmenting the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions;

[0089] Step 102), according to the similar non-agricultural habitat green space pixel area and the non-similar non-agricultural habitat green space pixel area, respectively calculate the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area;

[0090] Step 103), according to the mean gray value Z1 of the similar non-agricultural habitat green space pixel area and the mean gray value Z2 of the non-similar non-agricultural habitat green space pixel area, calculate the first threshold value T k+1 ;

[0091] Step 104), at the first threshold T k+1 ≠T k In the case of k+1 Segment the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions, and repeat steps 102) and 103);

[0092] Step 105), at the first threshold T k+1 =T k In the case of k+1 is the optimal threshold.

[0093] It should be further explained that, first, an approximate threshold is selected as the initial estimate based on the approximate idea, then the grayscale image of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is segmented to generate sub-images, and a new threshold is selected according to the characteristics of the sub-images. Secondly, the NDSGBVI image is segmented using the new threshold. After multiple iterations, the pixels of the incorrectly segmented image are minimized, and finally the optimal threshold is selected.

[0094] For example, the process of selecting the optimal threshold by the preset iterative algorithm is as follows:

[0095] Step 101), select the initial estimation threshold T0 = {T k , k = 0}:

[0096]

[0097] Among them, Z min , Z max They respectively represent the minimum and maximum grayscale values ​​in the grayscale image of the non-agricultural habitat green patch extraction index NDSGBVI of the agricultural landscape.

[0098] Step 102), according to the threshold T k , the image is divided into the pixel area R1 similar to the non-agricultural habitat green space and the pixel area R2 similar to the non-agricultural habitat green space. The formula is as follows:

[0099] R1={f(i,j),f(i,j)≥T k};

[0100] R2={f(i,j),0 <f(i,j)<T k};

[0101] Calculate the mean values ​​Z1 and Z2 of the grayscale values ​​of region R1 and region R2, as shown in the following formula:

[0102]

[0103]

[0104] Among them, f(i, j) is the gray value of the pixel point (i, j) on the image, N(i, j) is the weight coefficient of (i, j), and here, N(i, j)=1.

[0105] Step 103), select a new threshold T according to the mean gray value Z1 of the similar non-agricultural habitat green space pixel area and the mean gray value Z2 of the non-similar non-agricultural habitat green space pixel area k+1 , the formula is as follows:

[0106]

[0107] Step 104), at the first threshold T k+1 ≠T k In the case of , it means that the threshold is unstable at this time, and further iteration is required to determine the optimal threshold, and repeat steps 102) and 103);

[0108] Step 105), at the first threshold T k+1 =T k In the case of k+1 is the optimal threshold and the iteration ends.

[0109] This embodiment provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes. A preset iterative algorithm is used to determine the optimal threshold for extracting green space patches in non-agricultural habitats of agricultural landscapes, and the pixels of erroneously segmented images are minimized to achieve accurate extraction of green space patches in non-agricultural habitats of agricultural landscapes.

[0110] Based on the content of the above embodiment, in this embodiment, after the information of farmland and non-agricultural habitat green space is segmented according to the optimal threshold value for the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image in step 103 to extract the agricultural landscape non-agricultural habitat green space patch, it can be specifically implemented in the following way:

[0111] Performing mask classification on non-agricultural habitat green space pixels and farmland pixels in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index according to the optimal threshold value to obtain a mask classification result;

[0112] The mask classification result is put into remote sensing software for extraction processing to obtain the agricultural landscape non-agricultural habitat green space patches in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index.

[0113] It should be further explained that after the optimal threshold is obtained through the preset iterative algorithm, the non-agricultural habitat green space and farmland pixels in the NDSGBVI image are masked and classified and extracted in remote sensing software such as ENVI or ERDAS IMAGINE. The specific algorithm is as follows:

[0114]

[0115] Among them, f(i,j) is the gray value of the pixel point (i,j) on the processed image, T k+1 is the optimal threshold value determined by the preset iterative algorithm step 105), and g(i,j) is the image extracted based on the optimal threshold mask. The generated mask image is a two-dimensional matrix array composed of 0 and 1, where 1 represents the green patch of non-agricultural habitat in agricultural landscape, such as Figure 5 As shown, Figure 5In order to put the results of mask classification into remote sensing software for extraction processing, the obtained agricultural landscape non-agricultural habitat green space patches (dark gray area) in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index are obtained.

[0116] This embodiment provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes. Mask classification is performed on non-agricultural habitat green space pixels and farmland pixels in a grayscale image of an extraction index of non-agricultural habitat green space patches in agricultural landscapes according to an optimal threshold value to obtain a result of mask classification. The result of mask classification is put into remote sensing software for extraction processing to obtain the non-agricultural habitat green space patches in the grayscale image of the extraction index of non-agricultural habitat green space patches in agricultural landscapes, thereby realizing accurate and rapid extraction of non-agricultural habitat green space patches in agricultural landscapes.

[0117] Based on the content of the above embodiment, in this embodiment, after the step 103 performs information segmentation of farmland and non-agricultural habitat green space on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract agricultural landscape non-agricultural habitat green space patches, the method further includes:

[0118] Construct the Kappa coefficient of accuracy evaluation for green patch extraction in non-agricultural habitats of agricultural landscapes; the specific formula is as follows:

[0119]

[0120] Among them, P0 is the actual consistency rate, P e is the theoretical consistency rate;

[0121] Based on the accuracy evaluation coefficient Kappa, the extracted green patch of the non-agricultural habitat of the agricultural landscape is compared with the visible light orthophoto of the agricultural landscape to obtain the accuracy evaluation result of the extraction of the green patch of the non-agricultural habitat of the agricultural landscape.

[0122] It should be further explained that the calculated Kappa coefficient values ​​are between 0 and 1 and are divided into 5 groups to represent accuracy: 0.0-0.20 (very low), 0.21-0.40 (average), 0.41-0.60 (medium), 0.61-0.80 (high), and 0.81-1.00 (almost perfect agreement).

[0123] In this embodiment, the accuracy evaluation is to compare specific pixels in the subject classification image with reference pixels of known classification.

[0124] For example, the patches of non-agricultural habitats in agricultural landscapes in the grayscale image of the extracted index of patches of non-agricultural habitats in agricultural landscapes are compared with the original image. The patches of non-agricultural habitats in the original image can be clearly identified by naked eye observation. 300 sample points are randomly generated in the newly extracted image of non-agricultural habitats, completely covering the image. Then, with reference to the clear original image, each sample point is visualized and interpreted, and the actual land feature types of the 300 random sample points are judged respectively. Through visual interpretation and verification, the extraction accuracy of non-agricultural habitats in agricultural landscapes in visible light images basically reaches 100%, and the Kappa coefficient is 0.926.

[0125] This embodiment provides a method for extracting green space patches in non-agricultural habitats of agricultural landscapes. Based on the accuracy evaluation coefficient Kappa, the extracted green space patches in non-agricultural habitats of agricultural landscapes are compared with the visible light orthophotos of the agricultural landscape to obtain the accuracy evaluation results of the extraction of green space patches in non-agricultural habitats of agricultural landscapes. The accuracy of the extraction of green space patches in non-agricultural habitats of agricultural landscapes is more objectively evaluated, and a complete evaluation system is provided for the accurate extraction of green space patches in non-agricultural habitats of agricultural landscapes.

[0126] Figure 6 This is a flow chart of a method for extracting green patches in non-agricultural habitats in agricultural landscapes provided by another embodiment of the present application. Figure 6 First, determine the best time to acquire UAV visible light remote sensing images (i.e., shooting period): Since both farmland and non-agricultural habitats in agricultural landscapes have vegetation growing, in order to distinguish farmland from non-agricultural habitats and quickly and accurately extract non-agricultural habitat patches in agricultural landscapes, it is necessary to select the best time for UAV image shooting based on the phenological period of crops planted in the farmland, when the farmland is exposed (crops in the farmland are not planted or have been planted but not sprouted), and when the vegetation in the non-agricultural habitat patches has turned green and grown in patches; secondly, obtain centimeter-level ultra-high resolution visible light orthophotos of agricultural landscapes: Use UAVs to shoot at low altitudes to obtain centimeter-level ultra-high resolution visible light orthophotos of the best shooting period for the study area. The original high-resolution agricultural landscape images were stitched and orthophotos were generated using Pix4Dmapper software. Ground control points were selected in combination with high-resolution remote sensing satellite images. ENVI software was used to perform geometric correction on the orthophotos to form centimeter-level ultra-high-resolution visible light UAV orthophotos with projection coordinate information. Secondly, the green patch extraction index NDSGBVI of non-agricultural habitats in agricultural landscapes was constructed. For the visible light UAV orthophotos, the grayscale image of the NDSGBVI index was obtained by band calculation. The calculation formula of the extraction index NDSGBVI is as follows: NDSGBVI = (G 2 -B 2 ) / (G 2 +B 2), G and B represent the DN values ​​of the green band and blue band of the visible light image, that is, the brightness value of the remote sensing image pixel; finally, the iterative method is used to determine the optimal threshold for extracting non-agricultural green land in agricultural landscapes, and the optimal threshold is used to segment the information of farmland and non-agricultural green land in the extracted index grayscale image to realize the extraction of non-agricultural green land patches in agricultural landscapes.

[0127] Figure 7 This is a structural block diagram of the application identification device provided in this embodiment. The device includes an acquisition module 701, a construction module 702 and an extraction module 703, wherein:

[0128] An acquisition module 701 is used to acquire a visible light orthophoto of an agricultural landscape in a target area;

[0129] Among them, the target area is a test area selected by technical personnel in this field according to needs for the extraction of green patches in non-agricultural habitats of agricultural landscapes. Agricultural landscape is one of the most important landscape types on the earth's land surface, and is a mosaic of alternating farmland and natural and semi-natural non-agricultural habitats.

[0130] It should be further explained that before obtaining the visible light orthophoto of the agricultural landscape of the target area, it is necessary to obtain multiple original images of the agricultural landscape land in the target area through agricultural landscape drone remote sensing images during the shooting period, and splice the multiple original images of the agricultural landscape land in the target area to generate an initial visible light orthophoto of the agricultural landscape in the target area; the initial visible light orthophoto of the agricultural landscape in the target area is corrected to obtain the final visible light orthophoto of the agricultural landscape in the target area, wherein drone remote sensing has low cost, simple operation, high ground resolution, and is not affected by atmospheric factors during the image acquisition process.

[0131] For example, a 200×200m sample plot area is set up in the agricultural landscape as a test area, and visible light UAV remote sensing images are used to obtain visible light orthophotos of the agricultural landscape in the test area.

[0132] A construction module 702 is used to construct a grayscale image of green patch extraction index of non-agricultural habitats in agricultural landscapes based on the visible light orthophoto of the agricultural landscape;

[0133] It can be understood that the grayscale image of the patch extraction index of non-agricultural habitat green space in agricultural landscape includes information of farmland and non-agricultural habitat green space.

[0134] It should be further explained that based on the visible light orthophoto of the agricultural landscape, which has three visible light bands of red, green and blue, the grayscale image of the green patch extraction index NDSGBVI of the non-agricultural habitat of the agricultural landscape is obtained by band calculation.

[0135] In this embodiment, the calculation formula of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is as follows:

[0136] NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 );

[0137] Among them, G and B represent the DN values ​​of the green light band and the blue light band, respectively, that is, the brightness value of the remote sensing image pixel. The green patch extraction index of non-agricultural habitats in agricultural landscapes NDSGBVI reflects the normalized difference between the square reflectance of the green light channel and the square reflectance of the blue light channel.

[0138] The extraction module 703 is used to segment the information of farmland and non-agricultural habitat green space on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract the agricultural landscape non-agricultural habitat green space patch.

[0139] Among them, the optimal threshold is determined by using a preset iterative algorithm, which can minimize the pixels of the wrongly segmented image, making the green patches of non-agricultural habitats in the agricultural landscape extracted in the end more accurate.

[0140] The present embodiment provides a device for extracting green space patches in non-agricultural habitats of agricultural landscapes, including an acquisition module 701 for acquiring a visible light orthophoto of an agricultural landscape in a target area; a construction module 702 for constructing an index grayscale image of green space patches extracted in an agricultural landscape based on the visible light orthophoto of the agricultural landscape; and an extraction module 703 for performing information segmentation of farmland and non-agricultural green space on the index grayscale image of green space patches extracted in an agricultural landscape according to an optimal threshold value, so as to extract green space patches in non-agricultural habitats of agricultural landscapes. By acquiring the visible light orthophoto of the agricultural landscape in the target area, accurate and rapid extraction of green space patches in non-agricultural habitats of agricultural landscapes is achieved.

[0141] Optionally, the acquisition module 701 includes:

[0142] Used to obtain multiple original images of agricultural landscape land in the target area through UAV remote sensing images during the shooting period;

[0143] Splicing the multiple original images of agricultural landscape land in the target area to generate an initial visible light orthophoto of the agricultural landscape in the target area;

[0144] The visible light orthophoto of the agricultural landscape in the initial target area is corrected to obtain a visible light orthophoto of the agricultural landscape in the target area.

[0145] The present embodiment provides a device for extracting green space patches in non-agricultural habitats of agricultural landscapes, which is used to obtain multiple original images of agricultural landscape land in a target area through unmanned aerial vehicle remote sensing images during a shooting period; stitching the multiple original images of agricultural landscape land in the target area to generate an initial visible light orthophoto of the agricultural landscape in the target area; correcting the initial visible light orthophoto of the agricultural landscape in the target area to obtain a visible light orthophoto of the agricultural landscape in the target area. By stitching and correcting the original images of the agricultural landscape land in the target area, a more accurate visible light orthophoto of the agricultural landscape in the target area is obtained, which is more conducive to the subsequent accurate and rapid extraction of green space patches in non-agricultural habitats of the agricultural landscape.

[0146] Optionally, the calculation formula of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI in the construction module is as follows:

[0147] NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 );

[0148] Wherein, G and B represent the pixel brightness values ​​of the green light band and the blue light band in the visible light orthophoto respectively;

[0149] According to the calculation formula of the extraction index NDSGBVI, a grayscale image of the green patch extraction index of non-agricultural habitats in agricultural landscapes is obtained.

[0150] The present embodiment provides a device for extracting green space patches in non-agricultural habitats of agricultural landscapes. By obtaining a grayscale image of the extraction index of green space patches in non-agricultural habitats of agricultural landscapes according to the calculation formula of the extraction index NDSGBVI, it is not only convenient for determining the subsequent optimal threshold, but also enhances the vegetation information of green space in non-agricultural habitats, which is more conducive to the accurate and rapid extraction of green space patches in non-agricultural habitats of agricultural landscapes.

[0151] Optionally, the extraction module 703 further includes:

[0152] A preset iterative algorithm is used to determine the optimal threshold for extracting green space patches in non-agricultural habitats of the agricultural landscape.

[0153] The preset iterative algorithm specifically includes:

[0154] Step 101), select the initial threshold T k , and based on the initial threshold T k Segmenting the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions;

[0155] Step 102), according to the similar non-agricultural habitat green space pixel area and the non-similar non-agricultural habitat green space pixel area, respectively calculate the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area;

[0156] Step 103), according to the mean gray value Z1 of the similar non-agricultural habitat green space pixel area and the mean gray value Z2 of the non-similar non-agricultural habitat green space pixel area, calculate the first threshold value T k+1 ;

[0157] Step 104), at the first threshold T k+1 ≠T k In the case of k+1 Segment the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions, and repeat steps 102) and 103);

[0158] Step 105), at the first threshold T k+1 =T k In the case of k+1 is the optimal threshold.

[0159] This embodiment provides a device for extracting green space patches in non-agricultural habitats of agricultural landscapes, which uses a preset iterative algorithm to determine the optimal threshold for extracting green space patches in non-agricultural habitats of agricultural landscapes, minimizes the pixels of erroneously segmented images, and achieves accurate extraction of green space patches in non-agricultural habitats of agricultural landscapes.

[0160] Optionally, the extraction module 703 further includes:

[0161] Used to perform mask classification on non-agricultural habitat green space pixels and farmland pixels in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index according to the optimal threshold value to obtain a mask classification result;

[0162] The mask classification result is put into remote sensing software for extraction processing to obtain the agricultural landscape non-agricultural habitat green space patches in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index.

[0163] The present embodiment provides a device for extracting green space patches in non-agricultural habitats of agricultural landscapes, which is used to perform mask classification on non-agricultural habitat green space pixels and farmland pixels in a grayscale image of an extraction index of non-agricultural habitat green space patches in agricultural landscapes according to an optimal threshold value to obtain a result of mask classification; the result of mask classification is put into remote sensing software for extraction processing to obtain the non-agricultural habitat green space patches in the grayscale image of the extraction index of non-agricultural habitat green space patches in agricultural landscapes, thereby realizing accurate and rapid extraction of non-agricultural habitat green space patches in agricultural landscapes.

[0164] Figure 8 A schematic diagram of the physical structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 8 As shown, the electronic device may include: a processor 810, a communication interface 820, a memory 830 and a bus 840, wherein the processor 810, the communication interface 820 and the memory 830 communicate with each other through the bus 840. The bus 840 can be used for information transmission between the electronic device and the sensor. The processor 810 can call the logic instructions in the memory 830 to execute the following method: obtain the visible light orthophoto of the agricultural landscape of the target area; based on the visible light orthophoto of the agricultural landscape, construct an agricultural landscape non-agricultural habitat green space patch extraction index grayscale image; according to the optimal threshold, the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image is segmented into farmland and non-agricultural habitat green space information to extract agricultural landscape non-agricultural habitat green space patches.

[0165] In addition, the logic instructions in the above-mentioned memory 830 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.

[0166] On the other hand, an embodiment of the present invention provides a non-transitory computer-readable storage medium, which stores computer instructions, and the computer instructions enable a computer to execute a method for extracting green space patches in non-agricultural habitats of agricultural landscapes provided in the above-mentioned embodiments, for example, including: obtaining a visible light orthophoto of an agricultural landscape in a target area; constructing an index grayscale image of green space patches extraction in an agricultural landscape based on the visible light orthophoto of the agricultural landscape; and performing information segmentation of farmland and non-agricultural green space on the index grayscale image of green space patches extraction in an agricultural landscape according to an optimal threshold to extract green space patches in non-agricultural habitats of the agricultural landscape.

[0167] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0168] On the other hand, the present invention also provides a computer program product, which includes a computer program stored on a non-transitory computer-readable storage medium, and the computer program includes program instructions. When the program instructions are executed by a computer, the computer can execute a method for extracting green space patches in non-agricultural habitats of agricultural landscapes provided by the above-mentioned methods, the method including: obtaining a visible light orthophoto of an agricultural landscape in a target area; constructing an index grayscale image of green space patches extraction in an agricultural landscape based on the visible light orthophoto of the agricultural landscape; and performing information segmentation of farmland and non-agricultural green space on the index grayscale image of green space patches extraction in an agricultural landscape according to an optimal threshold to extract green space patches in non-agricultural habitats of the agricultural landscape.

[0169] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for extracting green space patches in non-agricultural habitats of agricultural landscapes, characterized in that: include: Determine the shooting period of UAV visible light remote sensing images according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation, and obtain visible light orthophotos of agricultural landscapes in the target area; Based on the visible light orthophoto of the agricultural landscape, construct a grayscale image of the green patch extraction index of the non-agricultural habitat of the agricultural landscape; According to the optimal threshold, the information of farmland and non-agricultural habitat green space patch extraction index grayscale image of the agricultural landscape non-agricultural habitat green space is segmented to extract the agricultural landscape non-agricultural habitat green space patch; The calculation formula of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is as follows: NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 ); Wherein, G and B represent the pixel brightness values ​​of the green light band and the blue light band in the visible light orthophoto respectively; According to the calculation formula of the extraction index NDSGBVI, a grayscale image of the green patch extraction index of the non-agricultural habitat of the agricultural landscape is obtained; The optimal threshold for extracting green patches in non-agricultural habitats of agricultural landscapes is determined by using a preset iterative algorithm; the preset iterative algorithm specifically includes: Step 101), select the initial threshold T k , and based on the initial threshold T k Segmenting the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions; Step 102), according to the similar non-agricultural habitat green space pixel area and the non-similar non-agricultural habitat green space pixel area, respectively calculate the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area; Step 103), according to the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area, calculate the first threshold value T k+1 ; Step 104), at the first threshold T k+1 ≠T k In the case of k+1 Segment the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions, and repeat steps 102) and 103); Step 105), at the first threshold T k+1 =T k In the case of k+1 is the optimal threshold.

2. The method for extracting green space patches in non-agricultural habitats of agricultural landscapes according to claim 1, characterized in that: The method of determining the shooting period of the visible light remote sensing image of the UAV according to the phenological period of the agricultural landscape crops and the non-agricultural habitat vegetation, and obtaining the visible light orthophoto of the agricultural landscape of the target area specifically includes: Determine the shooting period of the drone visible light remote sensing image according to the phenological period of the investigated agricultural landscape farmland crops and non-agricultural habitat vegetation, and obtain multiple original images of agricultural landscape land in the target area through the drone remote sensing image during the shooting period; Splicing the multiple original images of agricultural landscape land in the target area to generate an initial visible light orthophoto of the agricultural landscape in the target area; The visible light orthophoto of the agricultural landscape in the initial target area is corrected to obtain a visible light orthophoto of the agricultural landscape in the target area.

3. The method for extracting green space patches in non-agricultural habitats of agricultural landscapes according to claim 1, characterized in that: According to the optimal threshold, the information of farmland and non-agricultural habitat green space is segmented on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image to extract the agricultural landscape non-agricultural habitat green space patches, specifically including: Performing mask classification on non-agricultural habitat green space pixels and farmland pixels in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index according to the optimal threshold value to obtain a mask classification result; The mask classification result is put into remote sensing software for extraction processing to obtain the agricultural landscape non-agricultural habitat green space patches in the grayscale image of the agricultural landscape non-agricultural habitat green space patch extraction index.

4. The method for extracting green space patches in non-agricultural habitats of agricultural landscapes according to claim 1, characterized in that: After segmenting the information of farmland and non-agricultural habitat green space of the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to the optimal threshold value to extract the agricultural landscape non-agricultural habitat green space patch, the method further includes: Construct the Kappa coefficient of accuracy evaluation for green patch extraction in non-agricultural habitats of agricultural landscapes; the specific formula is as follows: Among them, P0 is the actual consistency rate, Pe is the theoretical consistency rate; Based on the accuracy evaluation coefficient Kappa, the extracted green patch of the non-agricultural habitat of the agricultural landscape is compared with the visible light orthophoto of the agricultural landscape to obtain the accuracy evaluation result of the extraction of the green patch of the non-agricultural habitat of the agricultural landscape.

5. A device for extracting green space patches in non-agricultural habitats of agricultural landscapes, characterized in that: It includes acquisition module, construction module and extraction module, among which: An acquisition module is used to determine the shooting period of the UAV visible light remote sensing image according to the phenological period of agricultural landscape crops and non-agricultural habitat vegetation, and to obtain the visible light orthophoto of the agricultural landscape in the target area; A construction module, used to construct a grayscale image of green patch extraction index of non-agricultural habitats in the agricultural landscape based on the visible light orthophoto of the agricultural landscape; An extraction module is used to segment the information of farmland and non-agricultural habitat green space on the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image according to an optimal threshold value, so as to extract the agricultural landscape non-agricultural habitat green space patch; The calculation formula of the agricultural landscape non-agricultural habitat green patch extraction index NDSGBVI is as follows: NDSGBVI=(G 2 -B 2 ) / (G 2 +B 2 ); Wherein, G and B represent the pixel brightness values ​​of the green light band and the blue light band in the visible light orthophoto respectively; According to the calculation formula of the extraction index NDSGBVI, a grayscale image of the green patch extraction index of the non-agricultural habitat of the agricultural landscape is obtained; The optimal threshold for extracting green patches in non-agricultural habitats of agricultural landscapes is determined by using a preset iterative algorithm; the preset iterative algorithm specifically includes: Step 101), select the initial threshold T k , and based on the initial threshold T k Segmenting the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions; Step 102), according to the similar non-agricultural habitat green space pixel area and the non-similar non-agricultural habitat green space pixel area, respectively calculate the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area; Step 103), according to the mean value Z1 of the grayscale value of the similar non-agricultural habitat green space pixel area and the mean value Z2 of the grayscale value of the non-similar non-agricultural habitat green space pixel area, calculate the first threshold value T k+1 ; Step 104), at the first threshold T k+1 ≠T k In the case of k+1 Segment the agricultural landscape non-agricultural habitat green space patch extraction index grayscale image into non-agricultural habitat green space pixel regions similar to non-agricultural habitat green space pixel regions and non-similar non-agricultural habitat green space pixel regions, and repeat steps 102) and 103); Step 105), at the first threshold T k+1 =T k In the case of k+1 is the optimal threshold.

6. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps of the method for extracting green space patches in non-agricultural habitats of agricultural landscapes as described in any one of claims 1 to 4 are implemented.

7. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of a method for extracting green space patches in non-agricultural habitats of agricultural landscapes as described in any one of claims 1 to 4 are implemented.

8. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of a method for extracting green space patches in non-agricultural habitats of agricultural landscapes as described in any one of claims 1 to 4 are implemented.