TSD 2024-Computer Vision For Real-Time Drowsiness Detection System
TSD 2024-Computer Vision For Real-Time Drowsiness Detection System
by Mirlinda Ebibi
& Artan Ebibi
Introduction
Overall system Algorithm
Methodology
System implementation
Face recognition
Road analyses
Conclusions, limitations, and future research
References
The dataset used by the algorithm includes images of eyes, faces, and
road conditions. By evaluating both the driver’s physical state and driving
behaviour, the system can detect signs of drowsiness and ensure the
driver is operating the vehicle safely
Mirlinda Ebibi, PhD 5
METHODOLOGY
The techniques used in this paper were helped by the OpenCV library of python by
using the methods below:
The capuring of the images would be done by a camera no lower than 8-megapixels. Access to
the camera inside the vehicle is made possible by cv2.VideoCapture(0).
The technique of this system for face detection and recognition will be the Haar Cascade. The
reason why this algorithm is one of the best choices is that it can run in real time.
Haar cascade uses the cascading window, and it tries to compute features in every window
and classify whether it could be an object. This method will use the light and shadow to detect
objects in images.
• Two-Rectangle Feature: This feature computes the difference between the sum of
pixels within two horizontally or vertically adjacent rectangular regions.
• Three-Rectangle Feature: Here, the sum within two outside rectangles is subtracted
from the sum within a center rectangle.
• Four-Rectangle Feature: This feature calculates the difference between diagonal
pairs of rectangles.
Image preprocessing:
For a more simple processing we can turn the images into greyscale. Smoothing it out
and reducing the noise is also essential. With the help of OpenCV functions an example
of the converted image will be as follows:
Non-maximum suppressison:
Non-maximum suppression is used to thin the detected edges.
Double threasholding:
The threasholding is used to classify the strength of the pixels.
Edge tracking by Hysteresis:
Hysteresis is a technique used in edge detection, notably in algorithms like Canny
edge detection. It employs two thresholds: a high threshold and a low threshold.
2. Weak Edges: Pixels with gradient values between the low and high thresholds are
labeled as weak edges. These are only considered edges if they are connected to strong
edges.
3. Noise Reduction: This method effectively minimizes noise by filtering out weak edges
that aren't linked to strong ones, preserving important features while eliminating less
relevant details.
By addressing both driver alertness and road awareness, this integrated approach aims to
significantly reduce accidents caused by drowsy driving, ultimately making roads safer for
everyone.
[1] National Highway Traffic Safety Administration (NHTSA). "Drowsy Driving and Automobile Crashes." [Online]. Available: NHTSA.
[2] OpenCV Documentation. "Open Source Computer Vision Library." [Online]. Available: OpenCV.
[3] P. Viola and M. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features," Proceedings of the 2001 IEEE Comp uter Society
Conference on Computer Vision and Pattern Recognition. CVPR 2001.
[4] F. Bergasa et al., "Real-time system for monitoring driver vigilance," IEEE Transactions on Intelligent Transportation Systems, vol. 7, no. 1, pp. 63 -77,
March 2006
[5] G. Eason, B. Noble, and I. N. Sneddon, “On certain integrals of Lipschitz-Hankel type involving products of Bessel functions,” Phil. Trans. Roy. Soc.
London, vol. A247, pp. 529–551, April 1955. (references)
[6] . Fleuret and D. Geman. Coarse-to-fine face detection. Int. J. Computer Vision, 2001.
[7] William T. Freeman and Edward H. Adelson. The design and use of steerable filters. IEEE Transactions on Pattern Analysis and Machine Intelligence
[8] Review on Drowsiness Detection, D. Khasim Vali
Any questions?
Mirlinda Ebibi, PhD 19