In microscopy, Feret's diameter is the measured distance between parallel lines that are tangent to an object In a general content, the term object should be understood with the meaning of a class instance. In EasyObject, an object is a maximally-sized area of adjacent connected pixels belonging to the layer foreground.'s profile and perpendicular to the ocular scale.
Generally, Feret's diameter is the greatest distance possible between any two points along the boundary of a region of interest.
The Feret bounding box is defined as the rectangle of minimum width that completely surrounds an object.
By contrast with the limit rectangles that are given for a fixed angle, the Feret box corresponds to the angle that minimizes the width.
The Feret width is thus the smallest object dimension between two parallel lines.
The Feret height is the other dimension of the Feret rectangle, i.e. the dimension measured in the perpendicular direction; it is not the largest dimension of the object.
Except in accidental cases, the limit center, gravity center and centroid do not coincide (even though they are in general very close to each other).
Formula for gravity center X (N = area):
Formula for centroid X (Pi = pixel value):