Abstract:Aiming at the limitations of the current agricultural machinery automatic driving headland turning method based on global navigation satellite system technology, a binocular vision-based identification and ranging method of farmland ridge boundary was proposed, and the feasibility, applicability and constraints of the specific method were analyzed. In view of the farmland environment with large illumination changes and many repeated textures, Census transform and truncated gradient were integrated to calculate the cost of stereo matching, and cross-scale cost merging algorithm based on segment-tree was used in the cost aggregation step, which can quickly get a good parallax diagram. After constructing a three-dimensional point cloud from a parallax diagram, in view of the actual situation of uneven farmland ground and uneven crop growth height, the adaptive threshold point cloud extraction and interference elimination were carried out, so as to realize the recognition of field ridge boundary. In addition, according to the farmland information, the calculated average boundary distance was corrected. The experimental results showed that this algorithm can realize the boundary distance detection of the early working farmland, and the recognition rate of the algorithm can reach 99% for the ridge of 5~10m in front of the field of view. The ranging accuracy was increased with the decrease of the detection distance, and the ranging error at 5m was about 0.075m. On NVIDIA Jetson TX2 hardware platform, the running time of the algorithm was about 0.8s, which can meet the real-time requirements of the operation for the agricultural machinery with a driving speed less than 1.5m/s.