moments-normalized

moments_normalized

skimage.measure.moments_normalized(mu, order=3) [source]

Calculate all normalized central image moments up to a certain order.

Note that normalized central moments are translation and scale invariant but not rotation invariant.

Parameters:

mu : (M, M) array

Central image moments, where M must be > order.

order : int, optional

Maximum order of moments. Default is 3.

Returns:

nu : (order + 1, order + 1) array

Normalized central image moments.

References

[R278] Wilhelm Burger, Mark Burge. Principles of Digital Image Processing: Core Algorithms. Springer-Verlag, London, 2009.
[R279] B. Jähne. Digital Image Processing. Springer-Verlag, Berlin-Heidelberg, 6. edition, 2005.
[R280] T. H. Reiss. Recognizing Planar Objects Using Invariant Image Features, from Lecture notes in computer science, p. 676. Springer, Berlin, 1993.
[R281] http://en.wikipedia.org/wiki/Image_moment

Examples

>>> image = np.zeros((20, 20), dtype=np.double)
>>> image[13:17, 13:17] = 1
>>> m = moments(image)
>>> cr = m[0, 1] / m[0, 0]
>>> cc = m[1, 0] / m[0, 0]
>>> mu = moments_central(image, cr, cc)
>>> moments_normalized(mu)
array([[        nan,         nan,  0.078125  ,  0.        ],
       [        nan,  0.        ,  0.        ,  0.        ],
       [ 0.078125  ,  0.        ,  0.00610352,  0.        ],
       [ 0.        ,  0.        ,  0.        ,  0.        ]])
doc_scikit_image
2017-01-12 17:22:29
Comments
Leave a Comment

Please login to continue.