{ } Raw JSON

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

function

skimage.transform._warps:swirl

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

Signature

def   swirl ( image center = None strength = 1 radius = 100 rotation = 0 output_shape = None order = None mode = reflect cval = 0 clip = True preserve_range = False )

Summary

Perform a swirl transformation.

Parameters

image : ndarray

Input image.

center : (column, row) tuple or (2,) ndarray, optional

Center coordinate of transformation.

strength : float, optional

The amount of swirling applied.

radius : float, optional

The extent of the swirl in pixels. The effect dies out rapidly beyond radius.

rotation : float, optional

Additional rotation applied to the image.

Returns

swirled : ndarray

Swirled version of the input.

Other Parameters

output_shape : tuple (rows, cols), optional

Shape of the output image generated. By default the shape of the input image is preserved.

order : int, optional

The order of the spline interpolation, default is 0 if image.dtype is bool and 1 otherwise. The order has to be in the range 0-5. See skimage.transform.warp for detail.

mode : {'constant', 'edge', 'symmetric', 'reflect', 'wrap'}, optional

Points outside the boundaries of the input are filled according to the given mode, with 'reflect' used as the default. Modes match the behaviour of numpy.pad.

cval : float, optional

Used in conjunction with mode 'constant', the value outside the image boundaries.

clip : bool, optional

Whether to clip the output to the range of values of the input image. This is enabled by default, since higher order interpolation may produce values outside the given input range.

preserve_range : bool, optional

Whether to keep the original range of values. Otherwise, the input image is converted according to the conventions of img_as_float. Also see https://scikit-image.org/docs/dev/user_guide/data_types.html

Aliases

  • skimage.transform.swirl