Compactness – Banner PresencePLUS P4 COLOR Series User Manual

Page 120

Advertising
background image

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.

These three results combine to give information about the elongation and orientation of a blob . The equations used
to compute these statistics are fairly complicated, but the results usually have an intuitively useful meaning, described
below. The first step in computing these results is to compute the M

2,0

, M

0,2

and M

1,1

statistical moments:

Banner Engineering Corp.

Minneapolis, MN USA

120

2/2010

PresencePLUS Software Tools

Advertising
This manual is related to the following products: