Sleep detection alarm
Automatically set an alarm when a person falls asleep, anytime, anywhere, designed to turn it on at the set time, and game to end the alarm to wake up properly.
Usually, alarms determine the time you wake up, but they don't determine the time you sleep. If you feel sleepy while working or studying, I judged that it would be efficient to wake up for a while and proceed with what you were doing. However, the goal was to develop an automatic alarm because it is unpredictable to fall asleep while working or studying. Because the conditions of the working environment are diverse, histogram equalization is used to maintain constant brightness even in dark or bright places, and the actual person sleeps, and the time of sleep is judged, an alarm is created, and the game is ended.
If you fall asleep after turning on this program at the place where you work, it can relieve your fatigue for a while and increase your work efficiency by not sleeping more than necessary. If the time setting is shortened in a driving situation, the effect of an alarm that prevents you from falling asleep may be enjoyed.

#include <D:\\sohwi\\dlib-19.24\\dlib\\image_processing\\frontal_face_detector.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\image_processing\\shape_predictor.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\image_processing\\render_face_detections.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\image_processing.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\gui_widgets.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\image_io.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\array2d.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\opencv\\cv_image.h>
#include <D:\\sohwi\\dlib-19.24\\dlib\\image_transforms.h>
dlib::deserialize("shape_predictor_68_face_landmarks.dat") >> sp;