Pakistan Journal of Agricultural Sciences, cilt.61, sa.2, ss.525-533, 2024 (SCI-Expanded)
Grapes are a highly significant fruit with the highest production rates, which are consistently increasing annually. Although traditional methods are employed in agriculture for spraying, harvesting, and estimating yield based on workers, these techniques are time-consuming, costly, and inaccurate. Hence, alternative technological options are necessary to address these challenges. This study proposed a method for autonomously detecting and counting visible grapes using a Red, Green and Blue (RGB) sensor in a robotic system for two datasets (grape size and colour). The k-means clustering was utilised to differentiate grape pixels from the input image, and the required cluster was automatically selected. This proposed model also incorporated Histogram-Oriented Gradients (HOG) to compute shape information as a feature. The classifier was then trained to identify grape berries in each window by carefully examining the feature shape by sliding an auto-sized window over a segmented image. Consequently, grape counting yielded an average accuracy of 83%, with red grapes achieving 92% accuracy and white grapes 76%. On the other hand, bunch counting showed higher accuracy, averaging at 94%, with red grapes at 96% accuracy and white grapes at 90%. The reliability of the method in detecting grapes and grape bunches regardless of colour is underlined by these results, which also accentuates its applicability in various counting tasks.