PRTools contents

PRTools manual

im_moments

IM_MOMENTS

PRTools routine for computing central moments of object images

     M = IM_MOMENTS(A,TYPE,MOMENTS)
     M = A*IM_MOMENTS([],TYPE,MOMENTS)

Input
 A Dataset with object images dataset (possibly multi-band)
 TYPE Desired type of moments
 MOMENTS Desired moments

Output
 M Dataset with moments replacing images (poosibly multi-band)

Description

Computes for all images in A a (1*N) vector M moments as defined by TYPE and MOMENTS. The following types are supported

 TYPE = 'none' Standard moments as specified in the Nx2 array MOMENTS.  Moments are computed with respect to the image center.  This is the default for TYPE.  Default MOMENTS = [1 0; 0 1];
 TYPE = 'central' Central moments as specified in the Nx2 array MOMENTS.  Moments are computed with respect to the image mean  Default MOMENTS = [2 0; 1 1; 0 2], which computes  the variance in the x-direction (horizontal), the  covariance between x and y and the variance in the  y-direction (vertical).
 TYPE = 'scaled' Scale-invariant moments as specified in the Nx2 array  MOMENTS. Default MOMENTS = [2 0; 1 1; 0 2].  After: M. Sonka et al.,  Image processing, analysis and machine vision.
 TYPE = 'hu' Calculates 7 moments of Hu, invariant to translation,  rotation and scale.  After: M. Sonka et al.,  Image processing, analysis and machine vision.
 TYPE = 'zer' Calculates the Zernike moments up to the order as  specified in the scalar MOMENTS (1 <= MOMENTS <= 12) MOMENTS = 12 generates in total 47 moments.  After: A. Khotanzad and Y.H. Hong, Invariant image  recognition by Zernike moments, IEEE-PAMI, vol. 12,  no. 5, 1990, 489-497.

 SEE   DATASETS, DATAFILES

PRTools contents

PRTools manual