Specifications
Intel
®
Image Processing Library Reference Manual
12-6
12
Moments
Computes all image
moments of order 0 to 3.
void iplMoments(IplImage*
image
, IplMomentState
mState
);
image
The image for which the moments will be
computed.
mState
The structure for storing the image moments.
Discussion
The function iplMoments() computes all spatial and central moments of
order 0 to 3 for the
image
. The moments and the corresponding scaling
factors are stored in the
mState
structure. To retrieve a particular moment
value, use the functions described in the sections that follow.
GetSpatialMoment
Returns a spatial moment
computed by iplMoments.
double iplGetSpatialMoment(IplMomentState
mState
, int
mOrd
, int
nOrd
);
mState
The structure storing the image moments.
mOrd, nOrd
The integer exponents m and n (see the moment
definition in the beginning of this section).
These arguments must satisfy the condition
0
≤
mOrd
+
nOrd
≤ 3.