Description Usage Arguments Value Note Author(s) See Also Examples
Compute 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:
r = \frac{m_{00}}{2} √{\frac{N}{M}+ \frac{M}{N}}
where
m_{pq} = ∑_{1}^{N} ∑_{1}^{M} (x^p)(y^q)f(x,y)
1 | calcMaxRadius(I, center)
|
I |
A 2-dimensional image matrix. |
center |
The x and y coordinates of the image centroid, input as |
maxRadius |
The radius of the the smallest disk that covers the entire image with its origin at the centroid. |
The value calculated by this function is used to obtain the polar coordinates of the pixels in the image. The coordinates of the pixels are scaled with this value so that they will be between -1 and 1 before the polar coordinates are calculated. This is necessary because complex moments are only defined on the unit disk.
Tan Dang
1 2 3 4 5 | data(mandril)
I=rowSums(img,dims=2);
maxRadius= calcMaxRadius(I);
maxRadius= calcMaxRadius(I, calcCentroid(I));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.