M-File Help: imoments View code for imoments

imoments

Image moments

f = imoments(im) is a RegionFeature object that describes the greyscale moments of the image im.

f = imoments(u, v) as above but the moments are computed from the pixel coordinates given as vectors u (Nx1) and v (Nx1). All pixels are equally weighted and is effectively a binary image.

f = imoments(u, v, w) as above but the pixels have weights given by the vector w and is effectively a greyscale image.

Properties

The RegionFeature object has many properties including:

uc centroid, horizontal coordinate
vc centroid, vertical coordinate
area the number of pixels
a major axis length of equivalent ellipse
b minor axis length of equivalent ellipse
theta angle of major ellipse axis to horizontal axis
shape aspect ratio b/a (always <= 1.0)
moments a structure containing moments of order 0 to 2, the elements are m00, m10, m01, m20, m02, m11.

See RegionFeature help for more details.

Notes

See also

RegionFeature, iblobs


 

© 1990-2012 Peter Corke.