A method for calculating the area of an operation trajectory based on the combination of image algorithm and deep learning
By combining image algorithms and deep learning, it automatically identifies agricultural machinery operation plots and calculates the area, solving the problems of low calculation accuracy and low efficiency in existing technologies, and achieving efficient and accurate operation area calculation and non-plot category trajectory management.
Patent Information
- Application Number
- CN202310620375.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-05-29
- Publication Date
- 2025-10-03
- Estimated Expiration
- 2043-05-29
AI Technical Summary
The existing agricultural machinery operation area calculation has low accuracy, low efficiency and is not universal, and the manual review cost is high.
Combining image algorithms and deep learning, the Beidou terminal collects agricultural machinery driving trajectory data, performs preprocessing, grayscale image generation, plot classification and area calculation, and uses morphological image processing and plot classification models to automatically identify the operating plots and calculate the area.
It achieves fast and accurate calculation of operating area, reduces manual review, improves calculation efficiency and accuracy, and provides monitoring and management of non-plot category trajectories.
Smart Images

Figure CN116664661B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of agricultural information technology, and in particular relates to an operation trajectory area calculation scheme planning method based on the combination of image algorithm and deep learning. Technical Background
[0002] With the increasing mechanization of agriculture, quickly and accurately measuring farmland operating areas has become an essential task in agricultural production. To address the shortcomings of traditional measurement methods, such as low efficiency, large errors, and the significant labor and resource consumption, image algorithms based on agricultural machinery trajectories have emerged as a novel measurement method. This algorithm analyzes and processes image data from agricultural machinery trajectories to extract the plots of land where the machinery is operating. These plots are then classified and screened to determine the operating area. This technology, based on morphological algorithms from digital image processing and deep learning image classification models, analyzes and processes trajectory data to extract the boundaries of the operating area. These are then input into a plot classification model to determine the plot category, thereby enabling automated calculation of the operating area. This application of this technology not only improves the accuracy and efficiency of operating area calculation but also promotes the standardization of agricultural machinery operators' operating routes, reduces pesticide and fertilizer waste, and improves resource utilization. Therefore, agricultural machinery trajectories-based operating area calculation technology has gradually become a key area in the development of agricultural informatization and intelligentization, and has been widely used in modern agricultural production. Summary of the Invention
[0003] The present invention provides a method for planning an operation trajectory area calculation scheme based on a combination of image algorithms and deep learning. The purpose is to solve the problems of low accuracy, low efficiency, lack of universality, and high manual review costs in existing agricultural machinery operation area calculations, and to provide a method that can quickly and accurately identify operation plots and accurately calculate the area of their operation plots.
[0004] The implementation steps of the present invention are as follows:
[0005] (1) Use Beidou terminal equipment to collect the driving trajectory of agricultural machinery and send it to the data receiving service to store the data collected by the positioning terminal;
[0006] (2) The preprocessing of agricultural machinery driving trajectories includes four steps: deduplication, thinning, segmentation, and filtering, which are used to remove adjacent and repeated longitude and latitude data; retain the minimum number of trajectory points without changing the original trajectory shape; segment the trajectory with trajectory points that are far apart; and filter the segmented trajectories where there are too few or too dense trajectory points, or the segmentation frequency is too high.
[0007] (3) Preprocessed trajectories with large geographical spans need to be segmented using predetermined rectangular geometry, and multiple sub-trajectories are generated using geometric algorithms;
[0008] (4) Generate a sub-track grayscale image based on the sub-track, and use the equal longitude and latitude projection coordinate system, which will be simpler and more accurate in the subsequent conversion between pixel coordinates and longitude and latitude coordinates;
[0009] (5) Based on the statistics of the width of most operation tracks and the minimum width of the plots, the appropriate dilation and erosion pixel size is selected, and the pixel boundaries of the operation plots are extracted from the sub-track grayscale image through the morphological image processing algorithm;
[0010] (6) The latitude and longitude coordinates of the original coordinate system are inferred through the pixel boundary, and the node structure of the pixel boundary is converted into a perforated polygon. The projection coordinate system selects equal-area projection to calculate the first-stage area of the agricultural machinery operation plot;
[0011] (7) Generate a fixed-size grayscale image of the land parcel based on the trajectory within the pixel boundary extracted in step 5;
[0012] (8) Inputting the land parcel grayscale image into the land parcel classification model to obtain the classification results of the image with land parcel, noise, road section, and drift as the classification categories;
[0013] (9) Eliminate the non-plot type area in the first stage area and perform the second stage area calculation based on the first stage area calculation;
[0014] The advantages of the present invention compared with the prior art are:
[0015] (1) No manual review is required to estimate and count the operating area, which saves manpower and improves the efficiency and accuracy of calculating the operating area;
[0016] (2) Through the categories output by the plot classification model, while calculating the plot operation area, the trajectories of non-plot categories can also be effectively monitored and managed, providing an effective management method for the trajectory data uploaded by the Beidou terminal. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 It is a flow chart of the method implementation of the present invention;
[0018] Figure 2 This is a schematic diagram of the target operation trajectory identification and plot extraction results of the present invention;
[0019] Figure 3 is a schematic diagram of the land parcel classification categories of the present invention; DETAILED DESCRIPTION
[0020] like Figure 1 As shown, the specific implementation of the method of the present invention includes the following 9 steps:
[0021] (1) Using Beidou terminal equipment to collect agricultural machinery driving trajectories
[0022] a) Install Beidou terminal equipment on agricultural machinery;
[0023] b) Set the acquisition frequency to determine the acquisition accuracy of trajectory data;
[0024] c) Storing the collected agricultural machinery driving trajectory data.
[0025] (2) Pre-processing operations such as deduplication, thinning, segmentation, and filtering of agricultural machinery driving trajectories
[0026] a) Remove duplicate trajectory data;
[0027] b) Use sparse algorithms to reduce data density and reduce subsequent calculations;
[0028] c) Segmenting the trajectory according to the speed or other characteristics of the agricultural machinery;
[0029] d) Filter out abnormal trajectory points, such as those with abnormal speed or excessive position deviation.
[0030] (3) The pre-processed trajectory larger than the threshold size is segmented into fixed rectangles to obtain multiple sub-trajectories
[0031] a) Setting the threshold size for trajectory segmentation;
[0032] b) Segmenting the preprocessed trajectory according to the threshold size;
[0033] (4) Generate sub-trajectory grayscale images based on the sub-trajectory with equal longitude and latitude projection
[0034] a) Select an appropriate projection method to project the sub-trajectory onto a two-dimensional plane;
[0035] b) converting the projected sub-trajectory into a grayscale image;
[0036] (5) Based on the statistics of the width of most operation tracks and the minimum width of the plot, the appropriate expansion and corrosion pixel size is selected, and the boundary of the operation plot is extracted from the sub-track grayscale image through the morphological image processing algorithm.
[0037] a) Count the width of the operation track and the minimum width of the plot;
[0038] b) Select an appropriate dilation erosion pixel size;
[0039] c) Use morphological image processing algorithms to extract the boundaries of the work area.
[0040] (6) Reverse the longitude and latitude coordinates of the original coordinate system through the pixel boundary and convert them into perforated geometry to calculate the first stage area of the agricultural machinery operation plot
[0041] a) Reverse-calculate the latitude and longitude coordinates of the original coordinate system based on the extracted pixel boundaries;
[0042] b) converting the latitude and longitude coordinates into a perforated geometry representation;
[0043] c) Calculate the area of the land used for agricultural machinery operation in the first phase.
[0044] (7) Based on the extracted pixel boundaries, the trajectory within the boundary is intercepted to generate a grayscale image of the plot. Here, there may be a situation where the pixel boundary is superimposed on the trajectory. It is necessary to expand the boundary to a fixed pixel according to the actual situation to avoid losing part of the operation trajectory.
[0045] The boundaries of each plot may be tangent, or the boundaries of plots between different sub-trajectory grayscale images may be tangent. In this case, further fusion operations need to be performed on the plot geometry to generate a complete plot grayscale image.
[0046] (8) Input the grayscale image of the land parcel into the land parcel classification model to obtain the classification results of the image into land parcel, noise, road section, and drift. The input land parcel classification model needs to be replaced with a suitable model according to actual needs. The initial training of the model is based on a large number of land parcel images. The types of training sets should be as wide and evenly distributed as possible to achieve the best training effect.
[0047] (9) Eliminate the non-plot type area from the first stage area to obtain the second stage area.
[0048] a) Analyze the classification results and identify non-plot areas;
[0049] b) Excluding the area of non-plot types;
[0050] c) Calculate the area of the second stage.
[0051] The following formula can be used to express the ratio between the latitude and longitude dimensions and the generated image size:
[0052] Assume that the longitude and latitude ranges in the original latitude and longitude coordinate system are Δlon and Δlat respectively, and the generated image size is W (width) and H (height), then the ratios of latitude and longitude to the generated image size are:
[0053] scale_x=W / Δlon
[0054] scale_y=H / Δlat
[0055] Through these two ratio formulas, latitude and longitude coordinates can be converted to image coordinates, and vice versa. The specific conversion formula is as follows:
[0056] The conversion relationship between image coordinates (x, y) and latitude and longitude coordinates (lon, lat) is:
[0057] x=(lon-lon_min)*scale_x
[0058] y=(lat-lat_min)*scale_y
[0059] The reverse conversion formula is:
[0060] lon=x / scale_x+lon_min
[0061] lat=y / scale_y+lat_min
[0062] Among them, lon_min and lat_min represent the minimum longitude and latitude in the original longitude and longitude coordinate system respectively.
[0063] After completing the above steps, we can continue to optimize and expand the calculation solution by adding the following steps:
[0064] (10) Evaluate the accuracy of calculation results
[0065] a) Use ground truth data, GIS (Geographic Information System), and web applications to annotate samples;
[0066] b) Calculate the true value of the operating plot area using sample data;
[0067] c) Compare the calculated second-stage area with the true value to evaluate the accuracy of the calculation results.
[0068] (11) Optimization calculation method
[0069] a) Analyze the sources of calculation errors based on the evaluation results;
[0070] b) Adjust parameters such as preprocessing, trajectory segmentation, and image generation to improve the accuracy of calculation results;
[0071] c) Update the land parcel classification model to make it more suitable for current data characteristics.
[0072] (12) Implement application plan
[0073] a) Deploy the optimized calculation method to practical application scenarios, such as agricultural information management systems;
[0074] b) Collect agricultural machinery operation trajectory data and calculate the operation area in real time;
[0075] c) Provide real-time operation plot area information to facilitate agricultural production management and decision-making.
[0076] (13) Continuous improvement and updating
[0077] a) Regularly collect and analyze farmer feedback to understand how the calculation method performs in real-world applications;
[0078] b) Continuously optimize and improve calculation methods based on farmer feedback and new technological developments;
[0079] c) Update the land parcel classification model to adapt it to new data characteristics and application requirements.
[0080] Parts of the present invention that are not described in detail belong to the well-known technology in the art.
[0081] Although the above describes the illustrative specific embodiments of the present invention to facilitate understanding of the present invention by those skilled in the art, it should be clear that the present invention is not limited to the scope of the specific embodiments. For those skilled in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the appended claims, these changes are obvious, and all inventions and creations using the concepts of the present invention are protected.
Claims
1. A method for calculating the area of an operation track based on a combination of image algorithms and deep learning, characterized by: Use Beidou terminal equipment to collect the driving trajectory of agricultural machinery; The agricultural machinery driving trajectory is pre-processed by deduplication, thinning, segmentation and filtering; the pre-processed trajectory larger than the threshold size is segmented into fixed rectangles to obtain multiple sub-trajectories; the sub-trajectory grayscale image is generated based on the sub-trajectory projection with equal longitude and latitude; according to the statistics of the width of most operation trajectories and the minimum width of the plot, the appropriate expansion and corrosion pixel size is selected, and the boundary of the operation plot is extracted from the sub-trajectory grayscale image through the morphological image processing algorithm; the longitude and latitude coordinates of the original coordinate system are inferred from the pixel boundary and converted into a perforated geometry to calculate the first-stage area of the agricultural machinery operation plot; the trajectory within the boundary is intercepted based on the extracted pixel boundary to generate a plot grayscale image; the plot grayscale image is input into the plot classification model to obtain the classification result of the image with plot, noise, road section and drift as classification categories; the area of non-plot type in the first-stage area is eliminated, which is the second-stage area; based on the plot area obtained in the second stage, the total area of agricultural machinery operation is calculated; The specific implementation steps are as follows: (1) Use Beidou terminal equipment to collect the driving trajectory of agricultural machinery and send it to the data receiving service to store the data collected by the positioning terminal; (2) The preprocessing of agricultural machinery driving trajectories includes four steps: deduplication, thinning, segmentation, and filtering, which are used to remove duplicate data of adjacent longitude and latitude; retain the minimum number of trajectory points without changing the original trajectory shape; and segment the trajectory based on trajectory points that are far apart. Filter out situations where the segmented trajectory points are too few, too dense, or the segmented frequency is too high; (3) Preprocessed trajectories with large geographical spans need to be segmented using predetermined rectangular geometry, and multiple sub-trajectories are generated using geometric algorithms; (4) Generate a sub-track grayscale image based on the sub-track, and use the equal longitude and latitude projection coordinate system, which will be more accurate in the subsequent conversion between pixel coordinates and longitude and latitude coordinates; (5) Based on the statistics of the width of most operation tracks and the minimum width of the plots, the appropriate dilation and erosion pixel size is selected, and the pixel boundaries of the operation plots are extracted from the sub-track grayscale image through the morphological image processing algorithm; (6) The latitude and longitude coordinates of the original coordinate system are inferred through the pixel boundary, and the node structure of the pixel boundary is converted into a perforated polygon. The projection coordinate system selects the equal-area projection of the current area to calculate the first-stage area of the agricultural machinery operation plot; (7) Generate a fixed-size grayscale image of the land parcel based on the trajectory within the pixel boundary extracted in step 5; (8) Inputting the land parcel grayscale image into the land parcel classification model to obtain the classification results of the image with land parcel, noise, road section, and drift as the classification categories; (9) Eliminate the non-plot type area from the first-stage area and perform the second-stage area calculation based on the first-stage area calculation.
Citation Information
Patent Citations
Work paper image word grid extraction method and device based on calculation of dynamic parameters
CN112183229A
Integrated track circuit total monitoring system
KR101989376B1