UNFOLLOW(1)

NAME
unfollow - converts a parametric contour into a binary image

SYNOPSIS
Img = unfollow(x,y,dims)

PARAMETERS

x and y
    vectors, storing the parametrized contour. They are truncated before calculation.

dims
    vector [row, column] storing the dimensions of the output Image. This has to be consistent with the size of the resulting contour.

Img binary array, 1 for object and 0 for background (double precision)

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:

          x = col - 1
          y = dims(1) - row

EXAMPLE
initial_dir = PWD;
chdir (SIPDIR + 'examples');
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);

BUGS AND SHORTCOMINGS
Images are stored in double precision matrices. Hopefully, the next release will make usage of integer types.

AUTHORS
Ricardo Fabbri <rfabbri@if.sc.usp.br>

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

    http://cyvision.if.sc.usp.br/~rfabbri/sip/

SEE ALSO
follow, bwborder, gsm, curvature