Embedded Circle Fitting John Daly Supervisor: Martin Glavin

Preview:

Citation preview

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.

Introduction

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.

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.

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.

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

Progress Report

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.

Implementation of the Algorithm in Simulink

Conversion to Fixed Point

Conversion to Fixed Point

Making the Model Amicable to Hardware Implementation

Making the Model Amicable to Hardware Implementation

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.

System Generator

System Generator

System Generator

Questions