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).