Description Usage Arguments Details Value Author(s) See Also Examples
Perform a polar transform of an image by calculating the polar coordinates of the pixels in an image and rearranging the pixels
into a plot of angle (theta) against radius. The polar coordinates are calculated with respect to the centroid, determined by
calcCentroid
or the center of the image space. All transformed images will be shifted to principal axis determined by:
θ=\frac{1}{2}arctan(\frac{2μ_{00}}{μ_{10}-μ_{01}})
where
μ_{pq}= ∑_{1}^{N} ∑_{1}^{M}(x-x0)^p(y-x0)^q f(x,y)
with (x0, y0) are centroid computed by calcCentroid
1 | polarTransform(I, resolution, scale, center)
|
I |
Image represented as a matrix or numeric array |
resolution |
An integer which determines the number of angle values between 0 and 2pi to be represented in the transform. |
scale |
Integer. Default is 0, no scaling in the transformation. If set to a positive integer, the maximum radius
used in the transformation will be set to |
center |
The x and y coordinates of the centroid to be used in the transform. If this argument is not provided, the center of the image space will be the centroid. |
This transformation is performed by finding the Euclidean coordinates of points which are contained within the
smallest circle with origin at the centroid or center of image which can be contained within the image boundaries.
The pixels whose coordinates most closely match these Euclidean coordinates are plotted at the corresponding polar coordinates.
At each radius, the perimeter is divided into 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
.
PI |
The transformed image. |
pAxis |
The principal axis of the image. |
resolution |
The resolution used for the transformation. |
scale |
The scale used for the transformation. |
center |
The centroid used for the transformation. |
Allison Irvine, Tan Dang
revPolar
, polarXY
, calcCentroid
1 2 3 4 | data(circles);
I=rowSums(img,dims=2)
R=polarTransform(I, 6, 100);
displayImg(list(I,R[[1]]));
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.