Method and system for agricultural machinery positioning based on deep learning

By using deep learning technology to detect crop boundaries and construct driving boundary lines, the problem of inaccurate harvesting by agricultural machinery on irregular fields has been solved, achieving efficient and precise crop harvesting and reducing soil compaction.

CN120912667BActive Publication Date: 2025-12-30ZHONGGU VEKEN (CHENGDU) POWER TECH CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511430799.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-10-09
Publication Date
2025-12-30
Estimated Expiration
2045-10-09

AI Technical Summary

Technical Problem

Existing agricultural machinery positioning technology cannot accurately identify crop boundaries, resulting in inaccurate harvesting. Furthermore, heavy machinery is inefficient when traveling on irregular fields, which may cause soil compaction and difficulties in field edge management.

Method used

A deep learning-based approach is used to acquire images through camera equipment, detect crop areas and boundaries, construct first and second detection boundary lines, and adjust the driving boundary lines of agricultural machinery to achieve precise harvesting.

Benefits of technology

It enables agricultural machinery to harvest crops efficiently and precisely on irregular fields, reducing soil compaction, improving harvesting efficiency, and preventing crop omissions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120912667B_ABST
    Figure CN120912667B_ABST
Patent Text Reader

Abstract

The application discloses a kind of method and system for agricultural machinery positioning based on deep learning.The first boundary curve and crop area are obtained based on the captured image.Based on the first boundary curve, a curve is constructed to obtain the first detection boundary line.Based on the captured image and crop area, a straight line is constructed to obtain the second detection boundary line.The boundary of the crop is found using both target detection and edge detection methods.Based on the first detection boundary line and the second detection boundary line, the position of the agricultural machinery is adjusted.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and more specifically, to a method and system for positioning agricultural machinery based on deep learning. Background Technology

