You are on page 1of 5

Driver Fatigue detection and warning system using

machine vision
Sohail Azmat and Massab Javed
Department of electrical engineering, HITEC university Taxila cantt, Pakistan, July
2014

ABSTRACT
This project presents a vision-based real-time driver fatigue detection system for
driving safety. Based on Voila & Jones Algorithm in MATLAB, the drivers face is
located from a color video captured by webcam in laptop. Then, same algorithm is
employed to locate the regions of the drivers eyes, which are used as the
templates for eye tracking in subsequent frames. Finally, the tracked eyes
images are used for fatigue detection in order to generate warning alarms for
driving safety. To track the eye blinking, convert RGB color map to HSI color map.
Black ball within eye has approximately 0.00 to 0.08 saturation value. When the
black ball detected then the eyes are open. When no black ball detection occurs
for 5 frames then system start alarm. The car running at 100 km/h will cover 83
meter in 3 seconds. The driver can itself set the waiting time. The proposed
system was tested on a Core(TM) I3 2.4 GHz Laptop with 1 GB RAM. The
experimental results seemed quite encouraging and promising. But the results
are not fully accurate. Some false detection also occurs due to low resolution
camera. The system check the Black ball in eye, which size and color may differ
man to man. System could reach 2 frames per second for eye tracking.
Key words: Face and eye detection, Eye blinking detection, fatigue detection,

1. INTRODUCTION
There is rapid growth in technology from
last two decades which comfort human
life. Technology has made our tasks

easy, more efficient and to understand


the world better. People live their life
with luxury and even cannot imagine
living without technology. Technology
has

save

our

time

we

can

flew
i

anywhere in world. It is technology when

car crashes it increase our chance of

we fulfill shortage of resources by

survival. The function of seat belt is

recycling waste material or to find

holding the passenger in place instead

another

desired

of flying in forward direction when

resources. We believe in technology

automobiles stop suddenly. Traffic lights

and also support it but to some extent.

and signs have also vital role to prevent

Simply

without

road accidents, traffic signs and lights

technology. In our country there are

are mostly used at road interchange,

many problems and have their specific

pedestrian crossing and other public

clarifications. One of the major problems

areas.

is road accidents. It becomes a serious

Driver drowsiness is main cause of road

problem for society thousands of people

accidents while driving. This thesis is

die and injured every year. There are

based to overcome the drowsy driver

many causes of road accidents but the

problem. Drowsiness also occurs at day

main

is

time but increase in darkness, when

negligence and underage driving. Driver

less traffic or in area having less road

planet

we

cause

having

cannot

of

survive

road

accidents

drowsiness is also significant factor in

junctions. When driver is spoiled by

road accidents when driver is unable to

drowsiness then his ability to drive,

focus and pay his full attention. Many

make decisions is effected badly and in

precautions are taken to avoid road like

this case the chances of accident

seat belts, traffic signs and lights, speed

increases. Driver may be drowsy due to

breakers and many other safety factors

tiredness or have any other resign it not

to overcome road accidents but still not

only affected society but also put all

completely fruitful outcomes. Speed

road users in danger.

breakers are mostly used on roads of


greater importance near school areas,
railways stations, colonies and hospitals
to slow down vehicles speed to avoid
road accidents. The most important
safety feature in vehicle is use of seat
belts in case of deadly accidents and

The basic aim of this project is to


develop such algorithms which detect
driver

fatigue

level

by

eye

state

estimation whether eyes are closed or


open in real time. This system will use
small security camera focusing on driver
from which we will detect driver face
2

then from driver face we will extract his

Next sections are organized as, section:

eyes then by monitoring his eyes

continuously to detect driver fatigue as

technique.

early to avoid road accidents.

blinking technique and alarming system.

Basic three steps are followed to detect

Section: 4 is of conclusion and future

driver fatigue; firstly take image of

work.

particular person from camera which


may be webcam or any other camera.
As image will contain head facing the
camera and background [1], use the
face detector to extract the eyes in
frame. While in second step frame the
detected eyes now pay full focus on eye
state estimation. In last step contains

explain

face

and

Section:

eye
3

detection

explain

eye

2. Face and Eye Detection


A built in function in Matlab is used for
face and eye Detection. The function is
vision.CascadeObjectDetector [3]. This
function is belonging to Matlab vision
library. This function based on Adaboost
algorithm. The Adaboost algorithm is
explained by Voila & Jones [2].

continuously monitoring eyes and will


check whether eyes are open or closed

This function is uses for detection of

then according to situation buzzer will

different parts of body, like face, eyes

alarm.

nose, lips, and upper body. Actually the


voila &

The Flow chart is given below.

Jones [6] work on Facial

detection and recognition. By applying


viola and jone algorithm, at the end a
vector of strong classifiers is obtained.
In processing by using these classifiers
the face is detect in image.
Again

perform

parameters

above

of

task

the

but

function

vision.CascadeObjectDetector
changes. As mentioned above that this
function

based

on

voila

&

jones

algorithm of ada boost. And the ada


boost is algorithm of face detection and
3

recognition. So this function performs

extract eyes of driver, from eye state

face detection by default. So if the

estimation continuously check whether

parameters changed for eye detection,

driver is drowsy of not. This application

the function just change the rectangle

is limited to driver fatigue detection to

positions. Use following function for eye

warn driver, in future this application can

detection

be developed more by additional work

vision.CascadeObjectDetector

which will more comfort driver in their

(EyepairBig) [3]

drowsiness detection. One of most

3. Eye Blinking Detection

favorable option is to make android


application

for

hand

held

devices.

For eye blinking detection, initially crop

Fatigue detection application can be

the detected eyes then separate them

made better by additional work, after

and use only one eye for further

driver fatigue is detection and buzzer is

process. Convert RGB image to HSI

alarmed then till driver drowsiness this

scale and make histogram equalization.

application also control vehicle. This

Then convert back to RGB image. Invert

application can be made more beneficial

the image. Now convert RGB to HSV

in future to detect face expression like

scale and use only Saturation plane for

smiley face, aggressive, anger and

further process. The retina value in S

which will prove helpful in interviews and

plane is approximately 0 to 0.1 observed

Psychological test.

experimentally. Use ROI function to


separate retina. Use circle command to

ACKNOWLEDGMENT

detect retina [4]. If the retina is detected

Acknowledgement is due to HITEC

the eyes are open if not eyes are close.

University Taxila Cantt, Pakistan for

4. Conclusion
In this project driver fatigue detection

support of this Project.

References

system application is designed and

[1] Sandra Trejo Guerrero, Model-

driver drowsiness can be detected

Based Eye Detection and Animation.

easily using this application. To detect

Master thesis, Sweden: LINKOPING

driver fatigue

University, June 2006

first captured face of

driver from running video than from face


4

[2] P. Viola and M. J. Jones, "Robust

Registration and Stereo Vision > Image

real-time

Registration

face

detection,"

Int.

J.Computer Vision, vol. 57, no. 2,

[4]

pp.137-154, 2004.

http://blogs.mathworks.com/steve/2012/

[3] 1994-2013 The Math Works, Inc.

09/04/detecting-circular-objects-in-

Computer Vision System Toolbox >

images

You might also like