Naïve Bayes Classifier for Hand Gestures Recognition
Imanuel Simatupang, Daniel Sutopo Pamungkas*, and Sumantri K. Risandriya
Mechatronics Dept, Politeknik Negeri Batam, Indonesia
Keywords: EMG, Myo Armband, Mobile Robot, Naive Bayes
Abstract: This paper provides recognizing the five gestures of the fingers using Naïve Bayes method. The
electromyography signal (EMG) is utilized to recognize the fingers movement. A myo armband is used to
obtain the signal. The average success rate of the system is about 90.61%. To verify the results, the outputs
of the system are used to control a mobile robot. The results show that the system is able to control the
movement of the robot.
Every movements of the human generate a signal
from the muscles known as Electromyography
(EMG) (Eason, Noble, & Sneddon, 1955). Signal of
the muscles activities captures using the electrodes
placed in the skin of the human. The EMG signals are
utilized by the researchers for diverse objectives. In
the health applications, one of the purposes of this
signal is to known the human muscles condition
(Montoya, Henao, Muñoz, 2017). In the engineering
applications, EMG signals are used to identify the
movement of the human body e.g. the gestures of the
hands. One application in robotics is to control robot
movement using the recognizing system (Morais, G
et al. 2016).for example to control the movement of
the robot hand (Andrean, Pamungkas, & Risandriya,
2019). The robot fingers are controlled by the
movement of the fingers of the operator. This system
enables to help the disabilities people to substitute
their hand (Risandriya and Pamungkas, 2018).
To identify the signals of the muscles actions,
there are several recognizing algorithm have been
used by the researchers. For instance: Neural
Network algorithm (Risandriya & Pamungkas, 2018),
Fuzzy (Gogić, Miljkovic, & Đurđević, 2016),
Adaptive Neuro-Fuzzy Inference System
(Caesarendra, Tjahjowidodo, & Pamungkas, 2017),
Linear Discriminant Analysis (Zhang, 2012), K-
Nearest Neighbor (Kaya & Kumbasar, 2018), etc.
For this study, the Naïve Bayes algorithm is used
to recognize the gesture of the fingers of the subjects.
The root mean square (RMS) of the EMG signal is
used to be processed in this algorithm. Five fingers
postures are examined to be identified. These fingers
poses are: relax, all fingers are open, all fingers are
close, wave out and wave in. These gestures are used
to control the mobile robot in the certain track.
To provide a complete explanation, this article is
organized as follows: next section objective is to
provide an explanation of the method, also Naïve
Bayes. Then proceed with the next in section III,
which presents experiments on the method proposed
to identify hand movements. This is followed by a
comparison between the two methods, while the last
section is given conclusions obtained from
experiments conducted.
Naïve Bayes classifier is a classifier algorithm based
on probability theorem. The Bayesian rule, or known
as the conditional probability, is used for this
classifier. Equation (1) and equation (2) shows the
Bayes rules. To classify the classes, this algorithm
calculates the possibility of each of the categories.
The group which has the most significant number of
probabilities is the event is in that group
Simatupang, I., Pamungkas, D. and Risandriya, S.
Naïve Bayes Classifier for Hand Gestures Recognition.
DOI: 10.5220/0010352601100114
In Proceedings of the 3rd International Conference on Applied Engineering (ICAE 2020), pages 110-114
ISBN: 978-989-758-520-3
2021 by SCITEPRESS – Science and Technology Publications, Lda. All rights reserved
P(a|x) is the probability of posterior class a with
attribute x
P(x|a) is the likelihood which the probability of
the predictor given class
P(x) is the probability of class x
P(a) is the probability of class a
X = (x
, x
…., x
In this classification, all features/values are
assumed to be values independent of each other in
each class. Because of this condition, even if a value
depends on one another, this classification will
consider all propositions to be independent so that it
gives the probability effect. One of the advantages of
Naive Bayes is that only the average value and
standard deviation of variables are required to
estimate the parameters of the classification. The
equation of mean and standard deviation are shown in
(3) and (4) respectively.
µ is the mean of the attribute in a class
σ is the variance of the attribute in a class
The decision making rule for classification is to
choose one more possibility based on the results of
the probability density values such as the Gauss
Density equation. [5]
For the experiments the Root Mean Square
(RMS) of the EMG signals is used as signals which
will be processed in the Naïve Bayes method. EMG
is a method to known electrical signal from the
muscle activity e.g. contraction or relaxation. To
obtain this signal, the electrodes are used. The Root
Mean Square (RMS) value of the EMG has a linear
relation and the activity of the muscle (Fukuda, T, Y.
et al 2010). The RMS values enable to obtain the
effective value of EMG signal. RMS equation (6) as
= the square of EMG signal amplitude
N = the data from EMG value
To establish the ability of Naïve Bayes algorithm the
block diagram of the system shown in Figure 1 is
made. This system aims are to recognize the gestures
of the hand also to drive a mobile robot.
The myo sensors are placed in the upper hand of
the subject. For this equipment we used myo
armband. A computer with 64 GB RAM and Intel
processor i-3 are used for performing Naïve Bayes
algorithm. The outcome of the algorithm is used for
controlling a custom mobile robot. This robot must be
follow in the specified path.
To control the robot hand gestures of the user are
used. Fist pose is used to stop the robot (Figure 2 (a)),
while the relaxed pose is used to transition from one
command to other command, as shown in Figure 2(b).
To make robot move forward, open fingers gestures
is applied (figure 2 (c)). Figure 2 (c) and Figure 2 (d)
are the gesture which are used to control robot to
move to the right and turn left respectively.
Figure 1: Block diagram of the system.
The algorithm which has a high achievement to
recognize the pose of the user's hand is calculated.
Naïve Bayes Classifier for Hand Gestures Recognition
Also, the time of the robot for accomplish the mission
are measured.
The sensor is used using the surface EMG or
known as sEMG. For this system a myo armband is
utilized, this device is positioned on the user's arm.
Figure 3 shows users who use muscle sensors. This
equipment has eight muscle sensors and a position
sensor. These eight sensors will be used to obtain
signals from the user's muscles when moving their
fingers. One subject used for the experiment was a
male aged 23 years. The user had never used the myo
Armband sensor before.
Before the sensors signal processed in Naïve
Bayes and NN algorithm, the information is filtered.
Moving average filter is used to reduce the noise. For
the retrieval of data for the training phase, subjects
performed thirty times for each pose. In the Naïve
Bayes method, the mean and the standard deviation
of the RMS signal of the training phase are saving in
the database of the algorithm.
Figure 2: Poses of the hand (a) fist (b) relax (c) open (d)
wave right and (e) wave left.
Figure 3: The usage of the armband.
For the application phase, the subject tries the
effectiveness of both methods to recognize the pose
of the hand. The subject is doing the three times
experiment (thirty times per experiment) for each
gesture and each method. The results of these
experiments are shown in Table 1 for Naïve Bayes.
The average for the Naïve Bayes method is 90.61%,
success rate. The flow charts of the algorithms are
shown in Figure 4.
To prove the success of the system in recognizing
finger movement patterns, both algorithms are tested
to move a mobile robot. The information from the
computer to the robot is transmitted using wireless via
Bluetooth connection. This robot is equipped with
two dc motors. The dimension of the robot is 10 cm
height, a length and width are 20 cm and 15cm
respectively. The mobile robot has a free-wheel at the
front. An Arduino Uno is used to controlling the
robot. Robot figure is shown in Figure 5
The task of the robot is to follow the path, as
shown in Figure 6. Before the experiments are
performed, the subject is trained how to drive the
mobile robot using Naïve Bayes algorithm five times
each. For the experiments, every task is measured
how much time is needed for mobile robot to
accomplish the path for this algorithm. The results
can be shown in Table 2.
Table 1: Result the success recognition for Naïve Bayes
Percentage success value (%)
Trial 1 Trial 2 Trial 3
Fist 89.26 90.12 90.53 89.97
Relax 91.22 90.37 91.03 90.87
Open 87.61 89.27 86.47 87.78
93.6 90.31 92.74
92.92 93.28 90.41
Table 2: Time to accomplish the path.
Trial (second)
1 2 3
Naïve Bayes 7.2 8.5 7.6 7.67
ICAE 2020 - The International Conference on Applied Engineering
Figure 4: Flow chart of the algorithms.
Figure 5: A mobile robot.
Figure 6: Path of the robot.
This article shows the ability of a recognize system to
identify fingers gesture using Naïve Bayes algorithm.
This system consists of a muscle sensor, a computer,
a controller, and a mobile robot. Data taken are RMS
values in the time domain. This system enables to
recognize the gestures around 90.6%. Moreover, this
system able to control mobile robot to follow the
certain path without any
This research was supported by Politeknik Negeri
Andrean, D., Pamungkas, D. S., Risandriya, S. K., 2019.
Controlling Robot Hand Using FFT as Input to the NN
Algorithm. Journal of Physics: Conference Series.
Caesarendra, W., Tjahjowidodo, T., Pamungkas, D, S.,
2017. EMG based classification of hand gestures using
PCA and ANFIS (pp. 18-23). In International
Conference on Robotics, Biomimetics, and Intelligent
Computational Systems (Robionetics). IEEE.
Eason, G., Noble, B., Sneddon, I.N., 1955. On certain
integrals of Lipschitz-Hankel type involving products
of Bessel functions. Philosophical Transactions of the
Royal Society of London, pp.529-551.
Fukuda, T., Y., et al., 2010. Root mean square value of the
electromyographic signal in the isometric torque of the
quadriceps, hamstrings and brachial biceps muscles in
female subjects. The Journal of Applied Research, vol.
10, no. 1, pp. 32-39.
Gogić, A., Miljkovic, N., & Đurđević, Đ., 2016.
Electromyography-based gesture recognition: Fuzzy
classification evaluation. In International Conference
on Electrical, Electronic and Computing Engineering.
Kaya, E., Kumbasar, T., 2018. Hand gesture recognition
systems with the wearable myo armband. In 2018 6th
International Conference on Control Engineering &
Information Technology (CEIT). IEEE.
Montoya, M., Henao, O., Muñoz, J., 2017. Muscle fatigue
detection through wearable sensors: a comparative
study using the myo armband, In Proceedings of the
XVIII International Conference on Human Computer
Interaction, ACM.
Morais, G., et al., 2016. Application of myo armband
system to control a robot interface. In 9
Conference on Bio-Inspired Systems and Signal
Processing. SCITEPRESS.
Risandriya, S. K., Pamungkas, D. S., 2018. MYO Armband
sensors and Neural Network Algorithm for Controlling
Naïve Bayes Classifier for Hand Gestures Recognition
Hand Robot. In International Conference on Applied
Engineering (ICAE). IEEE.
Zhang, D., et al., 2012. PCA and LDA for EMG-based
control of bionic mechanical hand. In International
Conference on Information and Automation. IEEE.
ICAE 2020 - The International Conference on Applied Engineering