CenterX, CenterY, CenterDist, CenterAngle  
Top  Previous  Next

Menu:   Measure > Parameters  
Script:   SelectParam ("CenterX", "CenterY", "CenterDist","CenterAngle")  

Select these parameters to compute the binary-weighted center of gravity of objects. The binary-weighted center of gravity is defined from the object's binary moments as the point, where the pixels above and below balance in the y direction, and the pixels on the left and right balance in the x direction.

CenterX and CenterY return the Cartesian coordinates of the binary-weighted center of gravity



Xi and Yi are horizontal and vertical coordinates of each pixel within the object
N is number of pixels in the object.

and CenterAngle return the polar coordinates of the binary-weighted center of gravity (i.e CenterDist is the distance between the center of gravity and the origin and CenterAngle is the angle between the radius-vector connecting the origin with the center of gravity and the horizontal).


In the Field Measurements
the center of gravity is calculated for the whole phase rather than for separate objects.

The parameters are calculated in calibrated units. The direction of CenterAngle depends on the Y-axis direction in the image calibration scale. If the Y-axis is pointed down (which is a default setting), the angle is measured from the positive X-axis clockwise. To measure the angle counterclockwise, reverse the direction of Y-axis. See Spatial Calibration
for more details.