Development of an Automated Machine for Grading Raisins based on Color and Size M. Omid, M. Sharouzi and A.R. Keyhani Department of Agricultural Machinery, Faculty of Agricultural Engineering and Technology, University of Tehran, Karaj, Iran. tel/fax: +98 261 2801 038 * e-mail: omid@ut.ac.ir Submitted: 28/02/2010 Accepted: 10/05/2010 Appeared: 26/05/2010 HyperSciences.Publisher AbstractIn this paper, design and testing of a machine vision based raisin sorter is presented. The proposed MV system consists of electronic, pneumatic and mechanical parts. The hardware is made up of a conveyor belt, eight pneumatic valves, a compressor and a control unit. The controller, which has a microcontroller as its main core, is used for the communication between the PC and the pneumatic valves via RS232 series port. By using the capture card, the camera sends images of raisins to the computer to be processed and have the raisins sorted accordingly. By a suitable combination of length and RGB color values raisins are graded it two classes. The PC sends proper commands, via the microcontroller, to actuators (valves) in order to reject defected raisins. The image processing algorithm has been implemented in Visual Basics environment. The developed program allows the user to easily configure the GUI in order to get high quality sorting results. To evaluate the performance of the sorter under various densities and impurities of raw raisins, as two factors affecting the accuracy of the sorter, some statistical tests were performed. The results of statistical analysis showed that with the existing number of valves, the optimum distance between two consecutive raisins should be 5 mm and the changes in the percentages of impurity does not have a significant effect on the overall performance of the machine on the level of 5%. Therefore, the sorter can provide a 99% pure output with less than 2% of loss. Keywords: Grading, Bulk raisin, Image processing, Machine vision, RGB, Color features, Software. 1. INTRODUCTION 1 Raisin is one of the important and valuable exported products in Iran. Manual evaluation and sorting of raisin is costly and inherently unreliable due to its subjective nature. The poor classification and sorting methodology has caused a reduction of exported product (Omid et al., 2010). Automatic raisin sorting system based on machine vision can improve the quality of the product, abolish inconsistent manual evaluation, and reduce dependence on available manpower. Researches in this area indicate the feasibility of using machine vision systems to improve product quality while freeing people from the traditional hand sorting of agricultural materials. Raji and Alamutu (2005) reviewed recent developments and applications of image analysis and computer machine vision in sorting of agricultural materials and products in the food industries. Basic concepts and technologies associated with computer vision, a tool used in image analysis and automated sorting was highlighted. Computer vision has been used for quality inspection of fruits. Quality inspections of fruits have two different The financial support provided by the University of Tehran, Iran. objectives: quality evaluation and defect finding. Machine vision is the most important tool for external feature measurements such as color intensity, color homogeneity, bruises, size, shape and stem identification (Lee et al., 1999; Majumdar and Jayas, 2000; Shahin and Symons, 2001; Paliwal et al., 2003; Shigeta et al. 2004). In a series of papers, Njoroge et al. (2003) described the operations and performance of an automated quality verification system for agricultural products. Kondo et al. (2005) proposed a multi- product grading system for agricultural products. In recent years our research team have been conducting considerable research in the design and fabrication of sorting machines. Omid, et al. (2009) developed an automatic trainable classifier, based on artificial neural network, for separating four different varieties of pistachio nuts. The developed system, because of none destructivity, does not cause damage to the open shell pistachio kernels, and therefore does not cause rejection by the consumer. Hence it can boost the exports. Color feature is the most important parameter in classification and sorting of raisins. Khojastehnazhand et al. (2009) developed a machine vision system to automatically determine the volume and surface area of orange. This image processing procedure can be Journal of Modelling and Simulation of Systems (Vol.1-2010/Iss.3) Omid et al. / Development of an Automated Machine for Grading Raisins based … / pp. 157-162 157 Copyright © 2010 HyperSciences_Publisher. All rights reserved www.hypersciences.org