Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

IEEE International Conference On Recent Trends In Electronics Information Communication Technology, May 20-21, 2016, India

Design of Drowsiness, Heart Beat Detection System


and Alertness Indicator for Driver Safety
Anilkumar C.V, Mansoor Ahmed, Sahana R, Thejashwini R, Anisha P.S

Abstract–In the present scenario, the automobile usage rate is Simultaneously the heart beat rate of the driver is monitored
increasing. Consequently, the number of accidents is also and detected using R-peak detection algorithm [3] by taking an
increasing. According to research, the majority of the accidents are ECG (Electro Cardio Gram) signal of the driver. The detected
due to driver’s carelessness. The main objective of this paper is to heart beat rate is compared with the normal value (60-100
present a technology that reduces the accidents caused due to
beats/minute) to predict whether the driver is in safe hands to
human abnormalities. This is done by monitoring the driver’s head
movements in order to detect drowsiness and heart beat rate by drive.
employing image processing techniques. Drowsiness detection is The outputs of drowsiness and heart beat rate detection are
accomplished by head motion detection using frame difference parallel processed and depending on these outputs thedriver state
algorithm and heart rate detection is carried out using R-peak is detected. If there is any abnormality in driver’s state,
detection algorithm. If any abnormalities are found during anotification is given through buzzer to indicate driver deviancy.
detection, an alert is given to the driver through a buzzer for the Thus, this system provides safety and security for the driver
safety of the driver along with the passengers. As a preliminary along with the passengers in real time implementation. We are
approach,we are simulating the process using MATLAB. making use of MATLAB for simulation of the proposed system
with computer vision tool box and signal processing tool box.
Keywords–Drowsiness, Heartbeat, Head motion detection, Frame
The system overview which can be implemented in
difference, ECG (Electrocardiogram), R-peak detection
automobiles is as follows,
I.INTRODUCTION

It has been a known concern that, there is an exponential Webcam


increase in automobile usage with corresponding increase in input
population. Consequently, the accident rates have also increased Processor Buzzer
due to various reasons. Among these, human errors while
driving has become an important factor along with driver fatigue,
drowsiness and distraction. Hence a system is developed for Sample
monitoring the driver’s condition while driving, which mainly ECG
deals with providing safety for the driver and for the passengers
by continuously auditing the driver conditionslike Fig.1 : System overview
drowsiness,heart beat rate and blood alcohol level [1]. The
proposed system monitors the drowsiness and heart beat rate of Fig.1. shows the overview of the proposed system. It
the driver in order to detect state of the driver. accepts two inputs namely- video and ECG pulse and provides
audio output after processing.
The drowsiness prediction in the driver is done by observing
II. PROPOSED SYSTEM
abnormal head or body motion using frame difference
algorithm[2].If the abnormal motion is detected, it can be
The flow diagram of the proposed system is as follows,Fig.2.
predicted that driver is in abnormal condition i.e. sleepy.
depicts the drowsiness detection by taking the webcam video as
Anilkumar C.V, Final Year B.E Student, Maharaja Institute of Technology, an input. From the live stream video, the prediction of drowsiness
Mysore, India is performed. For the real time implementation of the proposed
system the heart rate can be obtained using ECG (heart rate)
Mansoor Ahmed, Final Year B.E Student, Maharaja Institute of Technology, sensors. But as only simulation
Mysore, India
is carried out here, ECG signal sample is taken as an input for
Sahana R, Final Year B.E Student, Maharaja Institute of Technology, obtaining heart beat rate. Finally the drowsiness and heart beat
Mysore, India rate detection outputs are fed to a decision making module using
which the status of the driver is evaluated. Then with the help of
Thejashwini R, Final Year B.E Student, Maharaja Institute of Technology,
Mysore, India(thejashwiniramakrishna3@gmail.com) actuation module the audio warning is given to the driver through
the buzzer to avoid accidents due to his ignorance.But for the
Anisha P.S, Assistant Professor, ECE Department, Maharaja Institute of simulation purpose the sound from the speakers as a warning is
Technology, Mysore, India(anishaps_ece@mitmysore.in) generated using MATLAB command as below,
A=audioplayer (w,fs);

978-1-5090-0774-5/16/$31.00 © 2016 IEEE


937
IEEE International Conference On Recent Trends In Electronics Information Communication Technology, May 20-21, 2016, India

The above command is used to indicate the driver’s abnormality. The difference image obtained out of two consecutive frames is
where, w is the generated sinewave and fs is the sampling rate of converted into binary. Then, the sum of all pixel values in the
the signal to be generated. The methodologies used for binary difference image is compared with the threshold value. If

