For the inconsistent lodging of wheat with dense growth and overlapped organs, it is difficult to detect lodging direction accurately and quickly using vehicle vision for harvesters. Therefore, in this paper, the k-means algorithm is improved by designing a validity evaluation function, selecting initial clustering centers by distance, constructing a multidimensional feature vector, and simplifying calculations using triangle inequality. An adaptive image grid division method based on perspective mapping and inverse perspective mapping with a corrected basic equation is proposed for constructing a dataset of wheat lodging directions. The improved k-means algorithm and direction dataset are used to construct a bag of visual words. Based on scale-invariant feature transform, pyramid word frequency, histogram intersection kernel, and support vector machine, the wheat lodging directions were detected in the grid. The proposed method was verified through experiments with images acquired on an intelligent combine harvester. Compared with single-level word frequencies with existing and improved k-means, the mean accuracy of wheat lodging direction detection by pyramid word frequencies with improved k-means increased by 6.71% and 1.11%, respectively. The average time of detection using the proposed method was 1.16 s. The proposed method can accurately and rapidly detect wheat lodging direction for combine harvesters and further realize closed-loop control of intelligent harvesting operations.
In complex field environments, wheat grows densely with overlapping organs and different plant weights. It is difficult to accurately predict feed quantity for wheat combine harvester using the existing YOLOv5s and uniform weight of a single wheat plant in a whole field. This paper proposes a feed quantity prediction method based on the improved YOLOv5s and weight of a single wheat plant without stubble. The improved YOLOv5s optimizes Backbone with compact bases to enhance wheat spike detection and reduce computational redundancy. The Neck incorporates a hierarchical residual module to enhance YOLOv5s’ representation of multi-scale features. The Head enhances the detection accuracy of small, dense wheat spikes in a large field of view. In addition, the height of a single wheat plant without stubble is estimated by the depth distribution of the wheat spike region and stubble height. The relationship model between the height and weight of a single wheat plant without stubble is fitted by experiments. Then, feed quantity can be predicted using the weight of a single wheat plant without stubble estimated by the relationship model and the number of wheat plants detected by the improved YOLOv5s. The proposed method was verified through experiments with the 4LZ-6A combine harvester. Compared with the existing YOLOv5s, YOLOv7, SSD, Faster R-CNN, and other enhancements in this paper, the mAP50 of wheat spikes detection by the improved YOLOv5s increased by over 6.8%. It achieved an average relative error of 4.19% with a prediction time of 1.34 s. The proposed method can accurately and rapidly predict feed quantity for wheat combine harvesters and further realize closed-loop control of intelligent harvesting operations.