Finger Movements Recognition Using Naive Bayes Algorithm in
Frequency Domain
Daniel Sutopo Pamungkas and Novi Dharmayani
Dept. of Electrical Engineering Politeknik Negeri Batam, Batam, Indonesia
Keywords: EMG, Myo Armband, Naïve Bayes, Recognition.
Abstract: Rapid technological developments have led to various innovations to overcome existing problems, one of
which is prosthetic hands to facilitate daily activities. The field of biomechanics studies and applies the
concepts of technology, treatment, and diagnosis related to human activities, resulting in new technology in
the form of electromyography (EMG). EMG signals are signals originating from human muscles when they
contract or relax. This study aims to identify the Myo Armband sensor's movement pattern of the human
fingers. The Myo Armband sensor is placed on the forearm of the subject's right hand to receive signals from
the EMG. The data obtained will be converted to the frequency domain using FFT, then 70 percent of the data
from the EMG signal is used as training data to get the results of each movement. The training results will be
tested using 30 percent of the EMG signal data and classified using the Naive Bayes algorithm. The study’s
results show that this system manages to identify the gesture around 80%.
1 INTRODUCTION
Rapid technological developments have led to
various innovations to overcome existing problems,
one of which is prosthetic hands. Prosthetic hands can
facilitate daily activities such as picking up or moving
items. In the medical field, there is a field of
biomechanics that studies human movement. The
area of biomechanics studies and applies the concepts
of technology, treatment, and diagnosis related to
human activities to produce new technology in the
form of electromyography (EMG) (Pamungkas et al.,
2020).
EMG signals come from human muscles when
they contract or relax. EMG has been widely used and
applied as a signal control system in various
applications of the Human Machine Interface because
it can be used to check the condition of muscles and
nerve cells to help detect disturbances in nerves or
muscles.
To detect this type of signal, there are several
methods that researchers use. The first method uses a
needle to place the EMG sensor inside the skin (Dy et
al., 2021). The second method is the sensor location
on the skin’s surface to sense the EMG signal
(Pamungkas et al., 2020). The second method is more
convenient, even though the signal’s noise is higher.
Three methods can be used to apply this signal for
recognizing the pattern of the movement of the
fingers. There are time domains (Pamungkas et al.,
2020), (Esa et al., 2018), frequency domains
(Andrean et al., 2019) (Yousif et al., 2019), and a
combination of time and frequency domains
(Pancholi & Joshi, 2020)(Guo et al., 2004). The
frequency domain tends to obtain higher success in
recognizing the movements. However, this method is
slower than the time domain method because the
computation cost of the frequency domain is higher
(Nossier et al., 2020).
Moreover, several algorithms have been used to
identify the movement of the hand. Namely, Support
Vector Machine (SVM) (Dela et al., 2022), Neural
Network (Andrean et al., 2019), Naïve Bayes, and K-
Nearest Neighbours (K-NN) (Pamungkas et al.,
2020). Most of the research enables us to identify the
movement of the fingers from around 60% to 90%.
The naive Bayes classification method is a simple
probability classification method using a set of
probabilities. In this study, the frequency domain
features are used. The surface EMG (sEMG) sensors
are utilzed. Myo armband is an sEMG type, and it has
eight EMG sensors. While the Naive Bayes algorithm
is used. This method is expected to obtain the results
better than others.
Pamungkas, D. and Dharmayani, N.
Finger Movements Recognition Using Naive Bayes Algorithm in Frequency Domain.
DOI: 10.5220/0011880100003575
In Proceedings of the 5th International Conference on Applied Science and Technology on Engineering Science (iCAST-ES 2022), pages 777-780
ISBN: 978-989-758-619-4; ISSN: 2975-8246
Copyright © 2023 by SCITEPRESS Science and Technology Publications, Lda. Under CC license (CC BY-NC-ND 4.0)
777
The methods of the study are presented in the
following section. Afterward, the results of the
experiments are provided in the results and discussion
section. Finally, in the last section, the conclusions
are delivered.
2 METHODS
In this study, we utilized a Myo armband as a device
to detect the EMG signal. Those signals are processed
in a PC with core i5 and 8 Gb RAM, as seen in figure
1. The signals from the sensors are in the time domain
and need to be transformed into the frequency
domain. The Fast Fourier Transform (FFT) method is
used for this process. Five features of the frequency
signals are used for this study. Namely mean
frequency, median frequency, peak frequency, mean
power, and total power of the signal.
Myo armbands are used in the upper right hand of
the subject. Figure 2 shows that the subject wears the
device. The subject is a right-hand male without
disorders in neurological and muscular. The location
of sensor no 4 is approximately in the back of the
hand’s middle (see figure 2). To obtain the signals,
the subject is sitting in a chair. His hand is placed on
the desk in front of him. At the same time, the subject
moves their fingers. Five hand gestures are conducted
simultaneously in this study, as shown in Figure 3.
For every pose, the subject start by opening all the
fingers and bending the finger, then hold for 5
seconds and goes back to the initial position. For each
pose, the subject repeated ten times.
There are two phases for this system to identify
the movements of the fingers. First is the training
phase, then the test phase of the system. From each
pose, seven data are used for the training data, while
three other data are used for the test. The flow chart
of both steps can be seen in Figure 4. The raw signals
are obtained when the subject moves his finger.
Signals EMG from the sensor on the subject are
transformed to the frequency domain using the FFT
equation next step is to acquire features of the
transformed signal. The training data are obtained in
the training phase and then used in the test phase.
Figure 1: Diagram block of the identified system.
Figure 2: Subject wears the sensors.
Figure 3: Pose of the hand.
Figure 4: The flow chart of the system.
3 RESULTS AND DISCUSSION
The EMG signals are enabled to collect from the
sensor. Figure 5 shows the combination EMG signal
from all the sensors in the time domain for the thumb
finger pose. In comparison, each sensor‘s signal can
be seen in Figure 6 for the same pose.
After each finger's raw EMG data signal has been
input, FFT converts the time domain into the
frequency domain. The FFT data EMG signal is
iCAST-ES 2022 - International Conference on Applied Science and Technology on Engineering Science
778
shown in Figure 7, where the X axis is the frequency,
the Y axis is the amplitude, and the FFT of each
sensor data is shown in Figure 8. Then the EMG data
signal is extracted using five extraction features:
mean frequency, median frequency, peak frequency,
mean power, and total power contained in Table 1.
Figure 5: Graph of EMG raw data signal.
Figure 6: Graph of EMG Raw data each sensor signal.
Figure 7: Graph of FFT result of EMG signal data.
Figure 8: Graph of FFT result of each sensor data EMG
signal data.
Table 1: Features of the thumb pose.
Mean
Freq
Median
Freq
Peak
Freq
Mean
Power
Total
Power
Sensor
1
0.433
9
-1695 386 -2.9973 -3390
Sensor
2
0.429
4
-1695 238 -2.9973
-3.39E
+ 03
Sensor
3
0.455
8
-1695 485 -5.9947
-6.78E
+ 03
Sensor
4
0.422
1
-1695 481 -2.9973
-3.39E
+ 03
Sensor
5
0.394
5
-1695 407 -1.9982
-2.26E
+ 03
Sensor
6
0.449
9
-1695 619 -3.9965
-4.52E
+ 03
Sensor
7
0.456 -1695 513 -3.9965
-4.52E
+ 03
Sensor
8
0.454
1
-1695 759 -3.9965
-4.52E
+ 03
Sensor
1
0.567
5
2.06E +
03
505 2.9978
4.11E +
03
Sensor
2
0.528
3
2.06E +
03
899 6.9949
9.60E +
03
Sensor
3
0.742
2
2.06E +
03
277 0.9993 1371
Sensor
4
6.81E
+ 12
2.06E +
03
739
1.99E -
15
2.73E-
12
Sensor
5
0.288
8
2.06E +
03
1 -0.9993
-1.37E
+ 03
Sensor
6
0.704
2
2.06E +
03
1 0.9993
1.37E +
03
Sensor
7
0.440
3
2.06E +
03
481 -2.9978
-4.11E
+ 03
Sensor
8
0.587
5
2.06E +
03
1 1.9985
2.74E +
03
In the naive Bayes classification method, testing
for the five fingers obtained results, as shown in Table
2. From this confusion, matrix results show that the
system enables to identify of around 80%. Some
errors occur in determining the middle, ring, and little
fingers. Those failures are because the movement of
those fingers also activates others fingers.
Table 2: Confusion matrix of the result.
Movement Pattern
(actual data)
Experiment and Resul
t
1 2 3
Thumb Thumb Thumb Thumb
Index Index Index Index
Middle Middle Ring Middle
Ring Little Ring Ring
Little Little Little Ring
Finger Movements Recognition Using Naive Bayes Algorithm in Frequency Domain
779
4 CONCLUSIONS
This study attempts to recognize the fingers' gestures
using sEMG sensors and the Naive Bayes algorithm.
This system is capable of identifying the poses of the
subject’s fingers. Results show that the percentage of
this system is 80% to acknowledge gestures. In the
future, this system will be used in real time and
implemented for controlling hardware.
ACKNOWLEDGMENTS
The DRPM research fund funded this research.
REFERENCES
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,
1230(1). https://doi.org/10.1088/1742-6596/1230/1/
012030
Dela, L., Sutopo, D., Kurniawan, S., Tjahjowidodo, T., &
Caesarendra, W. (2022). EMG Based Classification of
Hand Gesture Using PCA and SVM. 459–477.
https://doi.org/10.1007/978-981-19-1804-9_35
Dy, C. J., Colorado, B. S., Landau, A. J., & Brogan, D. M.
(2021). Interpretation of Electrodiagnostic Studies:
How to Apply It to the Practice of Orthopaedic Surgery.
The Journal of the American Academy of Orthopaedic
Surgeons, 29(13), E646–E654. https://doi.org/10.5435/
JAAOS-D-20-00322
Esa, N. M., Mohd Zain, A., & Bahari, M. (2018).
Electromyography (EMG) based Classification of
Finger Movements using SVM. Undefined, 8(3).
https://doi.org/10.11113/IJIC.V8N3.181
Guo, X., Yang, P., Li, Y., & Yan, W. L. (2004). The SEMG
analysis for the lower limb prosthesis using wavelet
transformation. Annual International Conference of the
IEEE Engineering in Medicine and Biology -
Proceedings, 26 I, 341–344. https://doi.org/10.
1109/IEMBS.2004.1403162
Nossier, S. A., Wall, J., Moniri, M., Glackin, C., &
Cannings, N. (2020). A Comparative Study of Time and
Frequency Domain Approaches to Deep Learning
based Speech Enhancement. Proceedings of the
International Joint Conference on Neural Networks.
https://doi.org/10.1109/IJCNN48605.2020.9206928
Pamungkas, D. S., Simatupang, I., & Risandriya, S. K.
(2020). Comparison gestures recognition using k-NN
and naïve bayes. 3rd International Conference on
Applied Science and Technology, ICAST 2020,
677–681. https://doi.org/10.1109/ICAST51016.2020.
9557730
Pancholi, S., & Joshi, A. M. (2020). Improved
Classification Scheme Using Fused Wavelet Packet
Transform Based Features for Intelligent Myoelectric
Prostheses. IEEE Transactions on Industrial
Electronics, 67(10), 8517–8525. https://doi.org/10.
1109/TIE.2019.2946536
Yousif, H. A., Zakaria, A., Rahim, N. A., Salleh, A. F. Bin,
Mahmood, M., Alfarhan, K. A., Kamarudin, L. M.,
Mamduh, S. M., Hasan, A. M., & Hussain, M. K.
(2019). Assessment of Muscles Fatigue Based on
Surface EMG Signals Using Machine Learning and
Statistical Approaches: A Review. IOP Conference
Series: Materials Science and Engineering, 705(1),
012010. https://doi.org/10.1088/1757-899X/705/1/
012010.
iCAST-ES 2022 - International Conference on Applied Science and Technology on Engineering Science
780