Image
/ Characteristics / Centroid
The centroid (center of gravity) represents a measure of the geographic center of the object in the image. Its coordinates are calculated for a binary image:

where Xi and Yi are the coordinates of the i-th pixel of the object, A is the area of the object.
In the working window of this function, we define the gray level of the object for which we want to find the center of gravity.
The found center of gravity is drawn directly into the image and its X- and Y-coordinates are displayed at the same time.
Preview
Example
|

|
|
Centroid (gray level 0)
|
|
|
|

|
|
Centroid
(gray level 53)
|
|
|
|

|
|
Centroid
(gray level 6)
|
|
|
|