[0002] Currently, the purpose of positioning for agricultural machinery is to enable intelligent navigation or autonomous driving, with the core being to allow agricultural machinery (such as tractors, harvesters, and sprayers) to operate autonomously and precisely in the fields. Using GPS alone for positioning only tells "where I am," but not "what's around me" (such as suddenly appearing obstacles, the precise location of crop rows, and the crop's growth status). Therefore, for harvesting machinery, it cannot perform targeted harvesting. Furthermore, if fixed routes are used for harvesting, the fixed route pattern may not adapt well to all field shapes. Heavy agricultural machinery (such as combine harvesters) traveling on the same paths year after year causes extreme compaction of the soil beneath the wheel tracks, forming a hard "plow pan." When encountering irregularly shaped fields, this can lead to decreased efficiency or difficulties in field edge management. Moreover, when errors occur during agricultural harvesting, every route will experience problems, preventing intelligent harvesting of crops. Summary of the Invention

[0003] The purpose of this invention is to provide a method and system for positioning agricultural machinery based on deep learning, so as to solve the above-mentioned problems existing in the prior art.

[0004] In a first aspect, embodiments of the present invention provide a method for locating agricultural machinery based on deep learning, comprising:

[0005] Acquire captured images; the captured images represent horizontal images captured by a camera device on agricultural machinery;

[0006] Based on the captured image, a first boundary curve and a crop region are obtained; the first boundary curve represents the boundary of the detected crop region; the crop region represents the region where crop category matching needs to be performed.

[0007] Based on the first boundary curve, a curve is constructed to obtain the first detection boundary line;

[0008] Based on the captured image and the crop area, a straight line is constructed to obtain the second detection boundary line;

[0009] Based on the first detection boundary line and the second detection boundary line, a driving boundary line is obtained; the driving boundary line represents a straight line for controlling the driving of agricultural machinery.

[0010] Adjust the position of the agricultural machinery based on the aforementioned driving boundary lines.

[0011] Optionally, obtaining the first boundary curve and the crop region based on the captured image includes:

[0012] Based on the captured images, coordinate axes are constructed to obtain the crop area;

[0013] n partial crop images correspond to n crop regions;

[0014] Based on n crop regions, n crop boundary points are obtained; the ordinate of each crop boundary point is the ordinate of the center point of the crop region plus half the length; the abscissa of each crop boundary point is the abscissa of the center point of the crop region.

[0015] By fitting the n crop boundary points, the first boundary curve is obtained.

[0016] Optionally, the step of constructing coordinate axes to obtain the crop area based on the captured image includes:

[0017] Rotate the captured image 90 degrees clockwise to obtain a rotated image;

[0018] Construct a coordinate axis with the bottom left corner of the rotated image as the origin, length as the x-coordinate, and width as the y-coordinate;

[0019] The horizontal coordinate of the captured image is divided to obtain n partial crop images; each partial crop image represents an image of a region containing the crop portion.

[0020] The crop images are input into a target detection network to determine the crop category and obtain the crop region.

[0021] Optionally, the step of constructing a curve based on the first boundary curve to obtain the first detection boundary line includes:

[0022] Differentiating the first boundary curve yields a set of maxima and a set of minima; the set of maxima contains the x and y coordinates of multiple maxima; the set of minima contains the x and y coordinates of multiple minima.

[0023] Clustering the maximal set and the minima separately yields the clustered maximal set and the clustered minima;

[0024] The values ​​in the cluster maxima and cluster minima are fitted to obtain the first detection boundary line; the first detection boundary line represents the straight line with the most harvested crops.

[0025] Optionally, obtaining the first detection boundary line based on the cluster maxima and cluster minima includes:

[0026] The values ​​in the cluster maxima and cluster minima are fitted to obtain the first detection line; the first detection line represents the line with the most harvested crops.

[0027] Under the condition that the ordinate of the first boundary curve is greater than the ordinate of the first detection line, the maximum distance between the first boundary curve and the first detection line is taken as the first offset value.

[0028] The point on the first boundary curve corresponding to the first offset value is taken as the first offset point;

[0029] The first detection line is translated to intersect with the first offset point to obtain the first detection boundary line.

[0030] Optionally, the step of constructing a straight line based on the captured image and the crop area to obtain the second detection boundary line includes:

[0031] The captured image is segmented using an edge detection algorithm to obtain a segmented image; the segmented image includes multiple segmented regions; the segmented image represents an image that separates crop areas and land areas.

[0032] The segmented region is matched with the crop region to obtain a labeled segmented image; the labeled segmented image includes the crop region and the land region.

[0033] The boundary of the crop region in the segmented image is determined to obtain the second segmentation curve; the second segmentation curve represents the boundary between the crop region and the land region where the agricultural machinery is to travel.

[0034] Based on the second segmentation curve, a straight line is constructed to obtain the second detection boundary line; the second detection boundary line represents the straight line of the predicted motion of agricultural machinery.

[0035] Optionally, the step of constructing a straight line based on the second segmentation curve to obtain the second detection boundary line includes:

[0036] The second segmentation curve is fitted to construct a straight line, thus obtaining the second segmentation straight line;

[0037] The second dividing line is translated on the vertical axis until it intersects with the second dividing curve at one point and the value of the vertical axis is maximized, thus obtaining the second detection boundary point.

[0038] Optionally, obtaining the driving boundary line based on the first detection boundary line and the second detection boundary line includes:

[0039] The first and second detection boundary lines are plotted on the image to obtain a double boundary line image.

[0040] By comparing the ordinates of the first and second detection boundary lines under the same horizontal coordinate, the line with the larger ordinate is retained and the line with the smaller ordinate is deleted to obtain the driving boundary line.

[0041] Optionally, adjusting the position of the agricultural machinery based on the driving boundary line includes:

[0042] Obtain the boundary points of agricultural machinery; the agricultural machinery boundary points refer to the positions set on the agricultural machinery that match the driving boundary lines.

[0043] Match the boundary points of agricultural machinery with the driving boundary lines and adjust the position of the agricultural machinery.

[0044] Secondly, embodiments of the present invention provide a system for positioning agricultural machinery based on deep learning, comprising:

[0045] The acquisition module is used to acquire captured images; the captured images represent horizontal images captured by the camera equipment on the agricultural machinery.

[0046] The target detection module is used to obtain a first boundary curve and a crop region based on the captured image; the first boundary curve represents the boundary of the detected crop region; the crop region represents the region that needs to be classified according to crop type.

[0047] The curve module is used to construct a curve based on the first boundary curve to obtain the first detection boundary line;

[0048] A straight line module is used to construct a straight line based on the captured image and the crop area to obtain a second detection boundary line;

[0049] The driving boundary module is used to obtain a driving boundary line based on the first detection boundary line and the second detection boundary line; the driving boundary line represents a straight line for controlling the driving of agricultural machinery.

[0050] An adjustment module is used to adjust the position of the agricultural machinery based on the driving boundary line.

[0051] Compared with the prior art, the embodiments of the present invention achieve the following beneficial effects:

[0052] This invention also provides a method and system for agricultural machinery positioning based on deep learning. Two methods, object detection and edge detection, are used to find the boundaries of crops. Because adjusting the agricultural machinery's route to remove crops that are too far from the boundary would consume more resources and result in a smaller harvest, clustering is used to remove crops that are too far from the boundary. Since a straight line reduces directional changes in the agricultural machinery and the fitted straight line passes through most points on the curve, a straight line is constructed for the boundary curve. Furthermore, because the harvesting equipment of the agricultural machinery has a certain width, the intercept of the straight line is adjusted to ensure that all crops are cut. Then, boundary points of the agricultural machinery are set so that they extend beyond the travel boundary line to prevent inaccurate harvesting at the crop boundary. This not only prevents crop loss but also allows for the harvesting of most crops on the curve at once according to the set direction of the straight line. This achieves a more accurate harvesting effect based on the shape of the crops. Attached Figure Description

[0053] Figure 1 This is a flowchart of a method for locating agricultural machinery based on deep learning, provided by an embodiment of the present invention.

[0054] Figure 2 This is a schematic diagram of the land area and crop area under the coordinate axis in a deep learning-based agricultural machinery positioning method provided in an embodiment of the present invention.

[0055] Figure 3 This is a schematic diagram illustrating the acquisition of crop regions from partial crop images in a method for locating agricultural machinery based on deep learning, provided in an embodiment of the present invention.

[0056] Figure 4 This is a schematic diagram of the first detection line, the first offset point, and the first detection boundary line in a deep learning-based agricultural machinery positioning method provided in an embodiment of the present invention.

[0057] Figure 5 This is a schematic diagram of the segmented rectangle segmentation in a deep learning-based agricultural machinery positioning method provided in an embodiment of the present invention.

[0058] Figure 6 This is a schematic diagram of the driving boundary line in a deep learning-based agricultural machinery positioning method provided in an embodiment of the present invention. Detailed Implementation

[0059] The present invention will now be described in detail with reference to the accompanying drawings.

[0060] Example 1

[0061] like Figure 1As shown in the figure, this embodiment of the invention provides a method for locating agricultural machinery based on deep learning, the method comprising:

[0062] S101: Acquire a captured image; the captured image represents a horizontal image captured by a camera device on agricultural machinery.

[0063] The agricultural machinery referred to here refers to machinery that operates on existing crops, such as weeders and harvesters. Harvesters include wheat harvesters, rice harvesters, corn harvesters, cotton harvesters, etc. These agricultural machines are equipped with GPS devices, which can obtain the current location and control the direction of the crops.

[0064] The camera device is fixed to the agricultural machinery and is used to photograph objects in front of the machinery. The captured image represents an image taken at the current point in time from the location of the agricultural machinery.

[0065] S102: Based on the captured image, a first boundary curve and a crop region are obtained; the first boundary curve represents the boundary of the detected crop region.

[0066] S103: Based on the first boundary curve, construct a curve to obtain the first detection boundary line.

[0067] S104: Based on the captured image and the crop area, construct a straight line to obtain the second detection boundary line.

[0068] S105: Based on the first detection boundary line and the second detection boundary line, a driving boundary line is obtained; the driving boundary line represents a straight line for controlling the driving of agricultural machinery.

[0069] S106: Adjust the position of the agricultural machinery based on the driving boundary line.

[0070] Optionally, obtaining the first boundary curve and the crop region based on the captured image includes:

[0071] Rotate the captured image 90 degrees clockwise to obtain a rotated image.

[0072] The camera equipment is fixed in front of the agricultural machinery to capture the condition of the crops. As the machinery moves, it separates the crop area from the land area, leaving a boundary line in the width direction in the captured image. Rotating the image 90 degrees clockwise transforms the vertical boundary line into a length boundary line. Figure 2 As shown. The crop area represents the area where crops still exist, and the land area represents the agricultural area where crops have been harvested.

[0073] Construct coordinate axes with the bottom left corner of the rotated image as the origin, length as the x-coordinate, and width as the y-coordinate.

[0074] Wherein, the coordinate axes are as follows Figure 2 As shown.

[0075] The horizontal coordinate of the captured image is divided to obtain n partial crop images; each partial crop image represents an image of a region containing the crop portion.

[0076] In this system, the sum of the lengths of the n partial crop images equals the length of the single crop image. The width of each partial crop image is equal to the width of the entire crop image.

[0077] Among them, some crop images are as follows Figure 3 As shown.

[0078] In this embodiment, because the camera is positioned in front of the agricultural machinery and is horizontally parallel to the ground, the width of the captured image (the length of the rotated image) is divided.

[0079] The crop images are input into a target detection network to determine the crop category and obtain the crop region; the crop region represents the area that needs to be processed according to the crop category.

[0080] n partial crop images correspond to n crop regions.

[0081] In this embodiment, the target detection network is a YOLOv5 network. The network is trained using labeled crop regions as labeled data. The output of the target detection network in this embodiment includes one confidence score, 20 crop categories, the x-coordinate of the center point of the crop region, the y-coordinate of the center point, its length, and its width. The crop categories represent the types of crops.

[0082] This involves matching the types of crops that need to be harvested with the types of crops detected in the target system to find the corresponding crop areas.

[0083] Based on n crop regions, n crop boundary points are obtained; the ordinate of each crop boundary point is the ordinate of the center point of the crop region plus half the length; the abscissa of each crop boundary point is the abscissa of the center point of the crop region.

[0084] Wherein, the ordinate of the crop boundary point is the ordinate of the center point of the crop area plus 1 / 2 of the length; the ordinate of the crop boundary point is the ordinate of the center point of the crop area.

[0085] If the x-coordinate (x), y-coordinate (y), length (w), and width (h) of the center point of the crop region are given, then the crop boundary point is (xw / 2, y). The center point and boundary point of the crop region are as follows: Figure 3 As shown.

[0086] By fitting the n crop boundary points, the first boundary curve is obtained.

[0087] In this embodiment, polynomial fitting is used for fitting. The first boundary curve has more than 3 terms.

[0088] Optionally, the step of constructing a curve based on the first boundary curve to obtain the first detection boundary line includes:

[0089] Differentiating the first boundary curve yields a set of maxima and a set of minima; the set of maxima contains the x and y coordinates of multiple maxima; the set of minima contains the x and y coordinates of multiple minima.

[0090] The extreme values ​​are obtained by setting the first derivative to 0. The sign of the second derivative is used to determine whether a value is a maximum or a minimum, with a negative value indicating a maximum and a positive value indicating a minimum.

[0091] Clustering the maximal set and the minima separately yields the clustered maximal set and the clustered minima.

[0092] The k-means method was used for clustering.

[0093] The cluster maxima and cluster minima represent regions that are far from the current column of crops to be operated on.

[0094] Based on the cluster maxima and cluster minima, the first detection boundary line is obtained.

[0095] Optionally, obtaining the first detection boundary line based on the cluster maxima and cluster minima includes:

[0096] The values ​​in the cluster maxima and cluster minima are fitted to obtain the first detection line.

[0097] In this embodiment, the least squares method is used for fitting.

[0098] Since the goal of the least squares method for line fitting is to find a straight line that minimizes the sum of the squares of the perpendicular distances from all data points to that line, the first detection line represents the line on which the most crops can be harvested.

[0099] When the ordinate of the first boundary curve is greater than the ordinate of the first detection line, the maximum distance between the first boundary curve and the first detection line is taken as the first offset value.

[0100] In this embodiment, the first boundary curve is First detection straight line The distance from a point on the first boundary curve to the first detection line is d = ,pass > By imposing constraints, we can find d= using the gradient ascent method. The maximum value is used as the first offset value.

[0101] The point on the first boundary curve corresponding to the first offset value is taken as the first offset point.

[0102] Where, by d= Find the point corresponding to the first offset value.

[0103] The first detection line is translated to intersect with the first offset point to obtain the first detection boundary line.

[0104] Among them, based on the confirmed values ​​of A and B The function, when substituted with the first offset point, yields the value of C1.

[0105] Among them, B and Not equal to 0.

[0106] Wherein, the first detection line, the first offset point, and the first detection boundary line are as follows: Figure 4 As shown.

[0107] Optionally, the step of constructing a straight line based on the captured image and the crop area to obtain the second detection boundary line includes:

[0108] The captured image is segmented using an edge detection algorithm to obtain a segmented image; the segmented image includes multiple segmented regions; the segmented image represents an image that separates crop areas and land areas.

[0109] In this embodiment, the Candy operator is used as the edge detection algorithm. Image segmentation is performed by determining the intensity gradient of the image based on pixel values. First, the intensity gradient along the horizontal and vertical axes is obtained using the Candy operator. Then, a threshold is used to determine the boundaries based on the intensity gradient. The cv2.Canny function in Python is used for this purpose.

[0110] The intensity gradient of an image is a vector with two components: the horizontal gradient and the vertical gradient. The horizontal gradient measures the rate of change of intensity along the horizontal axis. The vertical gradient measures the rate of change of intensity along the vertical axis.

[0111] The segmented region is matched with the crop region to obtain a labeled segmented image; the labeled segmented image includes the crop region and the land region.

[0112] In this embodiment, because the edge detection algorithm divides the captured image into multiple segmented regions without understanding their meaning, the crop region in the captured image is matched with the segmented regions: the crop region in the captured image is set to 0, and other regions are set to 1, converting it into a binary image. The segmented region to be detected is set to 0, and other regions are set to 1. The overlapping area between the segmented region and the crop region is calculated using the cv2.bitwise_and function in Python, and the number of 1s in the overlapping area is calculated using np.sum as the overlapping area. The number of 1s in the segmented region is calculated using np.sum as the segmented area. If the overlapping area divided by the segmented area is greater than the area threshold, a match is made and it is marked as a crop region. In this embodiment, the area threshold is 0.9. Segmented regions where the overlapping area divided by the segmented area is less than 0.1 are classified as land regions. If the overlapping area divided by the segmented area is greater than or equal to 0.1 or less than or equal to 0.9, it indicates a segmentation error, and the second detection boundary line is set as the first detection boundary line.

[0113] The boundary of the crop region in the segmented image is determined to obtain the second segmentation curve; the second segmentation curve represents the boundary between the crop region and the land region where the agricultural machinery is to travel.

[0114] In this embodiment, the unharvested crop area is a rectangle. Because the crops are harvested by adjusting the straight line multiple times, the boundary of the partially harvested crop area in the acquired marked segmentation image is also composed of a curve with a shape similar to a rectangle.

[0115] In this embodiment, a rectangle of size p*q is constructed as the segmentation rectangle. This segmentation rectangle moves along the vertical axis in the marked segmentation image with a step size of q. In this embodiment, due to the camera's angle setting, crops up to z times the length of the agricultural machinery can be detected. Therefore, p in the marked segmentation image is 1 / (5*z) of the marked segmentation image's width, ensuring that both sides of the crop region are not simultaneously captured in a single detection, and that multiple positions on one side of the crop region's boundary are detected. q is equal to the length of the marked segmentation image, i.e., the length of the rotated image, i.e., the width of the captured image.

[0116] The agricultural machinery length refers to the length of the equipment capable of processing crops.

[0117] The schematic diagram of the segmented rectangle is shown below. Figure 5 As shown. The segmentation rectangle is constructed because the captured image is rectangular.

[0118] The boundary of the dividing rectangle with the largest average value of the ordinate is taken as the second dividing curve.

[0119] Based on the second segmentation curve, a straight line is constructed to obtain the second detection boundary line; the second detection boundary line represents the straight line of the predicted motion of agricultural machinery.

[0120] The second segmentation curve is fitted to a straight line using the least squares method.

[0121] Optionally, the step of constructing a straight line based on the second segmentation curve to obtain the second detection boundary line includes:

[0122] The second segmentation curve is fitted to construct a straight line, thus obtaining the second segmentation straight line;

[0123] The second dividing line is translated on the vertical axis until it intersects with the second dividing curve at one point and the value of the vertical axis is maximized, thus obtaining the second detection boundary point.

[0124] Optionally, obtaining the driving boundary line based on the first detection boundary line and the second detection boundary line includes:

[0125] The first and second detection boundary lines are plotted on the image to obtain a double boundary line image.

[0126] The dual-boundary-line image represents two boundaries of crops detected by different methods.

[0127] By comparing the ordinates of the first and second detection boundary lines under the same horizontal coordinate, the line with the larger ordinate is retained and the line with the smaller ordinate is deleted to obtain the driving boundary line.

[0128] Wherein, the driving boundary line is as follows Figure 6 As shown. The driving boundary line is used to find the straight line that will harvest more crops by using both target detection and edge detection methods. The reason for not taking the line with the largest ordinate from the two methods is to prevent crops from being missed during harvesting due to detection errors.

[0129] Optionally, the step of locating based on the running map to obtain the captured image includes:

[0130] Obtain the boundary points of agricultural machinery; the boundary points of agricultural machinery refer to the positions set on agricultural machinery that match the driving boundary lines.

[0131] In this embodiment, the edge of the agricultural machinery closest to the land is identified as the matching edge for the agricultural machinery. A position 5 centimeters away from this matching edge on the agricultural machinery is selected. Figure 6 As shown.

[0132] Match the boundary points of agricultural machinery with the driving boundary lines and adjust the position of the agricultural machinery.

[0133] In this embodiment, the agricultural machinery is equipped with a GPS receiver to locate its position on a GPS map using a satellite positioning system.

[0134] In the agricultural machinery map, the crop area represents a square area where crops are planted. The field road represents the road between crops.

[0135] Example 2

[0136] Based on the above-described deep learning-based agricultural machinery positioning method, this invention also provides a deep learning-based agricultural machinery positioning system, the system comprising:

[0137] The acquisition module is used to acquire captured images; the captured images represent horizontal images captured by the camera equipment on the agricultural machinery.

[0138] The target detection module is used to obtain a first boundary curve and a crop region based on the captured image; the first boundary curve represents the boundary of the detected crop region; the crop region represents the region that needs to be classified according to crop type.

[0139] The curve module is used to construct a curve based on the first boundary curve to obtain the first detection boundary line;

[0140] A straight line module is used to construct a straight line based on the captured image and the crop area to obtain a second detection boundary line;

[0141] The driving boundary module is used to obtain a driving boundary line based on the first detection boundary line and the second detection boundary line; the driving boundary line represents a straight line for controlling the driving of agricultural machinery.

[0142] An adjustment module is used to adjust the position of the agricultural machinery based on the driving boundary line.

[0143] The algorithms and displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is apparent from the above description. Furthermore, this invention is not directed to any particular programming language. It should be understood that the contents of the invention described herein can be implemented using various programming languages, and the above description of specific languages ​​is for the purpose of disclosing the best mode of implementation of the invention.

[0144] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.

[0145] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components in the apparatus according to embodiments of the present invention. The present invention can also be implemented as a device or apparatus program (e.g., a computer program and computer program product) for performing part or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.

Claims

1. A method for deep learning-based positioning of agricultural machinery, characterized in that, The method comprises the following steps: acquiring a photographed image; the photographed image represents a horizontal image photographed by a camera device on an agricultural machine; based on the photographed image, obtaining a first boundary curve and a crop region; the first boundary curve represents the boundary of the detected crop region; the crop region represents a region corresponding to the crop category that needs to be processed; based on the first boundary curve, constructing a curve to obtain a first detection boundary line; the step of constructing a curve based on the first boundary curve to obtain a first detection boundary line comprises the following steps: deriving the first boundary curve to obtain a maximum set and a minimum set; the maximum set contains the horizontal and vertical coordinates of multiple maximum values; the minimum set contains the horizontal and vertical coordinates of multiple minimum values; clustering the maximum set and the minimum set respectively to obtain a clustered maximum set and a clustered minimum set; fitting the values in the clustered maximum set and the clustered minimum set to obtain a first detection boundary line; the first detection boundary line represents a straight line with the most harvested crops; the step of obtaining a first detection boundary line based on the clustered maximum set and the clustered minimum set comprises the following steps: fitting the values in the clustered maximum set and the clustered minimum set to obtain a first detection straight line; the first detection straight line represents a straight line with the most harvested crops; under the condition that the vertical coordinate of the first boundary curve is greater than the vertical coordinate of the first detection straight line, taking the maximum distance between the first boundary curve and the first detection straight line as a first offset value; taking the point corresponding to the first offset value on the first boundary curve as a first offset point; translating the intersection of the first detection straight line and the first offset point to obtain a first detection boundary line; based on the photographed image and the crop region, constructing a straight line to obtain a second detection boundary line; the step of constructing a straight line based on the photographed image and the crop region to obtain a second detection boundary line comprises the following steps: performing image segmentation on the photographed image by an edge detection algorithm to obtain a segmented image; the segmented image comprises multiple segmented regions; the segmented image represents an image in which the crop region and the soil region are segmented; matching the segmented regions with the crop region to obtain a marked segmented image; the marked segmented image comprises the crop region and the soil region; determining the boundary of the crop region in the marked segmented image to obtain a second segmentation curve; the second segmentation curve represents the boundary between the crop region and the soil region to be traveled by the agricultural machine; based on the second segmentation curve, constructing a straight line to obtain a second detection boundary line; the second detection boundary line represents a straight line of the predicted movement of the agricultural machine; the step of constructing a straight line based on the second segmentation curve to obtain a second detection boundary line comprises the following steps: fitting the second segmentation curve to construct a straight line to obtain a second segmentation straight line; translating the second segmentation straight line in the vertical coordinate until there is one intersection point with the second segmentation curve and the value of the vertical coordinate is maximum to obtain a second detection boundary point; based on the first detection boundary line and the second detection boundary line, obtaining a travel boundary line; the travel boundary line represents a straight line for controlling the travel of the agricultural machine; based on the travel boundary line, adjusting the position of the agricultural machine.

2. The deep learning based agricultural machine positioning method according to claim 1, characterized in that, The first boundary curve and the crop region are obtained based on the photographed image, and the method comprises the steps of: The crop region is obtained by constructing a coordinate axis based on the photographed image; n crop regions are obtained by corresponding n partial crop images; n crop boundary points are obtained based on the n crop regions; the vertical coordinate of the crop boundary point is the vertical coordinate of the center point of the crop region plus the value of 1 / 2 of the length; the horizontal coordinate of the crop boundary point is the value of the horizontal coordinate of the center point of the crop region; The first boundary curve is obtained by fitting the n crop boundary points. 3.The deep learning based agricultural machine positioning method of claim 1, wherein, The crop region is obtained by constructing a coordinate axis based on the photographed image, and the method comprises the steps of: The photographed image is rotated clockwise by 90 degrees to obtain a rotated image; A coordinate axis is constructed with the lower left corner of the rotated image as the origin, the length as the horizontal coordinate, and the width as the vertical coordinate; The horizontal coordinates of the photographed image are segmented to obtain n partial crop images; the partial crop image represents an image of a region containing a crop part; The partial crop image is input into a target detection network to determine the category of the crop, and the crop region is obtained. 4.The deep learning-based agricultural machine positioning method of claim 1, wherein The driving boundary line is obtained based on the first detection boundary line and the second detection boundary line, and the method comprises the steps of: The first detection boundary line and the second detection boundary line are drawn in the image to obtain a double boundary line image; The vertical coordinates of the first detection boundary line and the second detection boundary line at the same horizontal coordinate are compared, the vertical coordinate with a larger value is retained, and the vertical coordinate with a smaller value is deleted to obtain the driving boundary line. 5.The deep learning based agricultural machine positioning method of claim 1, wherein, The position of the agricultural machine is adjusted based on the driving boundary line, and the method comprises the steps of: An agricultural machine boundary point is obtained; the agricultural machine boundary point represents a position on the agricultural machine that matches the driving boundary line; The position of the agricultural machine is adjusted by matching the agricultural machine boundary point and the driving boundary line.

6. A system for deep learning based positioning of agricultural machinery, characterized in that The method comprises the steps of: An acquisition module is configured to acquire a photographed image; the photographed image represents a horizontal image photographed by a camera device on an agricultural machine; A target detection module is configured to obtain a first boundary curve and a crop region based on the photographed image; the first boundary curve represents the boundary of the detected crop region; the crop region represents a region corresponding to a crop category that needs to be processed; A curve module is configured to construct a curve based on the first boundary curve to obtain a first detection boundary line; The first detection boundary line is obtained based on the first boundary curve, and the method comprises the steps of: Derivation is performed on the first boundary curve to obtain a maximum set and a minimum set; the maximum set contains the horizontal coordinates and vertical coordinates of multiple maximum values; the minimum set contains the horizontal coordinates and vertical coordinates of multiple minimum values; The maximum set and the minimum set are respectively clustered to obtain a clustered maximum set and a clustered minimum set; The values in the clustered maximum set and the clustered minimum set are fitted to obtain the first detection boundary line; the first detection boundary line represents a straight line where the most crops are harvested; The first detection boundary line is obtained based on the clustered maximum set and the clustered minimum set, and the method comprises the steps of: Fitting the values in the maximum set of clusters and the minimum set of clusters to obtain a first detection straight line; the first detection straight line represents a straight line where the most crops are harvested; When the longitudinal coordinate of the first boundary curve is greater than the longitudinal coordinate of the first detection straight line, taking the maximum distance between the first boundary curve and the first detection straight line as a first offset value; Taking the point corresponding to the first offset value on the first boundary curve as a first offset point; Translating the intersection of the first detection straight line and the first offset point to obtain a first detection boundary line; A straight line module is configured to construct a straight line based on the photographed image and the crop region to obtain a second detection boundary line; The straight line module is configured to construct a straight line based on the photographed image and the crop region to obtain a second detection boundary line, including: An edge detection algorithm is used to perform image segmentation on the photographed image to obtain a segmented image; the segmented image includes a plurality of segmented regions; the segmented image represents an image of the crop region and the soil region being segmented; The segmented regions are matched with the crop region to obtain a marked segmented image; the marked segmented image includes the crop region and the soil region; A second segmented curve is obtained by determining the boundary of the crop region in the marked segmented image; the second segmented curve represents the boundary between the crop region to be traveled by the agricultural machine and the soil region; A straight line is constructed based on the second segmented curve to obtain a second detection boundary line; the second detection boundary line represents a straight line of the predicted movement of the agricultural machine; The straight line is constructed based on the second segmented curve to obtain a second detection boundary line, including: The second segmented curve is fitted to construct a straight line to obtain a second segmented straight line; The second segmented straight line is translated in the longitudinal coordinate until there is one intersection point with the second segmented curve and the value of the longitudinal coordinate is maximum to obtain a second detection boundary point; A travel boundary module is configured to obtain a travel boundary line based on the first detection boundary line and the second detection boundary line; the travel boundary line represents a straight line for controlling the travel of the agricultural machine; An adjustment module is configured to adjust the position of the agricultural machine based on the travel boundary line.

Citation Information

Patent Citations

  • Harvester and automatic drive method thereof

    CN109588107A

  • Agricultural unmanned vehicle navigation method and device, agricultural unmanned vehicle and storage medium

    CN112526989A