This study develops a real-time drowsiness detection system based on grayscale image
processing and PERCLOS to determine if the driver is fatigued. The proposed system comprises three
parts: first, it calculates the approximate position of the driver’s face in grayscale images, and then uses
a small template to analyze the eye positions; second, it uses the data from the previous step and
PERCLOS to establish a fatigue model; and finally, based on the driver’s personal fatigue model, the
system continuously monitors the driver’s state. Once the driver exhibits fatigue, the system alerts the
driver to stop driving and take a rest.