{ } Raw JSON

bundles / skimage 0.26.1rc0.dev0+git20260530.b607368ff / skimage / transform / _warps / warp_polar

function

skimage.transform._warps:warp_polar

source: /dev/scikit-image/src/skimage/transform/_warps.py :1123

Signature

def   warp_polar ( image center = None * radius = None output_shape = None scaling = linear channel_axis = None ** kwargs )

Summary

Remap image to polar or log-polar coordinates space.

Parameters

image : (M, N[, C]) ndarray

Input image. For multichannel images channel_axis has to be specified.

center : 2-tuple, optional

(row, col) coordinates of the point in image that represents the center of the transformation (i.e., the origin in Cartesian space). Values can be of type float. If no value is given, the center is assumed to be the center point of image.

radius : float, optional

Radius of the circle that bounds the area to be transformed.

output_shape : tuple (row, col), optional
scaling : {'linear', 'log'}, optional

Specify whether the image warp is polar or log-polar. Defaults to 'linear'.

channel_axis : int or None, optional

If None, the image is assumed to be a grayscale (single channel) image. Otherwise, this parameter indicates which axis of the array corresponds to channels.

**kwargs : keyword arguments

Passed to transform.warp.

Returns

warped : ndarray

The polar or log-polar warped image.

Examples

Perform a basic polar warp on a grayscale image:
from skimage import data
from skimage.transform import warp_polar
image = data.checkerboard()
warped = warp_polar(image)
Perform a log-polar warp on a grayscale image:
warped = warp_polar(image, scaling='log')
Perform a log-polar warp on a grayscale image while specifying center, radius, and output shape:
warped = warp_polar(image, (100,100), radius=100,
                    output_shape=image.shape, scaling='log')
Perform a log-polar warp on a color image:
image = data.astronaut()
warped = warp_polar(image, scaling='log', channel_axis=-1)

Aliases

  • skimage.transform.warp_polar

Referenced by