def moments_normalized(mu, order=3):
 if (mu.ndim != 2):
  raise TypeError('Image moments must be 2-dimension')
 if ((mu.shape[0] <= order) or (mu.shape[1] <= order)):
  raise TypeError('Shape of image moments must be >= `order`')
 return _moments_cy.moments_normalized(mu.astype(np.double), order)

def moments_normalized ( mu , order = 3 ) : if ( mu . ndim != 2 ) : raise TypeError ( 'Image moments must be 2-dimension' ) if ( ( mu . shape [ 0 ] <= order ) or ( mu . shape [ 1 ] <= order ) ) : raise TypeError ( 'Shape of image moments must be >= `order`' ) return _moments_cy . moments_normalized ( mu . astype ( np . double ) , order )
calculate all normalized central image moments up to a certain order .