Compactness, Compactness7.3.2.6.2.4 compactness – Banner PresencePLUS P4 Series User Manual
Page 117

A pixel with two neighbors that belong to the same blob, forming
a corner, contributes 1.414 linear pixels to the perimeter of the
blob.
A pixel with three neighbors that belong to the same blob
contributes exactly 1 linear pixel to the perimeter of the blob. A
pixel with three neighbors that belong to the same blob contributes
exactly 1 linear pixel to the perimeter of the blob.
A pixel with four neighbors that belong to the same blob
contributes nothing to the perimeter of the blob.
This method of counting tends to slightly overestimate the "true" perimeter. For example, a circle with a radius
of 100 pixels will have a computed perimeter of approximately 660 pixels, compared with the expected value
of 628 pixels.
If the camera is configured to convert pixel distances to other units, (e.g. inches), the perimeter will be given
in those units. If the blob contains holes that have not been filled, the length of the perimeter will include the
points on the perimeters of these holes.
Compactness
The compactness is high for blobs that are nearly circular and low for blobs that are elongated or complicated.
compactness =
Where A is the area and P is the perimeter of the Blob in question. An idealized circle would have a compactness
of 100, but because the perimeter is approximated (see above), the highest realistic value for most blobs is
roughly 90. Very small blobs with just a handful of pixels may reach or even exceed the theoretical maximum
of 100, again because of the approximations in the perimeter calculation.
Major Axis Length, Minor Axis Length, and Major Axis Angle
To understand Major Axis Length, Minor Axis Length, and Major Axis Angle, it is important to note that these
are not measurements of the Blob itself because the Blob may be an irregular shape. Rather, these
measurements are determined by a well-defined shape, a "best fit ellipse" as shown below.
117
Banner Engineering Corp. - Minneapolis, MN USA - www.bannerengineering.com
Tel: 763.544.3164
P/N 000000
PresencePLUS Software Tools
7/2009