An Automated Machine Vision Based System For Fruit Sorting and Grading
An Automated Machine Vision Based System For Fruit Sorting and Grading
Bipan Tudu
IEE Department
Jadavpur University
Kolkata, India
bip_123@rediffmail.com
I. INTRODUCTION
Automated grading and sorting of agricultural products
are getting special interest because of increased demand in
different quality food with relative affordable prices by the
different group of customers belongs to different living
standards. Thus fruit produced in the garden are sorted
according to quality and maturity level and then transported to
different standard markets at different distances based on the
quality and maturity level. Sorting of fruits according to
maturity level is most important in deciding the market it can
be sent on the basis of transportation delay.
In present common scenario, sorting and grading of fruit
according to maturity level are performed manually before
transportation. This manual sorting by visual inspection is
labour intensive, time consuming and suffers from the problem
of inconsistency and inaccuracy in judgement by different
human. Which creates a demand for low cost exponential
reduction in the price of camera and computational facility
adds an opportunity to apply machine vision based system to
assess this problem.
The manual sorting of fruits replaced by machine vision
with the advantages of high accuracy, precision and processing
speed and more over non-contact detection is an inevitable
trend of the development of automatic sorting and grading
systems [1]. The exploration and development of some
fundamental theories and methods of machine vision for pear
quality detection and sorting operations has been accelerate the
application of new techniques to the estimation of agricultural
products quality [2].
Chiranjib Koley
Electrical Engineering Department
National Institute of Engineering
Durgapur, India
chiranjib@ieee.org
195
Fig.1. Proposed model of vision based automated fruit grading and sorting
system.
light output of the lamp still varies resulting from the lamp
ageing, filament or electrode erosion, gas adsorption or
desorption, and ambient temperature. These effect cause
changes in the RGB values of the images. The light intensity
controller corrects for the lamp output changes, maintaining a
constant short and long-term output from the lamp. The light
output regulating unit is made up of a light sensing head and a
controller. The (silicon based) light sensor. is also mounted
near to the sample fruit inside the chamber monitors part of the
light source output; the controller constantly compares the
recorded signal to the pre-set level and changes the power
supply output to keep the measured signal at the set level i.e.
120 lux.
The still frames are extracted from the video image at the
rate of 30 frames/sec. In our systems the motor speed and
distance between the two consecutive mangoes were taken as
input. If the motor speed and distance between two mangoes
are known then we can find a frame that will be the best still
image of full mango within the imaging chamber. In our
system the speed of the conveyer belt was 2ft/sec, length of the
imaging chamber was 1ft and the distance between two
consecutive mangoes on the conveyer belt was 1ft. So 7200
samples/hour can be sorted by our system. This rate can be
increased by increasing the speed of the conveyer belt and
reducing the distance between two consecutive samples in the
conveyer belt. The size of the still frame was 480X640 pixels.
C. Color Calibration of CCD camera
Color calibration of CCD cameras is essential for color
inspection systems based upon machine vision to provide
accurate and consistent color measurements. Here we have
calibrated the camera using color standard.
An image matrix for four varieties of mango having
different maturity levels are shown in Fig. 2.
Fig. 2. Images of four varieties mango having different maturity level. 1st
row: KU, 2nd row: SO, 3rd row LA and 4th row HI. Images are
taken with an interval of 2 days, shown in (a) raw (b) semimatured
(c) matured (d) over-matured.
196
l=
Fig.3. Extracted still frames from the video image with an interval of 5
frames, (a) frame no.10, sample entering into the imaging chamber (b) frame
no.15, sample near the middle of the imaging chamber (c) frame no. 20,
sample crossing the middle position of imaging chamber (d) frame no. 25,
sample going out from imaging chamber.
( ) (
(x x )+ (y y ) is
l
i
l
j
l
i
l
j
maximum,
where
y
y
= tan 1 2 1 l
, this rotation will align the
x2 x1l
mango vertically but may not able to place the apex region at
the top, it may be at the bottom position. To fix the problem
another rotation of 180o was made if the apex region is in
bottom position. The detection of the apex or the stalk was
made on the basis of geometrical properties of the varieties of
the mango under test. For all the varieties of the mango the
width of the apex is always higher than the stalk, this properties
was utilized to place the apex region at the top of the image.
The center point of the apex/stalk region is the point lies on the
longitudinal axis at a distance of 0.15 lmax from the two end
points of the longitudinal axis. This relation was determined
experimentally, and found to true for all the varieties of the
mango under test.
(a)
(b)
(c)
Fig. 4. Filtered images of Mango, (a) raw image of a mango, (b) raw mango
image along with the obtained contour, (c) binary image of the same mango
after removing the small patches, also shows the different positions and their
name as used in the work.
197
1
rc
(I
BW )
i =1 j =1
S k = R ,G ,B = slope
s k (i, j )
i = 1
( AapexR Astalk R )
( ) p (x )
M
p x | =
1
rc
()
and
k =1
Is
k =1
()
pk x N ( k , S k )
i =1 j =1
198
(2 )
d
2
| Sk
1
|2
1
exp x k
2
) S (x )
T
1
k
Fig. 6. Variation with maturity level (a) Average R of entire mango (b) Average R in apex region (c) Difference of average R to G. (d) Variation of average R to
average G with four different maturity level(i.e. M1,M2,M3 and M4 of KU). PDF distribution with (e) average value of total G and B (f) different batches and
different gardens. (g) Box-whiskers plots for most correlated features.
199
GMM
Experts
GMM
M4
Experts
M3
GMM
KU
SO
LA
HI
M2
Experts
M1
VARIETY
(Local
Name)
GMM
Experts
93.5
92.2
92.1
92.1
92.2
91.7
91.5
91.4
93.7
92.7
92.6
92.2
88.9
88.2
87.6
87.4
93.1
92.6
92.2
91.7
89.4
89.3
88.2
88.5
93.3
91.8
91.5
91.3
91.3
90.5
90.3
90.3
REFERENCES
From the obtained results as summarized in TABLE I, it can
be observed that the classification performance for the
proposed vision based automatic technique as good as the
manual expert based technique. Since the accuracy is
dependent on the image, which is further affected by the
ambient light intensity, thus controlling the light intensity was
performed. The variance in the probability density function of
the features indicates the variation of color pattern of mangoes
for a particular maturity level. Misclassification may occur
when different maturity level mangoes having similar color
pattern, but it was observed that extraction of multiple features
particularly gradient based features helped to correctly identify
those mangoes, as some raw mangoes having color pattern of
matured mango particularly in the apex region, but those
mangoes shows high gradient value of R along the
longitudinal axis. In some cases, the automatic technique for
extraction of features failed to collect suitable features, when
the surfaces of the mangoes were highly contaminated with
scratches and black color patches.
[1]
[2]
[3]
[4]
[5]
[6]
[7]
[8]
[9]
VII. CONCLUSIONS
The present work is an application of machine vision based
technique for automatic grading and sorting of fruits like
mango according to the maturity level. Different image
processing techniques were evaluated, to extract different
features from the images of mango. The proposed work also
aimed to find the variations of different features with maturity
level of mangoes. It also shows the application of Gaussian
mixture model to estimate the parameters of individual classes
to predict the maturity level. This technique found to be low
cost effective and moreover intelligent. The speed of sorting
system is limited by the conveyer belt speed and the gap
maintained in between two mangoes rather than response time
of the computerized vision based system, which is on the order
of ~50ms.
Test has been conducted only for the four varieties of
mango, but can be extended for other fruits where there are
reasonable changes in skin color texture occur with maturity.
The variations of classification performances with the variation
of other factors like changes in ambient light, camera
resolution, and distance of the camera were not studied. The
study shows that, machine vision based system performance, is
closer to the manual experts, where experts judge the mangoes
maturity level not only by the skin color but also with firmness
and smell.
[10]
[11]
[12]
[13]
[14]
[15]
[16]
[17]
[18]
[19]
[20]
[21]
200