You are on page 1of 2

Contour Detection- Freeman Chain Code

ABSTRACT:
Computer vision is a scientific discipline, concerned with the theory behind artificial systems that
extracts information from images. The fields closely related to computer vision are image
processing, image analysis and machine vision.

INTRODUCTION:

Definition:

The term Contour can be defined as an outline or a boundary of an object.

Hence, Contour detection deals with detecting various objects in an image specifically. Use of contour
detection in image processing is to locate objects and their boundaries in images.

PROBLEM STATEMENT:

Recognition of objects is one of the basic tasks in computer vision applications. Recognition is
usually based on gray levels or colours, and shape characteristics of target objects. The goal of contour
recognition is to find a description of objects specifically so as to distinguish between different target
objects.

The importance of contour detection is it detects the salient boundaries of the object in an image.

STATE OF ART:

1. Hough Transform:
Hough Transform extracts the geometric primitives from a raster images. It identifies the lines in an image
and positions of arbitrary shapes in an image like circles, ellipse.

The Basic idea of Hough Transform is that it considers a point to vote for all the lines it could be on and
the lines with maximum number of votes win to be represented in the Hough space.

The drawback of Hough Transform is that when there are more number of parameters it produces
inefficient results. And also it cannot be applied to shapes other than lines or circles.

2. Active Snake Contours:


To overcome the drawbacks of Hough Transform, active contours came into existence.

Snake contour is an active parametric contour, defined as an energy-minimizing spline that represents an
object boundary or some other salient image feature as a parametric curve. It was first introduced in
1987 by Kass et al.

The disadvantage of snake contour is it cannot detect multiple objects and the selection of parameters is
also becomes difficult.

3. Geometric Active contours:


The disadvantages of Snake contours can be overcome by using the Geometric Active Contours which
uses Level set method.

Here, Level set method is used instead of parameters to trace multiple objects more specifically. It is a
numerical technique for tracking interfaces and shapes.

1
Advantage: The level set method represents a closed curve; Γ using an auxiliary function ф, called the
level set function.

The drawback of this method is that it takes a lot of time and involves complex mathematical

OBJECTIVES OF THE PROJECT:

The main objective of the project is to determine the salient boundaries of individual objects in an image
specifically. Contour detection gives better outcomes when an edge detected image is given as an input
to the contour detection method. So, we perform edge detection and take its output as an input for
contour detection.

CHAIN CODE METHOD:

Chain code scheme is a representation that consists of series of numbers from 0 to 7 in clockwise
direction which represents the direction of the next pixel that can be used to represent shape of the
objects. The coordinate of the next pixel is calculated based on the addition and subtraction of columns
and rows by 1, depending on the value of the chain code. This representation is based on the work of
Freeman chain code. The basic principle of chain codes is to separately encode each connected
component in an image.

ALGORITHM:

The image of an object whose contour is to be found is loaded. Then, we perform Edge detection. This
requires a gray scale image as an input, so we convert the BGR image into a gray scale image.

The purpose of Edge detection is to significantly reduce the amount of data in an image, while preserving
the structural properties to be used for further image processing. The canny edge detection converts
gray-scale image to binary output image which serves as an input to the chain code method. The
algorithm is based on 8-connected 3X3 windows of Freeman chain code. Obtain the binary image of the
object. Set the start code as 0. Determine the first pixel set to ‘1’ and consider it as the initial position to
start finding the contour. A pixel which is traversed is changed to code-2 to avoid repeated traversal. Put
the code of the location in chain code and assign this location as the current pixel. Move to the next pixel
and repeat step 3 till the start pixel with value 2 is found. The chain code formed is then used to draw the
contours on the image. After detecting and drawing the contours on a copy of the original input image,
both the input image and the output image are displayed.

CONCLUSION:

The Chain code method is implemented to obtain continuous contours along the boundaries of the
objects in the given image. The Freeman chain code technique has an advantage of less recognition time
though it cannot give high recognition accuracy rate. To achieve high recognition rate, we apply this
technique along with other techniques like edge detection techniques.

Chain codes can be used to recognize characters and numerical digits successfully. Hence, this
technique can be implemented in number plate recognition. A chain code can be used to represent a
binary image in a compact form, which can be used to compare different objects, as a chain code is a
complete representation of an object or a curve. Hence, we can say that the chain code technique is a
lossless technique for producing connected contours for effective image processing.

You might also like