Segmentation and counting algorithm for touching hybrid rice grains
- COMPUTERS AND ELECTRONICS IN AGRICULTURE
- The ability to segment and count of touching hybrid rice grains can enable the automatic evaluation of seeding performance. In this paper, an algorithm that separates and counts touching rice grain, which consists of the watershed algorithm, an improved corner point detection algorithm, and neural network classification algorithm, is presented. To reduce the over-segmentation regions caused by the watershed algorithm, wavelet transform and Gaussian filter are first applied to enhance the contrast intensity of grayscale image and to reduce noise, followed by an improved corner point detection algorithm based on adaptive-radius circular template. The over-segmentation regions are identified and merged by detecting whether the end points of the splitting lines coincide with the corner points. Considering that regions of different grain quantity vary in appearance and corner point characteristic, a Back Propagation (BP) neural network classifier is employed to classify the under-segmentation regions into five categories: one grain, two grains, three grains, four grains, and more than four grains. The proposed algorithm was tested on three hybrid rice varieties under different realistic touching scenarios formed in the sowing process. The tests results showed that the corner point detection algorithm using an adaptive-radius circular template achieved better corner point accuracy than that using a fixed-radius template, and the over-segmentation regions were more accurately merged. For grain regions of different grain quantity, BP neural classifier achieved an average classification accuracy of 92.4%, which was suitable for counting rice grains in under-segmentation regions. The overall segmentation and counting method proposed in this study could achieve an average accuracy of 94.63%, which was verified by manual counting results.