250 likes | 404 Views
Driving Alarm System. Team 14 Vivian Liu Eric Tsai. Driving Alarm System. Purpose – To design an alarm system that will assist drivers who cannot focus on the road. Motivation – Everyone has experienced near accidents because of a few seconds of negligence. Initial Ideas.
E N D
Driving Alarm System Team 14 Vivian Liu Eric Tsai
Driving Alarm System Purpose – To design an alarm system that will assist drivers who cannot focus on the road Motivation – Everyone has experienced near accidents because of a few seconds of negligence
Initial Ideas • Measure reflected light from the retina • Determine if eye is closed or not focused on the road • Have 2 cameras operate independently • Capture 2 different images of the head • Hao Tang suggested 3D reconstruction • Use Active Appearance Model to detect facial features • Reconstruct 3D coordinates for each facial point
Objectives • Develop an algorithm that can isolate the ear and nostrils • Needs to be fast and reliable • Cannot hinder the driver • Track the facial points to monitor head position • Design a circuit to generate a beeping noise • Only start beeping when the software sends signal
Canny Algorithm • Developed by John F. Canny • Algorithm to detect a wide range of edges in an image • Should mark as many real edges as possible • The marked edges should be as close as possible to the real edge • Two threshold parameters used to generate the set of edges • Higher of the two is used to find the initial segments of strong edges • Lower one used to link the edges • Too high can cause the algorithm to miss important information • Too low and irrelevant information will be tagged
Detecting Nostrils • Use Canny Algorithm to convert the frame into a binary image of edges • Use higher threshold to filter out background images • Attempt to fit ellipses around each set of edges • Approximate the ellipse with least squares method given a set of 2D points • Parse through the different ellipses to determine which 2 cover the nostrils • Determine based on the length of the major and minor axis of the ellipses • Take advantage of the face’s symmetry to filter out bad points
Detecting the Ear • Apply the same method as detecting the nostrils • Attempt to isolate the ear canal though any part of the ear will do • Take advantage of the small elliptical shape of the canal • Restrain the ear to be near the center of the screen to aide in detection
Lucas-Kanade Method • Two frame differential method for optical flow estimation • Optical flow : pattern of apparent motion of objects, surfaces, and edges • Still very popular • Attempts to find correlations between adjacent frames • Generate vector field showing where each pixel has moved from time t to t+δt • Use partial derivatives with respect to spatial and temporal coordinates • Assume the pixels locally flow at a constant rate
Alarm Circuit • Only generate sound when a +12V signal is received from the serial port • Voltage regulator will force the output voltage to be 5V so the PIC won’t burn out • The PIC is programmed to play a repetitive note (C)
Communicating with the PC • 9-pin serial port allows the PC to send signals to the PIC • Output signal is either at ±12V • Software will send a high signal when the timer reaches 3 seconds • Continue sending high signal until head position is within acceptable range • Diode will block the -12V output
Testing Procedures • Make sure program can isolate facial features • Test the conditions for head tilting and nodding • Check if PIC can generate sound • Measure output voltage of serial port, try to switch to high through software
Successes • Software was able to isolate key facial points • Tracking the facial points was mostly satisfactory • Good constraints for determining alertness • Capable of communicating with the alarm circuit • Alarm circuit generated annoying noises
Improvements • Need to increase the frequency of a successful isolation • Determine good conditions on when to automatically recalculate the position of the facial points • Filter out unnecessary background images to allow for use in any environment • Depth perception • Alertness conditions will vary based on the distance of the face from the camera
Special Thanks • Professor G. Swenson • Professor T. Huang • Professor J. Coleman • Tomasz Wojtaszek • Hao Tang • Yuxiao Hu • Xingdou Fu