Description Usage Arguments Value Author(s) References See Also Examples
Calculate the centroid of a grayscale image using geometric moments. The centroid is based on pixel intensity. The centroid, located at pixel coordinates (x0,y0) is calculated using the following equation:
x0 = \frac{m_{10}}{m_{00}}
y0 = \frac{m_{10}}{m_{00}}
where
m_{pq} = ∑_{1}^{N} ∑_{1}^{M} (x^p)(y^q)f(x,y)
N is the horizontal dimensionality of the image and M is the vertical dimensionality of the image.
f(x,y)
is the pixel intensity of the pixel at location (x,y) in the image.
1 |
I |
An image represented as a 2-dimensional grayscale matrix. |
numeric: (x0, y0)
x0 |
x-coordinate of centroid |
y0 |
y-coordinate of centroid |
Allison Irvine, Tan Dang
Flusser, J., Suk, T., Zitova, B. Moments and Moment Invariants in Pattern Recognition. 2009. John Wiley & Sons Ltd. ISBN: 978-0-470-69987-4
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.