SIP Toolbox

unfollow - Converts a parametric contour into a binary image

Calling Sequence

Img = unfollow(x,y,dims)

Parameters

Description

Function unfollow plots a contour from its parametric representation into a binary image. This operation is the reverse of the follow function.

x and y both store the parametrized contour. That is, (x(i),y(i)) is a point of the contour, where the coordinate system is assumed as starting from bottom-left corner (0,0) to uper-right corner of the image. To get (x,y) coordinates from (row,col) matrix coordinates, use the transformation below:

Examples

       initial_dir = PWD;
       chdir (SIPDIR + 'images');

       Img = imread('star.bmp');
       xset('window',0);
       xbasc()
       imshow(Img,2);
       [x,y] = follow(Img);
       xbasc()
       xsm = gsm(x,15);
       ysm = gsm(y,15);
       Img2=unfollow(xsm,ysm,size(Img));
       xbasc()

       imshow(Img2,2);
       chdir(initial_dir);
   

Authors

Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>

Availability

The latest version of the Scilab Image Processing toolbox can be found at

http://siptoolbox.sourceforge.net

See Also

follow,  bwborder,  gsm,  curvature,