Webcam input ECG signal


input

Drowsiness Heart beat


analysis analysis

Decision
making

Audio warning

Fig.2 : Flow diagram of the proposed system

drowsiness detection and heart beat rate detection are explained Fig.3 : Flow diagram of the Drowsiness detection
as

1. DROWSINESS DETECTION

Drowsiness is one of the main reasons behind the accidents


caused by drivers. From [4], it is observed that drowsiness in a
driver causes unrest in him. The driver tries to stay awake by
making abnormal movement of head, body or eyelids. Also in
case of the driver falling asleep, there is no motion (still).
Drowsiness detection can be done by two methods:
1) Intrusive methods
2) Non-intrusive methods

1)In this method, electrodes are placed on the human body to If i1 = i1| No motion
receive EOG (Electroculogram) of EEG(Electro Else Movement in that pixel
Encephalogram) signals generated due to eye
blinking/movement. EOG signal is separated from EEG Where, i1,i2……..indicates the pixel values of the frame at interval
usingDiscrete Wavelet Transform. By setting a threshold value x(t). i1|, i2|…….indicates the pixel values of the frame at interval
for coefficients, the eye blink rate can be found. This method x(t+1).
provides an efficiency of 95%[5].
the pixel value is more than the threshold, motion is detected. If
2)The proposed method mainly concentrates on Non-intrusive movement or stillness is observed for sequentially long interval
method for drowsiness detection which uses video as an input. of time,then the driver is said to be drowsy. Hence, using this
The flow diagram of this method is as follows, methodology the driver state can be predicted.
As shown in Fig.3, the system consists of a camera which 2.HEART BEAT DETECTION
will be placed in front of driver to predict drowsiness. For the
sake of simulation, here webcam input is taken. The input video The ECG (Electro Cardio Gram) is a noninvasive method that is
is converted into frames. Then, the difference between
used to measure Heart Rate Variability (HRV). For the
consecutive frames is found using frame difference algorithm
which can be explained as below,Consider two consecutive simulation purpose, here an ECG signal sample is considered
frames in a stream of frames at interval x(t) and x(t+1). The which is taken from MIT-BIH. The typical ECG signals with
difference in pixel values is taken between the two frames. specified waves, intervals, and segments are shown
below,Basically an ECG signal consists of P wave, PR segment,

938
IEEE International Conference On Recent Trends In Electronics Information Communication Technology, May 20-21, 2016, India

QRS complex, T wave, PR interval, QT interval. The frequency using R-peak detection algorithm, peaks are detected. The
spectrum of ECG ranges from 0.05 to 100Hz [6]. The R spike is procedure can be explained as,
a positive peak(deflection) in ECG signal. 1) ECG samples are accepted
2) Peak threshold is set at 85% of the maximum amplitude
3) x(t) is said to a peak, if it is greater than previous and next
amplitude value i.e.,
x(t) > x(t+1) & x(t) > x(t-1) (1)

Finally, by taking the peak count, heartbeat rate per minuteis


calculated as,
Bpm= (2)

The obtained drowsiness and heart beat rate detection


output is used to make a decision on the driver’s abnormal
situation. This is done based on the practical threshold ratings
given in the Table.1,
Fig.4 : (Courtesy[5]) Typical ECG signal with specified waves, intervals and
segments TABLE 1: Threshold ratings of the proposed system
The flow diagram of the heart rate detection process as
Parameters Normal Abnormal
follows:
Head motions(counts) Less than or More than 5
equal to5
Heart beat More than 60 Less than 60
Less than 100 More than100

III. TOOLBOX REQUIRED FOR SIMULATION

1)IMAGE PROCESSING TOOLBOX:


It is a collection of functions that extend the capability of
the MATLAB numeric computing environment. It supports wide
range of image processing operations such as enhancement,
histogram equalization, negative of an image etc,

2)SIGNAL PROCESSING TOOLBOX:


It is collection of tools built on MATLAB numeric
computing environment. It supports a wide range of signal
processing operations from waveform generation to filter design
and implementation, parametric modelling, and spectral
analysis.

3)COMPUTER VISION CASCADE TOOLBOX:


This toolbox provides algorithms and tools for the design
and simulation of video processing, image processing and
computer vision systems. It can process video and image data to
solve problems such as noise, low contrast and artifacts resulting
from infected video. It can perform motion analysis, object
Fig.5 : Flow diagram of the heart rate detection detection and tracking and so on.

