Driver Monitoring Algorithm For Advanced Driver Assistance Systems
Driver Monitoring Algorithm For Advanced Driver Assistance Systems
(to locate the eyes region) and weighted matrix sum (to
Abstract —Fast expansion of Advanced Driver Assistance detect the iris).
Systems (ADAS) market and applications has resulted in a
high demand for various accompanying algorithms. In this II. RELATED WORK
paper we present an implementation of Driver monitoring Detection of driver’s fatigue level represents one of the
algorithm. Main goal of the algorithm is to automatically most researched topics when it comes to ADAS
asses if driver is tired and in that case, raise a proper alert. It applications [5]. In general, there are few different
is widely used as a standard component of rest approaches. First one combines readings from multiple
recommendation systems. Our approach is based on
combination of computer vision algorithms for face detection
sensors that are attached to driver. Conclusions are drawn
and eyes detection. Additionally, we have tested our using a fusion of collected data. For example, researchers
implementation in controlled environment on a real ADAS have used heart rate measurements for this purpose [7].
platform board. Some may found usage of sensors too intrusive for real
Keywords — Advanced Driver Assistance Systems, driver world use case. As often used alternative, driver is
monitoring, eyelid detection, face detection recorded with some camera equipment and computer
vision algorithms are applied in order to detect where the
I. INTRODUCTION driver is looking and if he/she pays attention to the road.
Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 12,2023 at 11:18:17 UTC from IEEE Xplore. Restrictions apply.
distinction to guide us, we constructed another weight
matrix with values vertically progressing from center of
matrix to the top and bottom. It should be clear that this
matrix is applied on top of eye center pixel which lies in
middle (Fig. 8). Additionally, matrix width is reduced by
50% (25% on each side) in order to eliminate border noise
(Fig. 8). As well as previously presented concentric matrix,
this matrix was also normalized.
1 1 1 1 1 1 1
1 1.25 1.25 1.25 1.25 1.25 1
1 1.25 1.56 1.56 1.56 1.25 1
1 1.25 1.56 1.95 1.56 1.25 1
1 1.25 1.56 1.56 1.56 1.25 1
1 1.25 1.25 1.25 1.25 1.25 1 Fig. 8. Second weighted matrix position
1 1 1 1 1 1 1
Fig. 5 Weight matrix, k=1.25, dimension = 7 D. Drowsiness score calculation
Final phase of described algorithm is calculation of
Matrix dimension must be odd number and it depends on
drowsiness score. Drowsiness score is value in range
eye region size. Coefficient k, used to calculate matrix
between 0 and 10. This range is divided into three
values, is empirically determined value. Before applying
intervals:
this matrix on surroundings of each pixel, we have done
one more matrix modification - normalization. This means x 0-3 low
that we have divided each element of matrix with sum of x 3-7 medium
initial matrix that is not normalized (Fig. 6). Total sum of x 7-10 high
all coefficients in normalized matrix equals 1. New score is calculated based on previous score
PrevScore and output of face and eye detect phases for
0.0171 0.0171 0.0171 0.0171 0.0171 0.0171 0.0171 current frame.
0.0171 0.0214 0.0214 0.0214 0.0214 0.0214 0.0171 Difference between intervals is:
0.0171 0.0214 0.0267 0.0267 0.0267 0.0214 0.0171 x If PrevScore is in low interval, then score twice
0.0171 0.0214 0.0267 0.0334 0.0267 0.0214 0.0171 faster decreases than it rises
0.0171 0.0214 0.0267 0.0267 0.0267 0.0214 0.0171 x If PrevScore is in medium interval, then score
0.0171 0.0214 0.0214 0.0214 0.0214 0.0214 0.0171 decreases and rises at the same rate
0.0171 0.0171 0.0171 0.0171 0.0171 0.0171 0.0171 x If PrevScore is in high interval, then score twice
Fig. 6. Normalized weight matrix (from Fig.5.) faster rises, than it decreases
When score is in low interval, we can tell that driver is
For each considered pixel, weighted sum of its not distracted at all. In case of medium and high score,
ambience is calculated. When whole image has been driver is drowsy and system should eventually alert the
processed, iris should contain pixel for which the sum was driver.
minimal. Intuition behind algorithm is that we want to
punish more bright pixels near center of applied filter, then
pixels on the edge of filter. Moreover, these punishments IV. EVALUATION
should happen gradually because of fact that neighbor Described algorithm gives the best results if camera and
pixels are also very important for correctness of algorithm. light source are placed in front of the driver. Algorithm
When center of eye is determined, next task is to output used for verification of detected regions is shown in
deduce if eye is opened or closed. Again, our approach Fig. 9.
was associated with weight matrices. Let’s consider
grayscale image of closed eye for a moment. In the center
of this image we have a strong line of dark values that
correspond to eyelashes. However, when eye is opened,
such line cannot be established (Fig. 7). With this
Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 12,2023 at 11:18:17 UTC from IEEE Xplore. Restrictions apply.
The algorithm was not tested at night because it
requires infrared cameras which were not available at the
time.
V. CONCLUSION
In this paper we described one implementation of
driver monitoring algorithm, which is in early stage of
development. Implemented algorithm is not state of the art,
but we have achieved some solid results. There is more
than one way we can improve this algorithm:
(a) (b) x Using infrared cameras would give better input
images – we would have images with the same
illumination level, so light would not be a factor.
x Using advanced and more accurate methods for iris
detection which are based on Bayesian
classification of extracted features.
x Integration with data coming from the car itself,
like current speed, steering pattern etc.
x Creating more sophisticated drowsiness score
calculation scheme and testing it in actual vehicle.
First two ideas do not require usage of additional
(c) (d) equipment. Consequently, working on these ideas will be
Fig. 9. Algorithm output examples our first step. Upon successful completion of these steps,
further refinements can be implemented during the in car
Image (a) shows a case when a face is found, eyes are testing.
open and driver is looking ahead. In this case, drowsiness
score is decreasing depending on its current value. ACKNOWLEDGMENT
Image (b) shows that our algorithm also works well in This work was partially supported by the Ministry of
case when driver does not look ahead. It is natural for a Education, Science and Technological Development of the
driver to look left or right in order to check side mirrors or Republic of Serbia, under grant number: TR32041.
to address their attention to some other road event. It
should be clear that drowsiness score should not rise in this REFERENCES
case. [1] M. Aly, “Real time Detection of Lane Markers in Urban Streets” in
Image (c) shows driver with closed eyes and red IEEE Intelligent Vehicles Symposium, Eindhoven, The
rectangle shows that algorithm detected that eyes are not Netherlands, June 2008
[2] P. Dollar, C. Wojek, B. Schiele, and P. Perona, “Pedestrian
opened. This may be a serious problem if driver is
Detection: An Evaluation of the State of the Art” in IEEE
sleeping. However, it may be the case that camera took the Transactions on Pattern Analysis and Machine Intelligence
frame when they were blinking. No matter what happened (Volume: 34, Issue: 4, April 2012 )
drowsiness score will rise. [3] S. Hossain, Z. Hyder, “Traffic Road Sign Detection and
Image (d) shows case when driver turns head to some Recognition for Automotive Vehicles” in International Journal of
Computer Applications, Volume 120 - Number 24, 2015
side. In that case face detect algorithm will not find [4] H. Al-Absi, J. Devaraj, P. Sebastian, V. Yap, “Vision-based
driver’s face and that is sign that driver is not paying automated parking system” in 10th International Conference on
attention to the road. Not all rotations are sanctioned, Information Sciences Signal Processing and their Applications
whereas in this particular image head is completely turned (ISSPA), 2010
[5] Hang-Bong Kang, “Various Approaches for Driver and Driving
right. Of course, score that measures distraction will Behavior Monitoring: A Review” in Computer Vision Workshops
increase. (ICCVW), 2013 IEEE International Conference, 2-8 Dec. 2013.
The algorithm was tested on real ADAS platform [6] P. Viola, M. Jones, “Rapid object detection using a boosted
board. It works as real-time algorithm (about 20 frames per cascade of simple features” in Computer Vision and Pattern
Recognition, 2001. CVPR 2001.
second) with high level of accuracy. The main reason for [7] J. Vicente, P. Laguna, A. Bartra, R. Bailón, “Drowsiness detection
good driver monitoring performance is minimal impact of using heart rate variability” in Medical & Biological Engineering
wrongly classified frames due to high framerate and the & Computing, June 2016, Volume 54, Issue 6, pp 927–937
manner of drowsiness score calculation. The algorithm was [8] J. Kim, S. Kim, H. Jung, B. Lee, E. Chung, “Driver's Drowsiness
Warning System Based on Analyzing Driving Patterns and Facial
implemented only for demo purposes and detailed Images” in 23rd International Technical Conference on the
statistical evaluation will be part of future work. Enhanced Safety of Vehicles (ESV), 2013
Authorized licensed use limited to: PES University Bengaluru. Downloaded on October 12,2023 at 11:18:17 UTC from IEEE Xplore. Restrictions apply.