Abstract:
Abstract: Agricultural machinery field automatic navigation technology is widely used in farming, sowing, weeding, fertilizing, spraying, harvesting and other agricultural production process. This technology can improve the efficiency of the mechanical efficiency and reduce the missing areas of operation, labor intensity and the complexity of the operation. Because machine vision can be used to obtain and perceive the relative position information of crop rows, current crop growth status and field environment in real time, it is widely applied in online crop detection and identification. In this paper, a method based on automatic accumulation threshold of Hough Transformation was presented in order to improve the adaptability of the crop row recognition algorithm for different kinds and growth periods of vegetables with machine vision. The method was composed of image preprocessing, feature point detection, optimal accumulation threshold acquisition and crop row extraction. Firstly, to reduce the adverse effects of light change and restrain the background noise, a* component of Lab color model was selected for transforming RGB image to grayscale image. Optimal adaptive threshold and morphology close-open operation was applied for minimizing error segmentation probability and eliminating irrelevant detail. Secondly, the feature points of crop rows were extracted by sectionalized vertical projection method. The original image was divided into several horizontal segments and target pixel ratio and vertical projection width were used as double threshold in the luminance projection view of each segment to determine the location of feature points and distinguish noise. Thirdly, the Hough transformation method with different accumulative thresholds was performed to fit straight lines for all feature points in the image coordinate system, then they were all converted to Hough space accumulator as points. These points were clustered into the same number as crop rows by K-means clustering method. According to the camera projection, the optimal accumulator threshold was acquired by the position relation of clustering centroid and minimum inter-class variance. Finally, the fitting line parameters of real crop rows were the clustering centroid parameters of the accumulation space under the optimal accumulation threshold, then the parameters were converted into the crop lines in the image coordinate system. The crop row identification tests of lettuce and cabbage were carried out in the greenhouse and filed according to the conditions of crops in different growing periods, different weed densities, and different light conditions in the field. The greenhouse experiment showed that the algorithm can effectively identify crop rows with an average recognition accuracy of 97.1% for two crops of different growth periods under different weed densities. The outdoor experiment showed that the algorithm can also identify crop rows with 94.6% recognition accuracy under different row numbers and light conditions. Time consumption for optimal accumulator threshold algorithm and crop rows extraction algorithm were no more than 1.5 and 0.2 s, and the average accuracy rate of crop row detection was achieved 95.8%. In view of the practical application of field operations, as the environmental parameters basically do not change significantly in a short time, the optimal accumulation threshold was only needed to be obtained once, which can ensure the time consumption of algorithm was about 0.2 s.