car2pol: Polar Transformer -Cartesian to Polar Coordinates-

Description Usage Arguments Value See Also Examples

Description

The function converts images to polar coordintates. The polar transformation is useful for unwarpping images which have a generally round object. From power specturm for example, one may generate radial integration profile or azimuthal intensity distribution. Default is "bilinear" interpolation.

Usage

1
car2pol(x, method="bilinear")

Arguments

x

A raster image or a matrix.

method

"NN" Nearest neighbour method, "bilinear" Bilinear interpolation.

Value

A matrix in polar coordinate system of the requested image

pol.img

Radial distance corresponds to the shorter side of requested image, and polar angle covers 0 to 360 degrees.

See Also

integ.profile

Examples

1
2
3
4
5
6
7
data(camphora)
par(mfrow=c(1,2))
image(rot90c(camphora), col=gray(c(0:255)/255), main="camphora, original", 
	    useRaster=TRUE, asp=1, axes=FALSE)
img <- car2pol(camphora, method="bilinear")
image(rot90c(img), col=gray(c(0:255)/255), main="camphora, polar (bilinear)", 
xlab="radial distance(pixel)",ylab="angle(deg)", useRaster=TRUE, asp=1, axes=FALSE)

Example output



wvtool documentation built on May 1, 2019, 10:27 p.m.

Related to car2pol in wvtool...