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: ndarrayInput image.
center: (column, row) tuple or (2,) ndarray, optionalCenter coordinate of transformation.
strength: float, optionalThe amount of swirling applied.
radius: float, optionalThe extent of the swirl in pixels. The effect dies out rapidly beyond
radius.rotation: float, optionalAdditional rotation applied to the image.
Returns
swirled: ndarraySwirled version of the input.
Other Parameters
output_shape: tuple (rows, cols), optionalShape of the output image generated. By default the shape of the input image is preserved.
order: int, optionalThe 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'}, optionalPoints 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, optionalUsed in conjunction with mode 'constant', the value outside the image boundaries.
clip: bool, optionalWhether 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, optionalWhether 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