# Center of Mass

The center of mass of a blob represents the blob's balance point. If a sheet of a uniform material were cut out in the shape of the blob, the point upon which the blob would balance is the center of mass. Note that the center of mass of a blob might not actually lie within the blob itself. The following figure shows a blob where the center of mass does not lie within the blob.

The center of mass is computed by determining the average weighted pixel location for each pixel in the blob in the x-axis and y-axis. The formulas that give the x and y components of the center of mass of a blob area:

where A is the weighted area and W(x,y) is the weight of the pixel at coordinate (x,y).

Note: Although the center of mass, as reported in either client or image coordinates, changes as the blob moves, the center of mass with respect to the blob's geometric extents is invariant. For this reason it is described as a geometric property.