Progress Report Development of a Driver Alert System for Road Safety
Jan 04, 2016
Progress Report
Development of a Driver Alert System for Road Safety
Martin Gallagher
4th Year Electronic Engineer
Today's Progress Report
1. Progress Completed to Date 1. Software
1.1 Hough Transform
1.2 Eye Detection Algorithms
2. Hardware
2.1 Pressure Sensors
2. Outline of plans of work to be completed.
2.1 Time Line
Software1.1-Hough Transform
Previously I had been
using a Function by Kevin
Chawke, to detect both
eyes the transform had to
be ran twice, the code
relied on loop and this
caused the function to be
slow to implement for the
purposes needed
Software
Using a transform available on the Mathworks website I have been able to detect circular areas of interest in pictures and test video
Raw Image with Circles Detected (center positions and radii marked)
100 200 300 400 500 600
50
100
150
200
250
300
350
400
450
050
100150
200250
0
50
100
150
0
100
200
300
400
3-D View of the Accumulation Array
Software
The function works by:
1. Taking in a greyscale image
2. Building an accumulation array by calculating the “gradient” and “magnitude of gradient” of the pixels
3.Combining the results of the pixel voting with the array.
The function also computes the local maxima and minima to find the centre of the circles and returns them as a Nx2 array called circen containing the X and Y co-ordinates respectively.
Returned also are the radii of the circles in a Nx1 array called cirrad
Software
1.2 Eye Detection AlgorithmOnce Circen and Cirrad have been returned there will usually be a surplus of circles detected. Filtering out these surplus due to geometric characteristics of eyes should yield a stable performance 1. The Iris should be the same or similar size2. Eyes are a fixed distance apart3. Angle between eyes and X plane should not
be extremely great
Eye Detection Algorithm
• Shown is a sample of circles of 3 radii and in different locations.
• Applying the characteristics described
Pairing Circles of similar radius
• Pairing the circles of similar radii we see there are 7 pairs.
1,2 &3 are of radius 5
4 & 5 are of radius 7
and 6,7 & 8 are of radius 10
Excluding those outside distance range
• As the eyes are of a fixed distance apart and should only vary if the subject turns their heads. Pairs whose distance apart lies outside the max distance allowed are removed from the search.
Excluding those pairs at large angles
• If the driver is vigilant and conscious their eye level should be relatively flat and not of angles greater than 45°
Problems with software
• This picture shows both eyes being detected and are highlighted in blue.
• Lighting plays a major
in the detection as shadow will cause error in the detection process
Raw Image with Circles Detected (center positions and radii marked)
100 200 300 400 500 600
50
100
150
200
250
300
350
400
450
Solution
• Should only one eye be detected the transform will be applied to an area each side of the eye at lower threshold levels to compensate for shadow.
Raw Image with Circles Detected (center positions and radii marked)
100 200 300 400 500 600
50
100
150
200
250
300
350
400
450
Raw Image with Circles Detected (center positions and radii marked)
100 200 300 400 500 600
50
100
150
200
250
300
350
400
450
2.Hardware
• 2.1 Pressure Sensors
These will be used to monitor the drivers grip on the steering wheel.
They consist of 2 flexible
substrates, with printed electrodes and semiconductor material sandwiching in a spacer substrate.
Diagram from FSRguide
Pressure Sensors
• The conductance is plotted vs. force (the inverse of resistance 1/r).This format allows interpretation on a linear scale. For reference, the corresponding resistance values are also included on the right vertical axis.
Diagram from FSRguide
Work to be completed
• The Majority of the Matlab code
should be running and testing by the
24th Jan - Running live video
- The pick eyes function running
- Sensor code implemented
Work to be completed
31 Jan - Combine all these data inputs into a testable programme.
21 Feb – Transfer some modules of the code onto a microprocessor.
Questions?