This page is a part of CVprimer.com, a wiki devoted to computer vision. It focuses on low level computer vision, digital image analysis, and applications. It is designed as an online textbook but the exposition is informal. It geared towards software developers, especially beginners, and CS students. The wiki contains mathematics, algorithms, code examples, source code, compiled software, and some discussion. If you have any questions or suggestions, please contact me directly.

# Perimeter

Suppose we are given an object in a digital image (see Objects in binary images and Objects in gray scale images). Then the perimeter of the object is the length of its Boundary = the number of edges in the contour of the object. Important in geometry, it is frequently not robust enough to be useful in digital image analysis. For more on that see Lengths of curves.

Image with 8 pixels arranged in a square.
The image.
Perimeters are lengths of cycles. Here A and B are 0-cycles, C and C’ are 1-cycles.

If you are prepared to assume that the object is a circle you can go area->radius->perimeter and avoid the inaccuracy altogether. Similar for squares.

The prerimeter appears in the output table of Pixcavator. Download the free Pixcavator Student Edition here.