<< percol SIP - Scilab Image Processing Toolbox pifilter >>

SIP - Scilab Image Processing Toolbox >> SIP - Scilab Image Processing Toolbox > perim

perim

Perimeter of binary shape

Calling Sequence

p = perim(Img)

Parameters

Img
binary array, 1 for object and 0 for background (double precision)
p
approximate perimeter of the shape inside Img

Description

This is a simple routine to measure the perimeter of a 2D shape. It assumes border pixels as a polygonal line: adjacent border pixels has measure size 1 or sqrt(2).

Examples

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

Img = imread('star.bmp');
clf
imshow(Img,2);
p = perim(Img)

chdir(initial_dir);

Authors

Availability

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

http://siptoolbox.sourceforge.net

See Also


<< percol SIP - Scilab Image Processing Toolbox pifilter >>