A method of agricultural machinery positioning based on field information constraints
Through deep learning and stereo vision technology, we can identify fixed targets in the field and build a position recognition control network, which solves the problem of insufficient positioning accuracy of agricultural machinery in hills, mountains and other areas, and achieves high-precision and efficient positioning under limited GNSS conditions.
Patent Information
- Application Number
- CN202411073760.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-07
- Publication Date
- 2024-10-25
- Estimated Expiration
- 2044-08-07
AI Technical Summary
In scenarios where GNSS positioning is limited, such as hills and mountains, it is difficult for agricultural machinery to achieve continuous high-precision positioning, and the positioning efficiency is low. The existing technology has shortcomings in maintaining the positioning accuracy of agricultural machinery in the field.
The deep learning method is used to identify fixed targets in the field, and the stereo vision method is used to dynamically position the fixed targets in the field, and a field position recognition control network is constructed. Agricultural machinery with a GNSS positioning system accuracy greater than the threshold is used as a base station to perform dynamic redundant positioning of field targets. Realize autonomous navigation and positioning of agricultural machinery.
When GNSS positioning is limited, it improves the positioning accuracy and efficiency of agricultural machinery, reduces manual operations, and reduces the cost of detection equipment. It is suitable for agricultural machinery positioning applications in hills, mountains and other areas.
Smart Images

