Automated Fruit Grading System
Automated Fruit Grading System
Abstract— In recent years, automatic visual inspection of quality control in fruit processing industries. From the past
technology has become more potential and important to fruit few years, different techniques have been enhanced to grade
grading applications. This is due to that the quality of fruits are and evaluate the quality of fruits. These methods can help to
the important factor for the consumer and so essential for detect different physical properties of fruits and with certain
marketing a uniform high quality products. The automated fruits
quality factors. For example, the vision-based systems include
grading technique have been set up to reduce the production
costs and improve fruit quality and replace the manual technique CCD or CMOS sensors that are used to estimate the size and
for grading of fruits as manual inspection is facing problems in shape of fruits. It helps to predict the size of the fruits from its
maintaining consistency and uniformity. Two kinds of fruits have RGB image frame with the help of CCD camera. Software
been inspected in this project; namely are apple and mango. A plays an important role in this color classification system. The
prototype of an automated fruit grading system is designed and software system is almost designed in MATLAB to detect the
developed in this paper to detect the defects on of the surface of color and size of the fruits. Color is very important in the
fruits. The system is capturing the fruit’s image using camera sorting of fruits but due to the similarity of colors between
and the fruits are placed onto of a rotating desk. The image is some fruits, the size also helps in solving the problems.
transmitted then to the processing level where the grading is done
using MATLAB.
J. Ramprabhu et.al (2014) had enhanced the technique for
Keywords—Visual inspection, Fruits; Grading System, sorting and grading the fruit quality by using Pixel wise
MATLAB, Image Processing classification method called Gaussian Mixture Model (GMM)
to improve the accuracy, reliability, consistency and
quantitative information apart from handling large volumes of
I. INTRODUCTION fruits [1]. By referring to the results, the edge extraction is one
The quality of the fruits is important for the consumers and of the important key factor for size detecting. By using the
become the requirement from the suppliers to provide fruits most powerful edge-detection method (Canny method) that
with high standards quality. So, in the past few years, fruit uses a multi-stage algorithms, we are able to detect a wide
grading systems have established to fulfil the needs of the fruit range of edges in images. On the other hand, Ali M. et. al,
processing industry inspection. Besides that, the process of (2011, 2012) has presented a visual inspection system to test
fruits involves several steps that can generally be classified the lateral surface of cylindrical products such as pin by using
into grading, sorting, packaging, transporting and storage. The cameras and image processing [2,3]. In this work, two kinds of
grading are considered as the most important steps towards the cameras are used for inspection: lines scan camera that uses a
high standard of quality. single line of photosensitive element with a CCD sensor and
Fruits are almost graded manually which is an expensive and matrix camera system that can capture the images by
time consuming process and labors shortage will affect to the involving 14 a rectangular mosaic of pixels. The image
operation during peak seasons. It has become increasingly resolution in line scan camera is better compare to matrix
difficult to hire or train the person who are willing to handle camera system. Rupali et. al, (2013) has used image
the monotonous task of inspection. In the meanwhile, a cost processing that provide the solution for automated fruit size
effective and accurate grading can be performed with detecting and grading system to solve the non-destructive
automated grading system. quality evaluation of fruits [4]. It was designed over
Generally, the fruits quality depends on outer parameters MATLAB software to inspect the color and size of the fruits
(size, color intensity, shape, surface appearances) and inner and categorize them into four groups: red color with small in
parameters (sugar contents, acid contents) but color and size is size, red color with big in size, green color with small in size
the most important factor for grading and sorting of fruits. and green color with big in size.
Nowadays, the fruit grading system is accomplished based on
weight, color and size which are accessible in all fruit Different types of algorithms and classifier are available to
processing industries. extract feature of fruit characters to solve the problems for
The fruit grading system techniques using computer fruit detecting and grading system as suggested Seema K. et.
machine vision and image processing play the important role al (2016) [5]. Based on the results, there are four methods : a)
Authorized licensed use limited to: Birmingham City University. Downloaded on March 03,2024 at 12:29:55 UTC from IEEE Xplore. Restrictions apply.
this project we will only concern on the external quality = 1.8cm x 1.3kg= 2.34kgcm= 2.34kgcm x
factors that is surface defects and decay.
= 0.23N.m
Automatic grading system is the implementation that begins
with the fruit sample being captured using camera with white
B. Hardware Development
background that image analysis can be applied to make
grading in MATLAB. Image processing in MATLAB is used
This system consists of mechanical part such as rotating
to extract the parameter of apple and mango in order to
desk that act as a place for inspection; electrical parts such as
prepare the input for classification. The features such as
DC motor, Arduino, computer and software such as image
surface defects or decay of fruits is used in this project.
processing in MATLAB. The automatic fruit grading system
is shown in Fig. 3 as 3D drawing and Fig. 4 after fabrications.
A. Inspection System Setup
In this project, camera from laptop is positioned to detect the
lateral surface of the fruit. The sample of fruits are brought to
The apparatus used for fruit classification in this project is
the rotating desk for grading. The DC motor is used to rotate
made by simple image processing equipment. In this project,
the desk which allow the camera to capture the lateral surface
the computer vision system will be set up to detect the lateral
of the fruits.
surface of the fruits shown in Fig. 2. The system was tested by
using a samples of apples and mangoes. Firstly, the fruit is
brought manually to the rotating desk which is connected to
the shaft of the 12V DC motor. The DC motor is then set by
Arduino to rotate 180° twice for each of the fruits in order to
be able to detect the defects of the whole lateral surface of
fruits. Then, the camera will capture the image and show the
analyzed image at the Graphical User Interface (GUI). We can
then observe the surface defects and decay of fruits through
GUI.
- Weight of fruit sample + weight of rotating desk Graphical user interface (GUI) is a type of user interface that
allows users to interact with electronic devices. GUI is used in
= 1.0kg + 0.3kg this project to show the defects of lateral surface of fruits in
two halves as in Fig. 5. The image of the fruits that captured
- Radius of DC-Motor = 1.8cm by the camera for each half will be shown at the box in GUI.
Then, the centers and radii of defects of apple and mango are
Torque needed to turn the rotating desk and sample of fruit analyzed.
Authorized licensed use limited to: Birmingham City University. Downloaded on March 03,2024 at 12:29:55 UTC from IEEE Xplore. Restrictions apply.
First half Cam. View Defect
Start
Fig.6. System setup with white background
Authorized licensed use limited to: Birmingham City University. Downloaded on March 03,2024 at 12:29:55 UTC from IEEE Xplore. Restrictions apply.
Fig.9. GUI for mango with defect
Fig.7. GUI for apple with defect
From Fig. 10, it is clear that there is no black patch for the
In similar way, no defects for both first half side and second both first half side and second half side of mango, which is
half side of apple have been occurred as shown in Fig. 8 resulted by no defect for both first half side and second half
side of mango after testing.
Fig.8. GUI for apple without defect Fig.10. GUI for mango1 without defect
Figs. 9 and 10 show the GUI for mango with defects and From all results in Figs. 7-10, we can see that the system is
without defect in respectively. able to detect the defects that have a spot with radius not less
than 10mm. The other small spots are considered as some
Fig. 9 shows the black patches occurred in the first half side changes in the color of fruits as the fruits can’t have just one
of mango however there is no black patch at the second half color in the whole surface. The position of defects is found in
side of mango. By result, there are defects on the first half side the image as the coordinate system of the image’s pixel not in
but no defect on the second half side of mango. The GUI real dimensions.
shows that there are five red circles on the first half side of
mango means that there are five defects while there is no red IV. CONCLUSION
circle at the second half side means that there is no defect.
In this paper, an automatic fruit grading system was
developed. This system consists of mechanical part such as
rotating desk that act as a place for inspection; electrical parts
such as DC motor, Arduino, computer and software such as
image processing in MATLAB. This automatic grading
system has been designed to meet the demands in grading
fruits’ operation compared to manual grading. The grading of
the fruits is based on the external quality factor based on
Authorized licensed use limited to: Birmingham City University. Downloaded on March 03,2024 at 12:29:55 UTC from IEEE Xplore. Restrictions apply.
surface defect and decay. This automatic inspection system [7] Khojastehnazhand, M., Omid, M., & Tabatabaeefar, a.
has saved time, effort and better accuracy than manual sorting. (2010). Development of a lemon sorting system based
This system starts with a DC motor that is programmed by on color and size. Plant Science, 4(April), 122–127.
Arduino to rotate 180° twice for each of the fruit. If there is a
defect on the inspected surface of fruit, a red circle will appear [8] Nandi, C. S., Tudu, B., & Koley, C. (2014). Machine
around the defect at the analyzed image. The other parameters vision based automatic fruit grading system using fuzzy
such as size, shape should also be included in this project in algorithm. International Conference on Control,
future research. These parameters will play valuable role for Instrumentation, Energy and Communication, CIEC
quality analysis process. In addition, since there will have 2014, 26–30.
some kind of fruits with same color such as tomato and apple,
so, there will be having some misclassification. Hence one [9] Yogitha, S., & Sakthivel, P. (2014). A distributed
feature can be added also namely texture while classifying computer machine vision system for automated
such kinds of fruits. inspection and grading of fruits. Proceeding of the IEEE
International Conference on Green Computing,
ACKNOWLEDGEMENT Communication and Electrical Engineering, ICGCCEE
2014, (0), 1–4.
The authors would like to express gratitude and
acknowledge to Ministry of High education and, Universiti [10] Pavithra, V., Pounroja, R., & Bama, B. S. (2015).
Malaysia Pahang (UMP) for continuous support under FRGS Machine vision based automatic sorting of cherry
grant (RDU160131). tomatoes. 2nd International Conference on Electronics
and Communication Systems, ICECS 2015, (Icecs),
REFERENCES 271–275.
[1] J.Ramprabhu and S.Nandhini (2014). Enhanced [11] Zhao, Y., Wang, D., & Qian, D. (2009). Machine Vision
Technique For Sorting And Grading The Fruit Quality Based Image Analysis for the Estimation of Pear
Using Msp430 Controller. International Journal of External Quality. 2009 Second International Conference
Advances in Engineering & Technology. Vol. 7, Issue 5, on Intelligent Computation Technology and
pp. 1483-1488. Automation, 629–632.
[2] Ali, M. A. H., Mailah, M., Tang, H. H., & Kazi, S. [12] Unay, D., & Gosselin, B. (2005). Artificial neural
(2012). Visual inspection of cylindrical product’s lateral network-based segmentation and apple grading by
surface using cameras and image processing. machine vision. Proceedings - International Conference
International Journal of Mathematical Models and on Image Processing, ICIP, 2(9813783), 630–633.
Methods in Applied Sciences, 6(2), 340–34
[13] Mousavi, A., Ahmadimoghaddam, P., Modares, A., &
[3] Ali, M., Mailah, M., Kazi, S., & Tang, H. H. (2011). Dolaty, H. (2012). Sorting and grading of cherries on the
Defects Detection of Cylindrical Object’s Surface using basis of ripeness, size and defects by using image
Vision System, 222–227. processing techniques. International Journal of
Agriculture and Crop Sciences (IJACS), 4(16), 1144–
[4] .Rupali S.Jadhav, & PROF. S.S.Patil. (2013). A Fruit 1149.
Quality Management System Based On Image
Processing . IOSR Journal of Electronics and
Communication Engineering (IOSR-JECE), 8(6), 01–
05.
Authorized licensed use limited to: Birmingham City University. Downloaded on March 03,2024 at 12:29:55 UTC from IEEE Xplore. Restrictions apply.