Farmland obstacle recognition and operation path planning method based on UAV imagery
By using a drone's multispectral sensor to collect farmland images and combining them with a deep convolutional network to correct obstacle contours, a path that conforms to mechanical dynamics is generated. This solves the problems of obstacle recognition accuracy and path feasibility in traditional farmland operation path planning, enabling efficient and safe farmland operations.
Patent Information
- Application Number
- CN202610005185.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-05
- Publication Date
- 2026-03-06
- Estimated Expiration
- 2046-01-05
AI Technical Summary
Traditional farmland operation path planning relies on manual surveying, which is difficult to adapt to the dynamically changing farmland environment. The accuracy of obstacle identification is insufficient, and the path planning is unreasonable, resulting in mechanical collision risks and resource waste. Moreover, existing methods fail to effectively combine the dynamic characteristics of obstacles and operating machinery, resulting in poor path feasibility.
The drone is equipped with a multispectral sensor to collect time-series images, which are then processed at the pixel level. The obstacle contours are corrected by combining a deep convolutional network to generate an obstacle distribution raster map. Based on the dynamic parameters of the working machinery, a path with the minimum obstacle avoidance cost is generated, and a dynamic time warping algorithm is used to smooth the path turning angle and speed adjustment.
It achieves high-precision identification and path planning of farmland obstacles, improves the feasibility and safety of the path, reduces the energy consumption and operational difficulty of machinery, and adapts to the needs of farmland operations at different growth stages.
Smart Images

