36
Final Year Project Report 2006-2007 Martin Gallagher 4 th Year Electronic Engineer

Final Year Project Report 2006-2007

  • Upload
    oya

  • View
    70

  • Download
    0

Embed Size (px)

DESCRIPTION

Final Year Project Report 2006-2007. Martin Gallagher 4 th Year Electronic Engineer. Development of a Driver Alert System for Road Safety. Today's Report. Initial Specification Background Development of Project - Software and Hardware Development Issues Results. - PowerPoint PPT Presentation

Citation preview

Page 1: Final Year Project Report 2006-2007

Final Year Project Report2006-2007

Martin Gallagher

4th Year Electronic Engineer

Page 2: Final Year Project Report 2006-2007

Development of a Driver Alert System

for Road Safety

Page 3: Final Year Project Report 2006-2007

Today's Report

• Initial Specification

• Background

• Development of Project

- Software and Hardware

• Development Issues

• Results

Page 4: Final Year Project Report 2006-2007

Initial Specification

1. Purpose of project to investigate the development of a system for detecting the likelihood that the driver is about to fall asleep

1.1 Sound alarm should this occur

Page 5: Final Year Project Report 2006-2007

Initial Specification

2. System primarily based on a small camera based on the dashboard

2.1 It will be used to “track” drivers eyes

2.2 Attempt to determine if driver falls asleep

Page 6: Final Year Project Report 2006-2007

Initial Specification

3. Enhance reliability of the system by making use additional sensor devices.

4. Initial algorithm development will be carried out in MATLAB, with the intention of porting some of the functionality to a suitable embedded system.

Page 7: Final Year Project Report 2006-2007

Initial Proposal

Using MATLAB as a development tool develop the basic functionality of the system with the Hough Transform as the basis for the detection of the eyes.

Page 8: Final Year Project Report 2006-2007

Description of Hough Transform

It is a method used to detect shapes in a digital image. There are a number of versions used to detect different shapes but all follow the same core principals

The circular version was used in this situation to detect the iris in the eye

Page 9: Final Year Project Report 2006-2007

Description of Hough Transform

Page 10: Final Year Project Report 2006-2007

Description of Hough Transform

The Circular Hough Transform uses the intersection of right cones to accumulate votes at a point.

This accumulation of votes corresponds to a centre point.

From this circular objects can be extracted from images.

Page 11: Final Year Project Report 2006-2007

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

Page 12: Final Year Project Report 2006-2007

Problems with software

• This picture shows both eyes being detected and are highlighted in blue.

• Lighting plays a major role as shadow can causes 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

Page 13: Final Year Project Report 2006-2007

Eye Detection Algorithm

Once the Hough transform has been applied there are usually a surplus of circles detected.

Filtering out these surplus due to geometric characteristics of eyes yields an increased stability in performance

Page 14: Final Year Project Report 2006-2007

Pick Eyes ExampleStep 1. Capture Frame

Page 15: Final Year Project Report 2006-2007

Pick Eyes Example

Step 2. Crop Frame

Page 16: Final Year Project Report 2006-2007

Pick Eyes Example

Step 2. Crop Frame

Page 17: Final Year Project Report 2006-2007

Pick Eyes Example

Step 3. Convert Frame to Grayscale

Page 18: Final Year Project Report 2006-2007

Pick Eyes Example

Step 4. Adjust Frame to improve image for processing

Page 19: Final Year Project Report 2006-2007

Pick Eyes Example

Step 5. Apply Hough Transform to frame

Page 20: Final Year Project Report 2006-2007

Pick Eyes Example

Circles are detected and shown in this image

Step 5. Apply Hough Transform to frame

Page 21: Final Year Project Report 2006-2007

Pick Eyes Example

Step 6. Apply pickEyes function to frame

Page 22: Final Year Project Report 2006-2007

Step 6.1 These are pixels close to the white end of the spectrum (255)Step 6.1 Remove points with

high index values.

Pick Eyes Example

As this is image is quite dark, with the highest index value of 75. No points are removed at this stage.

Page 23: Final Year Project Report 2006-2007

Pick Eyes Example

Step 6.2 Match points of similar radius

Page 24: Final Year Project Report 2006-2007

Step 6.3 Apply Distance Condition

Remove sets that lie outside Maximum width and inside Minimum

Pick Eyes Example

Page 25: Final Year Project Report 2006-2007

Pick Eyes Example

Step 6.4 Apply angle test to points

Remove points that lie at a greater angle to the X axis than specified.

Page 26: Final Year Project Report 2006-2007

3.Within specified angle limits

2.Within specified distance limits

Pick Eyes Example

Step 6.5 Remaining points should be:1.Similar in Radius

Page 27: Final Year Project Report 2006-2007

Step 6.6 Original Image highlighted

Upper Threshold

Lower Threshold

Current Image frame

Next Image frame

Eyes

Pick Eyes Example

Page 28: Final Year Project Report 2006-2007

Hardware

• Camera

• Pressure Sensors

1. FSR’s

2. ADuC 8031 Development Board

Page 29: Final Year Project Report 2006-2007

CameraThe camera used is a standard CMOS desktop web cam.

The resolution of 640x480 pixels was chosen so as to get adequate images and allow for speedy computation.

Page 30: Final Year Project Report 2006-2007

Pressure SensorsThese will be used to monitor the drivers grip on the steering wheel. The Force Sensitive Resistors consist of 2 flexible substrates, with printed electrodes and semiconductor material sandwiching in a spacer substrate.

Diagram from FSRguide

Page 31: Final Year Project Report 2006-2007

Pressure SensorsThe 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

Page 32: Final Year Project Report 2006-2007

Pressure Sensor Circuit

The FSR’s are arranged in a voltage divider circuit. This involved placing the FSR’s in series with a known resistance and measuring the voltage across it while the FSR’s vary with pressure.

FSR1 FSR2

100Ω

9V

V

Page 33: Final Year Project Report 2006-2007

ADuC 8031

• The Analog Devices product, the ADuC831 was chosen for this project as it provided the embedded system functionality described in the initial specification. Its core consists of an 8052 Microcontroller which provides the necessary processing power to compute the demands made on it by the requirements of this project.

Page 34: Final Year Project Report 2006-2007

ADuC 8031

• The ADuC 8031 is used to sample the data coming from the pressure sensors. The data is sampled and transferred to the PC via the serial port.

• The signal is converted to 12bits . This is too sensitive so the data is adapted to give 25 levels, approximately 0-2.5v. The ASCII value of the levels is sent to MATLAB to determine Driver grip of the steering wheel

Page 35: Final Year Project Report 2006-2007

Results

• Using the MATLAB environment to integrate the components of this project I have been able to develop a system that monitors both visual clues from the Driver and auxiliary data from pressure sensors.

• The program processes a frame of image data and numerous pressure sensor readings per loop.

Page 36: Final Year Project Report 2006-2007

Results

• This allows system to grade the data and trigger a response if the data values fall below defined threshold levels.