BWBORDER(1)

NAME
bwborder - border detection for binary images

SYNOPSIS
B = bwborder(Img)
B = bwborder(Img, 4)
B = bwborder(Img, 8)

PARAMETERS

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

B   binary(0-1) array (double), same size as Img

DESCRIPTION
Extracts contours from binary images, by detecting which pixel valued 1 has at least one neighbor valued 0. The second argument is 4 or 8 depending if the detection is to be made in 4- or 8-neighborhood. The final border will be 8-connected if 4-neighbors are used, and 4-connected if 8-neighbors are used.

bwborder(Img) equals bwborder(Img, 8).

EXAMPLE
initial_dir = PWD;
chdir (SIPDIR + 'examples');
Img = imread('bin2.pbm')
xbasc()
imshow(Img,2);
B = bwborder(Img)
imshow(B,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
edge, follow, im2bw