0% found this document useful (0 votes)
25 views8 pages

Vehicle Accident Prevention System by Detecting Drowsy Driver Using Matlab

Life is a previous gift. Every year thousands of people lose their lives in accidents. Human factors such as drowsiness play a key role. A survey detail shows that 43.9% people lost their lives in accidents and out of it 35.7% accidents are due to drowsiness or fatigue of the driver. Up to 70% of such accidents result in death or serious injury. The main cause of fatigue is sleeplessness or insomnia.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views8 pages

Vehicle Accident Prevention System by Detecting Drowsy Driver Using Matlab

Life is a previous gift. Every year thousands of people lose their lives in accidents. Human factors such as drowsiness play a key role. A survey detail shows that 43.9% people lost their lives in accidents and out of it 35.7% accidents are due to drowsiness or fatigue of the driver. Up to 70% of such accidents result in death or serious injury. The main cause of fatigue is sleeplessness or insomnia.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 8

10 VI June 2022

https://doi.org/10.22214/ijraset.2022.44526
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

Vehicle Accident Prevention System by Detecting Drowsy


Driver Using Matlab
K. Rojamani1, V. Devi Naga Sree2, B. Yamini3, T. Yashwanth Varma4
1
Assistant Professor, Dept of ECE, Krishna University College of Engg & Tech, Machilipatnam, AP, India
2, 3, 4
UG Student, Krishna University College of Engg & Tech, Machilipatnam, AP, India
.
Abstract: Life is a previous gift. Every year thousands of people lose their lives in accidents. Human factors such as drowsiness
play a key role. A survey detail shows that 43.9% people lost their lives in accidents and out of it 35.7% accidents are due to
drowsiness or fatigue of the driver. Up to 70% of such accidents result in death or serious injury. The main cause of fatigue is
sleeplessness or insomnia. The major reason for fatigue is due to long journey for many hours, sleeplessness, restlessness, stress
and many other factors. Hence the main goal of this project is to detect the drowsiness of the driver and alert if he/she is drowsy.
The image of the driver is acquired and then face is detected from image and then eyeball movement of the driver is observed
using Viola Jones algorithm.
Keywords: Viola Jones algorithm, Vision cascade object detector, Haar-feature, AdaBoost, Cascade classifiers

I. INTRODUCTION
According to World Health Organisation (WHO) every year the lives of approximately 1.3 million people are lost as a result of a
road traffic accidents. Road accidents leads to death or severe injuries which cannot be recovered back for life time. They lead to
permanent disabilities. Road accidents causes a lot of economic losses. One accident causes an entire family to suffer. Loss of a
person cannot be recovered, also if a person survives with disabilities a person has to take care of the affected.
Drowsy driving, also called as driver fatigue and tired driving is known as controlling the automobile while feeling sleepy. There
are many causes for a driver drowsiness such as tiredness and stress due to work, sleeplessness, driving for long hours etc. 35.7% of
the total accidents are caused due to drowsy driving. According to a survey 27% of drivers report feeling tired and to keep eyes open
and 1 in 25 drivers agree feeling drowsy while driving.
II. OBJECTIVE
Driver safety in the car is one of the most wanted system to avoid accidents. Our objective of the project is to ensure safety system.
For enhancing the safety we are detecting the eye blinks of the driver and estimating the driver status by using Viola Jones
algorithm and alerting the driver in case of no face detection or eyeball movement. This warning message helps the driver to
concentrate on driving and have a safe journey.
III. PROPOSED WORK
In this project work digital image processing (DIP) techniques are used to process the image acquired and the computer vision
toolbox which includes a function vision.CascadeObjectDetector( ) is used to detect the features of human face in Matlab. The
function vision,CascadeObjectDetector( ) in Matlab is used to detect the human face and its features is based upon the Viola Jones
algorithm.

A. Flow Chart

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 4721
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

1) Image Acquisition: A web camera is placed facing the driver and it acquires live image of the automobile driver. The colour
image is converted into gray scale by using rgb2gray( ), an inbuilt function of Matlab.This image is further processed to detect
eye ball movement.
2) Diving into frames: After acquiring the image this image is divided into individual frames. And each frame is divided into a
group of blocks. Out of the entire image the face part is extracted based on number of pixels and it is evaluated for eye
detection.
3) Face Detection & eye Detection: For every time interval ‘t’, face is detected and further divided into frames for the detection of
eye. imfindcircles( ), a function in Matlab detects circular objects (with strong and weak edges) from image captured whose
radii specified are approximately equal to radius
4) Eye Ball Movement Detection: Using vision cascade techniques based on the number of white and black pixels in the image the
eye is detected and from the radius range of the eye ball specified, the presence or absence of the eye ball can be determined.
5) Determining the direction of eye ball: The direction of eye ball movement can be determined from the direction of pupil and
iris from the eye of automobile driver. The direction straight, left or right will be indicated if the eyes are open. And if the eyes
are detected to be closed an alarm sound is indicated to alert the driver.

IV. VIOLA JONES ALGORITHM


Viola Jones algorithm is derived from the names of two computer vision researchers Paul Viola and Michael Jones who proposed
the paper “Rapid Object Detection using a Boosted Cascade of Simple Features” in the year 2001.
Viola Jones algorithm is the most efficient for real time face detection and is proved to be fast and accurate system for detecting
facial features. This algorithm divides the input image into a various number of subregions and studies from it. This algorithm can
also detect multiple faces from the images.
The Viola Jones algorithm involves four main steps:
1) Selecting Haar-like structures
2) Creating an integral image
3) Running AdaBoost training
4) Creating classifier cascades

