Documente Academic
Documente Profesional
Documente Cultură
discussions, stats, and author profiles for this publication at: https://www.researchgate.net/publication/284724250
READS
21
4 authors, including:
Yusman Yusof
10 PUBLICATIONS 2 CITATIONS
9 PUBLICATIONS 2 CITATIONS
SEE PROFILE
SEE PROFILE
Industrial Automation and Robotics Technology, Industrial Automation Section, Universiti Kuala Lumpur Malaysia
France Institute, Section 14 Jalan Teras Jernang, 43650 Bandar Baru Bangi, Selangor.
Tel: +603 8926 2022 Fax: +603 8925 8845
Email: cymophanex2@hotmail.com, Asyahmi87@yahoo.com
2
Abstract
Color has been a great help in identifying objects for
many years. Color is the byproduct of the spectrum of
light, as it is reflected or absorbed, as received by the
human eye and processed by the human brain. In day to
day practice, we will most likely use three models: HSV,
CMYK and RGB. In this project, the RGB model will be
focused. The RGB color model combines Red, Green, and
Blue light in various ways to reproduce a broad array of
colors. The RGB color of an object will be classified by
using Fuzzy logic according to the data given by the
analog sensor. This project aims in providing a better
understanding on applying Fuzzy Logic in solving real
life application for engineering technology students.
Experiments will be conducted and the results will be
used to demonstrate the color classification using Fuzzy
Logic.
Key Words:
Sensor.
1. Introduction
Color has been a great help in identifying objects for
many years. The process of color classification involves
extraction of useful information concerning the spectral
properties of object surfaces and discovering the best
match from a set of known descriptions or class models to
implement the recognition task [1]. Furthermore, most
manufacturers prefer color classification systems that
provide repeatable and reliable operation, as opposed to
human inspection, which has a high margin of error due
2. Primary Colors
Colors are actually light waves. Photographs,
magazines and other objects of nature such as an orange;
create color by subtracting or absorbing certain
wavelengths of color while reflecting other wavelengths
back to the viewer. This phenomenon is called subtractive
color [2]. When light from the sun hits an object such as
an orange, it absorbs all the colors except for orange. A
white object refracted all colors. Therefore, white is really
all the colors of the spectrum. Whereas something
appears black to us because the all colors are absorbed
and nothing is refracted. The color spectrum is made up
of varying frequencies and wavelengths. Each color has
its own designated space within the spectrum.
The choice of primary colors is related to the
physiology of the human eye. If the visible portion of the
light spectrum is divided into thirds, the predominant
colors are Red, Green and Blue. The RGB color model
is an additive color model in which red, green, and blue
light are added together in various ways to reproduce a
broad array of colors. The main purpose of the RGB color
model is for the sensing, representation, and display of
images in electronic systems, such as televisions and
computers [3].
1/1
3. System Overview
A low cost sensor, Light-Dependent Resistors (LDR)
is used to determine the lux levels reflected from an
object. The sensor is basically a resistor that changes its
resistive value (in ohms ) depending on how much light
is shining onto the squiggly surface. Three RGB color
LEDs will be used and object whose color is required to
be detected should be perpendicularly placed in front of
the system, hence the light rays reflected from the object
will fall on the single LDR. The LEDs will be triggered in
sequence for a short time.
2/2
RULE BASE
FUZZIFICATION
DECISION
MAKING
R G B
DEFUZZIFICATION
5. Fuzzification
Fuzzification is the process of mapping crisp inputs to
fuzzy membership functions. In fuzzy logic, it is
important to distinguish not only which membership
functions a variable belong to, but also the relative degree
to which it is a member. Figure 5 shows the input crisp
variable for the color sensor. In Figure 5, the fuzzy
7. Defuzzification
The defuzzification, calculation of the crisp output is
where the output is generated based on the inputs and the
rule base. In this case, the output is the color indicator of
itself i.e Red or Green or Blue as shown in Figure 5. In
this system, we are using Sugeno inference. It is a fuzzy
set with a membership function that is unity at a single
particular point on the universe of discourse and zero
everywhere else [5].
Table 2: The output range to classify color
3/3
l
31/8
31/7
31/6
31/5
31/4
31/3
31/2
31/1
31/01
31/02
31/03
31/04
31/05
31/06
31/07
31/08
31/09
31/010
Code
7/8
7/7
7/6
7/5
7/4
7/3
7/2
7/1
7/01
7/02
7/03
7/04
7/05
7/06
7/07
7/08
7/09
7/01
0
1
2
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
RED
Reading
Vol
Valu
t
e
3.77
238
3.87
246
4.03
255
4.14
261
4.16
263
4.15
263
4.18
264
4.15
263
4.23
267
4.23
267
X
X
X
X
X
X
X
X
-
GREEN
Reading
Vol
Valu
t
e
2.45
154
1.90
119
2.44
154
2.13
133
2.19
137
2.35
148
2.52
158
2.43
153
3.00
189
2.85
179
X
X
X
X
X
X
X
X
-
BLUE
Reading
Vol
Valu
t
e
2.89
182
2.68
169
2.97
187
2.50
157
2.66
167
2.06
128
2.63
166
2.60
164
3.06
193
3.18
201
X
X
X
X
X
X
X
X
-
RESULT
Valu
e
80.9
82.0
81.1
82.0
82.0
82.0
82.0
82.0
82.0
82.0
-
Colo
r
Red
Red
Red
Red
Red
Red
Red
Red
Red
Red
X
X
X
X
X
X
X
X
Leve
RED
GREEN
BLUE
Reading
Volt
Valu
e
2.90
181
3.26
205
3.37
213
3.54
224
3.41
216
3.57
225
3.70
234
3.65
230
3.57
225
3.76
238
X
X
X
X
X
X
X
X
-
Reading
Vol
Valu
t
e
2.60
162
2.43
153
2.57
161
2.36
148
2.40
152
2.84
178
2.68
169
2.64
166
2.68
169
2.88
182
X
X
X
X
X
X
X
X
-
Valu
e
49.0
49.0
49.0
49.0
49.0
49.0
49.0
49.0
49.0
49.0
-
Color
Green
Green
Green
Green
Green
Green
Green
Green
Green
Green
X
X
X
X
X
X
X
X
Code
1
2
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
Reading
Vol
Valu
t
e
2.27
142
3.29
201
3.15
198
3.09
195
3.09
195
3.24
204
3.25
204
2.94
185
3.16
200
3.10
196
X
X
X
X
X
X
X
X
-
RESULT
19/8
19/7
19/6
19/5
19/4
19/3
19/2
19/1
19/01
19/02
19/03
19/04
19/05
19/06
19/07
19/08
19/09
19/01
0
Leve
l
1
2
3
4
5
6
7
8
9
10
11
12
14
15
16
17
18
19
RED
Reading
Vol
Valu
t
e
2.47
155
2.30
144
2.26
142
1.55
97
2.00
125
2.08
130
2.77
174
2.21
139
3.19
201
3.37
213
X
X
X
X
X
X
X
X
-
GREEN
Reading
Vol
Valu
t
e
2.35
147
1.78
111
2.00
125
1.56
97
2.28
143
2.20
138
2.57
162
2.35
148
2.62
165
2.71
170
X
X
X
X
X
X
X
X
-
BLUE
Reading
Vol
Valu
t
e
2.70
170
2.82
177
2.97
188
2.49
156
3.23
203
3.33
209
3.40
214
3.32
209
3.59
226
3.67
232
X
X
X
X
X
X
X
X
-
RESULT
Valu
e
0.5
0.5
16.0
16.0
16.0
16.0
16.0
16.0
16.0
19.2
-
4/4
Color
Blue
Blue
Blue
Blue
Blue
Blue
Blue
Blue
Blue
Blue
X
X
X
X
X
X
X
X
10. References
[1] Ferat Sahin, A Radial Basis Function Approach to a Color
Image Classification Problem in a Real Time Industrial
Application, 27 June 1997, Blacksburg, Virginia, page 1-16, 26
Feb 2006.
[2]
http://www.glassescrafter.com/information/how-eye-seescolor.html
[3]
http://en.wikipedia.org/wiki/RGB_color_model#cite_refRWGHunt_2-1
[4] Naotoshi Sugano, Shou Komatsuzaki et al., Fuzzy Set
Theoretical Analysis of Human Membership Values on the
Color Triangle.
[5] M. Negnevitsky, Artificial Intelligence, in A Guide to
Intelligent Systems, Second Edition, Pearson Education,
Edinburgh: Addison Wesley, 2005. pp. 112.
5/5