A Tutorial on Image Moments

Embed Size (px)

Citation preview

  • 8/12/2019 A Tutorial on Image Moments

    1/15

    A TUTORIAL

    ON

    IMAGE MOMENTS

    BY

    ANIL SUDHAKAR KURHEKAR

  • 8/12/2019 A Tutorial on Image Moments

    2/15

    1. To Compute Centroidof an imageThe centroid is based on pixel intensity. The centroid, located at pixel

    coordinates (x0,y0) is calculated using the following equation:

    Where mpqis given by

    N is the horizontal dimensionality of the image and M is the vertical

    dimensionality of the image.

    Is the pixel intensity at the location (x,y)

    Center is at 270.046 248.303

  • 8/12/2019 A Tutorial on Image Moments

    3/15

    2. COMPUTE MAXIMUM RADIUSCompute maximum distance of all pixels from the centroid of the image.Alternatively, it is the radius of the the smallest disk that covers the entire

    image with its origin at the centroid. The radius is determined by:

    Where mpqis given by

    MAXIMUM RADIUS =376.7252

    3.Compute Image TransformThis transformation is performed by finding the Euclidean coordinates of

    points which are contained within the smallest circle with origin at the

    centroid or center of image which can be contained within the image

    boundaries. The pixels whose coordinates most closely match these

    Euclidean coordinates are plotted at the corresponding polar coordinates.

    At each radius, the perimeter is divided into radius * resolution equally

    spaced point. Then, the Euclidean coordinates of the points will be used in

    the transformation. This results in a upper-triangular matrix. This

    transform was created to approximate rotational invariance for

    orthogonal moments. The inverse transform may be calculated.

  • 8/12/2019 A Tutorial on Image Moments

    4/15

    4. Find the maximum order of finite momentsFunction to find the maximum order (and repetition for complex

    moments) of moments such that all moment values up to that order (in

    both the x and y directions) are finite and not NaN values. The maximum

    order will be at most the maximum order represented in the matrix of

    moment values. This function looks for the largest size rectangular block

    in the moment matrix such that no values are infinity or NaN.

    Matrix containing image moments from order 0 up to some order p in the

    x- direction and q in the y-direction, or in the case of complex moments, up

    to order p and repetition q.

    The maximum order of finite moments for Lena=300,200

    5. Complex Image ClassThis class contains an image and all information about the image required

    for computing the moments of the image. The object has methods for

    computing moments, moment invariants, and reconstructing the image

    from moments. The types of moments that can be calculated using thisobject are: generalized Pseudo-Zernike, Fourier Mellin, Fourier

    Chebyshev, and Radial Harmonic Fourier.

    1. Moments

  • 8/12/2019 A Tutorial on Image Moments

    5/15

    2. Invariant

  • 8/12/2019 A Tutorial on Image Moments

    6/15

  • 8/12/2019 A Tutorial on Image Moments

    7/15

    Example-II

    The zerothMoment

  • 8/12/2019 A Tutorial on Image Moments

    8/15

    The First Moment

    The Second Moment

    The 14thmoment

  • 8/12/2019 A Tutorial on Image Moments

    9/15

  • 8/12/2019 A Tutorial on Image Moments

    10/15

    7. The Chebyshev Moments of an Image

    8. Bivariate Legendre/Gegenbauer moments up to orders 50and 100 with parameter 1 for Gegenbauer moments

  • 8/12/2019 A Tutorial on Image Moments

    11/15

    9.Radial Harmonic-Fourier moment invariants of Image usingup to order 10 and repetition 10

  • 8/12/2019 A Tutorial on Image Moments

    12/15

    10. Continuous Chebyshev MomentsExample-I

  • 8/12/2019 A Tutorial on Image Moments

    13/15

    Example-II

  • 8/12/2019 A Tutorial on Image Moments

    14/15

    11. Generalize Pseudo Zernike PolynomialFor generalized Pseudo-Zernike moments, a single parameter is required,

    . A larger value of

    decreases the range of the polynomial values used for moment

    computation.

    For Gegenbauer moments, a single parameter is required,

    with the constraints

    > 1

    and

    ~ = 0

    .A larger value of

    increases the values of the polynomials used for moment calculation. If

    = 1

    , the moments are equivalent to continuous Chebyshev moments. For

    Hahn moments, two parameters are required,

    and

    c

    with the constraints

    > -1/2

    and> abs(c) -1

    .

    specifies where the polynomials are centered and the difference between

    and c is positively correlated to the range of the polynomial values used

    to calculate moments.

    For Krawtchouk moments, a single parameter is required,

    with the constraint

    0 < < 1.

    specifies where the polynomials are centered, relative to the image

    centroid.

  • 8/12/2019 A Tutorial on Image Moments

    15/15