ISBH:979r25r2783
EI{GINEERING
INTERNASIONAL
CONFERET{CE
"UilllES
COilSERVATION"
zo13
Semarangr
t@2O/3
oo
rHS'
o
o
FACULTY
OF
ENGINEERING
i i I i I i i I I
Reva Diaz
Airlanggal,
saptadi Nugroho2, Banu
wirawan
yohanes3
Electronic and Computer Engineering Deparlment Satya Wacana Christien University
Jalan Diponegoro 52-60 Salatiga 5071
I,
Jawa Tengah, IndonesiaI
(rev _1 2 0 4 @y aho o. co. id)
2
1s ap tad i 1nu groh o@y aho o. com)
3
1b o na
j
o@yai
o o. co. id)Engineeriug
International
Conference
"IINNES
Conservation"
2013Proceeding
p- ISBN: 979-25-2783
08.2013
TSBN:9?08Becausr
it
har thrThe An< te The mic: mo(
Softu'art The soft
vfire
prot
The Anc and cr featru imagel-Colorspa
Colorspa
y
consNlnac(
m.1.1.
I
l
additive r
element,
display cc
trr.1.2. Y
1 componex
which usir
informatic
420sp
col
Indonesiaoptimizing
Ball
Detection
Algorithm
using Center
of
Gravity
method and Servo
Pan
and
rilt
Controller for
Humanoid
Robotic
based
on
Android
Abstract-The
humanoid soccerrobotic
which contestedin
Kontes Robot Cerdas Indonesia(KRC|
ha
recognize the orange tennis balls in order to response as quick and accurate as possible. This paper
present
improving perforrnance of aball
detection algorithm using Centerof
Gravity methodo, yWliOtp
compared
to
the oneon
RGBA colorspace.And
it
also proposesa
non-linear servopan and
ltlt
algorithm
to
increase system response. Testing has been done by conducting seriesif
simulationsbasd
scenarios according
to
the contest rules. The experiments tooksn
averagefrom
100 sampleof
dffireai
times. The
result
is
an
increasingball
detection runtime performancefrom
80msto
22mson
average,improving by 363%. The better a robotic doing
ball
detection and image processing, thefaster it
will
movefollow
theball's
moving bycontrolling
its servo. From the eryteriment results,it
cottcluded that thesoccer robotic has increasing its system response.
-Humanoid
Soccer Robotic, Center ', Servo ControllerI.
INTRODUCTION
Kontes
Robot
Cerdas Indonesia(KRCI)
since 2011 included the Robosoccer Humanoid League.It
b
contest where robotics plays
football-tke
or soccer-like game. Two teams compete to score goals, and the tcr with the highest scoring goals is the winner of the game. H'owever, since 2012 the contest ailowed contestant$use an addition
robotic
asa
goal keeper.But,
algorithm implementationfor
the goai keeperrole is still
simple. Although research on the development of humanoid soccer robotic has been long time, there are so inadequacies in the functionality and perfonnance features, compared to buman beings[l].
Image processing used
in
the goal keeper robotic consumes much time, so that the robotic often missesball
andpoorly
r€sponsesthe ball that
comingunto
it.
Therefore, robotics needsto
optindzethe
im processing algorithm usedin
the game.In
additron,ball
detection accuracy perforrnance is another imptask. When the contest took place, there were lots of environmental distractions in the soccer field, such as
color similarity with
the poles andreferee's
'niforms, lights disparity, and uneven surface. Those probl could reducethe robotic
performance, henee algoritbm usedby
therobotic
hasto 69
simFle*a
ast
accommodate such scenarios in the soccer field.
This paper presents an algorithm optimization
for
the humanoid soccer roboticto
improve the speedaccuracy
of
theball
detectionfor
the goal keeper role. The paper's structure consistsof
the humanoid scrobotic implementation, ball detection algorithrn, servo controller, experiments and conclusion.
By
meansof
algorithm research,
it
is expected that students much more attracted to the robotic, image processing, and mol programming area.N.
HI]MANOID
SOCCERROBOTIC
The
ball
detection systemfor
thi
humanoid soccer roborie ss-posedof
hardware and software parts. system diagram is appeared in Fig. 1.ll.l.
HardwareThe hardware compon€nt
is
an actuator systemto contol
the camerafor
the roboticvision.
Thekeeper robotic utilized an Android smartphone as the sensors and the main processor, and also a mi
embedded system [2] to conhol servos pan and tilt.
eic.ft.unnes.ac.id
-
rr-142
l--ri
r-fr.r
F DTd
dt
International
Conference
66UNNESConservation"
2013Proceeding
979-2s-2783
2013,
Indonesiaof the Android smartphone has been included
by
many sensors such as carnera and compass [3], bas communicbtion modules such as bluetooth andwifi.
The cost using the smart phone may be less than using the modules separately.Fig
l.
Humanoid soccer robotics block diagramAndroid smartphone's tasks are
to
take picture usingits
camera, processing images to detect a ball, with the microconholler through bluetooth, and take decisions based on image processing system.ller embedded system is the support party which communicates with the smartphone using
n&rle
and controls the servos pan andtilt.
sftware
pafrs are image processing system and servo conholler that create the robotic's intelligence.implemented using Java
[a]
and Android[5]
software developmentkit
(SDK).Android software compiled
of four
main tasks, thatis, first to
create user interface include display components' event listener Second, to control the whole system include to deactivating auto whiteke
becauseit
disrupts thecolor
segmentation process.Third,
image processing includes creatinglnges
and
calculatingthe image's
centerof
gravity. Fourth,
to
managethe
communication toembedded system using bluetooth.
microcontroller embedded systems software is to control the seryos' movement ssing fast pulse width (PWM) method.
III.
BALL DETECTION
is a mathematical abstraction model
[6, 7]
to describe color representationin
numbers, andit
msists
of
threeor four
color elements, such asRGB, CtvfYI(, HSV,
HSL [8], or YUV.
Each basein a colorspace is color composer.
l.l.
RGBA colorspaceMedia that transmitting colo4 such as television and
LCD
display, creating image usingmix
of
color from prime color red, green, and blue. In addition to RGB, RGBA colorspace added another
alpha, which contains transparent information
from mixing RGB
color. Alpha value 100%will
color opaquely.
ml2.
YUV
colorspaceYUV
colorspace detinescolor using
luminance element(Y)
and
two
chrominanceor
color(IJV).
It
is
an improvementfrom color
information usedin old black
and white television using onlyY
element. TheY
element is a brightness level, and theU
andV
components are eolor'iiifrrmation. The Android smartphone keeps the image taken
by
its camerain
YW420
colorspace.YIJV
ffi)sp
colorspace defines in Fig. 2 where each 4 pixel consists of 4 bytesY,
abye
U and a byte V.r{E
r*l
,trd
[image:3.612.20.529.3.832.2]Engineering
International
Conference *UNNES Conservation"
2013Proceeding
p- ISBN: 979-25-2783
08.
2013.
Semarans.Indonesia
III.2.Taking PictureImages being taken
by
anAndroid
smartphone arein
YLIV42Osp colorspace and keptin
arrayof
Previous
works
basedon
images obtainedfrom an
omnidirectional camera[9].
In
the
2012 cont€st' humanoid soccor robotic using OpenCVlibrary [10] to
take picture and keptin RGBA
colorspace usingtype. To synchronize the scresn resolution, pictures are taken in 480 x 320 pixel resolution. III.3. Color Segmentation
Color segmentaiion is used to separate orange ball color with other environmental color. The conducted
by
set upper andlower
boundsfor
element valuesin
images.As a
results,binary
image consists of 0 for black andI
for white.IIi.4.Center of Gravity method
Center
of
massor
centerof
gravity on an imageis
apoint
where image object are spread evenly. color segmentation had been done, the center of gravity on binary or grayscale image is calculated [1 1].rV.
SERVO
CONTROLLER
The humanoid soccer robotic used microcontroller ATN{ega 324 to control servo pan and
tilt.
Becaus€communication between an Android smartphone and microcontroller is noi only used to control servo,
blt
to
control the robotic. Hence the robotic needsto
differentiate both data. Each datafor
controlling servorobotic has different header and tail. The byte configuration is presented in Table 1.
Table 1. Byte configuration for communication between Android smartphone and microcontroller
Function
ByteI
Byte 2 Byte 3 DescriptionPan
255 ValueTail
Controlling servo pan position using valrte between 0o-18(FTilt
254
ValueTail
Controlling servotilt
position using value between0"-9(f
Sen'o pan configured
to
rotate 180"with
1ofor
each step, so there are 180 steps. Meanwhile,sern
configured to rotate 90", so there are 90 steps. Servo rotation is used to search and follow the ball
movemc--V.
REST]LTS AND
ANALYSIS
Simulations are drawn up
in
accordance with the latest contest rules. In 2012 contest, servo is movedone step per frame
or
1o per frame. When each frame has average runtime 80 ms, so the maximum seryois only 12.5o per second. On that account"
it
slowed the servo movement. The new servo pan andtilt col
is not moving linearly,
but
adjust the distanceof
theball with
centerof
image. The farther thedistam
servo movement
wili
be quicker. Highest speed achieved is 6 steps per frame. The average runtime atZl
then the average servo speed
is
272.3" per second. The servo motor used has a 2.7 kg.cm torsion and60" per 130 ms or 461.5o per second.
The experiments to check algorithm performance on the humanoid soccer robotic are categorized
ifi,
groups,that
is,
image processing speed, noiseinulnerability,
light
intensity alteration tenacity,ad
detection accuracy. The experiments are conducted 100 timesto
compare system runtimeto
detect a each frame.A ball
is locatedin
an environment that has many objectswith
similar colorwith
theThe
objectsare
locatedon different
distancefrom robotic
and also variedlights
intensity. When conditions are changed, the value boundaries are kept constant and the roboticis
turnedto
show adil
circumstauces. System can detect theball
correctly when the crossing red-line locatedin
the center ofi
The simulation results are presented in Table 2.
It Lan be seen that YUV420sp colorspace is perforrn better than RGBA colorspace. When lights
i
reduced, the ball detection performance
ofboth
colorspace is degraded, but the reduced accuracyof
colorspace is less than RGBA colorspace.:97
@2.
Expesegn] shor
using
YL
than Ifo image. 1
tr
segmeicill
can peic.ft.unnes.ac.id
[image:4.612.58.542.21.526.2]al Conference
"UNNES Conservation"
2013Proceeding
Indonesia
T able 2. Contest simulation results Condition (lights brightness, number
of lamp, ball distance from robotic)
YUV420sp
RGBA
colorspace
colorspaceBright lights, 2 lamps, 20 cm 1000/" 10001o
Bright
lights,2
lamps, 40 cm 100% 100v, BriCht lights, 2 lamps, 100 cm -l0OYo 85o/"Bright lights, 2 lamps, 200 cm 90%
Bright lights, 2 lamps, 300 cm 400/b
Dreary lights, 1 lamp, 20 cm 100Y" IOOOA
Dreary lights,
I
lamp, 40 cm IOOYIDreary lights, 1 lamp, 100 cm 70% Dreary lights, 1 lamp, 200 cm 75%
Dreary lights,
I
lamp,300 cm 65V"Fqg 2. Experirnent results, using YUV420sp colorspace (left) and using RGBA colorspace
(righ|
olor
segmentationis
done usingYUV420sp
colorspace,but only
U
eleroent employedto
segment ides shorten time to process images, the segmentation result is.not degraded significantly. Optimizedusing YUV420sp colorspace takes 15-25 ms to process an image, its speedier than the old algorithm colorspace
which
takes 60-100ms. Besidesthe optimized algorithm also
presentsa
better
colorion
than theold
one, thecolor
segmentation can performwell
even when hand approach the ball in image. The new algorithm is also more endurable to noise than the old one, when lights intensity areolor
segmentationstill
perforrnswell
and centerof
gravity
coordinateis
settled.At
last,the
newstill
can process ball object positioned at 2 meters far but the old one cannot. The experiment results60% 80%
95% 90%
40Yo 20Y"
lg
llr
;&
br
rd
fzod
*Jr,
IEGT T
F
WlFr
ma
rEr
of
b
'of
reir
inFie.2.
-Engineering
International
Conference
"IINNES
Conservation"
2013Proceeding
p- ISBN: 97945-2783
2013.
SemaraIndonesia
VI.
CONCLUSION
This paper has discussed a comparison
in
color segmentation and calculating centerof
gravity betweentm
different
colorspace,that
is,
RGBA
and
YW420sp.
Both
colorspaceare
implementedon
an
Andrrfl
smartphone. From the experiment results,
it
can be concluded that YUV420sp colorspace is perform betierRGBA
colorspacefor
humanoid soccerrobotic which
usedto
competein
KRCI.
There have beenimproving features on image processing speed and accuracy, besides a quicker non-linear servo controller. Further research can be planned on the shape detection algorithm to improve image processing
and not to display image processing when the contest is going on, not only to lighter the processing but also
give a better security.
ACKNOWLEDGEMENTS
The reported work was supported by Robotic Research Center (R2C), Elechonic and Computer Department, and Satya Wacana Christian
Univenity,
Salatiga, Indonesia.lll
H.
Mobalegh , Development of an"rr"X1f;ruor*'9rf"ri
robot team,ph.D. Thesis, Freie universiryBerlin,
201l.
12)
D. Susilo, 48jam
latpas tuntas mil<rokontroler MCSSI&AVR
(Andi, 2010).13]
Robocup, RoboCup soccer humqnoid league rules andsetup,2}ll.
t4l
S. Hermawan, Mudah membuat aplikasi Androtd (Andi,201l).
tsl
U. Ahmad, Pengolahan citradigital
(Grahallnu, 2005).t6]
T.
Acharya,A.K.
Ray, Image processingprinciples
and applications,first
edition (New Jersey Wiley&
Sons, 2005).L7)
N.S. Widodo,A.
Rahman, Vision based self localization for humanoid robot soccer. Telkomnika,D.ecember 20 12, 637 -644.
t8]
F.M.
Carlos,U.L.
Pedro,
Yision-based self-localizationfor
soccer
robots, Proceedingof
the IEEE/RS International Conference onIntelligent
Robots and Systems,l 193-1198.t9l
G. Bradsky, O'Reilly Learning OpenCV computer vision with OpenClr iibrary(O'Reilly
Media,2008)-ll0l
Schildt, Herbert, Java : the conplete reference (McGraw-Hill,201l)
tl
U
Nugroho S,Utomo
D,
Rotation Invariant IndexingFor
Image Using Zemike Moments and R-Telkonnilca Journal, 9(2), 2017 , 335-340.ISBN:97
08
ANAP
Expe expert
q
facing.
A(T
di (interni and th the ruIt words:
E4
TB
dirreported
rwTB
ca.swhen it r
House
i
the third group of inlrces
on thr deathsTB
dirmrnageme govenrmet
in tub Meanl !o solve Program s
9ornmon p€
The pr
ln
is oftut
in diagr Variou
used a
n
The -\atare us
Iswanti
ofrer
) developr Eeatmentf
ge dire<
A
rhing tubetThis re
DFS sean speciali
eic.ft.unnes.ac.id
-
II-146