Professional Documents
Culture Documents
A New Method For Fruits Recognition System: Faculty of Information Science & Technology University Kebangsaan Malaysia
A New Method For Fruits Recognition System: Faculty of Information Science & Technology University Kebangsaan Malaysia
Abstract
Several fruit recognition techniques are developed based
upon color and shape attributes. However, different fruit
images may have similar or identical color and shape
values. Hence, using color features and shape features
analysis methods are still not robust and effective enough
to identify and distinguish fruits images. A new Fruit
recognition system has been proposed, which combines
three features analysis methods: color-based, shapebased and size-based in order to increase accuracy of
recognition. Proposed method classifies and recognizes
fruit images based on obtained features values by using
nearest neighbors classification. Consequently, system
shows the fruit name and a short description to user.
Proposed fruit recognition system analyzes, classifies and
identifies fruits successfully up to 90% accuracy. This
system also serve as a useful tool in a variety fields such
as educational, image retrieval and plantation science.
1. Introduction
Recognition system is an important field of computer
science concerned with recognizing patterns, particularly
visual and sound patterns[1]. It is central to optical
character recognition, voice recognition, and handwriting
recognition. It uses methods from statistics, machine
learning and other areas. Typical applications are text
classification to recognize different type of texts such as
spam and non spam E-mails, speech recantation for
specified purposes such as translating different languages
to English[2], hand written recognition for postal codes,
or the automatic face recognition which deals with digital
images as input to the pattern recognition systems[3].
In previous years, several types of image analysis
techniques are applied to analyze the agricultural images
such as fruits and vegetables, for recognition and
classification purposes.
The fruits recognition system could be applied as an
image contents descriptor which is able to describe the
low level visual features or contents of the fruit images for
the CBIR system[4]. The most popular analysis
2. Background
P = ( p 1 , p 2 , p 3 ,..., p n )
and Q = ( q1 , q2 , q3 ,..., qn )
In Euclidean n-space, is defined as:
(1)
( p1 q1 ) 2 + ( p2 q2 ) 2 + ... + ( pn qn ) 2
3. Related works
Three relevant existing systems that analyze and
recognize fruits using shape-based and color-based
analysis method have been reviewed. The existing
systems, fruits shape variation analyzer, fruits recognition
and localization system and tree fruit recognition using
texture properties and color data, are presented in the
following sections.
Fruits Shape Variation Analyzer for tomato and other
plant species has been developed to analyze shape and
size of tomato fruit and other plant species[13], such as
Butternut squash, yellow squash, large jalapeno, banana
pepper, chili pepper, grape, strawberry, and Bartlett pear.
It can accurately determine boundaries of fruit with
different color. The Analyzer can perform detection for
tomato fruit shape variation and describe any other twodimensional fruit shape. It provides intuitive descriptors
and output that facilitates the analysis of fruit morphology.
The controlled vocabulary and mathematical
descriptors were combined into tomato analyzer to
achieve objective measurement of fruits shape trait. The
controlled vocabulary can accurately describe a range
species of fruit shape traits. The mathematical descriptors
can calculate the fruit traits with a single equation for each
trait, include fruit shape, comprises fruit shape index, fruit
shape triangle, fruit shape eccentric, fruit end shape, fruit
shape heart, circular, ellipsoid, rectangular; and fruit size
comprises fruit height, width, mass, area, and perimeter.
The analyzer contains function for manually
adjustment the distal and proximal ends of the fruit.
Therefore, no matter fruit are positioned at an angle, the
analyzer also can correctly identify the distal and proximal
ends of the fruit. This method accuracy is different based
on the fruit image but the overall is around 80% to 85%
[14].
An AccuRange4000-IR point laser-range finder and a
phase shift laser technique have been applied for the fruits
recognition and localization to perform automatic
selective harvesting[12]. The system uses both of the
range and amplitude images provide by the laser rangefinder scanner in each scanned scene, and exploits the
4. Methodology
The methodology is the method or type of algorithm
that being used to develop a system. This section outlines
the methodology and data that are used to develop the
Fruit Recognition System, and presents the pseudo code
for developed system. For Fruits Recognition System, the
KNN algorithm performs fruit classification by using the
distance measure, which is the Euclidean distance metric
to measure the distance between the attributes of the
unknown fruit with the stored fruit examples, then the
algorithm will find out the nearest or closest examples to
the unknown fruit.
The algorithm will prompt user to crop the fruit area in
order to obtain or extract the color value of the input fruit
image. In order to obtain or compute the fruit roundness
value, the algorithm will analyze and extract the fruit
region feature properties, thus the fruit area and perimeter
for fruit shape roundness or metric value calculates.
Algorithm will compute the new area and perimeter values
for the fruit image according to the user selected scalar
value.
Figure 1: The fruit images space that illustrates the situation and
position of the unknown fruit sample and the groups of stored
fruit examples during the classification process of unknown fruit
sample to the class of its nearest neighbor.
has been extracted. Thus the fruit area and perimeter are
used in fruit shape roundness or metric value calculation.
Fruit
Name
Red
Green
Strawbe
Banana
Lemon
Durian
waterme
Minimum
G
128.5
99.0
158.8
168.0
192.5
84.8
77.8
14.0
145.0
21.38
145.8
148.3
67.0
119.9
42.0
31.0
28.2
53.1
17.6
22.0
39.7
219.9
146.0
233.0
251.0
252.8
197.8
119.6
98.0
189.0
56.1
234..5
218.5
172.0
166.4
B
67.0
62.0
58.2
95.5
129.1
88.0
77.7
4.2. Data
Fruit
Area
shape = 4
2
Perimeter
Maximum
G
(2)
Red Apple
Green apple
Strawberry
Banana
Lemon
Durian
Watermelon
Area (pixels)
mi
15
78
48
44
49
19
33
max
48472
17224
10595
18332
11788
83700
81228
Perimeter(Pixels)
min
694.6
472
306.4
622.8
414.7
1.4255e+3
1.7038e+3
Max
826.1
945
612.8
1.7500e+3
799.7
3.6694e+3
3.8223e+3
Red Apple
Green apple
Strawberry
Banana
Lemon
Durian
Watermelon
Roundness
min
0.82
0.84
0.60
0.22
0.72
0.44
0.66
max
0.91
0.92
0.69
0.39
0.91
0.59
0.89
(166.42,42.97,49.88)
Area
(Pixels)
Red
Roundness
Values
Mean (Pixels)
(R,G,B)
Fruit Name
Selected Scalar
Value
Input Fruit
Image number
0.88
21260
780.87
Apple
Banana
.00
(173.73,150.07,53.90)
0.30
9166.
875.38
00
Durian
(98.03,87.17,23.19)
0.47
67044
3294.51
.00
Strawbe
(186.52,54.59,27.76)
0.69
rry
Lemon
10328
612.78
.00
(212.84,144.87,4.11)
0.86
11788
586.16
.00
Waterm
(71.19,86.73,39.68)
0.66
elon
Green
Red
(155.85,176.28,31.30)
0.88
Banana
15636
944.26
.00
(196.13,101.96,71.82)
0.91
Apple
3037.29
.00
Apple
81228
17844
701.75
.00
(213.77,193.35,91.47)
0.39
11936
1245.69
.00
10
Durian
(157.67,163.88,89.78)
0.44
78162
3669.42
.00
10
Waterm
(157.67,163.88,89.78)
0.44
elon
11
Strawbe
Lemon
(147.57,42.27,48.33)
0.61
Waterm
(248.78,211.48,125.05
0.78
Green
Apple
301.81
(74.33,117.40,53.53)
11768
614.04
.00
0.89
elon
14
4422.
00
13
4892.57
6.0
rry
12
10421
55350
2159.69
.00
96.74,143.79,22.44)
0.90
16436
.00
678.64
[6]
6. Conclusion
The proposed method can process, analyze, classify
and identify the fruits images, which are selected and sent
in to the system based on color, shape and size features of
the fruit. The KNN algorithm is the appropriate and
effective classification algorithm to be used in the Fruits
Recognition System. The recognition system that has been
developed is able to recognize all the test fruit images
which are being selected by user or system tester from the
fruit selection menu on the system. The recognition results
of the system are accurate up to 90%.
There are some future works should be implement on
the Fruits Recognition System in order to improve and
enhance the functionality and flexibility of the recognition
system for more widely usage. The system should be
improved by extending its functions to process and
recognize more variety of different fruit images. Besides
that, the texture based analysis technique could be
combined with the existing three features analysis
technique on the system in order to gain better discerning
of different fruit images.
7. Acknowledgment
We would like thanks Mr. Liew Jin Yee For doing this
work and implementing the application in a user friendly
way.
[7]
[8]
[9]
[10]
[11]
[12]
[13]
8. References
[1]
[2]
[3]
[4]
[5]
[14]
[15]
[16]
Figure 8: Lemon
Figure 2: Red Apple
Figure 9: Strawberry
Figure 3: Banana
Figure 5: Strawberry
Figure 6: Watermelon
Appendix 2: Tested Images