3.33333

3.3 | 3 ratings Rate this file 13 Downloads (last 30 days) File Size: 70.1 KB File ID: #13109
image thumbnail

Contour Parameterization

by

 

25 Nov 2006 (Updated )

This function takes as input an image having white background and black foreground and traces the en

| Watch this File

File Information
Description

Contour Tracing of a Black White Image (Binary Image).

This function takes as input an image having white background and black foreground and traces the entire contour and returns the row and column
coordinate values of all the points which lie on the contour

This can be used in Line Following Algorithms and for parameterizing affine distorted contours.

Syntax :
cpixels = affine_contour_trace(BW,r,c,xx1,yy1)

Input :
BW - Black & White Image (Binary Image).
row,col - row, column value of a single pixel on the contour, serves as the starting point of parameterization
xx1,yy1 - listing of all the boundary points of the object obtained using the command: [xx1,yy1,p] = find(originalImage);

Output :
sp_x - N x 2 matrix which stores the coordinate values of the contour, column1 gives the rows & column2 the corresponding column.

See the SampleUsage.m file for an example

The program has been succesfully tested using the MPEG7-ShapeB dataset and Airplane dataset.

Sample images are included for experimentation.

Acknowledgements

This file inspired Contour Following In Binary Images.

MATLAB release MATLAB 7 (R14)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
11 Sep 2008 csa spp

very well written code!superb and gud job

04 Mar 2008 Ezzaich Amel  
10 May 2007 Fran├žois Mourougaya

doesn't work on tricky contours (for example, two circles connected by a one pixel width line), producing strange ordering of the contour points.

Contact us