A field-ditch-pond extraction method based on unmanned aerial vehicle photogrammetry and deep learning
By combining UAV photogrammetry with deep learning, the problems of high dependence on manual labor, low efficiency, and insufficient accuracy in the extraction of field-ditch-pond systems in small watersheds have been solved. This method achieves efficient and high-precision field-ditch-pond extraction, adapts to complex terrain and various types of farmland, and supports agricultural management.
Patent Information
- Application Number
- CN202510468377.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-15
- Publication Date
- 2025-11-21
- Estimated Expiration
- 2045-04-15
AI Technical Summary
Existing technologies for extracting field-ditch-pond systems in small watersheds suffer from problems such as high reliance on manual labor, low extraction efficiency, and insufficient accuracy. The extraction results are unsatisfactory, especially in complex terrain and multi-type farmland conditions.
This study employs a method combining UAV photogrammetry and deep learning. Image data is acquired through oblique photogrammetry, and a U-net algorithm model with a built-in attention mechanism is constructed. Combined with multi-feature fusion technology, the ISODATA clustering algorithm and an image segmentation model that supports zero-shot learning are used. Mountain shadow tools are also used for multi-scale segmentation and shape feature extraction to generate high-precision field-ditch-pond vector data.
It significantly improves the accuracy and efficiency of field-ditch-pond extraction, can adapt to complex terrain and various types of farmland, provides high-precision data support, and provides technical support for the simulation of agricultural non-point source pollution migration trajectories and the fine management of farmland.
Smart Images

