Wheat field furrow unmanned aerial vehicle image detection method based on spatial topology analysis
Patent Information
- Application Number
- CN202610841417.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-11
- Publication Date
- 2026-09-01
AI Technical Summary
[0010]本发明的目的是为了解决现有技术中难以实现麦田垄沟影像检测的缺陷,提供一种基于空间拓扑结构分析的麦田垄沟无人机影像检测方法来解决上述问题
[0059] The present invention provides a method for detecting wheat field furrows using UAV images based on spatial topology analysis. Compared with existing technologies, this method draws on a visual computing framework and utilizes high-resolution UAV images. Based on spatial topology analysis, it elevates the image processing unit from pixels to editable structural elements, thereby enabling the detection of farmland furrows in complex agricultural scenarios.
Smart Images

Figure CN122676346A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of wheat field image processing technology, specifically to a method for detecting wheat field furrows using unmanned aerial vehicle (UAV) images based on spatial topology analysis. Background Technology
[0002] In modern precision agriculture, field ridges are not only the foundation of crop growth space but also the visual baseline for automated navigation, precision fertilization, and irrigation operations by agricultural machinery. Real-time and accurate extraction of wheat field ridge and furrow structure using UAV (Unmanned Aerial Vehicle) low-altitude remote sensing technology has significant application value for farmland path planning, operational coverage assessment, and crop growth monitoring. As the geometric framework of farmland, the complete extraction of ridge and furrow morphology is a core step in achieving digital modeling of farmland and the construction of unmanned operation maps.
[0003] In remote sensing imagery, furrow detection essentially relies on the accurate segmentation and fitting of "crop rows" or "bare soil / shaded background." Looking at research both domestically and internationally, the techniques in this field can be mainly divided into the following two categories:
[0004] The first category consists of methods based on traditional machine vision. The typical process involves first using vegetation indices (such as the supergreen index ExG) combined with Otsu's method to binarize the image, separating vegetation from the soil background. Then, mathematical algorithms such as Hough Transform, least squares, or location clustering are used to fit the centerline of the crop rows or furrows. However, traditional methods are highly dependent on threshold settings and have poor adaptability to rapid changes in light intensity, interference from field weeds, and irregular curved furrows.
[0005] The second category comprises deep learning-based methods: With the development of artificial intelligence, deep neural networks (DNNs) have gradually replaced traditional methods as the mainstream. Object detection networks (such as the YOLO series and Faster R-CNN) and semantic segmentation networks (such as U-Net and SegFormer) are widely used for feature extraction in complex farmland environments. Deep learning methods, by autonomously learning high-dimensional features, effectively overcome the limitations of traditional feature engineering under complex lighting conditions and high weed density.
[0006] Although furrow and crop row detection technologies based on drone imagery are relatively mature, existing research is highly focused on wide-row crops such as maize, cotton, and potatoes. In contrast, research on furrow detection for narrow-row, densely planted crops such as wheat remains scarce. This academic gap is mainly attributed to the extremely high complexity and unique characteristics of wheat field scenarios.
[0007] 1. High planting density and extremely narrow row spacing: Wide-row crops such as corn have clear furrow boundaries, while wheat fields (strip sowing or broadcast sowing) usually have a row spacing of only 15-25 cm. The furrows occupy very few pixels in the image and are easily disturbed by gaps between wheat ears, lodging, or other ground features.
[0008] 2. Canopy closure and severe cross-shading: As wheat enters the jointing and booting stages, leaves rapidly cross-over, leading to canopy closure and lodging. This causes the visual features of the bottom furrows (bare soil or shadows) to degrade drastically or even completely break in UAV aerial images. A comparative study by Zhao et al. (2021) vividly illustrates this problem: the same row detection algorithm can achieve an accuracy of over 99% in cotton fields (wide rows) with different nitrogen fertilizer levels, but in wheat fields, due to extremely high plant density and leaf shading, its accuracy drops sharply to 66%-82%.
[0009] In summary, traditional machine vision algorithms are not robust to high-density, heavily occluded wheat field environments, and existing deep learning models rarely have specific network designs or optimizations tailored to the underlying physical topology (ridges and furrows) of wheat fields. Summary of the Invention
[0010] The purpose of this invention is to address the shortcomings of existing technologies in detecting wheat field furrows in images, and to provide a method for detecting wheat field furrows using unmanned aerial vehicle (UAV) images based on spatial topology analysis to solve the above problems.
[0011] To achieve the above objectives, the technical solution of the present invention is as follows:
[0012] A method for detecting wheat field furrows in UAV images based on spatial topology analysis includes the following steps:
[0013] 11) Acquisition and preprocessing of drone images of wheat fields: Acquire drone images of wheat fields and process them into a dataset;
[0014] 12) Define the gully extraction algorithm: Construct a gully extraction algorithm by combining physical constraints and spatial topology analysis;
[0015] 13) Obtaining the detection results of wheat field furrow UAV images: The wheat field UAV images are processed using the furrow extraction algorithm to obtain the detection results of wheat field furrow UAV images.
[0016] The acquisition and preprocessing of the wheat field drone imagery includes the following steps:
[0017] 21) Use the flight path set by the UAV to carry out remote sensing mapping of standardized farmland, which is a rectangular farmland with horizontal and vertical furrows intersecting perpendicularly;
[0018] 22) Use remote sensing image stitching software to stitch together the images obtained by remote sensing mapping to obtain an orthophoto mosaic.
[0019] 23) Crop the orthophoto mosaic according to the set resolution to obtain the cropped images. At the same time, store the name of each cropped image and its row and column ID in a matrix form in a Python npy file. Combine the cropped images and npy files as a dataset.
[0020] The defined gully extraction algorithm includes the following steps:
[0021] 31) The furrow extraction algorithm is defined as including a furrow coarse extraction stage and a furrow completion stage;
[0022] 32) Setting up the furrow coarse extraction stage: The candidate furrow region is located by fusing multiple constraint features, and the furrow structure is roughly located. The furrow structure includes transverse furrows and longitudinal furrows.
[0023] 33) Setting up the furrow completion stage: Using an assistive algorithm to select the upper and lower boundaries of the furrows for the rough furrow structure, and completing the furrows based on rules.
[0024] The furrow coarse extraction stage includes the following steps:
[0025] 41) Combine five consecutive horizontally or vertically arranged silhouette images from the dataset to form a composite image;
[0026] 42) Perform multi-feature fusion detection:
[0027] Threshold segmentation is performed on the mosaic image to calculate the super-green index. ExG = 2G-R–B; Extract the HSV spatial luminance component V; Generate a threshold segmentation to initially generate a binary mask Z: Z ;
[0028] in, This represents the upper limit of grayscale value for furrows in the ExG space. This represents the upper limit of the gray value of the furrows in the V channel of the HSV color space. RGB are the three basic channels of the image, and HSV is the color space of the image.
[0029] 43) Perform connected component analysis using a binary mask Z, and calculate the aspect ratio of the segmented connected components. Filter out Connected components, The threshold represents the lower limit of the aspect ratio of the connected domain of the detected furrow candidate region, which is used to distinguish the noise of the real furrow from the background noise of the farmland from the perspective of the connected domain.
[0030] 44) Extracting candidate line segment sets using probabilistic Hough transform ,
[0031] 45) Perform secondary filtration:
[0032] Calculate the effective pixel density on each horizontal and vertical line segment. ,
[0033] like > If this line is considered a furrow, a mask of width 'a' is created with this line as its centroid as the result of furrow extraction. The centroid coordinates are recorded and converted into coordinates for the stitched large image. ; The effective pixel density threshold represents the lower limit of the proportion of pixels identified as furrows on the line segment containing the furrows to the total number of pixels. It is used to further distinguish real furrows from farmland background noise along the entire line angle.
[0034] 46) Loop through the orthophoto mosaic and set the overlap rate. Coarse extraction was performed on both transverse and longitudinal furrows, and the extraction results were labeled as transverse furrow masks. and longitudinal furrow mask ;
[0035] 47) Based on the row and column IDs of the cutout image, mask the horizontal furrows along the horizontal and vertical directions respectively. and longitudinal furrow mask The pixels in the image are subjected to sliding window centroid tracing, and the discrete centroid points obtained from each row and column scan are aggregated into horizontal furrow entities with independent IDs. and longitudinal furrow entities ,
[0036] ,
[0037] ,
[0038] in, Let n be the centroid of the detected longitudinal furrow region. This is the centroid point of the nth detected transverse furrow region;
[0039] At the same time, a new attribute was added to the furrow structure—the length of the line connecting the centroids. ;
[0040] 48) Repeat steps 41)-47) to extract the furrow structure.
[0041] The furrow completion stage includes the following steps:
[0042] 51) Perform noise pruning, removing branches of a certain length. , The fragmented furrow structure, in which, This is the lower threshold for the furrow length used for extension, so that furrow structures that do not meet the length requirements are no longer extended or completed.
[0043] 52) Specify the topology baseline:
[0044] Compare each transverse furrow Average y-coordinate of the centroid y-coordinate of the horizontal line of the orthophoto mosaic The furrows are divided into an upper group and a lower group; the longest furrow is selected. As a spatial constraint boundary As a constraint on the longitudinal structure of the furrows that serve as the upper edge of farmland, Constraints on the longitudinal structure of furrows that serve as the lower edge of farmland;
[0045] 53) Structured Reconstruction:
[0046] Traverse each vertical trench entity to be processed and A linear regression model for fitting the boundary grooves using the least squares method is defined. Using a linear regression model Extend the furrow lines in both directions to calculate the longitudinal furrow entities. End and geometric intersection and ,
[0047] ,
[0048] ,
[0049] in, The straight line fitted to the k-th longitudinal furrow. The straight line fitted to the top horizontal furrows. The straight line fitted to the bottom horizontal furrows.
[0050] Solve the two linear equations separately.
[0051] get , ,
[0052] in, For the kth longitudinal furrow and upper transverse furrows The intersection point, whose coordinates are... ; For the kth longitudinal furrow and lower transverse furrows The intersection point, whose coordinates are... ;
[0053] 54) Virtual growth: [This refers to the process of virtual growth.] and As a newly added topology node, it completes the process. Sequence, and simultaneously The intersection of the leftmost and rightmost points of the extension line is added to... In the middle, fill the visual gaps caused by crop shading;
[0054] 55) Sort the point sets of all gully entities by spatial monotonicity to ensure the logical rigor of the topological structure;
[0055] 56) Output: Generate a color-coded detection map ,Will Attached to the orthophoto mosaic to display furrow identification results, updated. and Calculation results of the length of the furrows in the structure.
[0056] A computer-readable storage medium storing a computer program, which, when executed by a processor, enables a method for detecting wheat field furrows using UAV images based on spatial topology analysis.
[0057] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When executed by the processor, it enables a method for detecting wheat field furrows using UAV images based on spatial topology analysis.
[0058] Beneficial effects
[0059] The present invention provides a method for detecting wheat field furrows using UAV images based on spatial topology analysis. Compared with existing technologies, this method draws on a visual computing framework and utilizes high-resolution UAV images. Based on spatial topology analysis, it elevates the image processing unit from pixels to editable structural elements, thereby enabling the detection of farmland furrows in complex agricultural scenarios.
[0060] This invention follows the principle of "physical constraint-oriented" approach, achieving its goal through two core steps: "structure generation" and "structure completion." Compared to traditional data-driven methods, this approach offers the following significant advantages:
[0061] 1. No training required and low barrier to entry: No need to spend a lot of manpower on sample labeling, which greatly reduces the initial preparation threshold and computing power cost of the algorithm;
[0062] 2. Easy to tune parameters and have physical meaning: The algorithm parameters directly correspond to the agronomic characteristics of wheat fields, which facilitates rapid migration between different varieties and sample areas;
[0063] 3. Excellent spatiotemporal generalization performance: The model constructed by combining sensitive color features and robust topological constraints can effectively resist spatiotemporal heterogeneity interference caused by changes in region, reproductive period and illumination, thus ensuring the reliable application of the algorithm in real-world large-scale and cross-regional scenarios. Attached Figure Description
[0064] Figure 1 This is a sequence diagram of the method of the present invention;
[0065] Figure 2a A schematic diagram of the furrows in a wheat field;
[0066] Figure 2b A schematic diagram of the furrows in an image of wheat ears;
[0067] Figure 3 This is a silhouette image related to the present invention;
[0068] Figure 4 This is a schematic diagram of the contents of the npy file involved in this invention;
[0069] Figure 5a , Figure 5b All images are results of coarse extraction of furrows involved in this invention;
[0070] Figure 6 This is a schematic diagram illustrating the ridge and furrow extraction effect involved in the present invention. Detailed Implementation
[0071] To provide a better understanding of the structural features and effects achieved by the present invention, a detailed description is provided below, accompanied by preferred embodiments and accompanying drawings:
[0072] Traditional image processing methods rely excessively on local gradients and color operators, making them prone to getting trapped in local optima when faced with high-frequency noise interference and physical obstructions, thus failing to maintain the integrity of the topological structure. While deep learning algorithms, which have emerged in recent years, possess powerful feature extraction capabilities, they are essentially data-driven empirical models, and their performance is highly dependent on the completeness of the training samples. Faced with data distribution shift caused by spatiotemporal heterogeneity, deep learning models often lack hard constraints on the physical geometry of the field ridges, resulting in severe fragmentation and logical inconsistencies in prediction results in lodged or heavily shaded areas.
[0073] Image is essentially a model of the features of the objective world, such as color, brightness, and texture. The basic unit of current mainstream image processing is the pixel, and the processing methods are usually based on pattern recognition methods derived from linear algebra and probability theory (including machine learning and its important branch, deep learning). However, the above methods cannot achieve the leap from image recognition to image understanding. The main difficulties are: (1) Image sensors can usually only express the surface information of the field of view in the form of pixels. Affected by factors such as target spatial structure, illumination, and occlusion, some key information may be missing. Classic pattern recognition image processing methods lack image information completion functions, which may lead to ambiguity in the results of algorithm recognition; (2) The pixel-level information obtained by the image sensor does not directly contain the correspondence between pixels and objects in the physical world. It may resolve points belonging to different objects as pixels with the same gray value, causing huge interference to subsequent image processing.
[0074] The aforementioned dilemmas force us to re-examine the fundamental theories of computer vision. David Marr, the founder of visual computation theory, pointed out that the visual process is not only a reconstruction from low-level features to high-level semantics, but also a process of eliminating reverse engineering ambiguities by utilizing constraints and rules from the physical world. Therefore, injecting the physical topology of wheat planting—such as the near parallelism, equidistant spacing, and continuous growth direction of furrows—as top-level constraints into the algorithm logic becomes a key breakthrough in solving the problem of furrow extraction in complex environments. Vision is not merely a passive reception of light and shadow signals, but a computational process of constructing a representation of the objective world step by step. In his defined "Computational Theory," the core scientific problem lies in how to solve the uncertainty in recovering three-dimensional physical properties from two-dimensional images, namely the "Inverse Optics Problem." Marr's most forward-thinking contribution to image processing lies in the introduction of physical constraints and rules.
[0075] In the field of agricultural remote sensing, this idea is highly adaptable. When wheat field images suffer from fragmented primary sketches due to lodging, shadows, or sensor noise, empirical models built solely based on data often fail. According to Marr, higher-level geometric prior rules must be introduced—such as the quasi-periodic arrangement of crops, the near-parallel topology of furrows, and the constant row spacing due to mechanical sowing. By transforming these physical constraints into regularization terms or search boundaries for the algorithm, the originally constrained feature extraction task can be transformed into an optimization reconstruction process guided by physical rules, thereby recovering stable agricultural structural information even in environments with highly spatiotemporal heterogeneity.
[0076] like Figure 1 As shown, the present invention provides a method for detecting wheat field furrows and ridges in UAV images based on spatial topology analysis, comprising the following steps:
[0077] The first step is to acquire and preprocess drone images of wheat fields: acquire drone images of wheat fields and process them into a dataset.
[0078] (1) Remote sensing mapping of standardized farmland is carried out using the flight path set by the UAV. The standardized farmland is a rectangular farmland with horizontal and vertical furrows intersecting perpendicularly.
[0079] (2) Use remote sensing image stitching software to stitch together the images obtained by remote sensing mapping to obtain an orthophoto mosaic.
[0080] (3) Cropping the orthophoto mosaic according to the set resolution to obtain the cropped image, such as... Figure 3 As shown, the name of each cropped image and its corresponding row and column IDs are stored in a matrix format in a Python npy file. The cropped images and the npy file are then combined as follows: Figure 4 As shown, they are merged into a dataset.
[0081] The second step is to define the gully extraction algorithm: a gully extraction algorithm is constructed by combining physical constraints and spatial topology analysis.
[0082] (1) The furrow extraction algorithm is set to include the furrow coarse extraction stage and the furrow completion stage.
[0083] (2) Setting the furrow coarse extraction stage: The candidate furrow region is located by fusing multiple constraint features, and the furrow structure is roughly located. The furrow structure includes transverse furrows and longitudinal furrows.
[0084] In the coarse extraction stage, the algorithm simulates the primary sketch of color and texture in human vision and locates candidate regions for gullies by fusing multiple constrained features.
[0085] From the perspective of image color features, the furrows and gaps between wheat ears in a wheat field are relatively dark areas. Due to factors such as the growth stage and the image acquisition environment, simple image grayscale analysis algorithms struggle to accurately distinguish between furrows and gaps between wheat ears. Figure 2a and Figure 2b As shown, the colors of the furrows and gaps in the wheat field and wheat ear images are extremely similar. In addition to using Gaussian blur to reduce the influence of furrow gaps, this invention utilizes the characteristic of standardized farmland furrows being horizontal and vertical, and adds an important constraint—a density threshold: if pixels in a row / column exceed the density threshold percentage, they are considered foreground elements, and that row / column is considered a furrow; if the threshold is not reached, these foreground elements are considered noise such as gaps between wheat ears.
[0086] A1) Combine five consecutive horizontally or vertically continuous silhouette images from the dataset to form a stitched image.
[0087] A2) Perform multi-feature fusion detection:
[0088] Threshold segmentation is performed on the mosaic image to calculate the super-green index. ExG = 2G-R–B; Extract the HSV spatial luminance component V; Generate a threshold segmentation to initially generate a binary mask Z: Z ;
[0089] in, This represents the upper limit of grayscale value for furrows in the ExG space. This represents the upper limit of the grayscale value of the furrows in the V channel of the HSV color space. RGB are the three basic channels of the image, and HSV is the color space of the image.
[0090] A3) Perform connected component analysis using a binary mask Z, and calculate the aspect ratio of the segmented connected components. Filter out Connected components, The threshold represents the lower limit of the aspect ratio of the connected domain of the detected furrow candidate area, which is used to distinguish the noise of the real furrow from the background of farmland from the perspective of the connected domain.
[0091] A4) Extracting candidate line segment sets using probabilistic Hough transform ,
[0092] A5) Perform secondary filtering:
[0093] Calculate the effective pixel density on each horizontal and vertical line segment. ,
[0094] like > If this line is considered a furrow, a mask of width 'a' is created with this line as its centroid as the result of furrow extraction. The centroid coordinates are recorded and converted into coordinates for the stitched large image. ; The effective pixel density threshold represents the lower limit of the proportion of pixels identified as furrows on the line segment containing the furrows to the total number of pixels. It is used to further distinguish real furrows from farmland background noise along the entire line angle.
[0095] A6) Loop through the orthophoto mosaic until the overlap rate is set. Coarse extraction was performed on both transverse and longitudinal furrows, and the extraction results were labeled as transverse furrow masks. and longitudinal furrow mask ;
[0096] A7) Based on the row and column IDs of the cutout image, mask the horizontal furrows along the horizontal and vertical directions respectively. and longitudinal furrow mask The pixels in the image are subjected to sliding window centroid tracing, and the discrete centroid points obtained from each row and column scan are aggregated into horizontal furrow entities with independent IDs. and longitudinal furrow entities ,
[0097] ,
[0098] ,
[0099] in, Let n be the centroid of the detected longitudinal furrow region. This is the centroid point of the nth detected transverse furrow region;
[0100] At the same time, a new attribute was added to the furrow structure—the length of the line connecting the centroids. ;
[0101] A8) Repeat steps A1)-A7) to extract the furrow structure, as shown below. Figure 5a , Figure 5b As shown.
[0102] (3) Setting the furrow completion stage: The coarse furrow structure is used to select the upper and lower boundaries of the furrows and delete misidentified furrows using an assisted algorithm, and then the furrows are completed based on rules. In this stage, the coarse furrow structure FCoarse is displayed in the view. The manual feedback (RLHF) method can also be used to assist the algorithm in selecting constraint references and filtering out some interference. Since the algorithm has difficulty in identifying reference objects and is not good at judging the overall situation, manual assistance is used to turn the detected furrows into structures that can be selected, edited and deleted. The purpose is to solve the error problem of coarse extraction. This also makes it convenient for users to edit unreasonable results and directly delete the incorrect furrow structures, which enhances the model's adaptability to complex environments.
[0103] B1) Perform noise pruning, removing length... , The fragmented furrow structure, in which, This is the lower threshold for the furrow length used for extension, so that furrow structures that do not meet the length requirements are no longer extended or completed.
[0104] B2) Specify the topology baseline:
[0105] Compare each transverse furrow Average y-coordinate of the centroid y-coordinate of the horizontal line of the orthophoto mosaic The furrows are divided into an upper group and a lower group; the longest furrow is selected. As a spatial constraint boundary As a constraint on the longitudinal structure of the furrows that serve as the upper edge of farmland, Constraints on the longitudinal structure of furrows that serve as the lower edge of farmland;
[0106] B3) Structured Reconstruction:
[0107] Traverse each vertical trench entity to be processed and ;
[0108] Linear regression model for fitting boundary gullies using the least squares method ;
[0109] Using linear regression model Extend the furrow lines in both directions to calculate the longitudinal furrow entities. End and geometric intersection and ,
[0110] ,
[0111] ,
[0112] in, The straight line fitted to the k-th longitudinal furrow. The straight line fitted to the top horizontal furrows. The straight line fitted to the bottom horizontal furrows.
[0113] Solve the two linear equations separately.
[0114] get , ,
[0115] in, For the kth longitudinal furrow and upper transverse furrows The intersection point, whose coordinates are... ; For the kth longitudinal furrow and lower transverse furrows The intersection point, whose coordinates are... ;
[0116] B4) Virtual Growth: [This will...] and As a newly added topology node, it completes the process. Sequence, and simultaneously The intersection of the leftmost and rightmost points of the extension line is added to... In the middle, fill in the visual gaps caused by crop shading.
[0117] B5) Sort the point sets of all gully entities by spatial monotonicity to ensure the logical rigor of the topological structure;
[0118] B6) Output: Generate a color-coded detection map ,Will Attached to the orthophoto mosaic to display furrow identification results, updated. and Calculation results of the length of the furrows in the structure.
[0119] The third step is to obtain the results of the UAV imagery detection of wheat field furrows: The UAV imagery of the wheat field is processed using a furrow extraction algorithm to obtain the UAV imagery detection results of the wheat field furrows, such as... Figure 6 As shown, the final results of furrow detection are presented.
[0120] As shown in Table 1, the computational cost of the proposed method is compared with that of the classic semantic segmentation network models YOLOv8 and U-net, which have relatively low computational cost. The comparison metrics include total FLOPS and unit pixel computation density (i.e., total FLOPS / number of image pixels).
[0121] Table 1. Comparison of computational complexity between the furrow extraction algorithm involved in this invention and the classical semantic segmentation model.
[0122]
[0123] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the present invention is not limited to the above embodiments. The embodiments and descriptions in the specification are merely principles of the invention. Various changes and modifications can be made to the invention without departing from its spirit and scope, and all such changes and modifications fall within the scope of the claimed invention. The scope of protection claimed by the appended claims and their equivalents is defined.
Claims
1. A method for detecting wheat field furrows and ridges in UAV images based on spatial topology analysis, characterized in that, Includes the following steps: 11) Acquisition and preprocessing of drone images of wheat fields: Acquire drone images of wheat fields and process them into a dataset; 12) Define the gully extraction algorithm: Construct a gully extraction algorithm by combining physical constraints and spatial topology analysis; 13) Obtaining the detection results of wheat field furrow UAV images: The wheat field UAV images are processed using the furrow extraction algorithm to obtain the detection results of wheat field furrow UAV images.
2. The method for detecting wheat field furrows and ridges in UAV images based on spatial topology analysis according to claim 1, characterized in that, The acquisition and preprocessing of the wheat field drone imagery includes the following steps: 21) Use the flight path set by the UAV to carry out remote sensing mapping of standardized farmland, which is a rectangular farmland with horizontal and vertical furrows intersecting perpendicularly; 22) Use remote sensing image stitching software to stitch together the images obtained by remote sensing mapping to obtain an orthophoto mosaic. 23) Crop the orthophoto mosaic according to the set resolution to obtain the cropped images. At the same time, store the name of each cropped image and its row and column ID in a matrix form in a Python npy file. Combine the cropped images and npy files as a dataset.
3. The method for detecting wheat field furrows and ridges in UAV images based on spatial topology analysis according to claim 1, characterized in that, The defined gully extraction algorithm includes the following steps: 31) The furrow extraction algorithm is defined as including a furrow coarse extraction stage and a furrow completion stage; 32) Setting up the furrow coarse extraction stage: The candidate furrow region is located by fusing multiple constraint features, and the furrow structure is roughly located. The furrow structure includes transverse furrows and longitudinal furrows. 33) Setting up the furrow completion stage: Using an assistive algorithm to select the upper and lower boundaries of the furrows for the rough furrow structure, and completing the furrows based on rules.
4. The method for detecting wheat field furrows and ridges in UAV images based on spatial topology analysis according to claim 3, characterized in that, The furrow coarse extraction stage includes the following steps: 41) Combine five consecutive horizontally or vertically arranged silhouette images from the dataset to form a composite image; 42) Perform multi-feature fusion detection: Threshold segmentation is performed on the mosaic image to calculate the super-green index. ExG = 2G-R–B; Extract the HSV spatial luminance component V; Generate a threshold segmentation to initially generate a binary mask Z: Z ; in, This represents the upper limit of grayscale value for furrows in the ExG space. This represents the upper limit of the gray value of the furrows in the V channel of the HSV color space. RGB are the three basic channels of the image, and HSV is the color space of the image. 43) Perform connected component analysis using a binary mask Z, and calculate the aspect ratio of the segmented connected components. Filter out Connected components, The threshold represents the lower limit of the aspect ratio of the connected domain of the detected furrow candidate region, which is used to distinguish the noise of the real furrow from the background noise of the farmland from the perspective of the connected domain. 44) Extracting candidate line segment sets using probabilistic Hough transform , 45) Perform secondary filtration: Calculate the effective pixel density on each horizontal and vertical line segment. , like > If this line is considered a furrow, a mask of width 'a' is created with this line as its centroid as the result of furrow extraction. The centroid coordinates are recorded and converted into coordinates for the stitched large image. ; The effective pixel density threshold represents the lower limit of the proportion of pixels identified as furrows on the line segment containing the furrows to the total number of pixels. It is used to further distinguish real furrows from farmland background noise along the entire line angle. 46) Loop through the orthophoto mosaic and set the overlap rate. Coarse extraction was performed on both transverse and longitudinal furrows, and the extraction results were labeled as transverse furrow masks. and longitudinal furrow mask ; 47) Based on the row and column IDs of the cutout image, mask the horizontal furrows along the horizontal and vertical directions respectively. and longitudinal furrow mask The pixels in the image are subjected to sliding window centroid tracing, and the discrete centroid points obtained from each row and column scan are aggregated into horizontal furrow entities with independent IDs. and longitudinal furrow entities , , , in, Let n be the centroid of the detected longitudinal furrow region. This is the centroid point of the nth detected transverse furrow region; At the same time, a new attribute was added to the furrow structure—the length of the line connecting the centroids. ; 48) Repeat steps 41)-47) to extract the furrow structure.
5. The method for detecting wheat field furrows and ridges in UAV images based on spatial topology analysis according to claim 4, characterized in that, The furrow completion stage includes the following steps: 51) Perform noise pruning, removing branches of a certain length. , The fragmented furrow structure, in which, This is the lower threshold for the furrow length used for extension, so that furrow structures that do not meet the length requirements are no longer extended or completed. 52) Specify the topology baseline: Compare each transverse furrow Average y-coordinate of the centroid y-coordinate of the horizontal line of the orthophoto mosaic The furrows are divided into an upper group and a lower group; the longest furrow is selected. As a spatial constraint boundary As a constraint on the longitudinal structure of the furrows that serve as the upper edge of farmland, Constraints on the longitudinal structure of furrows that serve as the lower edge of farmland; 53) Structured Reconstruction: Traverse each vertical trench entity to be processed and A linear regression model for fitting the boundary grooves using the least squares method is defined. Using a linear regression model Extend the furrow lines in both directions to calculate the longitudinal furrow entities. End and geometric intersection and , , , in, The straight line fitted to the k-th longitudinal furrow. The straight line fitted to the top horizontal furrows. The straight line fitted to the bottom horizontal furrows. Solve the two linear equations separately. get , , in, For the kth longitudinal furrow and upper transverse furrows The intersection point, whose coordinates are... ; For the kth longitudinal furrow and lower transverse furrows The intersection point, whose coordinates are... ; 54) Virtual growth: [This refers to the process of virtual growth.] and As a newly added topology node, it completes the process. Sequence, and simultaneously The intersection of the leftmost and rightmost points of the extension line is added to... In the middle, fill the visual gaps caused by crop shading; 55) Sort the point sets of all gully entities by spatial monotonicity to ensure the logical rigor of the topological structure; 56) Output: Generate a color-coded detection map ,Will Attached to the orthophoto mosaic to display furrow identification results, updated. and Calculation results of the length of the furrows in the structure.
6. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, enables the wheat field furrow UAV image detection method based on spatial topology analysis as described in any one of claims 1-5.
7. A computer device, characterized in that, The system includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, it can implement the method for detecting wheat field furrows using UAV images based on spatial topology analysis as described in any one of claims 1-5.