Monday, September 26, 2005

moment of blob

Once we get stuck in such a question, during a Image Processing class, so you're not the first one to get confused with it.

In fact, the centroid C, also known as the center of gravity or center of mass ( in Image Processing follows the same concept as stated in Physics, i.e, "(...) the point of a body at which the force of gravity can be considered to act and which undergoes no internal motion", where the MASS DENSITY (weight) is uniform, say one for every object pixel, and zero for a background pixel.

We need Blobs Centroids because it's easier to describe rigid blobs motion by considering only their centroids, rather than every point of them.

As far as I know, MOMENTS are statistical concepts, which accounts for distributions in a single number, as degrees of dispersion of a histogram. So, if you consider each pixel of your image as a random variable and have a histogram of some features (gray levels) taken from your image, you may calculate its k_th moments to grab global information about the behaviour of the random variables.

Formally speaking, central moments are defined as:

k_th_central_moment (Image) = SUM_x p(x).(x-xc)^k, for all x in Image,

where p(x) is the observed density distribution of x in Image (discrete relative frequency), and xc is the mean.

The 1st moment (k=1) is the average (or expectance) of x, the second central moment is the variance (k=2), the 3rd is the skewness and the 4th is the kurtosis (


get the moments of the blobs using cvMoments() and


dXCenter = Moments.m10 / Moments.m00;

dYCenter = Moments.m01 / Moments.m00;

No comments:

Post a Comment