calcCentroid
or the center of the image space. All transformed images will be shifted to principal axis determined by:
$$\theta=\frac{1}{2}arctan(\frac{2\mu_{00}}{\mu_{10}-\mu_{01}})$$
where
$$\mu_{pq}= \sum_{1}^{N} \sum_{1}^{M}(x-x0)^p(y-x0)^q f(x,y)$$
with (x0, y0) are centroid computed by calcCentroid
polarTransform(I, resolution, scale, center)
scale
, and the transformed image will have dimensions
scale, (scale*resolution)
radius * resolution
equally spaced point. Then, the Euclidean coordinates
of the points will be used in the transformation. This results in a upper-triangular matrix.
This transform was created to approximate rotational invariance for orthogonal moments.
revPolar
is the inverse transform of polarTransform
.revPolar
, polarXY
, calcCentroid
data(circles);
I=rowSums(img,dims=2)
R=polarTransform(I, 6, 100);
displayImg(list(I,R[[1]]));
Run the code above in your browser using DataLab