Figure CN120388307B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application belongs to the technical field of remote sensing and agricultural informatization, and particularly relates to a field-ditch-pond extraction method based on unmanned aerial vehicle photogrammetry and deep learning. BACKGROUND
[0002] The field-ditch-pond system (field block, ditch and pond) of a small watershed is an important part of an agricultural landscape and is a key channel for the migration of agricultural area source pollution, and is of great significance for agricultural production, irrigation and water environment monitoring. The traditional extraction method of the field-ditch-pond system of a small watershed mainly relies on manual sketching and ground investigation, which is time-consuming and heavy, and it is difficult to realize automatic extraction on a large scale and with high precision. With the development of remote sensing technology, the extraction method of large-scale watershed field block, river and water area based on satellite remote sensing has been gradually applied and popularized. However, due to the limitations of high-precision remote sensing data acquisition and multi-target recognition algorithm technology in complex ground scenarios, there are still problems such as incomplete and inaccurate extraction of micro-land boundary, poor extraction precision of small ditches and spectral mixing.
[0003] The unmanned aerial vehicle photogrammetry technology gradually becomes an important means of small-scale remote sensing monitoring due to its high resolution, strong flexibility, timely data acquisition and other characteristics. The unmanned aerial vehicle is equipped with multiple types of lenses, and can provide high-precision and rich ground spectral information and terrain information through oblique photography, which has unique advantages in ground object classification and target extraction. However, the existing extraction methods usually separate the spectral, texture or terrain information of the ground object, which limits the extraction precision and efficiency. At the same time, the existing algorithms have not provided a systematic solution for the fine extraction of the field-ditch-pond system, especially in the case of complex terrain and multiple types of farmland, the extraction effect is still not ideal.
[0004] In view of the deficiencies of the prior art, the present application provides a field-ditch-pond extraction method based on unmanned aerial vehicle photogrammetry and deep learning, which aims to solve the above problems. SUMMARY
[0005] The present application aims to overcome the deficiencies in the prior art and provide a field-ditch-pond extraction method based on unmanned aerial vehicle photogrammetry and deep learning, which can solve the problems of complex terrain, strong manual dependence, low extraction efficiency and insufficient precision in the prior art.
[0006] To achieve the above-mentioned purpose, in a first aspect, the present application provides a field-ditch-pond extraction method based on unmanned aerial vehicle photogrammetry and deep learning, which comprises:
[0007] S1: using an unmanned aerial vehicle equipped with a multi-spectral camera and an optical lens, obtaining original image data through oblique photogrammetry technology;
[0008] S2: preprocessing the acquired original image data to generate multispectral image map (DOM) and digital surface model (DSM);
[0009] S3: constructing a U-net algorithm model with built-in attention mechanism, combining multi-feature fusion technology to train the preprocessed image data, wherein the fused features include spectral features, terrain features and texture features;
[0010] S4: using the trained U-net algorithm model to extract water pond from the image data of the target area, and generating the vector data of the water pond;
[0011] Using ISODATA clustering algorithm to classify the preprocessed multispectral data and extract field block data to be extracted; using an image segmentation model supporting zero sample learning to perform image segmentation on the field block data to be extracted, and generating the vector data of the field block;
[0012] Using mountain shadow tool combined with DSM data to extract ridge area, and performing multi-scale segmentation and shape feature extraction to generate the vector data of the field ditch;
[0013] S5: spatially superimposing and analyzing the vector data of water pond, field block and field ditch to check the topological consistency, and generating the final field-ditch-pond vector data.
[0014] In combination with the first aspect, the U-net algorithm model with built-in attention mechanism in S3 comprises:
[0015] An encoder module adopts a five-level down-sampling structure, each level is composed of two groups of depthwise separable convolution (Depthwise Separable Convolution) with kernel size of 3x3 and step size of 1, which is combined with ReLU activation function and embedded with SE (Squeeze-and-Excitation) channel attention module to adjust and strengthen the water body spectral features (such as near-infrared band reflection difference) through adaptive channel weight;
[0016] A decoder module adopts a five-level up-sampling structure, each level realizes feature recovery through bilinear interpolation and transpose convolution, and performs cross-layer jump connection with the feature map of the corresponding level of the encoder module, introduces a dynamic gating mechanism at the connection, and uses Sigmoid function to control the feature fusion weight; and the decoder module innovatively integrates a multi-scale dilated convolution pyramid module (Multi-scale Dilated Convolution Pyramid, MDCP) in the fourth decoding layer, which contains four groups of parallel dilated convolution layers, and the output features are input into 1x1 convolution for multi-scale context feature fusion after channel splicing.
[0017] In combination with the first aspect, a 2*2 max pooling layer is arranged at the end of each stage in the encoder module, the feature map size is reduced stage by stage, and the number of channels is multiplied to 512.
[0018] In combination with the first aspect, the multi-feature fusion technology in S3 comprises:
[0019] Spectral feature extraction is performed on the multispectral data, including reflectivity calculation of blue, green, red, red edge and near-infrared bands;
[0020] Topographic feature extraction is performed on the DSM data, including calculation of slope, curvature and aspect.
[0021] Texture feature extraction is performed on the image data, including calculation of texture intensity and texture direction.
[0022] In combination with the first aspect, the U-net algorithm model is labeled by the LabelMe tool, and a bicubic interpolation algorithm is used for size normalization of the image data.
[0023] In combination with the first aspect, the multi-scale segmentation technology uses the mountain shadow tool in ArcGIS Pro, sets the solar elevation angle to 50°, and extracts the mountain shadow under multiple solar azimuth angles to enhance the shadow features of the image.
[0024] Secondly, the present application provides a UAV photogrammetry and deep learning field-ditch-pond extraction system; the system comprises:
[0025] A data acquisition module is used to control the UAV to carry a multispectral camera and an optical lens, and to obtain original image data of a target area by using oblique photogrammetry technology.
[0026] A data preprocessing module is used to preprocess the obtained original image data to generate a multispectral image map (DOM) and a digital surface model (DSM).
[0027] A model training module is used to construct a U-net algorithm model with an embedded attention mechanism, and to train the preprocessed image data in combination with a multi-feature fusion technology, wherein the fused features include spectral features, topographic features and texture features.
[0028] A data extraction module is used to:
[0029] A trained U-net model is used to extract water ponds from the image data of the target area to generate vector data of the water ponds.
[0030] The ISODATA clustering algorithm is used for classifying the preprocessed multi-spectral data to extract the field block region data to be extracted; and a zero-sample learning supported image segmentation model is used for image segmentation of the field block region data to be extracted to generate the vector data of the field block;
[0031] The field ridge region is extracted by using the mountain shadow tool in combination with the DSM data, multi-scale segmentation and shape feature extraction are performed, and the vector data of the field ditch is generated;
[0032] The data integration module is used for spatial superposition analysis of the vector data of the pond, field block and field ditch, checking of topological consistency, and generation of the final field-ditch-pond vector data.
[0033] In combination with the second aspect, the data extraction module further comprises:
[0034] The pond extraction unit is used for processing the tree sheltering problem, repairing the pond boundary by the convex hull algorithm and curvature calculation;
[0035] The field block extraction unit is used for processing the boundary effect of the sliding clipping, reducing the influence of the boundary effect by weight distribution;
[0036] The field ditch extraction unit is used for processing the misclassification problem of the field ridge region, and the misclassified region is removed by the maximum bounding rectangle analysis and threshold method.
[0037] In the third aspect, the present application provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the method according to the first aspect.
[0038] In the fourth aspect, the present application provides a device, which comprises:
[0039] A memory is used for storing instructions;
[0040] A processor is used for executing the instructions, so that the device executes the steps of the method according to the first aspect.
[0041] Compared with the prior art, the present application has the following beneficial effects:
[0042] 1.The present application can obtain high-resolution raw image data through the data acquisition module, which can provide high-quality data basis for subsequent fine extraction, and can preprocess the data through geometric correction, radiation correction and aerial triangulation; in the model training module, the spectral features, terrain features and texture features are combined, and the U-net algorithm model with built-in attention mechanism is trained to significantly improve the model's perception ability of complex ground objects, and through multi-feature fusion technology, the model can more accurately identify and extract water ponds, fields and ditches, and improve the extraction accuracy; in the data extraction module, water ponds are extracted by the U-net model, fields are extracted by the ISODATA clustering algorithm and image segmentation model, and ditches are extracted by the mountain shadow tool and multi-scale segmentation technology; finally, all the data is analyzed by spatial superposition and topological consistency check to generate the final field-ditch-pond vector data, which provides high-precision data support for subsequent agricultural non-point source pollution migration trajectory simulation and farmland fine management. BRIEF DESCRIPTION OF DRAWINGS
[0043] Figure 1 is a flowchart of the extraction method of the present application.
[0044] Figure 2 is a multispectral image map (DOM) of the experimental area in the embodiment of the present application.
[0045] Figure 3 is a digital surface model (DSM) of the experimental area in the embodiment of the present application.
[0046] Figure 4 is an extraction result map of the experimental area in the embodiment of the present application. DETAILED DESCRIPTION
[0047] The present application will be further described below in conjunction with the drawings. The following embodiments are only used to more clearly illustrate the technical solutions of the present application, and cannot be used to limit the protection scope of the present application.
[0048] Embodiment One
[0049] Reference Figures 1-4 The present application provides a UAV photogrammetry and deep learning field-ditch-pond extraction method, which comprises:
[0050] S1: using a UAV to carry a multispectral camera and an optical lens, obtaining raw image data through oblique photogrammetry technology;
[0051] S2: preprocessing the obtained raw image data to generate a multispectral image map (DOM) and a digital surface model (DSM); the multispectral image map (DOM) is specifically referred to Figure 2, the digital surface model (DSM) can refer to Figure 3 ;
[0052] S3: Construct a U-net algorithm model with built-in attention mechanism, and train the preprocessed image data by combining multi-feature fusion technology, wherein the fused features include spectral features, terrain features and texture features;
[0053] S4: Use the trained U-net algorithm model to extract water ponds from the image data of the target area, and generate vector data of the water ponds;
[0054] The ISODATA clustering algorithm is used to classify the preprocessed multi-spectral data, and the image segmentation model supporting zero sample learning is used to perform image segmentation on the field block to be extracted region data, and generate vector data of the field block;
[0055] The mountain shadow tool is used in combination with the DSM data to extract the ridge region, and multi-scale segmentation and shape feature extraction are performed to generate vector data of the field ditch;
[0056] S5: Spatially superimpose the vector data of the water ponds, field blocks and field ditches, check the topological consistency, and generate the final field-ditch-pond vector data.
[0057] Further, the preprocessing in S1 includes geometric correction, radiation correction and aerial triangulation.
[0058] Specifically, in the embodiment, the U-net algorithm model with built-in attention mechanism in S3 includes:
[0059] The encoder module adopts a five-level downsampling structure, each level is composed of two groups of depthwise separable convolution (Depthwise Separable Convolution), the kernel size is 3x3, the step is 1, the ReLU activation function is used, and the SE (Squeeze-and-Excitation) channel attention module is embedded, and the water body spectral features (such as near-infrared band reflection difference) are adjusted and strengthened through adaptive channel weight.
[0060] The decoder module adopts a five-level upsampling structure, each level realizes feature recovery through bilinear interpolation and transpose convolution, and performs cross-layer jump connection with the feature map of the corresponding level of the encoder module, a dynamic gating mechanism is introduced at the connection, and a Sigmoid function is used to control the feature fusion weight; and the decoder module innovatively integrates a multi-scale dilated convolution pyramid module (MDCP) in the fourth decoding layer, which includes four groups of parallel dilated convolution layers (with expansion rates of 1, 3, 5 and 7), and the output features are input into a 1x1 convolution after channel splicing for multi-scale context feature fusion.
[0061] It should be noted that in the present embodiment, a 2x2 max pooling layer is arranged at the end of each level in the encoder module, the feature map size is reduced step by step, and the channel number is multiplied to 512.
[0062] Further, the multi-feature fusion technology in S3 includes:
[0063] Spectral feature extraction is performed on the multispectral data, including reflectivity calculation of blue band, green band, red band, red edge band and near-infrared band;
[0064] Topographic feature extraction is performed on the DSM data, including calculation of slope, curvature and slope direction;
[0065] Texture feature extraction is performed on the image data, including calculation of texture intensity and texture direction.
[0066] Further, the U-net algorithm model performs water body labeling through the LabelMe tool, and performs size normalization processing on the image data by using the bicubic interpolation algorithm.
[0067] Further, the multi-scale segmentation technology uses the mountain shadow tool in ArcGIS Pro, sets the solar elevation angle to 50°, and extracts the mountain shadow under multiple solar azimuth angles to enhance the shadow features of the image.
[0068] It should be noted that in the present embodiment, the data collection / acquisition and data preprocessing in S1 and S2 specifically include the following steps:
[0069] The oblique photogrammetry uses a DJI M350 multi-rotor unmanned aerial vehicle, carries a Red Edge-MX multi-spectral camera and a five-lens gimbal to collect ground data; the multi-spectral image data covers blue, green, red, red edge and near-infrared bands; the oblique aerial photography flight is set to a heading overlap of 80%, a lateral overlap of 70% and a flight height of 200 meters; during the shooting process, a photo is taken every 2.5 seconds to ensure the consistency of the image data and the flight efficiency, to ensure efficient coverage of the target area, and to ensure that high-quality and high-coverage original image data are obtained through these parameters.
[0070] The ground radiation energy received by the spectral camera can be affected by factors such as sensor self-photoelectric noise, camera dark angle effect, solar elevation angle change and aerosol optical thickness, thereby causing a certain difference between the collected radiation value and the actual radiation value of the ground object. Therefore, photos of the radiation calibration board are taken before and after the unmanned aerial vehicle flies, and the reflectivity of the calibration board is set to 25%, 50% and 75% respectively. Through these calibration board images, radiation calibration is performed to eliminate the radiation errors caused by various factors and ensure the accuracy of subsequent image data.
[0071] After the image data collection is completed, the DJI ZhiTu software is used to perform geometric correction, radiation correction and aerial triangulation on the image data collected by the unmanned aerial vehicle, to generate centimeter-level multi-spectral and RGB version DOM (Digital Ortho Map) and DSM (Digital Surface Model).
[0072] It should be noted that in this embodiment, the U-net model training in S3 specifically includes the following steps:
[0073] 500 RGB original aerial photos of the study area and the surrounding area are selected to ensure that the image resolution is not less than 0.5 meters / pixel, and the storage format is GeoTIFF to retain geographic coordinate information. The water body is labeled using LabelMe9 (an open-source image labeling tool mainly used for data preparation in the field of computer vision and machine learning), and the labeling result is saved as a JSON file in the form of a polygon vector. Then it is converted into a binary mask data (water value is 255 and background value is 0). When labeling, all types of water bodies (such as rivers, lakes, ponds, etc.) need to be covered. First, determine the scaling reference according to the maximum side length, construct a square blank canvas and perform zero value padding, and map the original image data to the corresponding area of the canvas. A bicubic interpolation algorithm is used to perform high-precision size normalization on the padded image, so that the image content is scaled to 512x512 pixels without distortion. The EXIF metadata of the JPEG file is read using the GDAL function to obtain the location information of the picture and record it, which facilitates the splicing of the predicted image.
[0074] In the embodiment, the data set is also divided and enhanced, that is, 500 images are proportionally divided into a training set (400 images), a verification set (80 images), and a test set (20 images). When dividing, uniform distribution of different terrains (such as mountainous areas and plains) is ensured. Geometric transformation, radiation transformation, and noise injection are performed on the training data to improve the robustness of the model.
[0075] During data training, the Adam optimizer is used, the initial learning rate is 1e-4, the learning rate is reduced by 50% every 20 rounds, the batch size is 8, the weighted cross-entropy loss and the Dice Loss are combined to handle class imbalance and improve boundary detection accuracy, the batch size is 8, the training rounds are 100 rounds, the test set needs to reach IoU≥0.87, Recall≥0.91, and the false detection rate of the shadow area needs to be less than 5%;
[0076] After training, the data is predicted: the original data and the labeled data after training are scaled to 512x512 pixels in size and the position information is retained, and then prediction is performed, the binary file generated by prediction is converted to the original image size and the original position information is written to facilitate image splicing. Based on the GDAL library, the optimized binary mask is converted into a polygon vector, and the output format is Shapefile.
[0077] It should be noted that in the embodiment, the extraction of the water pond, field block, and field ditch vector data in S4 specifically includes the following steps:
[0078] S41: Water pond data extraction
[0079] The original aerial photos of the study area are scaled and the position information is retained, and are input into the trained model for prediction. After predicting the water body data, the original size is scaled, the original geographic position is merged, and then the binary water body data is processed by raster-to-surface to obtain the vector data of the water body. Thus, the water pond extraction is completed according to the spectral characteristics.
[0080] S42: Field block data extraction
[0081] S421: The ISODATA clustering algorithm is used to classify the multi-spectral data, and the classification is iterated three times and 12 times, and then the forest land and building land are extracted by class merging, and then the classification post-processing is performed to eliminate the salt and pepper effect. The multi-spectral data of the study area is removed from the forest land, building land, and water pond area extracted in the previous step to obtain the field block to be extracted area data, thereby reducing the influence of the background of the subsequent image segmentation;
[0082] S422: Based on the field block to be extracted region data, sliding cropping is performed according to the size of 1600*1600 pixels and the step of 800 pixels (repetition rate 50%), the cropped TIF file is saved with position information and converted into JPG format; an image segmentation model supporting zero sample learning (Segment Anything Model) is used for image segmentation, each grid instance of the image (each field block can be clearly extracted) is automatically extracted according to the spectral and texture features of the data, and then converted into a vector boundary, and then the spectral values in each vector block are calculated to remove the non-field block area, and the extraction of the field block is completed.
[0083] S43: Field ditch data extraction
[0084] S431: In order to further optimize the boundary between the field block and the surrounding environment, the mountain shadow tool in ArcGIS Pro (a desktop GIS software widely used in spatial data management, advanced map analysis and creation of visual effects) is used to set the solar elevation angle to 50°, and the mountain shadow is extracted under multiple solar azimuth angles (45°, 135°, 225°, 305°). The four extracted mountain shadow bands are fused with the DSM data to enhance the shadow features of the image and improve the recognition accuracy of the field block and the ridge area.
[0085] S432: Based on the field block to be extracted region data, the image data is subjected to multi-scale segmentation and object-oriented classification by using the eCognition software (a professional remote sensing image processing software widely used in the fields of geosciences, environmental monitoring, natural resource management, etc.). In this process, the weight of the four mountain shadow bands is set to 1, the weight of the DSM band is set to 0.6, the scale parameter is set to 80, the shape parameter is set to 0.5, and the compactness parameter is set to 0.6. These parameter settings can effectively perform image segmentation and ensure accurate extraction of field blocks and ridges while avoiding over-segmentation.
[0086] S433: After segmentation, about ten ridge samples and twenty background samples are selected, the nearest neighbor feature is configured, the mean value and standard deviation are selected as the feature parameters, and then classification is performed. In this step, through sample training, the ridge area is identified and distinguished from other categories. The classification result is exported in the Shapefile (shp) format, and the classification result is written into the attribute table, and the ridge area is extracted based on the classification result.
[0087] S434: Since some areas may be misclassified as the ridge category, threshold method is used to remove these misclassified areas. In order to ensure the accuracy of the results, the WGS1984 geographic coordinate system is used for coordinate conversion, and the data is projected into the WGS1984 UTM Zone 50N projection coordinate system. Then, the aspect ratio of the maximum bounding rectangle of each feature and the area ratio of the feature to the maximum bounding rectangle are calculated. According to the set threshold, the ridge area that meets the condition is selected, and the misclassified area is removed. In this example, the threshold is set to the area ratio of the maximum bounding rectangle of the feature itself greater than 0.3 and the aspect ratio less than 1.5, which is considered as a misclassified area and is deleted.
[0088] S435: In ArcGIS Pro, the fusion tool is used to fuse adjacent ridge surface areas to form continuous ridge areas. By performing boundary smoothing on these areas, further noise removal is performed. Through manual investigation, it is known that the width of the field ditch is generally about 0.2 to 0.3 m. A 0.4 m buffer zone is generated for the extracted field block, and the erase tool is used to erase the field block data and the ridge data, thereby obtaining the field ditch data.
[0089] In this embodiment, the present application can obtain high-resolution raw image data through the unmanned aerial vehicle carrying a multispectral camera and an optical lens in the data acquisition module, providing a high-quality data basis for subsequent fine extraction, and pre-processing the data through geometric correction, radiation correction and aerial triangulation; In the model training module, the U-net algorithm model with built-in attention mechanism is trained by combining spectral features, terrain features and texture features, which significantly improves the model's perception ability of complex ground objects. Through multi-feature fusion technology, the model can more accurately identify and extract water ponds, field blocks and field ditches, and improve the extraction accuracy; In the data extraction module, the water pond is extracted by the U-net model, the field block is extracted by the ISODATA clustering algorithm and the image segmentation model, and the field ditch is extracted by the mountain shadow tool and the multi-scale segmentation technology; Finally, all the data is checked by spatial overlay analysis and topological consistency, and the final field-ditch-pond vector data is generated, which provides high-precision data support for subsequent agricultural non-point source pollution migration trajectory simulation and fine management of farmland.
[0090] Embodiment Two
[0091] Based on the embodiment one, the present application further provides a UAV photogrammetry and deep learning field-ditch-pond extraction system; the system comprises:
[0092] A data acquisition module is used to control the unmanned aerial vehicle to carry a multispectral camera and an optical lens, and to obtain raw image data of the target area through oblique photogrammetry technology;
[0093] A data preprocessing module is configured to preprocess the acquired original image data to generate a multispectral image map (DOM) and a digital surface model (DSM);
[0094] A model training module is configured to construct a U-net algorithm model with an embedded attention mechanism and train the preprocessed image data by combining a multi-feature fusion technology, wherein the fused features include spectral features, terrain features, and texture features;
[0095] A data extraction module is configured to:
[0096] extract water pond vector data from the target area by using the trained U-net model to extract the water pond from the image data of the target area;
[0097] classify the preprocessed multispectral data by using an ISODATA clustering algorithm to extract field block region data to be extracted, and perform image segmentation on the field block region data to be extracted by using an image segmentation model supporting zero sample learning to generate field block vector data;
[0098] extract ridge region data by using a mountain shadow tool in combination with DSM data, and perform multiscale segmentation and shape feature extraction to generate field ditch vector data;
[0099] A data integration module is configured to perform spatial superposition analysis on the water pond, field block, and field ditch vector data, check topological consistency, and generate final field-ditch-pond vector data.
[0100] Further, the data extraction module further includes:
[0101] A water pond extraction unit is configured to process tree sheltering problems, repair water pond boundaries by using a convex hull algorithm and curvature calculation;
[0102] A field block extraction unit is configured to process boundary effects of sliding clipping, and reduce the influence of boundary effects by weight distribution;
[0103] A field ditch extraction unit is configured to process misclassification problems of ridge region, and remove misclassified regions by using maximum bounding rectangle analysis and threshold method.
[0104] It should be noted that in the present embodiment, the specific operation of the water pond extraction unit is as follows: for the part of the water pond that is mostly blocked by trees, it is selected separately, the convex hull algorithm is used to calculate the convex polygon thereof, the vector cross product of three adjacent points is calculated to judge the curvature, a certain curvature threshold is set, the place with high curvature is extracted, the vertical distance of the point with high curvature value to the convex hull is calculated, the part of the water pond that is naturally curved is excluded, and then it is judged whether the outside of the concave region is a tree. If it is a tree, the filling operation is performed; specifically, for each vertex, the previous point, the current point and the next point are taken, the cross product of the forward vector and the backward vector is calculated, and then the curvature value is obtained by normalization processing. The points with a curvature value greater than 0.15 and a vertical distance to the convex hull less than 7m are taken as the tree-shielded vertex. Then, the points with a curvature value greater than -0.1 are sequentially connected to form an arc segment from the left and right sides of the point. The convex hull is constructed from the arc segment, and it is judged whether the spectrum value of the convex hull is a tree. If it is, it is merged into the water pond surface. If not, it is not merged. This method can make up for the loss of information caused by tree shielding, thereby improving the accuracy of water pond extraction.
[0105] It should be noted that in the present embodiment, the specific operation of the field block extraction unit is as follows: since the sliding cropping will produce a boundary effect, the integrity of the boundary object will be lost, so the middle image (for example, the first, second and third images in the sliding cropping, the second image being the middle region of the first and third images) of the sliding cropping is given the highest weight. When the vector elements selected in 50% of the area of the middle image are merged, if they overlap with other images during merging, they are fused into the highest weight area, thereby reducing the influence of the boundary effect. For the areas with smaller areas, they are merged to the outside to reduce the influence of the void, and then for each vectorized field block region, the spectrum value inside it is calculated, the non-field block region is removed by setting a threshold for each band, and it is ensured that the finally retained region is the actual field block part.
[0106] It should be noted that in the present embodiment, the specific operation of the field ditch extraction unit is as follows: in order to delete the misclassified region, the maximum bounding rectangle of each segmented region is analyzed, the aspect ratio and area ratio thereof are calculated, and the misclassified region is removed according to the set threshold (the aspect ratio of the maximum bounding rectangle ≤1.5 and the element occupies the maximum bounding rectangle area ratio ≥0.3). This step effectively removes the field ridge regions that are misclassified or do not meet the conditions, ensures the accuracy of the extraction result, and then smoothes the field ridge boundary line, thereby extracting the field ridge boundary.
[0107] Embodiment three
[0108] On the basis of the embodiment one, the application further provides a computer readable storage medium, which stores a computer program, and the computer program is executed by a processor to realize the steps of the method in the embodiment one.
[0109] Embodiment four
[0110] On the basis of the embodiment one, the application further provides a device, which comprises:
[0111] a memory for storing instructions;
[0112] a processor for executing the instructions, so that the device executes the steps of the method in the embodiment one.
[0113] In summary, the application provides a high-efficiency and high-precision field-ditch-pond extraction method through the unmanned aerial vehicle photogrammetry technology and the deep learning algorithm combined with the multi-feature fusion technology. The method not only significantly improves the extraction precision, but also improves the extraction efficiency, can adapt to the extraction requirements of complex terrains and multiple types of farmland, and provides strong technical support for small watershed agricultural non-point source pollution control and farmland fine management.
[0114] Those skilled in the art will understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application 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-ROMs, optical storage, etc.) containing computer-usable program code.
[0115] The present application is described with reference to flowcharts and / or block diagrams according to the methods, devices (systems), and computer program products of the embodiments of the present application. It should be understood that each flow and / or block in the flowcharts and / or block diagrams, and the combination of flows and / or blocks in the flowcharts and / or block diagrams can be implemented by computer program instructions. These computer program instructions can be provided to a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing devices generate a means for implementing the functions specified in the flowcharts and / or block diagrams. Figure 1 The function of the means specified in one flow or multiple flows and / or blocks Figure 1 The function of the means specified in one flow or multiple flows and / or blocks
[0116] These computer program instructions can also be stored in a computer-readable memory capable of guiding the computer or other programmable data processing devices to work in a specific manner, so that the instructions stored in the computer-readable memory produce a product including instruction means, which implements the functions specified in the flowcharts and / or block diagrams.Figure 1 one or more processes and / or functions described in one or more blocks. Figure 1 one or more blocks.
[0117] These computer program instructions can also be loaded into computer or other programmable data processing devices, so that a series of operational steps are performed on the computer or other programmable data processing devices to generate a computer-implemented process, so that the instructions executed on the computer or other programmable data processing devices provide steps for implementing the function described in one or more processes and / or functions described in one or more blocks. Figure 1 one or more processes and / or functions described in one or more blocks. Figure 1 one or more blocks.
[0118] The above description is only the preferred embodiment of the present application, and it should be pointed out that for those skilled in the art, without departing from the technical principles of the present application, a number of improvements and modifications can be made, and these improvements and modifications should also be considered as the protection scope of the present application.
Claims
1. A method for extracting fields, ditches, and ponds using UAV photogrammetry and deep learning, characterized in that, include: S1: Use a drone equipped with a multispectral camera and optical lens to acquire raw image data through oblique photogrammetry. S2: Preprocess the acquired raw image data to generate a multispectral image map (DOM) and a digital surface model (DSM); S3: Construct a U-net algorithm model with a built-in attention mechanism, and train it on preprocessed image data by combining multi-feature fusion technology. The fused features include spectral features, terrain features and texture features. S4: Use the trained U-net algorithm model to extract water features from the image data of the target area and generate vector data of the water features; The ISODATA clustering algorithm was used to classify the preprocessed multispectral data and extract the data of the field areas to be extracted; an image segmentation model that supports zero-shot learning was used to segment the data of the field areas to be extracted and generate vector data of the field. Using the mountain shadow tool in conjunction with DSM data, the field ridge area was extracted, and multi-scale segmentation and shape feature extraction were performed to generate vector data of the field ditches; S5: Perform spatial overlay analysis on the vector data of ponds, fields, and ditches, check topological consistency, and generate the final field-ditch-pond vector data; The U-net algorithm model with built-in attention mechanism described in S3 includes: The encoder module adopts a five-level downsampling structure, with each level consisting of two sets of depthwise separable convolutions. Its kernel size is 3×3, with a stride of 1. It is equipped with a ReLU activation function and an embedded SE channel attention module to enhance the spectral features of water bodies through adaptive channel weight adjustment. The decoder module adopts a five-level upsampling structure. Each level achieves feature recovery through bilinear interpolation and transposed convolution, and makes cross-layer skip connections with the feature maps of the corresponding levels of the encoder module. A dynamic gating mechanism is introduced at the connection point, and the Sigmoid function is used to control the feature fusion weights. Furthermore, the decoder module innovatively integrates a multi-scale dilated convolution pyramid module in the fourth-level decoding layer, which contains four sets of parallel dilated convolution layers. The output features are concatenated by channels and then input into a 1×1 convolution for multi-scale contextual feature fusion. The multi-feature fusion technology described in S3 includes: Spectral features are extracted from multispectral data, including reflectance calculations for blue, green, red, red-edge, and near-infrared bands. Topographic features are extracted from DSM data, including the calculation of slope, curvature, and aspect. Texture features are extracted from image data, including the calculation of texture intensity and texture direction.
2. The method for extracting fields, ditches, and ponds using UAV photogrammetry and deep learning according to claim 1, characterized in that, In the encoder module, a 2×2 max-pooling layer is set at the end of each stage, the feature map size is reduced step by step, and the number of channels is multiplied to 512.
3. The method for extracting fields, ditches, and ponds using UAV photogrammetry and deep learning according to claim 1, characterized in that, The U-net algorithm model uses the LabelMe tool to label water bodies and employs a bicubic interpolation algorithm to normalize the image data in size.
4. The method for extracting fields, ditches, and ponds using UAV photogrammetry and deep learning according to claim 1, characterized in that, The multi-scale segmentation technique uses the mountain shadow tool in ArcGIS Pro, sets the solar elevation angle to 50°, and extracts mountain shadows at multiple solar azimuth angles to enhance the shadow features of the image.
5. A field-ditch-pond extraction system based on UAV photogrammetry and deep learning, characterized in that, include: The data acquisition module is used to control the UAV equipped with a multispectral camera and optical lens to acquire raw image data of the target area through oblique photogrammetry technology. The data preprocessing module is used to preprocess the acquired raw image data to generate multispectral image maps (DOM) and digital surface models (DSM). The model training module is used to build the U-net algorithm model with a built-in attention mechanism and train it on the preprocessed image data by combining multi-feature fusion technology. The fused features include spectral features, terrain features and texture features. The data extraction module is used for: The trained U-net model is used to extract water features from the image data of the target area, generating vector data of the water features. The ISODATA clustering algorithm was used to classify the preprocessed multispectral data and extract the data of the field areas to be extracted; an image segmentation model that supports zero-shot learning was used to segment the data of the field areas to be extracted and generate vector data of the field. Using the mountain shadow tool in conjunction with DSM data, the field ridge area was extracted, and multi-scale segmentation and shape feature extraction were performed to generate vector data of the field ditches; The data integration module is used to perform spatial overlay analysis on the vector data of ponds, fields, and ditches, check topological consistency, and generate the final field-ditch-pond vector data. The U-net algorithm model includes: The encoder module adopts a five-level downsampling structure, with each level consisting of two sets of depthwise separable convolutions. Its kernel size is 3×3, with a stride of 1. It is equipped with a ReLU activation function and an embedded SE channel attention module to enhance the spectral features of water bodies through adaptive channel weight adjustment. The decoder module adopts a five-level upsampling structure. Each level achieves feature recovery through bilinear interpolation and transposed convolution, and makes cross-layer skip connections with the feature maps of the corresponding levels of the encoder module. A dynamic gating mechanism is introduced at the connection point, and the Sigmoid function is used to control the feature fusion weights. Furthermore, the decoder module innovatively integrates a multi-scale dilated convolution pyramid module in the fourth-level decoding layer, which contains four sets of parallel dilated convolution layers. The output features are concatenated by channels and then input into a 1×1 convolution for multi-scale contextual feature fusion. The multi-feature fusion technology includes: Spectral features are extracted from multispectral data, including reflectance calculations for blue, green, red, red-edge, and near-infrared bands. Topographic features are extracted from DSM data, including the calculation of slope, curvature, and aspect. Texture features are extracted from image data, including the calculation of texture intensity and texture direction.
6. The UAV photogrammetry and deep learning system for extracting fields, ditches, and ponds according to claim 5, characterized in that, The data extraction module also includes: The pond extraction unit is used to handle the tree occlusion problem and repairs the pond boundary by calculating the convex hull algorithm and curvature. The field extraction unit is used to handle the boundary effect of sliding cut, and the impact of the boundary effect is reduced through weight allocation; The field ditch extraction unit is used to handle the misclassification problem of the field ridge area. It removes misclassified areas through maximum bounding rectangle analysis and thresholding.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by the processor, it implements the steps of the field-ditch-pond extraction method based on UAV photogrammetry and deep learning as described in any one of claims 1-4.
8. An electronic device, characterized in that, include: Memory, used to store instructions; A processor is configured to execute the instructions, causing the device to perform the steps of the field-ditch-pond extraction method of UAV photogrammetry and deep learning as described in any one of claims 1-6.
Citation Information
Patent Citations
Unmanned aerial vehicle image crown canopy segmentation method based on combination of morphology and mark controlling
CN106875407A
Field ditch pond parameter acquisition method and device
CN110207676A
Cited By
Source remote sensing data fusion and intelligent interpretation method and system for digital agriculture
CN122388614A