Multi-template matching algorithm for cucumber recognition in natural environment - Bao, Guanjun; Cai, Shibo; Qi, Liyong; Xun, Yi; Zhang, Libin; Yang, Qinghua (Computers and electronics in agriculture, 2016)
•A multi-template matching library was established by proportional scaling and rotating the standard cucumber image.•Multi-template matching algorithm for cucumber recognition for harvesting robot was developed.•High recognition accuracy of 98% was obtained from the verification test. The automatic recognition of cucumber target within its cultivating environment is one of the key techniques for the cucumber harvesting robot. Since cucumber grows in the complex environment and its color is similar to that of branches and leaves, it is quite challenging to achieve high identification accuracy when employing algorithms based on color features, image segmentation and shape features. Adopting spectroscopy can simplify the algorithm. However it increases the complexity and cost of the robot system. The multi-template matching method was proposed to solve this problem in this paper. A multi-template matching library, which contained 65 cucumber images, was established based on the statistical parameters of the matured Radit cucumber, by proportional scaling the standard cucumber image with step of 0.1 in the range of [0.8, 1.2] and rotating with step of pi/36 in the range of [−pi/6, pi/6]. To identify the cucumber in the visual field of the robot, cucumber templates in the library are used to calculate the matrix of normalized correlation coefficients (NCC) with the target image, one after another. If the maximum NCC is above the threshold, there is the target cucumber in the image frame. Otherwise, there is no target in the visual field. To verify the algorithm, 100 photos of the Radit cucumber with different size and angle were sampled in the test. The results indicated that cucumbers were correctly recognized and positioned in 87 images. Cucumbers which were correctly recognized but with picking position deviation appeared in 11 images. Cucumbers were not found in two images. In general, the correct recognition accuracy is 98%, with 11% fault position.