A. Haar-Like Features
Alfred Haar, a Hungarian mathematician gave the concepts of Haar wavelets, which are a sequence of rescaled “square-shaped”
functions.
Haar-features are digital image features used for face detection. As humans contain lighter and darker regions at various parts of
their face that indicates organs. Haar-structures are used to identify lighter and darker regions of the face by summing up the number
of pixel values in the image and comparing them. The sum of the darker pixels is smaller than the sum of the lighter pictures.

There are three types of haar-features:


1) Edge features
2) Line features
3) Four-sided features

 Edge Features

Edge features are useful for detecting edges in the face

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 4722
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

 Line Features

Line features are useful for detecting lines in the face


 Four-sided Features

The four-sided features are used for finding diagonal features in the face

B. Integral Image
The disadvantage of haar-feature it is difficult to calculate haar-features as the number of pixels in the larger features are huge. This
problem can be overcome by crating integral images.
Integral image is an easy way to calculate sum of pixel values in a image or rectangular part of image. The value at each point is
obtained by the sum of all the pixels above the value, the value of the pixel and pixels which are to the left of the value.

For example:

The value 21 in the integral image is obtained by the sum 5+3+7+6.

C. Adaptive boosting(AdaBoost)
AdaBoost is technique or a training process that decides which features are to be used and which features can be eliminated for
detecting the faces in the images.
The AdaBoost runs all the subregions of an image for checking the performance of the classifier. Subregions that produce strong
response in the classifier are treated as ‘positives’ and the subregions that produce weak responses are treated as ‘negatives’.
The ‘positives’ indicate the presence of the face and the ‘negatives’ indicate absence of the face.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 4723
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

D. Cascading Classifiers
The AdaBoost identifies the strong classifier and weak classifier based on its performance and assigns weights based on the
performance (best classifiers with more weight). The weak classifiers are cascaded in order to become a strong classifier.

When the subregion is applied as input to first classifier it checks for the presence of face features if it is detected to be face, the
output is treated as ‘maybe’ (true) and this subregion is applied as input to next classifier. If the classifier does not detect the face
then the output is ‘no’ (false) and the subregion is discarded.
Cascading classifiers are used for the faster detection of facial features.

V. VISION CASCADE OBJECT DETECTOR


The vision.CascadeObjectDetector( ), is an inbuilt function in Matlab that can be installed from computer vision toolbox. It uses
Viola Jones algorithm to detect human’s face, nose, eyes, ears or upper body.
To detect face or upper body from an image in Matlab:
1) Create a vision.CascadeObjectDetector object and set its properties
2) Call the function along with the arguments.

VI. RESULTS
A. Detetion Of An Opened Eye
1) Eye Balls in Forward Direction: If the direction of eye balls is detected to look forward or straight then it is indicated by up
arrow.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 4724
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

2) Eye Balls Facing Towards Left: If the direction of eye balls is detected to look left side then it is indicated by left arrow.

3) Eye balls facing towards right: If the direction of eye balls is detected to look right side then it is indicated by right arrow.

B. Detection Of Closed Eye


If the eye is closed or if the camera cannot detect the face of automobile driver or if there is an obstacle between face and camera
closed eye symbol is indicated and also an alarm is triggered to alert the automobile driver.

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 4725
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.538
Volume 10 Issue VI June 2022- Available at www.ijraset.com

VII. CONCLUSION
Many accidents occur due to fatigue or drowsiness of the driver, Viola Jones algorithm is implemented in Matlab to detect the
condition of the driver whether the driver is drowsy or not. In this project the condition of the driver is verified for every time period
continuously and all the conditions verified to be accurate.
If the driver is detected to be drowsy an alarm is set to ring for a minute continuously to alert the driver and focus on driving, so as
to prevent from occurring of the accidents.

VIII. FUTURE WORK


As an alarm is included in the project to make the driver focused this can be a temporary way to avoid drowsiness and the driver
may feel drowsy after some time.
In future scope when an automobile driver is detected to be drowsy the car can be controlled to automatically shift to park at a safe
place at side of the road and automatic engine locking system can be implemented. In addition to this the driver cannot access the
controlling of the car until the driver is detected to be non-drowsy for 10 minutes.

REFERENCES
[1] P. Viola and M. J. Jones, Robust real-time face detection, International Jour nal of Computer Vision, 57 (2004), pp. 137{154
[2] Rapid Object Detection using a Boosted Cascade of Simple Features https://web.iitd.ac.in/~sumeet/viola-cvpr-01.pdf
[3] Hands-On Machine Learning with Scikit-Learn, Keras, and TensorFlow: Concepts, Tools, and Techniques to Build Intelligent Systems by Aurelien Geron
[4] General framework for object detection; CP Papageorgiouetal. https://www.researchgate.net/pub lication/3766402_General_framework_for_object_d etection
[5] www.mathworks.com
[6] https://www.mygreatlearning.com/blog/violahttps://www.mygreatlearning.com/blog/viola-jones-algorithm/jones-algorithm/
[7] Breaking Down Facial Recognition: The Viola-Jones Algorithm https://towardsdatascience.com/thehttps://towardsdatascience.com/the-intuition-behind-facial-
detection-the-viola-jones-algorithm-29d9106b6999intuition-behind-facial-detection-the-violahttps://towardsdatascience.com/the-intuition-behind-facial-
detection-the-viola-jones-algorithm-29d9106b6999jones-algorithm-29d9106b6999
[8] Face detection as done in 2001: Viola Jones
[9] Algorithm
[10] https://iq.opengenus.org/face-detectionhttps://iq.opengenus.org/face-detection-using-viola-jones-algorithm/using-viola-jones-algorithm/

©IJRASET: All Rights are Reserved | SJ Impact Factor 7.538 | ISRA Journal Impact Factor 7.894 | 4726

You might also like