PRTools Contents

PRTools User Guide

im_moments

IM_MOMENTS

Fixed mapping for computing central moments of object images

     M = IM_MOMENTS(A,TYPE,MOMENTS)
     M = A*IM_MOMENTS([],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]. See [1].
 TYPE = 'hu' Calculates 7 moments of Hu, invariant to translation,  rotation and scale. See [1].
 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. See [2].

Reference(s)

1. M. Sonka et al., Image processing, analysis and machine vision.
2. A. Khotanzad and Y.H. Hong, Invariant image recognition by Zernike moments, IEEE-PAMI, vol. 12, no. 5, 1990, 489-497.

See also

datasets, datafiles,

PRTools Contents

PRTools User Guide

This file has been automatically generated. If badly readable, use the help-command in Matlab.