Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

22
Embedded Circle Fitting John Daly Supervisor: Martin Glavin

Transcript of Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Page 1: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Embedded Circle Fitting

John Daly

Supervisor: Martin Glavin

Page 2: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Introduction

• When an image is captured with a very wide-angle lens, straight lines in the target become curved in the resultant image.

• This is known as barrel distortion and the apparent effect is that of an image which has been mapped around a sphere.

Page 3: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Introduction

Page 4: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.
Page 5: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.
Page 6: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Edge Detection

• The first step was to implement Edge Detection

• Detect Significant Edges– The method uses two thresholds, to

detect strong and weak edges, and includes the weak edges in the output only if they are connected to strong edges. This method is therefore less likely than the others to be "fooled" by noise, and more likely to detect true weak edges.

Page 7: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Edge Linking

• The next step was edge linking– Where an edge diverges at a junction the function

simply tracks one of the branches. The other branch is eventually processed as another edge. It returns an edgelist, a cell array of edge lists in row, column coordinates and an image of all the edges labeled with an edge number.

Page 8: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Circle Fit

• The next step was to apply a circle fit algorithm

• Characterisation of a camera lens

• Calculate how much distortion the picture has suffered.

Page 9: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Polynomial Transformation

• Using the information gained from the previous parts, an algorithm to transform the Image needed to be applied to compensate for the distortion suffered

• Apply cubic polynomial transformation

Page 10: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Progress Report

Page 11: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Simulink

• To prepare the code for embedding in hardware, the algorithm was recreated in a Simulink model.

• Simulink is an extension of MATLAB that allows creating algorithms in a graphical fashion.

Page 12: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.
Page 13: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Implementation of the Algorithm in Simulink

Page 14: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Conversion to Fixed Point

Page 15: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Conversion to Fixed Point

Page 16: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Making the Model Amicable to Hardware Implementation

Page 17: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Making the Model Amicable to Hardware Implementation

Page 18: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Embedding the code

• A Spartan 3 FPGA was chosen for implementing the code.– An FPGA is an integrated circuit that is programmable by the

designers rather than by the device manufacturer.

Page 19: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

System Generator

Page 20: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

System Generator

Page 21: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

System Generator

Page 22: Embedded Circle Fitting John Daly Supervisor: Martin Glavin.

Questions