polarXY {IM}R Documentation

Calculate polar coordinates of elements in a matrix

Description

Computes the radius and and angle of each element's location in a matrix with respect to the centroid.

Usage

polarXY(I, centroid)

Arguments

I

"Matrix" representation of an image, or any matrix.

centroid

two numbers, the x coordinate of the centroid and the y coordinate of the centroid. The function calcCentroid may be used to estimate the image centroid.

Value

"list"

radius

The radius of the polar coordinates of each element in the input matrix.

theta

The angle of the polar coordinates of each element in the input matrix.

Author(s)

Allison Irvine, Tan Dang

See Also

polarTransform, calcCentroid

Examples

data(lena);
I=rowSums(img,dims=2);
center= calcCentroid(I);
result= polarXY(I, center);

[Package IM version 1.0 Index]