Fig.5. shows the procedure for heart rate detection IV. EXPERIMENTAL RESULTS
simulation taking ECG sample as an input. Before processing
the signal the pre-processing is done, which involves removing The simulation results of drowsiness detectionis depicted below,
baseline wander (below 0.5Hz to 0.75Hz) due to movement of it shows the process of motion detection from the video.
body and during the stress, using band pass filter. The power
line (at 50Hz) is removed using band rejection filter. Then by

939
IEEE International Conference On Recent Trends In Electronics Information Communication Technology, May 20-21, 2016, India

The R- peak detection and the heart rate per minute is obtained
as,

Input first frame (a)Input


second frame(b)

Difference between two


frames showing Binary image of Difference
movement image

Fig.6 :Motion detection process from the video


The sum of all pixel values in the binary difference image
obtained is compared with the threshold value for motion
detection. When the continuous motion or stillness is observed,
the driver is said to be drowsy. Fig.9 : Simulation results of the heart rate detection

V. CONCLUSION

Due to the human error’s while driving, accident rates are


increased and also there is no safety for the driver and passenger.
Hence through continuously monitoring the driver by detecting
drowsiness and heart beat rates and also alerting him when he is
deviating from his normal circumstance, accidents rates can be
minimized. To perform this one of the efficient methods used
are motion detection for drowsiness prediction and R-peak
detection algorithm to count heart beat rate. For illustrating the
driver’s state, an example is taken for the simulation purpose.
The results obtained can be implemented for developing an
intelligent automobile which can detect the driver fatigue, thus
increasing safety and security of the driver, correspondingly the
Fig.7 : Drowsy motion detection simulation window accident rates may be decreased.

FUTURE SCOPE
The results that can be obtained by the heart beat rate detection The other modules such as GSM and emergency vehicle control
method is as shown in Fig.8., module can be implemented. If the driver’s state is an
unconditional, then the message can be given to the registered
mobile number through GSM. Also the speed of the vehicle can
be controlled if sudden heart problems occur.

ACKNOWLEDGEMENT

This work is dedicated to our beloved parents. We gratefully


thank Dr. Mahesh Rao, Head of the Department, Electronics
and Communication Engineering, MIT, Mysore for giving us
this big opportunity to pursue this work. Technical support and
advice from teaching staff of ECE, Maharaja Institute of
Technology is gratefully appreciated.

REFERENCES
Fig.8 : Original ECG signal [1] Akshay Kumar Yalkar, HarshaVardhan Singh N, Jagadevan V, Nandini C,
K.Ezhilarasan&PushpaMala.S, “Development of A Smart Interface For

940
IEEE International Conference On Recent Trends In Electronics Information Communication Technology, May 20-21, 2016, India
Safety and Protection of Automotives”, International Journal of Image
Processing (IJIP), Volume (9) : Issue (4) : 2015
[2] Suresh D S, Lavanya M P, “Motion Detection and Tracking using
Background Subtraction and Consecutive Frames Difference Method”
International Journal of Research Studies in Science, Engineering and
Technology Volume 1, Issue 5, August 2014
[3] DurgeshkumarOjha, Monica Subashini, “Analysis of ECG signal for the
detection of abnormalities using MATLAB”,International Journal of
Medical, Health, Biomedical, Bioengineering and Pharmaceutical
Engineering ,Vol:8, No:2,2014
[4] https://sleepfoundation.org /sleep-topics/drowsy-driving
[5] S.Thulasi Prasad1, Dr. S. Varadarajan“Heart rate detection using Hilbert
transform “IJRET: International Journal of Research in Engineering and
Technology Volume: 02 Issue: 08 | Aug-2013
[6] Mr. Raees Ahmad , Prof. J. N Borole “Drowsy Driver Identification using
eye blink detection”, International Journal of Computer Science and
Information Technologies, Vol. 6(1), 2015
[7] Hussain A. Jaber AL-Ziarjawey and IlyasÇankaya “Heart Rate
Monitoring and PQRST Detection Based on Graphical User Interface with
Matlab”, International Journal of Information and Electronics Engineering,
Vol.5 No. 4, July 2015
[8] S. ThulasiPrasad, Dr. S. Varadarajan “Heart rate detection using Hilbert
transform “IJRET: International Journal of Research in Engineering and
Technology Volume: 02 Issue: 08 | Aug-2013
[9] NishuSingla “Motion Detection Based on Frame Difference Method”
International Journal of Information & Computation Technology, Volume
4, Number 15 (2014).

941

You might also like