perim - Perimeter of binary shape
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).
initial_dir = PWD;
chdir (SIPDIR + 'images');
Img = imread('star.bmp');
xbasc()
imshow(Img,2);
p = perim(Img)
chdir(initial_dir);
http://siptoolbox.sourceforge.net