Figure CN118604865B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of agricultural machinery positioning, and in particular to an agricultural machinery positioning method based on field information constraints. Background Art
[0002] Autonomous precision navigation of agricultural machinery and intelligent perception of field information are important components of developing smart agriculture. Hilly areas have complex terrain, small and scattered land, and GNSS signals will be blocked by buildings, tall trees and other objects, causing position drift. Large agricultural machinery dominated by RTK-GNSS positioning technology is difficult to apply, and it is necessary to develop small and lightweight agricultural machinery suitable for individual households to adapt to the planting and harvesting of different crops in hilly areas. Therefore, maintaining the positioning accuracy of agricultural machinery in hilly areas while taking into account the constraints of field information is a major demand.
[0003] Stereoscopic vision technology generally uses binocular cameras for shooting and measurement. Binocular cameras are similar to human eyes and can measure distances and angles, forming a pseudo-lidar measurement and perception system. Dynamic stereoscopic vision technology focuses on the measurement, perception and model reconstruction of the three-dimensional information of moving objects. The dynamic stereoscopic vision system installed on self-driving cars can achieve efficient measurement, perception and adaptive modeling reconstruction of moving objects. Therefore, the use of stereoscopic vision positioning and navigation technology for agricultural machinery navigation and positioning in hilly areas can perform dynamic measurement and perception without adding expensive hardware equipment, with high accuracy and good environmental adaptability.
[0004] At present, multi-sensor combined positioning and navigation technology is used to locate agricultural machinery at home and abroad. Multi-sensor combined positioning and navigation technology has high measurement accuracy and good reliability. However, in GNSS positioning restricted scenes such as hills and mountains, it is difficult to achieve continuous high-precision positioning of field agricultural machinery, and the positioning efficiency is low. The existing positioning methods are extremely difficult to locate agricultural machinery in the field in GNSS positioning restricted scenes such as hills and mountains. It is urgent to explore a continuous and fast field agricultural machinery positioning accuracy maintenance technology in GNSS positioning restricted scenes such as hills and mountains to make up for the current lack of agricultural machinery positioning accuracy in GNSS positioning restricted scenes such as hills and mountains.
[0005] The existing technology for image-based automatic navigation of agricultural machinery focuses on the fields of field image processing, navigation path planning and obstacle recognition. However, there are relatively few practical applications in maintaining the positioning accuracy of agricultural machinery in hilly areas, which takes into account the optimization of multi-source data selection, and is the difficulty of automatic navigation of agricultural machinery. Summary of the invention
[0006] The technical problem to be solved by the present invention is that, in view of the above-mentioned defects of the prior art, a method for positioning agricultural machinery based on field information constraints is provided. The present invention aims at the problem of maintaining the positioning accuracy of agricultural machinery in hilly and mountainous areas, identifies fixed targets in the field through a deep learning method, and dynamically locates fixed targets in the field through a stereoscopic vision method; then, autonomous navigation and positioning of agricultural machinery is performed based on a field position recognition control network composed of fixed targets in the field, so that the positioning of agricultural machinery can be maintained with high accuracy under the condition of GNSS positioning being restricted. This provides a guarantee for maintaining the positioning accuracy of agricultural machinery in hilly and mountainous areas where GNSS positioning is partially restricted.
[0007] The technical solution adopted by the present invention to solve the problem is as follows:
[0008] A method for positioning agricultural machinery based on field information constraints, comprising:
[0009] The deep learning method is used to identify and classify the images of the field position identification objects, and the position identification control points corresponding to the field fixed targets are obtained;
[0010] A dynamic redundant positioning method for field targets based on stereo vision uses agricultural machinery with GNSS positioning system accuracy greater than the accuracy threshold as a base station to perform dynamic redundant positioning of field targets and build a field position recognition control network.
[0011] When GNSS positioning is limited, agricultural machinery is positioned based on the field position recognition control network.
[0012] Preferably, the step of using a deep learning method to identify and classify images of field position identification objects to obtain position identification control points corresponding to field fixed targets includes:
[0013] Conduct preliminary investigation and screening of field location identifiers;
[0014] Obtain visual features of each field location identification object, and extract common visual features of the field location identification objects;
[0015] Label the images of objects in the field to create a data set;
[0016] The deep convolutional network is trained using the data set to obtain a corresponding weight file, wherein the backbone network of the deep convolutional network is a residual network;
[0017] According to the weight file, the field location identification objects are identified and classified.
[0018] Preferably, the method for dynamic redundant positioning of field targets based on stereoscopic vision uses agricultural machinery with a GNSS positioning system accuracy greater than an accuracy threshold as a base station to perform dynamic redundant positioning of field targets, and the steps of constructing a field position recognition control network include:
[0019] Construct a dynamic stereo vision measurement model with agricultural machinery as the base station;
[0020] Calculate the location of field control points based on the dynamic repeated images of the binocular camera;
[0021] According to the positions of the field control points, a field position identification control network is constructed.
[0022] Preferably, the step of positioning the agricultural machinery based on the field position recognition control network when GNSS positioning is limited includes:
[0023] Obtain the coordinates of the field control points and calculate the position coordinates of the agricultural machinery at the moment of travel based on the measurement principle.
[0024] Preferably, the step of using the data set to train a deep convolutional network to obtain a corresponding weight file, wherein the backbone network of the deep convolutional network is a residual network, comprises:
[0025] Select the residual network structure and build the corresponding network model;
[0026] Dividing the data set into a training set and a validation set, wherein the training set is used to train the network model, and the validation set is used to verify the performance of the network model;
[0027] The image samples of the training set are input into the residual network, and the mean square error loss function is calculated using the following formula:
[0028]
[0029] in, is the location of the agricultural machinery predicted by the network model, is the actual position of the agricultural machinery in the image sample, n is the number of image samples, MSE is the mean square error loss function;
[0030] Updating the network parameters by back propagation to minimize the mean square error loss function;
[0031] The validation set is input into the trained network model for evaluation, and the accuracy is calculated according to the following formula:
[0032] Accuracy = Number of correctly predicted image samples / Total number of image samples
[0033] According to the accuracy, the structure of the trained network model is optimized.
[0034] When the performance of the trained network model meets the requirements, the weight file of the network model is saved.
[0035] Preferably, the step of constructing a dynamic stereoscopic vision measurement model with the agricultural machinery as the base station comprises:
[0036] D211. When the accuracy of the GNSS positioning system is greater than the accuracy threshold, use the GNSS receiver to obtain the location information of the agricultural machinery, process the received satellite signal, and calculate the location parameters of the agricultural machinery; use the IMU sensor to obtain the attitude information of the agricultural machinery, wherein the attitude information includes the measurement data of the accelerometer and the gyroscope;
[0037] D212, using Kalman filtering to fuse the position parameter and the attitude information to obtain a filtering result, and using RTS reverse smoothing algorithm to smooth the filtering result to obtain a navigation result;
[0038] D213, use a binocular camera to obtain scene images around agricultural machinery;
[0039] D214. Combining the position parameter and the posture information with the pixel coordinates in the scene image, converting the pixel coordinates in the scene image into actual physical coordinates, and establishing a dynamic stereoscopic vision measurement model.
[0040] Preferably, the step of calculating the position of the field control point according to the dynamic repeated image of the binocular camera includes:
[0041] D221. First, the parameters of the binocular camera are calibrated, and the binocular camera installed on the agricultural machinery is used to collect images to obtain repeated image sequences;
[0042] D222, extracting features from the repeated image sequence, and performing feature matching to obtain a feature matching result;
[0043] D223, calculating the disparity value between adjacent images according to the feature matching result;
[0044] D224. According to the disparity value, select the feature points with the disparity range as the field control points;
[0045] D225. For field control points, the parallax value is converted into the three-dimensional coordinates of the field control point under the binocular camera by triangulation. The calculation method is as follows:
[0046] Use the following formula to calculate the three-dimensional coordinates of the field control point under the binocular camera:
[0047]
[0048] in, is a reference disparity value, Used to prevent the denominator from being 0; B is the baseline length of the binocular camera, d is the disparity value, f is the focal length, is the X-axis coordinate of the field control point under the binocular camera, is the Y-axis coordinate of the field control point under the binocular camera, is the Z-axis coordinate of the field control point under the binocular camera;
[0049] D226. According to the three-dimensional coordinates of the field control points under the binocular camera and the binocular camera parameters, the three-dimensional coordinates of the field control points under the binocular camera are converted into the actual physical coordinates of the field control points. , the calculation formula is as follows:
[0050] ;
[0051] in, is the X-axis coordinate of the field control point under the binocular camera, is the Y-axis coordinate of the field control point under the binocular camera, is the Z-axis coordinate of the field control point under the binocular camera, is the actual physical X-axis coordinate of the field control point, is the actual physical Y-axis coordinate of the field control point, is the actual physical Z-axis coordinate of the field control point, is the inverse matrix of the rotation matrix of the coordinate system, T is the translation matrix of the coordinate system.
[0052] Preferably, the step of calculating the position coordinates of the agricultural machine at the moment of driving based on the measurement principle includes:
[0053] D311. Calculate the distance between point A and point B based on the coordinates of the field control point , the distance between point P and point A and the distance between point P and point B :
[0054] ;
[0055] ;
[0056] ;
[0057] D312, according to , and Use the law of cosines to find the angle:
[0058] ;
[0059] ;
[0060] ;
[0061] in, is the arccosine function, is the first angle, The second angle is the third angle;
[0062] D313, calculate the triangulation closure error:
[0063] 180°;
[0064] ;
[0065] ;
[0066] ;
[0067] in, To adjust the first angle, To adjust the second angle, To adjust the third angle, W is the triangulation closure error;
[0068] D314, Calculate the coordinates of agricultural machinery:
[0069] ;
[0070] ;
[0071] in, A It is the first control point in the field. B It is the second control point in the field. P is the agricultural machinery coordinate point, is the horizontal coordinate of the agricultural machinery coordinate point, is the vertical coordinate of the agricultural machinery coordinate point.
[0072] Preferably, before obtaining the coordinates of the field control points, the method further comprises:
[0073] Mount a stereo vision binocular camera on agricultural machinery;
[0074] Free station setting during the driving of agricultural machinery;
[0075] The field control points are photographed to obtain the coordinates of the field control points.
[0076] Beneficial effects of the invention: The invention provides an agricultural machinery positioning method based on field information constraints. The agricultural machinery positioning method based on field information constraints described in the invention aims at the problem of maintaining the positioning accuracy of agricultural machinery in hilly and mountainous areas, identifies field fixed targets through a deep learning method, and dynamically locates field fixed targets through a stereo vision method; then autonomous navigation and positioning of agricultural machinery is performed based on a field position recognition control network composed of field fixed targets, so that the positioning of agricultural machinery in the case of GNSS positioning restrictions is maintained with high accuracy. It provides a guarantee for maintaining the positioning accuracy of agricultural machinery in scenes where GNSS positioning is partially restricted in hilly and mountainous areas. Using GNSS positioning technology, deep learning, inertial attitude estimation, stereo vision and other technologies, a method for positioning agricultural machinery based on field information constraints is proposed. A field agricultural machinery dynamic positioning system based on field information constraints is developed, with high-precision inertial navigation as the core, and field control points are constrained by using binocular cameras to jointly measure field control points, so as to autonomously locate agricultural machinery in hilly and mountainous areas where GNSS positioning is partially restricted, thereby improving positioning accuracy and economic benefits.
[0077] Compared with the existing technical solutions, the solution of the present invention has the following advantages.
[0078] First, compared with existing image classification methods, the present invention adopts a deep learning method to quickly and accurately classify images, which improves classification efficiency and greatly saves time costs.
[0079] Second, in hilly areas, when agricultural machinery is working in the field, the GNSS signal is often blocked and cannot be fixed, requiring manual operation by the agricultural machinery operator to continue normal operation. The solution proposed by the present invention dynamically locates the agricultural machinery based on the natural control network of the field position identification object, greatly reducing manual operation and improving work efficiency.
[0080] Third, the use of stereoscopic vision positioning and navigation technology for agricultural machinery navigation and positioning in hilly areas can perform dynamic measurement and perception without adding expensive hardware equipment, with high accuracy and good environmental adaptability. It improves positioning efficiency and economic benefits and greatly saves the cost of detection equipment.
[0081] Fourth, the technical solution of the present invention focuses on multidisciplinary intersection, making full use of technologies such as stereoscopic vision positioning, deep learning and inertial attitude estimation, and can be widely used in navigation positioning, image processing and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0082] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0083] Figure 1 It is a flow chart of an agricultural machinery positioning method based on field information constraints provided by an embodiment of the present invention.
[0084] Figure 2 It is a flow chart of a residual neural network in an embodiment of an agricultural machinery positioning method based on field information constraints provided in an embodiment of the present invention.
[0085] Figure 3 This is an example diagram of the resection measurement of the agricultural machinery positioning method based on field information constraints provided by an embodiment of the present invention.
[0086] Figure 4 This is a schematic diagram of the photographing and measuring principle of field control points by an inertial mobile platform equipped with a binocular camera in an embodiment of the agricultural machinery positioning method based on field information constraints provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0087] In order to make the purpose, technical solution and advantages of the present invention clearer and more specific, the present invention is further described in detail below with reference to the accompanying drawings and examples. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not used to limit the present invention.
[0088] It should be noted that if the embodiments of the present invention involve directional indications (such as up, down, left, right, front, back, etc.), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0089] The inventors have found that it is difficult to achieve high-precision dynamic real-time positioning of field agricultural machinery in areas with restricted GNSS positioning, such as hills and mountains, in the prior art, and the positioning efficiency is low. The existing field agricultural machinery positioning measurement is extremely labor-intensive in areas with restricted GNSS positioning, and it is urgent to explore a method for agricultural machinery positioning based on field information constraints to supplement the current shortcomings of dynamic positioning of field agricultural machinery in hilly and mountainous areas. In the prior art, the focus of image-based agricultural machinery automatic navigation technology is mainly divided into fields such as field image processing, navigation path planning, and obstacle recognition. However, there are relatively few practical applications in maintaining the positioning accuracy of agricultural machinery in hilly areas that take into account the optimization selection of multi-source data, which is a difficult problem in the current automated navigation of agricultural machinery.
[0090] In order to solve the above technical problems, the embodiment of the present invention provides an agricultural machinery positioning method based on field information constraints, including using a deep learning method to identify and classify images of field position identification objects to obtain position identification control points corresponding to field fixed targets; a dynamic redundant positioning method for field targets based on stereo vision, using agricultural machinery as a base station when the accuracy of the GNSS positioning system (Global Navigation Satellite System) is good to perform dynamic redundant positioning of field targets and build a field position identification control network; in the case of GNSS positioning being limited, the agricultural machinery is positioned based on the field position identification control network to achieve the maintenance of agricultural machinery positioning accuracy that takes into account field information constraints. The present invention identifies field fixed targets through a deep learning method, and dynamically locates field fixed targets through a stereo vision method; and then locates agricultural machinery based on a field position identification control network composed of field fixed targets to achieve autonomous positioning and navigation of agricultural machinery under GNSS positioning-restricted conditions, which can be widely used in applications such as maintaining agricultural machinery positioning accuracy in scenes where GNSS positioning is partially restricted in hilly and mountainous areas.
[0091] Example 1
[0092] like Figure 1 As shown in , an embodiment of the present invention provides an agricultural machinery positioning method based on field information constraints, such as Figure 1As shown, in the embodiment of the present invention, the agricultural machinery positioning method based on field information constraints includes the following steps D1-D3:
[0093] D1: Use deep learning methods to identify and classify images of field position identification objects to obtain position identification control points corresponding to field fixed targets.
[0094] Convolutional Neural Networks (CNN) are a type of feedforward neural networks that include convolution calculations and have a deep structure. They are one of the representative algorithms of deep learning.
[0095] In this step, a deep convolutional network using a residual network as the backbone network is trained to obtain a trained network model, and the trained network model is used to identify and classify objects in field locations.
[0096] D2: A dynamic redundant positioning method for field targets based on stereo vision uses agricultural machinery with a GNSS positioning system accuracy greater than the accuracy threshold as a base station to perform dynamic redundant positioning of field targets and build a field position recognition control network.
[0097] GNSS (Global Navigation Satellite System) is an air-based radio navigation and positioning system that can provide users with all-weather 3D coordinate, speed and time information at any location on the Earth's surface or in near-Earth space.
[0098] In the embodiment of the present invention, a dynamic stereo vision measurement model with agricultural machinery as the base station is constructed, and the position of the field control point is calculated according to the dynamic repeated image of the binocular camera. The dynamic repeated image refers to the phenomenon that the object is repeated but the position is offset by a certain amount when the image of the same object is captured by two cameras of the binocular camera during movement. The position of the object in three-dimensional space can be calculated by analyzing the offset.
[0099] D3: When GNSS positioning is limited, agricultural machinery is positioned based on the field position recognition control network to maintain the positioning accuracy of agricultural machinery while taking into account field information constraints.
[0100] In this step, a stereoscopic vision binocular camera is mounted on the agricultural machinery to photograph the field control points, and the position coordinates of the agricultural machinery at the moment of driving are calculated based on the measurement principle. Preferably, after calculating the position coordinates of the agricultural machinery at the moment of driving, it also includes: selecting different field position identification objects to form a dynamic control network according to the relative distance between the agricultural machinery's traveling position and the field control points. The accuracy change analysis of different field control points is performed, and the optimal combination of field control points is selected, so as to maintain a high positioning accuracy during the driving process of the agricultural machinery.
[0101] In the embodiment of the present invention, Convolutional Neural Networks (CNN) is a type of feedforward neural network that includes convolution calculation and has a deep structure, and is one of the representative algorithms of deep learning. The step D1 specifically includes:
[0102] Step D11: Conduct preliminary investigation and screening of field location identification objects.
[0103] Step D12: Obtain visual features of each field location identification object and extract common visual features of the field location identification objects.
[0104] Step D13: label the images of the objects at the field locations and create a data set.
[0105] Conduct a preliminary investigation on field location identification objects, screen out identification objects with visual features, extract the common visual features of field location identification objects, take photos of the screened field location identification objects to obtain images, annotate the collected field location identification object images, and create a data set.
[0106] Step D14: Use the data set to train the deep convolutional network to obtain a corresponding weight file, and the backbone network of the deep convolutional network is a residual network.
[0107] Step D15: Identify and classify field location identification objects according to the weight file.
[0108] Step D14 includes the following steps D141-D147:
[0109] Step D141, select a residual network structure and construct a corresponding network model.
[0110] Step D142: divide the data set into a training set and a validation set, wherein the training set is used to train the network model, and the validation set is used to verify the performance of the network model.
[0111] The existing data set is divided into a training set and a validation set for model training and evaluation. The ratio of the training set to the validation set can be 3:1 or other ratios. The data set can also be divided into a training set, a test set, and a validation set. The ratio of the training set, the test set, and the validation set can be 5:2:1 or other ratios.
[0112] D143. Input the image samples of the training set into the residual network and calculate the mean square error loss function using the following formula:
[0113] ;
[0114] in, is the location of the agricultural machinery predicted by the network model, is the actual position of the agricultural machinery in the image sample, n is the number of image samples, MSE is the mean square error loss function;
[0115] Step D144, updating the network parameters by back propagation method to minimize the mean square error loss function.
[0116] Backpropagation is a commonly used algorithm for training neural networks in deep learning. It updates the network parameters by calculating the gradient of the loss function with respect to the network parameters, thereby updating the network parameters to minimize the loss function, thereby realizing the gradient transfer from the output layer to the input layer.
[0117] Step D145: Input the validation set into the trained network model for evaluation, and calculate the accuracy according to the following formula:
[0118] Accuracy = number of correctly predicted image samples / total number of image samples;
[0119] Step D146: Optimize the structure of the trained network model according to the accuracy rate.
[0120] Optimizing the structure of the network model can improve the performance of the network model.
[0121] Step D147: When the performance of the trained network model meets the requirements, save the weight file of the network model.
[0122] When the accuracy reaches above 95%, save the weight file of the trained network model.
[0123] Load the trained weight file, perform preprocessing on the image of the object to be classified by image scaling, cropping, normalization, etc., load the processed image into the model for inference, and the trained network model will output the category prediction result of the image to determine which category the object belongs to.
[0124] GNSS (Global Navigation Satellite System) is an air-based radio navigation and positioning system that can provide users with all-weather 3D coordinates, speed and time information at any location on the Earth's surface or in near-Earth space.
[0125] According to the measurement principle of binocular camera, please refer to Figure 4 , get the coordinate information of the photography measurement system. Figure 4 In the figure, f is the focal length of the binocular camera, which is set to 150 mm; μ is the physical size of the binocular camera pixel, which is set to 4.5 μm; p1 and p2 are the pixel measurement coordinates of the field control points (u, v) respectively.
[0126] Wherein, the step D2 specifically includes:
[0127] D21. Construct a dynamic stereo vision measurement model with agricultural machinery as the base station.
[0128] D22. Calculate the position of field control points based on the dynamic repeated images of the binocular camera.
[0129] D23. Construct a field position identification control network based on the positions of the field control points.
[0130] Step D21 includes the following steps D211-D214:
[0131] Step D211: When the accuracy of the GNSS positioning system is greater than the accuracy threshold, use the GNSS receiver to obtain the location information of the agricultural machinery, process the received satellite signal, and calculate the location parameters of the agricultural machinery; use the IMU sensor to obtain the attitude information of the agricultural machinery, and the attitude information includes the measurement data of the accelerometer and the gyroscope.
[0132] Step D212: Use Kalman filtering to fuse the position parameter and the attitude information to obtain a filtering result, and use the RTS reverse smoothing algorithm to smooth the filtering result to obtain a navigation result.
[0133] The position parameters and attitude information of agricultural machinery are tightly combined, that is, the measurement data of multiple sensors are fused using the Kalman filter method to eliminate the errors and drifts between sensors and improve the accuracy and stability of solving attitude and motion.
[0134] Step D213: Use a binocular camera to obtain scene images around the agricultural machinery.
[0135] Step D214: combining the position parameter and the posture information with the pixel coordinates in the scene image, converting the pixel coordinates in the scene image into actual physical coordinates, and establishing a dynamic stereoscopic vision measurement model.
[0136] Two stereo cameras were mounted on the agricultural machinery so that they were aligned with each other at a certain baseline distance, and images were captured from the two stereo cameras at the same time to ensure that the fields of view of the stereo cameras had an overlapping area.
[0137] The dynamic stereo vision measurement model is a model that measures natural objects in the field based on agricultural machinery base stations. The dynamic stereo vision measurement model can measure objects in real time during the movement of agricultural machinery and realize navigation and positioning in complex environments.
[0138] Preferably, after using a binocular camera to acquire scene images around the agricultural machinery in step D213, it also includes reconstructing a scene model around the agricultural machinery from the scene images through stereo vision technology, and the scene model around the agricultural machinery is used to acquire scene images of natural objects in the field.
[0139] Step D22 includes the following steps D221-D226:
[0140] D221. First, calibrate the parameters of the binocular camera, and use the binocular camera installed on the agricultural machinery to collect images to obtain a repeated image sequence.
[0141] The repeated image sequence includes multiple binocular images, and the binocular images are preprocessed, including operations such as image dedistortion, image correction and image enhancement, and features are extracted from the repeated image sequence, such as edge or texture features, and feature matching is performed.
[0142] D222, extracting features from the repeated image sequence, and performing feature matching to obtain feature matching results.
[0143] D223. Calculate the disparity value between adjacent images according to the feature matching result.
[0144] The disparity value is obtained by calculating the pixel offset in the horizontal direction.
[0145] D224. Based on the disparity value, select feature points with a disparity range as field control points.
[0146] Field control points are feature points with similar characteristics within a certain parallax range, such as trees, utility poles, and manhole covers.
[0147] D225. For field control points, the parallax value is converted into the three-dimensional coordinates of the field control point under the binocular camera by triangulation. The calculation method is as follows:
[0148] Use the following formula to calculate the three-dimensional coordinates of the field control point under the binocular camera:
[0149] ;
[0150] in, is a reference disparity value, To prevent the denominator from being 0, Adjust according to the specific scenario. B is the baseline length of the binocular camera, d is the disparity value, f is the focal length, is the X-axis coordinate of the field control point under the binocular camera, is the Y-axis coordinate of the field control point under the binocular camera, It is the Z-axis coordinate of the field control point under the binocular camera.
[0151] Step D226: According to the three-dimensional coordinates of the field control point under the binocular camera and the binocular camera parameters, the three-dimensional coordinates of the field control point under the binocular camera are converted into the actual physical coordinates of the field control point. , the calculation formula is as follows:
[0152]
[0153] in, is the X-axis coordinate of the field control point under the binocular camera, is the Y-axis coordinate of the field control point under the binocular camera, is the Z-axis coordinate of the field control point under the binocular camera, is the actual physical X-axis coordinate of the field control point, is the actual physical Y-axis coordinate of the field control point, is the actual physical Z-axis coordinate of the field control point, is the inverse matrix of the rotation matrix of the coordinate system, T is the translation matrix of the coordinate system.
[0154] The matrix composed of the three-dimensional coordinates of the field control points under the binocular camera is multiplied by the inverse matrix of the rotation matrix, and then the translation matrix is subtracted from the matrix product to obtain the matrix composed of the actual physical coordinates of the field control points.
[0155] The free station method is mainly used for total station mapping and construction layout. First, a location is flexibly selected to set up the total station, and then the distance and angle measurement of the total station are used to observe two or more field control points, and then the position coordinates of the station are calculated and the orientation is completed.
[0156] Step D3 includes the following steps:
[0157] D31. Obtain the coordinates of the field control points and calculate the position coordinates of the agricultural machinery at the moment of driving based on the measurement principle.
[0158] Step D31 includes the following steps:
[0159] D311. Calculate the distance between point A and point B based on the coordinates of the field control point , the distance between point P and point A and the distance between point P and point B :
[0160] ;
[0161] ;
[0162] ;
[0163] D312, according to , and Use the law of cosines to find the angle:
[0164] ;
[0165] ;
[0166] ;
[0167] in, is the arccosine function, The first angle, The second angle is the third angle;
[0168] D313, calculate the triangulation closure error:
[0169] 180°;
[0170] ;
[0171] ;
[0172] ;
[0173] in, To adjust the first angle, To adjust the second angle, To adjust the third angle, W is the triangulation closure error;
[0174] In the measurement adjustment, the triangulation closure error is distributed to the first angle, the second angle and the third angle according to the same weight to obtain the adjusted first angle, the adjusted second angle and the adjusted third angle. The adjusted first angle, the adjusted second angle and the adjusted third angle can be used to calculate the agricultural machinery coordinates with higher accuracy.
[0175] D314, Calculate the coordinates of agricultural machinery:
[0176] ;
[0177] ;
[0178] Measurement example Figure 3 ,in, A It is the first control point in the field. B It is the second control point in the field. P is the agricultural machinery coordinate point, is the horizontal coordinate of the agricultural machinery coordinate point, is the vertical coordinate of the agricultural machinery coordinate point.
[0179] Before step D311, the method further includes:
[0180] Mount a stereo vision binocular camera on agricultural machinery;
[0181] Free station setting during the driving of agricultural machinery;
[0182] The field control points are photographed to obtain the coordinates of the field control points.
[0183] The coordinates of the field control points include the coordinates of the first field control point A and the coordinates of the second field control point B.
[0184] In step D33, control points with poor accuracy or large variations are avoided according to application requirements, and relatively stable field control points with small errors are selected to form the optimal combination of field control points. This can make the positioning accuracy of the agricultural machinery higher, thereby maintaining the positioning accuracy during the driving process of the agricultural machinery.
[0185] The present invention uses a stereoscopic vision binocular camera on agricultural machinery to shoot field control points in GNSS positioning restricted areas such as hills and mountains. With high-precision inertial navigation as the core, the binocular camera is used to jointly measure the field control points for constraints. Through shooting measurement, triangulation and other calculations, the agricultural machinery in hills, mountains and other GNSS positioning partially restricted areas is autonomously positioned, thereby achieving rapid positioning of the agricultural machinery and improving positioning accuracy and economic benefits.
[0186] In summary, the agricultural machinery positioning method based on field information constraints described in the present invention includes: using a deep learning method to identify and classify images of field position identification objects to obtain position identification control points corresponding to field fixed targets; a dynamic redundant positioning method for field targets based on stereoscopic vision, using agricultural machinery with a GNSS positioning system accuracy greater than an accuracy threshold as a base station, performing dynamic redundant positioning of field targets, and constructing a field position identification control network; in the case of GNSS positioning restrictions, positioning agricultural machinery based on the field position identification control network, and maintaining the positioning accuracy of agricultural machinery taking into account field information constraints. The present invention identifies field fixed targets through a deep learning method, and dynamically locates field fixed targets through a stereoscopic vision method; and then locates agricultural machinery based on a field position identification control network composed of field fixed targets, and realizes autonomous positioning and navigation of agricultural machinery under GNSS positioning restrictions, which can be widely used in applications such as maintaining the positioning accuracy of agricultural machinery in scenes where GNSS positioning is partially restricted in hilly and mountainous areas.
[0187] It should be understood that the application of the present invention is not limited to the above examples. For ordinary technicians in this field, improvements or changes can be made based on the above description. All these improvements and changes should fall within the scope of protection of the claims attached to the present invention.
Claims
1. A method for positioning agricultural machinery based on field information constraints, characterized in that: include: The deep learning method is used to identify and classify the images of the field position identification objects, and the position identification control points corresponding to the field fixed targets are obtained; A dynamic redundant positioning method for field targets based on stereo vision uses agricultural machinery with GNSS positioning system accuracy greater than the accuracy threshold as a base station to perform dynamic redundant positioning of field targets and build a field position recognition control network. When GNSS positioning is limited, agricultural machinery positioning is performed based on the field location recognition control network; The method for dynamic redundant positioning of field targets based on stereoscopic vision uses agricultural machinery with a GNSS positioning system accuracy greater than an accuracy threshold as a base station to perform dynamic redundant positioning of field targets, and the steps of constructing a field position recognition control network include: Construct a dynamic stereo vision measurement model with agricultural machinery as the base station; Calculate the location of field control points based on the dynamic repeated images of the binocular camera; According to the positions of the field control points, a field position identification control network is constructed; The steps of constructing a dynamic stereo vision measurement model with the agricultural machinery as the base station include: D211. When the accuracy of the GNSS positioning system is greater than the accuracy threshold, use the GNSS receiver to obtain the location information of the agricultural machinery, process the received satellite signal, and calculate the location parameters of the agricultural machinery; use the IMU sensor to obtain the attitude information of the agricultural machinery, wherein the attitude information includes the measurement data of the accelerometer and the gyroscope; D212, using Kalman filtering to fuse the position parameter and the attitude information to obtain a filtering result, and using RTS reverse smoothing algorithm to smooth the filtering result to obtain a navigation result; D213, use a binocular camera to obtain scene images around agricultural machinery; D214. Combining the position parameter and the posture information with the pixel coordinates in the scene image, converting the pixel coordinates in the scene image into actual physical coordinates, and establishing a dynamic stereoscopic vision measurement model.
2. The method for positioning agricultural machinery based on field information constraints according to claim 1, characterized in that: The step of using a deep learning method to identify and classify images of field position identification objects to obtain position identification control points corresponding to field fixed targets includes: Conduct preliminary investigation and screening of field location identifiers; Obtain visual features of each field location identification object, and extract common visual features of the field location identification objects; Label the images of objects in the field to create a data set; The deep convolutional network is trained using the data set to obtain a corresponding weight file, wherein the backbone network of the deep convolutional network is a residual network; According to the weight file, the field location identification objects are identified and classified.
3. The method for positioning agricultural machinery based on field information constraints according to claim 1, characterized in that: The steps of positioning the agricultural machinery based on the field position recognition control network under the condition of limited GNSS positioning include: Obtain the coordinates of the field control points and calculate the position coordinates of the agricultural machinery at the moment of driving based on the measurement principle; The step of calculating the position coordinates of the agricultural machine at the moment of driving based on the measurement principle comprises: D311. Calculate the distance between point A and point B based on the coordinates of the field control point , the distance between point P and point A and the distance between point P and point B : ; ; ; D312, according to , and Use the law of cosines to find the angle: ; ; ; in, is the arccosine function, is the first angle, The second angle is the third angle; D313, calculate the triangulation closure error: ; ; ; ; in, To adjust the first angle, To adjust the second angle, To adjust the third angle, W is the triangulation closure error; D314, Calculate the coordinates of agricultural machinery: ; ; in, A It is the first control point in the field. B It is the second control point in the field. P is the agricultural machinery coordinate point, is the horizontal coordinate of the agricultural machinery coordinate point, is the vertical coordinate of the agricultural machinery coordinate point.
4. The method for positioning agricultural machinery based on field information constraints according to claim 2, characterized in that: The step of using the data set to train the deep convolutional network to obtain a corresponding weight file, wherein the backbone network of the deep convolutional network is a residual network, comprises: Select the residual network structure and build the corresponding network model; Dividing the data set into a training set and a validation set, wherein the training set is used to train the network model, and the validation set is used to verify the performance of the network model; The image samples of the training set are input into the residual network, and the mean square error loss function is calculated using the following formula: ; in, is the location of the agricultural machinery predicted by the network model, is the actual position of the agricultural machinery in the image sample, n is the number of image samples, MSE is the mean square error loss function; Updating the network parameters by back propagation to minimize the mean square error loss function; The validation set is input into the trained network model for evaluation, and the accuracy is calculated according to the following formula: Accuracy = number of correctly predicted image samples / total number of image samples; Optimizing the structure of the trained network model according to the accuracy rate; When the performance of the trained network model meets the requirements, the weight file of the network model is saved.
5. The method for positioning agricultural machinery based on field information constraints according to claim 1, characterized in that: The step of calculating the position of the field control point according to the dynamic repeated image of the binocular camera comprises: D221. First, the parameters of the binocular camera are calibrated, and the binocular camera installed on the agricultural machinery is used to collect images to obtain repeated image sequences; D222, extracting features from the repeated image sequence, and performing feature matching to obtain a feature matching result; D223, calculating the disparity value between adjacent images according to the feature matching result; D224. According to the disparity value, select the feature points with the disparity range as the field control points; D225. For field control points, the parallax value is converted into the three-dimensional coordinates of the field control point under the binocular camera by triangulation. The calculation method is as follows: Use the following formula to calculate the three-dimensional coordinates of the field control point under the binocular camera: , , ; in, is a reference disparity value, Used to prevent the denominator from being 0; B is the baseline length of the binocular camera, d is the disparity value, f is the focal length, is the X-axis coordinate of the field control point under the binocular camera, is the Y-axis coordinate of the field control point under the binocular camera, is the Z-axis coordinate of the field control point under the binocular camera; D226. According to the three-dimensional coordinates of the field control points under the binocular camera and the binocular camera parameters, the three-dimensional coordinates of the field control points under the binocular camera are converted into the actual physical coordinates of the field control points. , the calculation formula is as follows: ; in, is the X-axis coordinate of the field control point under the binocular camera, is the Y-axis coordinate of the field control point under the binocular camera, is the Z-axis coordinate of the field control point under the binocular camera, is the actual physical X-axis coordinate of the field control point, is the actual physical Y-axis coordinate of the field control point, is the actual physical Z-axis coordinate of the field control point, is the inverse matrix of the rotation matrix of the coordinate system, T is the translation matrix of the coordinate system.
6. The method for positioning agricultural machinery based on field information constraints according to claim 3, characterized in that: Before obtaining the coordinates of the field control points, the process further includes: Mount a stereo vision binocular camera on agricultural machinery; Free station setting during the driving of agricultural machinery; The field control points are photographed to obtain the coordinates of the field control points.
Citation Information
Patent Citations
Image classification method and system, electronic equipment and storage medium
CN117315355A
Visual multi-task mounting type agricultural inspection method and device based on deep learning
CN118447320A
Unmanned aerial vehicle visual positioning system in damaged environment and construction method thereof
CN118447420A
Real time localization with image data
US11436752B1
