A method for determining high-precision ridge line of potato crop independent of unmanned aerial vehicle
By acquiring reference point location data and using a deep learning model to select points for potato crops, and then fitting straight lines using the least squares method, the problem of high-precision determination of potato crop ridge lines in no-fly zones for drones was solved, and efficient agricultural machinery operation path planning was achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- QINGDAO AGRI UNIV
- Filing Date
- 2023-09-05
- Publication Date
- 2026-04-28
AI Technical Summary
In no-fly zones for drones or when human error is significant, existing technologies struggle to accurately determine the ridge lines of potato crops, making it difficult to plan agricultural machinery operation paths.
By acquiring reference point location data, images of potato crops are captured using a camera device. A deep learning target recognition model is constructed to select potato crop points. The least squares method is used to fit the linear equation, and the intersection point line is connected to obtain the potato crop ridge line.
It enables high-precision determination of potato crop ridge lines within drone-free zones, simplifying agricultural machinery operation path planning and improving operational efficiency and accuracy.
Smart Images

Figure CN117115811B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of ridge line technology for potato crops, and particularly relates to a high-precision method for determining ridge lines for potato crops without relying on drones. Background Technology
[0002] In the context of the development of agricultural machinery automation and intelligence, the sowing, weeding, pest control and harvesting of crops are increasingly reliant on technological development. Among these, the combination of Beidou GNSS positioning technology, RTK positioning technology and image analysis has become the focus and cornerstone of the development of agricultural intelligence and automation.
[0003] The extraction of ridge lines mainly relies on data collection by equipment such as drones and CCD cameras, and then data analysis and processing are carried out with the help of related technologies in the fields of image processing and computer vision.
[0004] However, using drones with RTK capabilities to collect data from the work site, such as Figure 1 As shown, image processing technology can directly determine the location of the work path, but this method is not feasible in drone-restricted areas. Furthermore, using RTK to measure the position of each seedling and then fitting a navigation line is too labor-intensive. Using RTK to obtain the navigation line by taking points and connecting them on the work rows results in significant human error, especially noticeable when the work rows are severely curved. Using a CCD camera to capture reference images, such as... Figure 2 As shown, image navigation is a method of obtaining vehicle navigation parameters by calibrating images captured by a camera, transforming coordinate systems, and calculating various complex mathematical models. The process is quite cumbersome. Summary of the Invention
[0005] This invention proposes a high-precision method for determining the ridge line of potato crops without relying on drones, in order to solve the technical problems existing in the prior art.
[0006] To achieve the above objectives, this invention provides a method for high-precision determination of potato crop ridge lines without relying on unmanned aerial vehicles (UAVs), comprising:
[0007] Obtain reference object location data; take pictures of different tuber crops based on the reference object location data to obtain several images of tuber crops;
[0008] By selecting the tuber crops in the aforementioned images of tuber crops, several tuber crop points are obtained;
[0009] The points of the potato crop are fitted to obtain a fitted line. Based on the fitted line and the reference position data, several intersection points are obtained. The intersection points are connected to obtain an intersection line. The intersection line is fitted to obtain the potato crop ridge line.
[0010] Preferably, the process of obtaining several images of tuber crops includes:
[0011] A reference object is placed in the potato crop field, and its position data is obtained based on RTK. A camera device is fixedly placed based on the reference object's position data, and the potato crop is photographed using the camera device to obtain the first image of the potato crop. At the same time, the camera device and the reference object are moved to photograph different potato crops. After the movement, the distance between the camera device and the reference object remains unchanged, and the height and angle of the camera device remain unchanged. After several movements, several images of potato crops are obtained.
[0012] Preferably, the reference object includes several reference devices, and the distance between the reference devices remains constant.
[0013] Preferably, the process of selecting potato crops from the plurality of potato crop images includes:
[0014] A deep learning-based target recognition model is constructed, and based on the target recognition model, the potato crops in the several potato crop images are selected to obtain several potato crop points, wherein the target recognition model adopts the YOLOv5 model.
[0015] Preferably, the process of obtaining the fitted line includes:
[0016] The potato crop points are set as a straight line equation, and an error term is set based on the coordinates of the potato crop points. The minimum error term of the potato crop points is calculated using the least squares method. Based on the minimum error term, the fitting line parameters are obtained by matrix operation. The fitting line parameters are substituted into the straight line equation to obtain the fitting line.
[0017] Preferably, the equation of the straight line is:
[0018] Y = ax + b
[0019] Where a and b are the fitting line parameters, x is the x-coordinate of the tuber crop point, and y is the y-coordinate of the tuber crop point.
[0020] Preferably, the error term is
[0021] Q=∑(y i -y) 2 =∑(y i -ax-b) 2
[0022] Among them, (x i ,y i (i = 1, 2, ..., n) are the coordinates of the points for potato crops, and a and b are the fitting line parameters.
[0023] Preferably, the minimum error term satisfies the following setting condition:
[0024]
[0025] Where Q is the error value, and a and b are the fitting line parameters.
[0026] Preferably, the matrix operation is as follows:
[0027]
[0028] Among them, (x i ,y i (i = 1, 2, ..., n) are the coordinates of the points for potato crops, and a and b are the fitting line parameters.
[0029] Preferably, the fitting line parameters are:
[0030]
[0031]
[0032] Among them, (x i ,y i (i = 1, 2, ..., n) are the coordinates of the points for potato crops.
[0033] Compared with the prior art, the present invention has the following advantages and technical effects:
[0034] This invention combines traditional ridge line recognition with a method using reference points and RKT positioning to solve the technical problem of high-precision positioning of crop ridge lines when drones cannot fly. The technical solution provided by this invention obtains the final navigation line through a fitting method. By incorporating this navigation line into the navigation system, it enables autonomous unmanned agricultural machinery to harvest potato crops effectively and conveniently. Attached Figure Description
[0035] The accompanying drawings, which form part of this application, are used to provide a further understanding of this application. The illustrative embodiments and descriptions of this application are used to explain this application and do not constitute an undue limitation of this application. In the drawings:
[0036] Figure 1 Images of land parcels were collected by drones, which is the background technology of this invention.
[0037] Figure 2 The image is a rendering taken by a camera used in the background technology of this invention.
[0038] Figure 3 This is a top view showing the effect of the device according to an embodiment of the present invention;
[0039] Figure 4This is an RTK coordinate diagram of the intersection point in an embodiment of the present invention;
[0040] Figure 5 This is a comparison chart of the results of connecting ridge lines after RTK measurement and fitting using the least squares method in an embodiment of the present invention;
[0041] Figure 6 This is an actual effect diagram of an embodiment of the present invention;
[0042] Figure 7 This is a flowchart of a method according to an embodiment of the present invention. Detailed Implementation
[0043] It should be noted that, unless otherwise specified, the embodiments and features described in this application can be combined with each other. This application will now be described in detail with reference to the accompanying drawings and embodiments.
[0044] It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions, and although a logical order is shown in the flowchart, in some cases the steps shown or described may be executed in a different order than that shown here.
[0045] Example 1
[0046] Currently, crop planting and harvesting mainly rely on the experience of agricultural machinery operators. However, with the decrease in agricultural workers and the emergence of unmanned and smart farms, more and more agricultural machinery will depend on autonomous driving technology. Autonomous driving of agricultural machinery requires the planning of operating paths, which in turn requires the extraction of the rows and ridges for operation.
[0047] like Figure 7 As shown, this embodiment provides a method for high-precision determination of potato crop ridge lines without relying on drones, including:
[0048] A reference object is placed in the potato crop field, and the reference object's position data is obtained based on RTK. A camera device is fixed based on the reference object's position data, and the potato crop is photographed based on the camera device.
[0049] Simultaneously move the camera device and the reference object to obtain several images of potato crops;
[0050] A deep learning-based target recognition model is constructed, and the potato crops in the potato crop image are selected by bounding boxes based on the target recognition model to obtain potato crop points;
[0051] The points of the potato crop are fitted to obtain a fitted line. Based on the fitted line and the position data of the reference object, the intersection points are obtained. The intersection points are connected to obtain the intersection line. The intersection line is fitted again to obtain the potato crop ridge line.
[0052] This invention uses potatoes as the research object and conducts experiments in potato fields, according to... Figure 3 As shown, in the early stages of potato seedling emergence, reference objects were placed in the plot. The distance between rods ab and cd was L, and the distance between the camera and rods ab was l. The camera's posture was fixed, ensuring that the camera's height and angle remained consistent when taking pictures. The reference objects were moved forward sequentially to collect data, while keeping L and l constant. After several attempts, the length of L was set to 5 meters, and the length of l was also set to 5 meters. A bracket was used to fix the camera, based on... Figure 1 The reference object for ridge line recognition is shown. While maintaining the camera's posture, a photo of the potato is taken, and the positions of the two ends of the poles are measured using RTK. A total of four data points, a, b, c, and d, are measured for the two poles.
[0053] Before image processing, preprocessing operations such as bounding box annotation are performed on the images. After these operations, the Labelimg tool is used to select and annotate crop seedlings and create a dataset. Once the dataset is created, computer vision technology is used to identify the crops. The YOLOv5 model is used for training. The operating system is Windows 10, the CPU is an AMD Ryzen 74800H with Radeon Graphics 2.GHz, the GPU is an Nvidia GeForce RTX2060 with 16GB of VRAM, CUDA Toolkit version is 11.1, cuDNN version is 8.0, and the compiler is Python 3.9. The program is written in Python and run on PyCharm. The OpenCV library is installed in PyCharm's settings. The XML files annotated with Labelimg are converted to TXT files and divided into training and test sets according to a certain ratio, with the training set accounting for 80% and the test set accounting for 20%. After training, the model is used to identify the location of each seedling and select each potato seedling by bounding box.
[0054] After selecting the crop seedlings using image processing techniques, the navigation line is fitted using the least squares method. The principle behind this fitting method is that some coordinate points are discretely distributed and, overall, approximate a straight line; the parameters of the line are calculated based on this. Let the equation of the line be:
[0055] Y = ax + b (1)
[0056] Using the coordinates (x, y) of discrete points within a certain interval on a straight line trajectory i ,y i (i = 1, 2, ..., n), define the error term:
[0057] Q=∑(y i -y) 2 =∑(yi -ax-b) 2 (2)
[0058] The least squares principle requires that Q be minimized; the condition for Q to be minimized is...
[0059]
[0060]
[0061] The parameters a and b can be obtained using matrix operations or by directly solving equations. The calculation formula is as follows:
[0062]
[0063]
[0064] Substituting the calculated parameters a and b into formula (1) will allow us to fit the straight line well. In other words, we use the least squares method to fit the straight line and fit the discrete points related to it into a straight line.
[0065] After the straight line fitting is completed, the pixel points of the working ridge line can be directly obtained from the image. Simultaneously, the pixel coordinates of points a, b, c, and d can be obtained from the captured image, as shown in the figure. The line segments ab and cd intersect the fitted ridge line at two points. Furthermore, the coordinates of points a, b, c, and d have already been obtained using RTK, and thus, the corresponding values can be obtained. Figure 4 The RTK coordinates of points e and f are shown.
[0066] After obtaining the coordinates of points e and f, a MATLAB program can be used to connect the points, but the result is a polyline instead of a straight line. This requires refitting using the least squares method. After fitting, the final navigation line is obtained. By placing the navigation line into the navigation system, it can enable autonomous unmanned agricultural machinery to harvest potato crops and obtain the high-precision position of the potato crop ridge line.
[0067] In this embodiment, after fitting the navigation line, a row is selected, and the position of each seedling is measured using RTK. The points are then connected using MATLAB. The final navigation line is compared with the navigation line extracted in this application. Figure 5 As shown, the line graph represents the ridges connected after RTK measurement, and the straight line represents the effect after fitting using the least squares method. Figure 6 The diagram shows the actual effect, proving that the method of this invention is effective and convenient.
[0068] The above description is merely a preferred embodiment of this application, but the scope of protection of this application is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A method for high-precision determination of ridge lines in potato crops without relying on drones, characterized in that, Includes the following steps: Obtain the position data of the reference object; Based on the reference object location data, different tuber crops were photographed to obtain several images of tuber crops; The process of obtaining several images of tuber crops includes: A reference object is placed in the field of tuber crops, and the position data of the reference object is obtained based on RTK. A camera device is fixedly placed based on the position data of the reference object, and the tuber crops are photographed by the camera device to obtain the first image of the tuber crops. At the same time, the camera device and the reference object are moved to photograph different tuber crops. After the movement, the distance between the camera device and the reference object remains unchanged, and the height and angle of the camera device remain unchanged. After several movements, several images of tuber crops are obtained. By selecting the tuber crops in the aforementioned images of tuber crops, several tuber crop points are obtained; Fit the points of the potato crop to obtain a fitted line. Based on the fitted line and the reference position data, obtain a number of intersection points. Connect the intersection points to obtain an intersection line. Fit the intersection line to obtain the potato crop ridge line. The process of obtaining the fitted line includes: The potato crop points are set as a straight line equation, and an error term is set based on the coordinates of the potato crop points. The minimum error term of the potato crop points is calculated using the least squares method. Based on the minimum error term, the fitting line parameters are obtained by matrix operations. The fitting line parameters are substituted into the straight line equation to obtain the fitting line.
2. The method for high-precision determination of potato crop ridge lines without relying on drones as described in claim 1, characterized in that, The process of selecting potato crops from the aforementioned images includes: A deep learning-based target recognition model is constructed, and the target recognition model is used to select potato crops in several potato crop images to obtain several potato crop points. The target recognition model adopts the YOLOv5 model.
3. The method for high-precision determination of potato crop ridge lines without relying on drones as described in claim 1, characterized in that, The equation of the straight line is: Where a and b are the fitting line parameters, x is the x-coordinate of the tuber crop point, and y is the y-coordinate of the tuber crop point.
4. The method for high-precision determination of potato crop ridge lines without relying on drones as described in claim 1, characterized in that, The error term is: in, Let be the coordinates of the points for the potato crop, and a and b be the parameters of the fitted line.
5. The method for high-precision determination of potato crop ridge lines without relying on drones as described in claim 1, characterized in that, The minimum error term must satisfy the following conditions: in, denoted as the error value, and a and b as the parameters of the fitted line.
6. The method for high-precision determination of potato crop ridge lines without relying on drones according to claim 1, characterized in that, The matrix operation is as follows: in, Let be the coordinates of the points for the potato crop, and a and b be the parameters of the fitted line.
7. The method for high-precision determination of potato crop ridge lines without relying on drones as described in claim 1, characterized in that, The fitting line parameters are: in, The coordinates are for points related to tuber crops.