Figure CN121453065B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of farmland path planning technology, specifically a method for farmland obstacle recognition and operation path planning based on UAV images. Background Technology
[0002] In modern large-scale agricultural operations, the scientific nature of path planning directly impacts operational and resource utilization efficiency, while the accuracy of obstacle identification is a prerequisite for path planning. Traditional farmland operation path planning relies heavily on manual on-site surveys and experience-based design, which is not only time-consuming and labor-intensive but also difficult to adapt to the dynamic changes in the farmland environment. Especially in areas with scattered obstacles and complex terrain, unreasonable path planning is prone to occur, leading to waste such as empty runs of machinery and repetitive operations, and even increasing the risk of collisions between machinery and obstacles.
[0003] With the development of UAV remote sensing technology, it has gradually become an important means of farmland information collection due to its advantages of flexibility, mobility, and wide coverage. In existing technologies, some solutions use single-band UAV images for obstacle identification; however, the information provided by a single band of data is limited, making it difficult to distinguish between crops and obstacles with similar shapes in farmland, easily leading to misjudgments. At the same time, most solutions only utilize single-frame images for analysis, ignoring the dynamic information contained in time-series images, and failing to effectively eliminate interference from factors such as changes in lighting and differences in crop growth stages, resulting in insufficient stability in obstacle contour extraction.
[0004] In the subsequent processing of obstacle recognition, traditional contour extraction algorithms often suffer from false detections or missed detections due to complex farmland backgrounds and noise interference. Although some solutions introduce convolutional neural networks for semantic segmentation, they fail to effectively combine the segmentation results with edge feature extraction, making it difficult to accurately correct erroneous regions in the contours and to fully supplement the geometric topology of missed targets, thus affecting the accuracy of subsequent path planning.
[0005] Existing path planning methods often only consider the spatial constraints of obstacles, neglecting the dynamic characteristics of the machinery itself. The generated paths may exceed the controllability of the machinery, resulting in poor actual executability. At the same time, path evaluation focuses more on distance optimization and lacks consideration for the smoothness of key parameters such as steering angle and speed adjustment. This can easily lead to problems such as excessively frequent path turns and sudden speed changes, increasing the energy consumption and operational difficulty of the machinery and failing to meet the development needs of efficient and precise operations in modern agriculture. Summary of the Invention
[0006] The purpose of this invention is to provide a method for farmland obstacle recognition and operation path planning based on UAV images, so as to solve the problems mentioned in the background art.
[0007] To achieve the above objectives, the present invention provides a method for farmland obstacle recognition and operation path planning based on UAV images, the method comprising:
[0008] A time-series image sequence of farmland area was collected by a multispectral sensor carried by a drone. The time-series image sequence includes synchronous imaging data in the visible light band and the near-infrared band.
[0009] The time-series image sequence is subjected to pixel-level fusion processing to generate a multi-channel fused image with spatial alignment characteristics, and the edge response features of obstacles in each channel are extracted.
[0010] Based on the edge response features, an initial contour set of obstacles is constructed. Combined with the hierarchical semantic segmentation results of the deep convolutional network, the false detection regions in the initial contour set are corrected and the geometric topology of the missed targets is supplemented.
[0011] Based on the corrected obstacle outline set and the geographical coordinates of farmland boundaries, an obstacle distribution raster map containing absolute position references is established.
[0012] Based on the dynamic parameters of the operating machinery and the spatial constraint relationship between the obstacle distribution grid, a set of candidate paths is generated with the goal of minimizing obstacle avoidance costs.
[0013] The smoothness of the steering angle sequence and speed adjustment sequence of each path in the candidate path set is evaluated by the dynamic time warping algorithm, and the optimal operation path that meets the mechanical control characteristics is selected.
[0014] Preferably, the pixel-level fusion processing of the time-series image sequence includes:
[0015] Calculate the pixel displacement deviation of the visible light band image and the near-infrared band image in the same geographic coordinate system;
[0016] A bilinear interpolation model is established based on the pixel displacement deviation to spatially register the gray-level gradient distribution of the visible light band image with the thermal radiation intensity distribution of the near-infrared band image.
[0017] A wavelet transform-based frequency domain fusion operation is performed on the registered dual-band image to preserve the high-frequency detail components of the visible light band and the low-frequency texture components of the near-infrared band, generating a multi-channel fused image.
[0018] Preferably, the extraction of edge response features of obstacles in each channel includes:
[0019] Adaptive threshold segmentation is performed on the multi-channel fused image to obtain a preliminary binarized region;
[0020] The cumulative directional gradient of each pixel in the initial binarized region is calculated using the histogram of directional gradients algorithm.
[0021] Candidate connection points of obstacle edges are determined based on the distribution of abrupt changes in the cumulative directional gradient, and a continuous topological chain of edge response features is constructed using the minimum spanning tree algorithm.
[0022] Preferably, the false detection region in the corrected initial contour set includes:
[0023] The semantic segmentation results of the deep convolutional network are projected onto the geographic coordinate system corresponding to the initial contour set to obtain the semantic category ratio of pixels inside each initial contour.
[0024] If the semantic category ratio of pixels inside an initial contour is inconsistent with the preset obstacle category, it is determined to be a false detection area and deleted from the contour set;
[0025] For semantically segmented connected components not covered by any initial contours, calculate the coordinates of the circumscribed polygon vertices and add them to the corrected obstacle contour set.
[0026] Preferably, establishing the obstacle distribution grid map including absolute position references includes:
[0027] Convert the geographic coordinates of farmland boundaries into a sequence of polygon vertices in the UTM projected coordinate system;
[0028] Based on the minimum bounding rectangle of the vertex sequence, divide the grid into equal-sized grid units according to the preset resolution;
[0029] Based on the spatial containment relationship between the corrected obstacle outline set and the grid cells, mark the grid index number containing the obstacle and the average obstacle height.
[0030] Preferably, generating a candidate path set with the objective of minimizing obstacle avoidance cost includes:
[0031] Based on the minimum turning radius and maximum tilt angle limits of the operating machinery, define the reachability constraints of the path nodes;
[0032] Adopting improved A The algorithm searches for a sequence of connected nodes that satisfy reachability constraints in the obstacle distribution grid map to generate an initial path;
[0033] Cubic spline interpolation is performed on consecutive nodes in the initial path to eliminate abrupt changes in path curvature and generate a smooth set of candidate paths.
[0034] Preferably, the smoothness evaluation of the steering angle sequence and speed adjustment sequence of each path in the candidate path set using a dynamic time warping algorithm includes:
[0035] Extract the curvature change points of each path in the candidate path set, and calculate the sum of the absolute values of the turning angles between adjacent change points;
[0036] The acceleration fluctuation of the speed adjustment sequence is fitted based on the rated power curve of the operating machinery;
[0037] The sum of the absolute values of the steering angles and the acceleration fluctuations are input into the dynamic time warping algorithm to calculate the matching cost between each path and the ideal smooth template.
[0038] Preferably, the step of selecting the optimal operation path that conforms to the mechanical control characteristics includes:
[0039] The top three candidate paths with the lowest matching cost are selected as the preferred path set;
[0040] Calculate the weighted sum of the total length of each path in the preferred path set and the obstacle avoidance distance;
[0041] Select the path with the smallest weighted sum as the optimal operation path, and output its node coordinate sequence and speed control parameters.
[0042] Preferably, the method further includes:
[0043] The actual position offset of the UAV is acquired in real time during the execution of the optimal operation path;
[0044] If the actual position offset exceeds the preset threshold, local path replanning is triggered: based on the current remaining path segment and the updated obstacle distribution grid map, a local obstacle avoidance sub-path is generated and the corresponding segment of the original path is replaced.
[0045] Preferably, generating a local obstacle avoidance sub-path includes:
[0046] Starting from the current actual location and ending at the least recently visited path node, a local search window is established in the obstacle distribution grid map;
[0047] A bidirectional Dijkstra algorithm is used to find obstacle avoidance sub-paths within the search window, ensuring that the rate of curvature change of the sub-path does not exceed the set upper limit of the original optimal working path.
[0048] Compared with the prior art, the beneficial effects of the present invention are:
[0049] By using drones equipped with multispectral sensors to collect time-series image sequences, simultaneously acquiring visible and near-infrared data, the imaging advantages of different bands are fully utilized. This overcomes the shortcomings of single-band images in terms of information dimensionality, enabling a more comprehensive capture of the characteristic information of farmland obstacles and effectively distinguishing crops from obstacles, providing a high-quality data foundation for subsequent identification work. The introduction of time-series image sequences can also effectively avoid interference from factors such as changes in lighting and fluctuations in crop growth, improving the stability and reliability of data acquisition and adapting to the needs of farmland operations at different times and growth stages.
[0050] Pixel-level fusion processing achieves precise spatial alignment of multi-band images. The generated multi-channel fused image retains the feature information of each band while ensuring spatial consistency, creating conditions for accurate extraction of obstacle edge response features. The combination of edge response features and the semantic segmentation results of deep convolutional networks forms a complementary recognition mechanism. This mechanism can not only correct false detection regions in the initial contour set but also completely supplement the geometric topology of missed targets, significantly improving the integrity and accuracy of obstacle contours and avoiding path planning errors caused by contour information deviations.
[0051] The obstacle distribution grid map, which includes absolute position references, links obstacle outlines to the geographic coordinates of farmland boundaries, enabling precise spatial positioning of obstacles and making obstacle avoidance more targeted during path planning. This presentation method, which incorporates geographic coordinates, also effectively connects with the overall farmland operation area, ensuring that path planning not only meets obstacle avoidance requirements but also conforms to the actual geographic boundaries of the farmland, preventing paths from exceeding the operation area or missing any work zones.
[0052] During the path generation phase, the dynamic parameters of the operating machinery are fully considered to ensure that the candidate path design conforms to the actual operating capabilities of the machinery and guarantees high feasibility. A candidate path set aimed at minimizing obstacle avoidance costs can filter out the most cost-effective direction from multiple possible path solutions, reducing the idle distance and energy consumption of the operating machinery. The dynamic time warping algorithm evaluates the smoothness of the steering angle sequence and speed adjustment sequence, effectively eliminating unreasonable paths with frequent turns and sudden speed changes. The selected optimal path better matches the machine's handling characteristics, reducing operational difficulty, minimizing wear on mechanical components, and improving the safety and stability of the operation process. Attached Figure Description
[0053] Figure 1 This is a schematic diagram illustrating the working principle of the farmland obstacle recognition and operation path planning method based on UAV images described in this invention.
[0054] Figure 2 A flowchart for pixel-level fusion processing;
[0055] Figure 3 A flowchart for creating a grid map of obstacle distribution. Detailed Implementation
[0056] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
[0057] Please see Figure 1 This invention provides a method for farmland obstacle recognition and operation path planning based on UAV images. The method includes: a UAV equipped with a multispectral sensor flies over a farmland area to collect synchronous imaging data including visible light and near-infrared bands, forming a time-series image sequence. After the time-series image sequence is transmitted to a ground processing system, pixel-level fusion processing is performed to generate a spatially aligned multi-channel fused image. Obstacle edge response features of each channel are extracted from the multi-channel fused image, and the edge response features are used to construct an initial obstacle contour set. A deep convolutional network performs hierarchical semantic segmentation on the time-series image sequence. The segmentation results are superimposed and analyzed with the initial contour set to correct false detection areas and supplement the geometric topology of missed targets, outputting a corrected obstacle contour set. The geographical coordinates of the farmland boundary are combined with the obstacle contour set to establish an obstacle distribution grid map including absolute position references. The dynamic parameters of the operating machinery are input into the path planning module and coupled with the spatial constraint relationship of the obstacle distribution grid map to generate a candidate path set with the goal of minimizing obstacle avoidance costs. The dynamic time warping algorithm evaluates the smoothness of the steering angle and speed adjustment sequences of each path in the candidate path set, and selects the optimal operation path that meets the machine's control characteristics. The output of the optimal operation path is a sequence of node coordinates and speed control parameters, which guides the machine to perform farmland operations.
[0058] Example 1: See Figure 2When a drone performs image acquisition tasks in farmland areas, its multispectral sensors simultaneously acquire imaging data in the visible light and near-infrared bands, forming a time-series image sequence. Each band in the time-series image sequence exhibits spatial positional deviations. Pixel-level fusion processing aims to eliminate these deviations and integrate multi-band information. The process begins with calculating the pixel displacement deviation. Visible light and near-infrared images are loaded into memory for feature point matching. Feature point matching employs a scale-invariant feature transform algorithm, which detects corner and edge features in the visible light image and searches for corresponding feature points in the near-infrared image. The matching process calculates the Hamming distance of the feature descriptors; the feature point pair with the smallest distance is considered a correct match. The average of the coordinate differences of all correctly matched point pairs yields an estimate of the pixel displacement deviation, which is a two-dimensional vector representing the horizontal and vertical offsets. The pixel displacement deviation is input into a bilinear interpolation model, which constructs a coordinate mapping function. This function maps the coordinates of each pixel in the near-infrared image to the coordinate system of the visible light image, using an affine transformation matrix. For each pixel in the near-infrared image, its corresponding floating-point coordinates in the visible light image are found. The grayscale values of its four neighboring pixels are then used for weighted calculation. The weights are determined by the distance between the floating-point and integer coordinates; pixels closer to each other have greater weights. The bilinear interpolation model outputs a coordinate-aligned near-infrared image with the same dimensions as the visible light image.
[0059] After spatial registration, the dual-band images undergo frequency domain fusion based on wavelet transform, with the Daubechies wavelet basis function selected. The wavelet transform decomposes each band into low-frequency and high-frequency sub-bands, with three decomposition levels to balance detail preservation and computational efficiency. The high-frequency detail components of the visible light band image contain rich edge and texture information, while the low-frequency texture components of the near-infrared band image reflect the thermal radiation characteristics of ground features. The frequency domain fusion rule stipulates that the high-frequency coefficients of the fused image are taken from the high-frequency sub-band of the visible light band, and the low-frequency coefficients are taken from the low-frequency sub-band of the near-infrared band. The inverse wavelet transform reconstructs the fusion result, generating a multi-channel fused image. The multi-channel fused image has three channels, corresponding to the red, green, and blue information of visible light and the thermal radiation information of near-infrared light, respectively. Image data is normalized to the 0-1 range to avoid brightness differences between different bands affecting subsequent processing. Pixel-level fusion processing is executed in parallel on the graphics processor, improving the processing speed of large-scale image data. The geographic coordinate system adopts the WGS84 standard to ensure that all image data have a unified spatial reference. The calculation of pixel displacement deviation incorporates a random sampling consensus algorithm to eliminate mismatched point pairs and improve registration accuracy. The bilinear interpolation model is implemented using interpolation functions from an open-source computer vision library, supporting multiple interpolation methods. In the wavelet transform frequency domain fusion operation, the selection of high-frequency and low-frequency components is based on signal-to-noise ratio evaluation to optimize the quality of the fused image. The spatial alignment characteristics of the multi-channel fused image are verified through reprojection error, with the error threshold set to one pixel unit.
[0060] The multi-channel fused image is stored as a multi-dimensional array, with dimensions including height, width, and number of channels. Data for each pixel is represented as a floating-point number, preserving original precision. The output of the pixel-level fusion processing module serves as input for edge response feature calculation, connecting to subsequent image analysis processes. The entire fusion process comprises four stages: memory allocation, data loading, computation execution, and result saving. The memory allocation stage reserves sufficient GPU memory to store intermediate results, while the data loading stage reads the original image data from the storage device. The computation execution stage utilizes the parallel computing unit of the graphics processor to accelerate image transformation operations. The result saving stage writes the multi-channel fused image to persistent storage in a lossless compressed TIFF file format. The parameters of the feature point matching algorithm are optimized, with the number of feature points controlled between 1000-2000 to ensure stability. The bilinear interpolation model uses a bilinear weighted kernel function to reduce image distortion. The Db4 wavelet is chosen as the basis function for the wavelet transform, achieving a balance between frequency localization and computational complexity. The inverse wavelet transform reconstruction process uses a pyramid algorithm to synthesize image details layer by layer. The quality assessment of multi-channel fused images uses the information entropy index; a higher entropy value indicates more complete information retention. The environment configuration for pixel-level fusion processing includes a hardware platform and software libraries. The hardware platform is equipped with a high-performance graphics processor and large-capacity memory. The software libraries rely on the OpenCV image processing library and the CUDA parallel computing platform, with version numbers matched to ensure compatibility. An exception handling mechanism monitors memory overflow and computation timeout situations, logging and terminating the process when an exception occurs. Calibration data from the multispectral sensor is used to correct lens distortion; this data includes the camera intrinsic parameter matrix and distortion coefficients. The flight altitude and angle during image acquisition are recorded in metadata, which is stored bound to the image data. The calculation of pixel displacement deviation considers the impact of terrain undulations; digital elevation model data is used for elevation correction. The bilinear interpolation model uses mirror filling when processing image boundary pixels to avoid boundary effects. In the wavelet transform frequency domain fusion operation, the fusion weights of high-frequency coefficients are configurable to adapt to different scenario requirements. After the multi-channel fused image is generated, histogram equalization is performed to enhance contrast and highlight obstacle features. Histogram equalization uses an adaptive method, with the local window size dynamically adjusted according to the image content.
[0061] The performance optimization strategies for pixel-level fusion processing include memory reuse and computational pipelines. Memory reuse reduces the overhead of creating and destroying intermediate variables, while the computational pipeline overlaps data transmission and computational operations. A monitoring interface displays fusion progress and resource usage, and supports user interruption. The band registration accuracy of the multispectral sensor is periodically calibrated using a standard calibration board for laboratory testing. GPS positioning data and inertial measurement unit data are fused during image acquisition to improve geographic coordinate accuracy. A multi-scale strategy is introduced for calculating pixel displacement deviation, first quickly estimating on low-resolution images and then finely adjusting on full-resolution images. The implementation of the bilinear interpolation model supports batch processing, handling multiple image pairs in a single call. Wavelet transform frequency domain fusion operations provide multiple fusion rule options, automatically selected based on image quality evaluation metrics. The storage format of multi-channel fused images supports georeferenced information embedding, conforming to the GeoTIFF standard. The pixel-level fusion processing module's interface is loosely coupled for easy integration into larger processing workflows. The processing workflow's fault tolerance mechanism detects quality issues in the input image, including overexposure, underexposure, and motion blur. When a quality issue is detected, a re-acquisition process is triggered, and the drone automatically flies back to the problem area to re-capture the image. The calculated pixel displacement deviation is saved as a transformation matrix file, which is used for subsequent batch processing jobs. The parameters of the bilinear interpolation model are adjustable; the size of the interpolation kernel affects the smoothness of the image. In the frequency domain fusion operation of wavelet transform, increasing the number of decomposition layers can extract more detailed information but increases the computational load. Post-processing operations for multi-channel fused images include noise suppression and sharpening enhancement; noise suppression uses a nonlocal mean filtering algorithm. Time complexity analysis of the entire pixel-level fusion processing flow shows that the main time-consuming operations are wavelet transform and feature point matching. Memory usage patterns show that peak memory consumption occurs during the image decomposition and reconstruction stages. Parallelization speedup tests demonstrate that the graphics processing unit (GPU) provides a significant speed improvement compared to the central processing unit (CPU). Unit tests for the pixel-level fusion processing module cover all boundary cases, including empty input, single-pixel images, and completely black images. Integration tests verify the end-to-end processing flow of multi-band data, from data input to fused image output. Performance tests are conducted on farmland images of varying sizes, ranging from megapixels to hundreds of millions of pixels. Stability testing involved continuous 24-hour operation of the processing module, monitoring for memory leaks and computational errors. The pixel-level fusion processing module's deployment scheme supports both cloud and edge devices, with edge devices equipped with embedded graphics processors. The module's maintenance plan regularly checks for updates to dependent libraries, which may result in performance improvements or bug fixes.
[0062] Example 2: See Figure 3The multi-channel fused image enters the feature extraction stage, where adaptive thresholding is applied to each channel of the image. Adaptive thresholding employs a sliding window mechanism, with the window size dynamically calculated based on the image resolution, set to one-tenth of the image width. Within each window, the Otsu threshold for pixel grayscale values is calculated, determined based on the principle of maximizing inter-class variance of the grayscale histogram. The segmentation result generates a preliminary binarized region, where high-grayscale pixels are labeled as foreground and low-grayscale pixels as background. The preliminary binarized region exhibits noise and fragmentation; a morphological closing operation connects adjacent foreground regions, using a circular structuring element with a radius of three pixels. The oriented gradient histogram algorithm is applied to the foreground pixels within the preliminary binarized region, calculating the gradient magnitude and orientation angle for each pixel. The gradient magnitude is obtained through Sobel convolution, which includes horizontal and vertical convolution kernels. The convolution results are used to synthesize the gradient magnitude, and the orientation angle is calculated using the arctangent function. The Histogram of Oriented Gradients (HGP) algorithm divides the 0-360 degree directional range into eight intervals, accumulating each pixel's gradient within its corresponding interval based on its orientation angle. The accumulated directional gradients statistically analyze the gradient direction distribution within each small region, using a dense grid with a grid size matching the sliding window size. Abrupt changes in the accumulated directional gradients are detected using a second-order difference method, with each abrupt change corresponding to a local extremum in the histogram of gradient directions. These abrupt changes are marked as candidate connection points for obstacle edges, forming the initial set of edge features.
[0063] The minimum spanning tree algorithm constructs a continuous topological chain of edge response features, treating candidate connection points as graph nodes. Edge weights between nodes are calculated based on Euclidean distance and directional consistency; Euclidean distance reflects spatial proximity, while directional consistency measures gradient direction differences. The Prim algorithm generates the minimum spanning tree by starting from any node and progressively adding edges with the minimum weight to connect new nodes. The minimum spanning tree forms a connected graph, eliminating isolated points and broken segments. Edge chain smoothing employs B-spline curve fitting, resulting in a closed edge chain forming a polygonal contour. The initial obstacle contour set consists of these polygonal contours, with each contour stored as a vertex sequence.
[0064] A deep convolutional network (DCNN) processes multi-channel fused images in parallel, employing an encoder-decoder architecture. The encoder uses a ResNet50 backbone, which incorporates residual connections to mitigate gradient vanishing. The decoder restores spatial resolution through transposed convolutional upsampling and uses skip connections to fuse shallow and deep features. The semantic segmentation output provides a probability map of the category for each pixel, including obstacles, crops, and soil. The semantic segmentation results are projected onto a geographic coordinate system, using an affine transformation matrix to map the image coordinates to UTM coordinates. The semantic category ratio of pixels within each initial contour is statistically analyzed, calculating the ratio of obstacle category pixels to the total number of pixels within the contour. A preset threshold of 0.7 is set for the obstacle category ratio; initial contours below this threshold are considered false positives. False positives are removed from the initial obstacle contour set, and the contour index is updated accordingly. The DCNN is trained using a labeled dataset containing various farmland scene images. A weighted cross-entropy loss function is used, and the Adam algorithm is employed as the optimizer. The training iterations are set to 100 epochs, with the batch size adjusted based on memory capacity. Hole filling in the semantic segmentation results uses morphological operations, with dilation connecting discrete regions. Connected components not covered by the initial contour are detected, and noise interference is filtered out using a connected component area threshold. The circumscribed polygon is generated using a convex hull algorithm, which calculates the minimum convex polygon for the point set. The coordinates of the supplementary contour vertices are added to the corrected obstacle contour set, which is stored in vector format.
[0065] The fusion of edge response features and semantic segmentation results is performed in the spatial domain, with a weighted combination of low-level edge information and high-level semantic information. Weight coefficients are dynamically adjusted based on feature confidence levels; edge feature confidence is based on gradient strength, while semantic feature confidence is based on classification probability. The fused obstacle contour set undergoes topological checking to eliminate self-intersections and overlapping contours. Contour vertex simplification uses the Douglas-Peucker algorithm to reduce the number of vertices while preserving shape features. The corrected obstacle contour set is output in GeoJSON format, with an attribute table recording contour area and semantic category. The window sliding step size for adaptive threshold segmentation is set to half the window size to ensure continuity between regions. The number of directional partitions in the Histogram of Oriented Gradients (HGP) algorithm is experimentally determined, as the number of partitions affects directional resolution. The minimum spanning tree algorithm introduces distance constraints in edge weight calculation, limiting the maximum connection distance to ten pixels. The input image of the deep convolutional network is standardized by subtracting the mean and dividing by the standard deviation. The projection accuracy of the semantic segmentation results is verified using control points distributed at the four corners of the image. The correction of the initial obstacle contour set is visualized in an interactive interface, supporting manual correction and confirmation. The feature extraction stage of the multi-channel fused image incorporates memory optimization strategies, and large images are processed in blocks to avoid memory overflow. The calculation of the directional gradient histogram utilizes a parallel programming model, enabling multi-threading for acceleration. The minimum spanning tree algorithm is implemented using Fibonacci heap optimization to reduce time complexity. The inference process of the deep convolutional network is accelerated using TensorRT, optimizing the computational graph structure. Post-processing of semantic segmentation results includes Conditional Random Field (CRF) optimization, which smooths the classification boundaries. The obstacle contour set is stored using a spatial index structure, with R-trees accelerating spatial queries.
[0066] The feature extraction module's exception handling mechanism monitors memory usage and computational errors, with error logs recording detailed context. Adaptive threshold segmentation incorporates noise robustness processing in its threshold calculation, eliminating abnormal grayscale values. Gradient calculation using the central difference method in the histogram of oriented gradients (HOR) improves accuracy. The minimum spanning tree algorithm's connectivity check prevents forest generation, ensuring single connected components. Training data augmentation for deep convolutional networks includes rotation, scaling, and color transformation. Projection error propagation analysis of semantic segmentation results keeps errors within acceptable ranges. Consistency checks are performed on the obstacle contour set to avoid duplicate and empty contours. Performance analysis tools for the feature extraction process record the time consumption of each stage, guiding optimization. The adaptive threshold segmentation's window size is adjusted based on image content complexity. The directional interval partitioning scheme for the histogram of oriented gradients tests uniform and non-uniform partitioning. The edge weight formula for the minimum spanning tree algorithm compares various distance and orientation metrics. A multi-scale training strategy for deep convolutional networks enhances model generalization ability. An ensemble learning method for semantic segmentation results fuses the outputs of multiple models. The simplification of the obstacle contour set is controlled by the area retention rate. The feature extraction module's interface design supports both batch and streaming processing to meet various application scenarios. Visual inspection of the binarized results of adaptive threshold segmentation verifies segmentation quality. Dimensional optimization of the feature descriptors in the histogram of oriented gradients balances discriminative power and computational cost. Visualization of the minimum spanning tree algorithm's spanning tree shows edge connectivity relationships. Activation map analysis of deep convolutional networks visualizes the network's attention regions. The confusion matrix of semantic segmentation results evaluates classification accuracy. Geometric attribute calculations for obstacle contour sets include perimeter, roundness, and compactness. The evolution of feature extraction techniques includes the application of graph neural networks, which directly process point cloud data. Deep learning methods for adaptive threshold segmentation use fully convolutional networks to predict threshold maps. Variant algorithms of histogram of oriented gradients explore deep features as alternatives to handcrafted features. The dynamic update mechanism of the minimum spanning tree algorithm supports incremental construction. The lightweight design of deep convolutional networks is suitable for embedded devices. Spatiotemporal consistency modeling of semantic segmentation results utilizes video sequence information. Hierarchical representation of obstacle contour sets supports multi-scale analysis. Unit tests for the feature extraction module cover various boundary cases, including full foreground and full background images. Integration testing verifies the data flow between the feature extraction and subsequent path planning modules. Performance testing runs on different hardware platforms, including CPUs and GPUs. Stability testing injects corrupted image data to verify the module's fault tolerance. The feature extraction module's deployment scheme supports containerized deployment, with the container image containing all dependent libraries. The maintenance plan regularly updates model and algorithm parameters to adapt to environmental changes.
[0067] Example 3: The corrected obstacle outline set and farmland boundary geographic coordinates are input into the rasterization module. The geographic coordinate transformation adopts the general transverse Mercator projection system. The projection transformation utilizes standard coordinate transformation library functions, with latitude and longitude coordinates as input and Cartesian coordinates as output. During the transformation process, the central meridian parameter is set, and the central meridian is determined according to the longitude zone where the farmland area is located. The minimum bounding rectangle of the vertex sequence is calculated by traversing the extreme values of all vertex coordinates. The boundary of the rectangle is determined by the minimum X coordinate, maximum X coordinate, minimum Y coordinate, and maximum Y coordinate. The minimum bounding rectangle serves as the basic area for rasterization. The grid cell size is set according to the physical dimensions of the operating machinery, with a standard value of 0.1 meters × 0.1 meters. The number of rows and columns of the grid cell is calculated by dividing the width and height of the rectangular area by the grid size, and the calculation result is rounded up to ensure full coverage.
[0068] Each raster cell is assigned a unique index number, which are arranged in row-major order. The mapping relationship between raster cells and geographic coordinates is established using the following formula:
[0069]
[0070] in: Represents a raster row index (dimensionless). This indicates a raster column index (dimensionless). and The planar coordinates (in meters) of the center point of the grid cell. This represents the smallest X-coordinate of the smallest bounding rectangle (in meters). This represents the maximum Y-coordinate of the smallest bounding rectangle (in meters). This indicates the grid resolution (unit: meters). The spatial relationship between the obstacle outline set and the grid cells is determined through point-on-polygon testing. The test uses the ray casting method to calculate the positional relationship between the center point of each grid cell and the obstacle outline. When the center point of a grid cell is located inside the obstacle outline, the grid is marked as an obstacle grid. The average obstacle height is obtained through interpolation of digital surface model data, which is derived from the UAV LiDAR point cloud. The obstacle distribution grid map is stored in the form of a two-dimensional matrix, where matrix element values of 0 represent free space, 1 represent obstacles, and floating-point values represent the average height.
[0071] The dynamic parameters of the operating machinery include the minimum turning radius and the maximum tilt angle. The minimum turning radius constrains the lower limit of the path's curvature, and the maximum tilt angle limits the path's slope variation. The reachability constraints for path nodes are defined as follows: the radius of curvature of the lines connecting nodes must be greater than the minimum turning radius, and the slope angle must be less than the maximum tilt angle. Improvement A The algorithm searches for a path in a grid map of obstacle distribution. It uses a list to store nodes to be expanded and a list to store already processed nodes. The heuristic function is a weighted sum of Euclidean distance and a turning penalty term. The total cost estimate for node n is:
[0072]
[0073] in: This represents the total estimated cost (in meters) from the starting point through node n to the ending point. This represents the actual path length from the starting point to node n (in meters). This represents the Euclidean distance (in meters) from node n to the endpoint. This represents the change in the turning angle from the parent node to node n (in radians). This represents the turning penalty coefficient (unit: meters / radians). During node expansion, adjacent nodes are checked to see if they meet the reachability constraints; nodes that do not meet the constraints are excluded. Path cost calculation includes distance cost and obstacle avoidance cost; obstacle avoidance cost is inversely proportional to the distance from the node to the nearest obstacle.
[0074] The initial path node sequence may contain sharp inflection points, which are processed by cubic spline interpolation. The interpolation treats the path nodes as control points, constructing a piecewise cubic polynomial function. The function satisfies the conditions of positional continuity, first derivative continuity, and second derivative continuity at the nodes. Boundary conditions are set to natural boundary conditions, with the second derivative values at the start and end points being zero. The interpolated path is discretized into a dense point sequence with a point spacing of 0.05 meters, forming a smooth candidate path set. The candidate path set stores the coordinate, curvature, and velocity sequences of each path. The zone number of the general transverse Mercator projection system is calculated based on the longitude of the farmland area to avoid cross-zone projection distortion. Elevation correction during coordinate transformation utilizes digital elevation model data to eliminate the influence of terrain undulations. The boundary of the minimum bounding rectangle is extended by one grid size to prevent the omission of boundary areas. The grid cell index uses a zero-based numbering system, with row indices incrementing from 0. For obstacle contour sets, points are tested using an even-odd rule in polygon testing; points are considered internal when the number of intersections between a ray and the polygon boundary is odd. The interpolation method for digital surface model data adopts the inverse distance weighting method, and the interpolation radius is set to five grid sizes.
[0075] The obstacle distribution grid visualization uses a pseudo-color mapping, with free space displayed in green and obstacles shown as a gradient from red to yellow based on their height. (Improved A) The algorithm uses a min-heap data structure for the initial list to improve node extraction efficiency. The turning penalty coefficient of the heuristic function is experimentally determined to be 1.0 m / radian, balancing path length and smoothness. The neighbor pattern for node expansion uses eight-neighbor connections, allowing diagonal movement. The obstacle avoidance cost function for path costs uses an exponential decay model, with cost inversely proportional to the square of the obstacle distance. The coefficient matrix for cubic spline interpolation is solved using a chasing algorithm to ensure numerical stability. Natural boundary conditions are implemented by setting the endpoint second derivatives to zero. The step size for path discretization is chosen to consider the control precision of the operating machinery, with a step size less than half the grid size. The candidate path set data structure contains a list of path objects, each encapsulating geometric and dynamic attributes. The coordinate unit for the universal transverse Mercator projection is meters, consistent with the grid size unit. The precision loss of coordinate transformation is controlled by double-precision floating-point storage. The calculation of the minimum bounding rectangle includes convex hull detection to ensure the rectangle contains all vertices.
[0076] The coordinate calculation of the grid cell center point incorporates a half-pixel offset to ensure the point is centered within the grid. Outliers are excluded from the calculation of the average obstacle height; outliers are defined as data points exceeding three standard deviations. The storage format of the obstacle distribution raster map supports sparse matrix compression, reducing storage space usage. Improvement A The algorithm's path search failure handling mechanism reduces the heuristic function weight and re-searches upon failure. The reachability constraint check for node expansion uses the radius of curvature formula, calculated using the three-point circle method. The number of control points in cubic spline interpolation is optimized; too many control points lead to overfitting, while too few result in lost details. The coordinate points of the path discretization are resampled to ensure uniform point spacing. The candidate path set is sorted based on the total path length and a smoothness index, calculated using the curvature integral. The coordinate range of the general transverse Mercator projection is checked, triggering an anomaly when coordinate values exceed the valid range. The inverse transformation formula for coordinate transformation is verified to ensure its reversibility. The rotation invariance of the minimum bounding rectangle is tested to verify the rectangle's adaptability to vertex distribution.
[0077] The multi-level resolution scheme for raster cells supports two levels of raster maps: coarse raster for fast pathfinding and fine raster for fine obstacle avoidance. Simplified operations on obstacle contour sets reduce the number of vertices, improving point-to-polygon testing efficiency. Hole filling in digital surface model data uses a diffusion algorithm to fill missing data areas. Improvements to A... The algorithm is parallelized to search multiple candidate paths simultaneously. Dynamic constraint caching for node expansion avoids redundant calculations of constraints for the same nodes. The derivative calculation for cubic spline interpolation uses the central difference method to improve numerical differentiation accuracy. Curvature calculation for path discretization is based on parametric equations, with the curvature formula involving first and second derivatives. The candidate path set is persistently stored in JSON format for easy data transfer and debugging. The coordinate system identifier for the universal transverse Mercator projection is embedded in raster metadata to ensure coordinate system consistency. Control point residual analysis is performed during coordinate transformation, and transformation parameters are recalibrated when the residual exceeds a threshold.
[0078] The dynamic update mechanism for the minimum bounding rectangle supports incremental obstacle addition. Grid cell status labels include three states: unknown region, free region, and obstacle region. The statistical confidence interval for the average obstacle height is calculated; grid cells with excessively large confidence intervals are marked as uncertain regions. Improvement A The algorithm's adaptive heuristic function weights dynamically adjust the greediness level based on the search progress. Obstacle expansion radii are set for node expansion, with the expansion radius equal to the circumcircle radius of the operating machinery. Ill-conditioned conditions in cubic spline interpolation are handled by adding a regularization term when ill-conditioned conditions occur. Velocity curves are generated from path discretization, modeling a negative correlation between velocity and curvature. Redundant paths in the candidate path set are removed, and paths with similarity exceeding a threshold are merged. Coordinate accuracy verification using the universal transverse Mercator projection is performed, comparing errors with high-precision GPS measurements. Batch processing optimization for coordinate transformation is implemented, replacing loop processing with matrix operations. A minimum bounding rectangle segmentation strategy is used to handle large-scale farmland areas, with parallel rasterization of the segmented sub-regions. Raster cell attribute expansion supports multiple obstacle types, with a type field distinguishing between static and dynamic obstacles. Temporal analysis of the average obstacle height is performed to detect moving obstacles whose height changes exceed a threshold. Improvements to A... The algorithm enables arbitrary angle path search, overcoming grid angle limitations. It integrates a dynamic model for node expansion, incorporating both acceleration and jerk constraints. The energy minimization objective of cubic spline interpolation uses total curve bending energy as the optimization metric. Real-time optimization of path discretization and predictive coding reduce data transmission volume. Priority scheduling of candidate path sets allocates computational resources based on job urgency. A general transverse Mercator projection coordinate system transformation log is maintained, containing transformation parameters and accuracy metrics.
[0079] Example 4: The candidate path set input smoothness evaluation module uses a dynamic time warping algorithm to analyze the turning and motion characteristics of each path. Path curvature change points are extracted using a multi-scale curvature calculation method based on the local geometric properties of the path point sequence. Curvature calculation uses a parametric equation, which is then used for cubic spline interpolation to obtain a continuous representation of the path. Curvature change points are defined as zero-crossing points of the first derivative of curvature, and zero-crossing point detection uses sign change as a criterion. The sum of the absolute values of the turning angles between adjacent change points is accumulated, and the turning angle is calculated using the path tangential angle difference. The tangential angle is approximated using the forward difference of the path point sequence, with the difference step size adjusted according to the path sampling density. The rated power curve of the operating machinery is fitted to the speed adjustment sequence; the rated power curve is obtained from the machinery technical manual. Polynomial regression is performed on the power curve data points, with the regression order selected as a cubic polynomial based on the curve shape. The acceleration fluctuation of the speed adjustment sequence is calculated, with acceleration estimated using the central difference of the speed sequence. The acceleration fluctuation is quantified into the variance of the acceleration sequence, and the variance is calculated using an unbiased estimation formula. The Dynamic Time Warping (VTW) algorithm takes a steering angle sequence and an acceleration sequence as input. The ideal smooth template sequence is defined as a sequence with zero steering angle and constant acceleration. The algorithm constructs a cumulative distance matrix, where each element represents the alignment cost between the input sequence and the template sequence. Euclidean distance is used as the distance metric, and the sequences are z-score normalized before distance calculation. The VTW algorithm finds the minimum cost path, and the path cost is output as the matching cost.
[0080] The three candidate paths with the lowest matching cost are selected as the preferred path set, which includes path geometry data and motion parameters. The total length of each path is calculated by accumulating the Euclidean distances between adjacent path points. Obstacle avoidance distance is defined as the average distance from a path point to the nearest obstacle; spatial indexing is used to accelerate distance calculation. A weighted sum of the total length and obstacle avoidance distance is calculated, with weighting coefficients reflecting task priority. The path with the smallest weighted sum is selected as the optimal task path, and the node coordinate sequence of the optimal task path is output as a navigation file. Speed control parameters are generated based on path curvature, with the radius of curvature positively correlated with the speed value. The smoothness evaluation module involves multiple parameter configurations, and parameter settings directly affect the evaluation results. The window size of the dynamic time warping algorithm constrains the path alignment range, and the window size is set to 20% of the number of path points. The Gaussian smoothing parameter selection for curvature calculation is based on the Gaussian kernel standard deviation being proportional to the path sampling interval. The goodness-of-fit test of the rated power curve is performed, with the coefficient of determination threshold set to 0.95 to ensure fitting quality. Optimization of the differential step size for acceleration sequences: too small a step size amplifies the impact of noise, while too large a step size loses detailed features.
[0081] The selection criteria for the preferred path set are configurable, including maximum path length limits and minimum obstacle avoidance distance requirements. Weighting coefficients in the weighted sum calculation support dynamic adjustment based on the current load status of the operating machinery. The output format of the optimal operating path is compatible with common agricultural machinery navigation systems, including the ISO11783 standard data package. The speed control parameter table structure includes three fields: path point index, radius of curvature, and recommended speed. Real-time performance monitoring of path smoothness evaluation is implemented, with computation time constraints meeting online planning requirements. The computational complexity of the dynamic time warping algorithm is analyzed, showing that complexity is proportional to the square of the number of path points. The algorithm implementation employs dynamic programming optimization, and space complexity is reduced through a rolling array technique. Robustness of curvature change point detection is enhanced by introducing a hysteresis threshold to suppress false zero-crossings caused by noise. A piecewise fitting strategy for the rated power curve is employed, with segment point selection based on the degree of power change. Frequency domain analysis of acceleration fluctuations is performed, using Fast Fourier Transform to identify the main fluctuation frequency components.
[0082] The matching cost is normalized to the zero-to-one interval for easier cross-path comparison. The diversity of the optimal path set is preserved, and path shape features are quantified using principal component analysis. The accuracy of obstacle avoidance distance calculation is verified, as accuracy is directly related to raster resolution. The multi-objective optimization characteristics of weighted sum calculation are demonstrated, with weight coefficients determined through Pareto front analysis. The feasibility of the optimal operating path is checked, including minimum turning radius constraints and maximum slope constraints. Parallel computation of the smoothness evaluation module is implemented, distributing multi-path evaluation tasks across multiple computational cores. The memory access mode of the dynamic time warping algorithm is optimized, and a cache-friendly design improves computational efficiency. Boundary handling in curvature calculation is implemented, with mirror expansion of path endpoints to maintain computational continuity. Extrapolation of the rated power curve is limited, ensuring the power value does not exceed the maximum allowable power of the machinery. Outlier filtering of the acceleration sequence uses the median absolute deviation method. The confidence level of the matching cost is evaluated based on the signal-to-noise ratio of the input sequence. A backtracking mechanism for the optimal path set is implemented, retaining historical evaluation results for analysis and comparison. The obstacle avoidance distance is dynamically updated, recalculating the distance when the obstacle position changes. Multi-scenario testing of weighted summation calculations, covering typical farmland operation conditions. Visualization of the smoothness of the optimal operation path, with a curvature comb plot visually displaying the path's curvature. Calibration process for the smoothness evaluation module, using a standard path dataset with known smoothness. Parameter sensitivity analysis of the dynamic time warping algorithm, analyzing the impact of window size and distance metric selection. Comparative study of curvature calculation methods, including angle-based and derivative-based methods. Temperature compensation for rated power curves, compensating for power characteristic changes under mechanical heat engine conditions. Resampling processing of acceleration sequences, with a unified resampling frequency of 10 Hz to eliminate sampling rate differences.
[0083] The system includes: time-series analysis of matching costs to analyze the changing trends of matching costs in continuous tasks; interactive adjustment of the optimal path set, allowing operators to manually modify the path order; visualization of obstacle avoidance distances using a distance heatmap overlaid with path lines; adaptive weight adjustment for weighted sum calculations based on path environment complexity assessment; and an interface for exporting the optimal task path, supporting KML format for third-party software (see Table 1).
[0084] Table 1: Path Evaluation Parameter Configuration Table
[0085]
[0086] The smoothness assessment module's parameter configuration is managed through configuration files, which use YAML format for enhanced readability. A parameter validation mechanism checks the rationality of parameter values, triggering warning logs for unreasonable parameters. The curvature calculation window automatically adjusts based on the total path length and curvature change frequency. Adaptive settings for the steering angle threshold are based on the steering system response characteristics of the operating machinery. An optimized algorithm for the acceleration sampling interval balances computational accuracy and real-time requirements. The dynamic time warping window is dynamically determined based on the number of path points and computational resource limitations. The coupling relationship between length weight and safety weight is analyzed, showing an inverse relationship. The curvature smoothness coefficient is scene-adapted to farmland environments with varying terrain undulations. A model selection criterion for the power fitting order is based on the Akaike information content criterion. The minimum number of path points is set based on the minimum output requirements of the path planning algorithm. The maximum matching cost adjustment strategy is based on statistical analysis of historical evaluation results. Version control of the parameter configuration table is implemented, with version numbers distinguishing parameter sets for different operating seasons. The parameter export function supports batch processing, with export formats including CSV and JSON. The parameter optimization tool provides a graphical interface that displays the impact of parameter changes on evaluation results in real time. Parameter configuration access control differentiates between administrator and operator permissions. A parameter backup mechanism regularly saves configurations, with encrypted backup files stored to prevent tampering. The smoothness evaluation module includes parameter sensitivity studies using Monte Carlo methods to sample the parameter space. Principal component analysis of parameter correlation identifies key parameter combinations. Response surface modeling for parameter adjustment helps quickly locate optimal parameter regions. An automated parameter calibration process uses a standard test path set. An expert system for parameter configuration recommends parameter values based on a rule base.
[0087] Example 5: During the execution of the optimal operation path, the UAV navigation system acquires positioning data in real time. The positioning data comes from a fusion navigation system integrating a GPS receiver and an inertial measurement unit. Taking a specific farmland operation scenario as an example, the UAV is executing an optimal north-south operation path. The path point sequence contains 56 navigation points, and the machine is moving at a constant speed of 2 meters per second. When the UAV reaches the vicinity of path point number 28, the navigation system detects a lateral offset of 0.8 meters between the actual position and the planned path, exceeding the preset threshold of 0.5 meters. This offset is due to a heading deviation caused by a sudden crosswind interference. At this time, the system immediately triggers a local path replanning mechanism. The local path replanning module uses the UAV's current actual position as the starting point for replanning, with the actual position coordinates (125.63 meters, 387.47 meters) in the UTM coordinate system. The planned endpoint is selected as the least recently visited path node. The system searches the path sequence backward and finds that path point number 29 has not yet been visited, with coordinates (125.71 meters, 389.12 meters). A local search window is established diagonally between the start and end points, with the window size dynamically adjusted to a 12m x 15m rectangular area based on offset and environmental complexity. The obstacle distribution grid is updated in real-time within the search window, with updates derived from newly detected obstacles by the UAV's forward-looking vision sensor, such as a temporarily placed toolbox measuring approximately 1.5m x 0.8m, located at (127.20m, 388.35m). The bidirectional Dijkstra algorithm searches the updated obstacle distribution grid, expanding synchronously from both the start and end points. The start-point search tree expands forward with nodes spaced 0.2m apart to accommodate mechanical turning. The end-point search tree expands backward with a step size of 0.2m. The two search trees meet at coordinates (126.58m, 388.26m), maintaining a safe distance of 1.5 meters from the newly appeared toolbox. The generated local obstacle avoidance sub-path contains 7 path points, with a total sub-path length of 2.1m. The curvature change rate check showed that the maximum curvature change was 0.15 radians / meter, which is lower than the upper limit of 0.2 radians / meter set for the original optimal working path.
[0088] The local obstacle avoidance sub-path is smoothly integrated into the original path system. The starting point of the sub-path is connected to the current position of the UAV using a cubic Bézier curve, ensuring C2 continuity (position, tangent direction, and curvature continuity) at the connection point. A fifth-order polynomial interpolation is used between the end point of the sub-path and path point 29 to ensure acceleration continuity. The path replacement operation updates the global path sequence, replacing the segment between points 28 and 29 of the original path with seven newly generated path points. The total length of the updated path is 0.3 meters longer than the original path, but it successfully avoids newly appearing obstacles. During path execution, the positioning system continuously monitors the actual position offset at a frequency of 10 Hz. When the UAV travels along the new path to path point 30, the offset has been reduced to within 0.2 meters, indicating that the local replanning has successfully corrected the path deviation. The entire replanning process takes 1.2 seconds, including 0.3 seconds for sensor data processing, 0.6 seconds for path search calculation, and 0.3 seconds for path smoothing. During replanning, the operating machinery maintains a low speed of 0.5 meters per second to ensure safety. The local path replanning mechanism includes various anomaly handling scenarios. For example, when no feasible path is found within the search window, the system gradually expands the search window size, up to a maximum of 30 meters x 30 meters. Another anomaly is the continuous movement of dynamic obstacles; in this case, the system initiates periodic replanning, with the replanning frequency adaptively adjusted according to the obstacle's movement speed, reaching a maximum of once per second. For temporary obstacles, the system sets an obstacle presence time threshold; if no obstacle is detected for more than 5 minutes, the original path is automatically restored.
[0089] The parameter configuration in the specific implementation reflects adaptability. The position offset threshold is dynamically set according to the operational accuracy requirements, and the threshold range is adjustable between 0.3 meters and 1.0 meter. The initial size of the search window is proportional to the braking distance of the operating machinery; the longer the braking distance, the larger the window size. The upper limit of the rate of change of curvature is determined based on the steering performance of the specific operating machinery. Machinery with flexible steering can be set with a smaller upper limit of the rate of change of curvature, while machinery with heavy steering requires a larger upper limit. Sensor data updates adopt a multi-source fusion strategy: visual sensors provide obstacle contour information, laser rangefinders provide precise distance data, and millimeter-wave radar detects obstacles partially obscured by vegetation. The data fusion cycle is 0.1 seconds to ensure that the obstacle distribution grid map can reflect environmental changes in a timely manner. The obstacle position prediction algorithm is based on linear extrapolation of historical trajectories to predict the obstacle position within the next 2 seconds for forward-looking path planning. Path smoothing considers the dynamic constraints of the operating machinery, and the control point arrangement of the Bézier curve meets the maximum centripetal acceleration limit. The choice of polynomial order in polynomial interpolation balances computational complexity with smoothness requirements. Lower-order polynomials are faster to compute but have poorer smoothness, while higher-order polynomials have higher smoothness but require more computation. In practice, a piecewise interpolation strategy is adopted, using quadratic polynomials for straight segments and fifth-order polynomials for curve segments.
[0090] The local path replanning system employs a priority scheduling mechanism for computational resource management, assigning the highest priority to path search tasks to ensure real-time performance. Memory usage optimization utilizes pooling technology, pre-allocating path point storage space to avoid dynamic allocation overhead. Algorithm stability is ensured through redundancy design; a backup algorithm immediately takes over when the primary path planning algorithm fails. The backup algorithm is based on the artificial potential field method, which has low computational cost but poor path smoothness. An implementation case demonstrates the system's effectiveness in handling sudden obstacles. In a real-world operation, the drone successfully avoided a wild animal that suddenly entered a farmland. The wild animal moved at approximately 3 meters per second, and the system completed replanning within 0.8 seconds, generating a new path that maintained a safe distance of at least 3 meters between the drone and the wild animal. Throughout the avoidance process, the operating machinery's speed was smoothly adjusted, with a maximum acceleration not exceeding 0.5 meters per second², meeting comfort requirements. Coordination between the local path replanning system and the global path planning system is achieved through path splicing point management. A transition region is set at the splicing point, within which the local path gradually converges to the global path. The length of the transition region is proportional to the operating machinery's speed; at a speed of 2 meters per second, the transition region length is set to 4 meters. The path consistency check verifies the directional deviation between the local path and the global path. If the directional deviation exceeds 15 degrees, a global replanning is triggered.
[0091] The anomaly log system meticulously records each replanning event, including trigger time, offset magnitude, obstacle type, replanning time, and new path quality assessment metrics. This recorded data is used for system performance analysis and parameter optimization. System reliability is enhanced through multiple protection mechanisms: a degradation strategy is employed during power fluctuations, path search accuracy is simplified when computing resources are insufficient, and the inertial navigation system is relied upon for short-term maintenance in the event of sensor failure. A communication interruption handling scheme supports offline operation, storing the most recent environmental map data locally. The system recovery mechanism automatically reinitializes after fault resolution, without affecting the current task. The interface between the local path replanning system and the agricultural machinery electronic control system uses the CAN bus protocol, which defines a standard path point message format. The electronic control system provides feedback on path tracking status; a new round of replanning is triggered when the tracking error exceeds a threshold. The human-machine interface displays the replanning status in real time, allowing operators to manually adjust replanning parameters or directly intervene in control. The historical path storage function records complete actual operation paths for operation quality assessment and system optimization. Implementation data shows that the system meets the real-time requirements of farmland operations. On a typical embedded computing platform (dual-core 1.5GHz processor, 2GB memory), the average computation time for local path replanning is less than 1 second. Memory usage remains stable at less than 150MB, and power consumption is controlled below 5W, making it suitable for long-term outdoor operations.
[0092] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus.
[0093] Although embodiments of the invention have been shown and described, it will be understood by those skilled in the art that various changes, modifications, substitutions and alterations can be made to these embodiments without departing from the principles and spirit of the invention, the scope of which is defined by the appended claims and their equivalents.
Claims
1. An unmanned aerial vehicle image-based farmland obstacle identification and operation path planning method, characterized in that, The method comprises the following steps: acquiring a time sequence image sequence of a farmland area by a multi-spectral sensor carried by a UAV, wherein the time sequence image sequence comprises synchronous imaging data of a visible light band and a near-infrared band; performing pixel-level fusion processing on the time sequence image sequence to generate a multi-channel fusion image with spatial alignment characteristics, and extracting edge response features of obstacles in each channel; constructing an initial obstacle contour set according to the edge response features, combining a hierarchical semantic segmentation result of a deep convolutional network to correct misjudged areas in the initial contour set and supplement the geometric topological structure of missed targets; establishing an obstacle distribution grid map containing absolute position references based on the corrected obstacle contour set and farmland boundary geographic coordinates; generating a candidate path set with the minimum obstacle avoidance cost as the target according to the spatial constraint relationship between the dynamic parameters of a working machine and the obstacle distribution grid map; performing smoothness evaluation on the steering angle sequence and the speed adjustment sequence of each path in the candidate path set by a dynamic time warping algorithm, and screening an optimal working path meeting the mechanical control characteristics. 2.The method of claim 1, wherein, The pixel-level fusion processing on the time sequence image sequence comprises the following steps: respectively calculating the pixel displacement deviation of the visible light band image and the near-infrared band image under the same geographic coordinate system; establishing a bilinear interpolation model according to the pixel displacement deviation to spatially register the gray gradient distribution of the visible light band image and the thermal radiation intensity distribution of the near-infrared band image; performing a frequency domain fusion operation based on wavelet transform on the registered dual-band image to retain the high-frequency detail components of the visible light band and the low-frequency texture components of the near-infrared band, and generating a multi-channel fusion image. 3.The method of claim 2, wherein, The extraction of the edge response features of obstacles in each channel comprises the following steps: performing adaptive threshold segmentation processing on the multi-channel fusion image to obtain a preliminary binary region; calculating the directional gradient accumulation of each pixel point in the preliminary binary region by using a histogram of oriented gradients (HOG) algorithm; determining candidate connection points of obstacle edges according to the mutation point distribution of the directional gradient accumulation, and constructing a continuity topological chain of the edge response features by a minimum spanning tree algorithm. 4.The method of claim 3, wherein, The correction of misjudged areas in the initial contour set comprises the following steps: projecting the semantic segmentation result of the deep convolutional network into the geographic coordinate system corresponding to the initial contour set to obtain the semantic class proportion of each pixel inside the initial contour; if the semantic class proportion of a pixel inside a certain initial contour is inconsistent with a preset obstacle class, it is determined as a misjudged area and deleted from the contour set; for a semantic segmentation connected domain not covered by any initial contour, calculating the vertex coordinates of its circumscribed polygon and supplementing it to the corrected obstacle contour set. 5.The method of claim 4, wherein, The establishment of the obstacle distribution grid map containing absolute position references comprises the following steps: converting the farmland boundary geographic coordinates into a polygon vertex sequence under the UTM projection coordinate system; dividing equal-size grid cells according to a preset resolution based on the minimum circumscribed rectangle of the vertex sequence; according to the spatial inclusion relationship between the corrected obstacle contour set and the grid cells, marking the grid index number containing obstacles and the average height of the obstacles. 6.The method of claim 5, wherein, The generation of the candidate path set with the minimum obstacle avoidance cost as the target comprises the following steps: According to the minimum turning radius and the maximum tilt angle limit of the working machine, the accessibility constraint condition of the path node is defined; An improved A The improved A* algorithm searches for a sequence of connected nodes in the obstacle distribution grid map that satisfies the reachability constraint to generate an initial path. The continuous nodes in the initial path are processed by cubic spline interpolation to eliminate the path curvature mutation points and generate a smooth candidate path set. 7.The method of claim 6, wherein, The turning angle sequence and the speed adjustment sequence of each path in the candidate path set are evaluated for smoothness by the dynamic time warping algorithm, including: The curvature change points of each path in the candidate path set are extracted, and the sum of the absolute values of the turning angles between adjacent change points is calculated; According to the rated power curve of the working machine, the acceleration fluctuation of the speed adjustment sequence is fitted; The sum of the absolute values of the turning angles and the acceleration fluctuation are input into the dynamic time warping algorithm to calculate the matching cost of each path with the ideal smooth template. 8.The method of claim 7, wherein, The optimal working path that meets the mechanical control characteristics is screened out, including: Select the first three candidate paths with the smallest matching cost as the preferred path set; Calculate the weighted sum of the total length and the obstacle avoidance distance of each path in the preferred path set; Select the path with the smallest weighted sum as the optimal working path, and output its node coordinate sequence and speed control parameters. 9.The UAV image-based farmland obstacle identification and operation path planning method according to claim 8, characterized in that, It also includes: Real-time acquisition of the actual position offset of the unmanned aerial vehicle during the execution of the optimal working path; If the actual position offset exceeds the preset threshold, trigger local path re-planning: generate a local obstacle avoidance sub-path according to the current remaining path segment and the updated obstacle distribution grid map, and replace the corresponding section of the original path. 10.The method of claim 9, wherein, The local obstacle avoidance sub-path is generated, including: Establish a local search window in the obstacle distribution grid map with the current actual position as the starting point and the nearest unvisited path node as the ending point; Use the bidirectional Dijkstra algorithm to find an obstacle avoidance sub-path in the search window, ensuring that the curvature change rate of the sub-path does not exceed the set upper limit of the original optimal working path.
Citation Information
Patent Citations
Multi-sensor fusion unmanned equipment agriculture monitoring method and system
CN119515029A
Unmanned tractor path planning and roadblock avoiding method based on ant colony algorithm and JPS + algorithm
CN120335438A