Module Import alias identifier ImportFrom alias identifier ImportFrom alias ImportFrom alias alias alias alias alias alias FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Str Num NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad If BoolOpAnd CompareEq Call NameLoad NameLoad Num BoolOpOr CompareEq AttributeLoad NameLoad attr Num CompareNotEq SubscriptLoad NameLoad Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num body Assign NameStore Call NameLoad NameLoad Assign NameStore SubscriptLoad NameLoad Index Num If CompareEq AttributeLoad NameLoad attr Num body Assign NameStore SubscriptLoad NameLoad ExtSlice Slice Slice Index AttributeLoad NameLoad attr Assign NameStore SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore BinOpDiv Call NameLoad NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore SubscriptLoad AttributeLoad NameLoad attr ExtSlice Slice NameLoad Slice NameLoad Slice NameLoad Assign NameStore BinOpSub BinOpMult NameLoad BinOpAdd NameLoad Num Num Assign NameStore BinOpSub BinOpMult NameLoad BinOpAdd NameLoad Num Num Assign NameStore BinOpSub BinOpMult NameLoad BinOpAdd NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad NameLoad orelse If BoolOpAnd CompareEq NameLoad Num CompareEq NameLoad Num body Assign NameStore Call NameLoad keyword TupleLoad BinOpSub BinOpDiv NameLoad Num Num BinOpSub BinOpDiv NameLoad Num Num orelse Assign NameStore BinOpSub Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num NameLoad ListLoad NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword AttributeLoad NameLoad attr Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpSub BinOpMult NameLoad BinOpAdd SubscriptLoad NameLoad ExtSlice Slice Index Num Num Num Assign SubscriptStore NameLoad ExtSlice Slice Index Num BinOpSub BinOpMult NameLoad BinOpAdd SubscriptLoad NameLoad ExtSlice Slice Index Num Num Num Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign NameStore Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults Num Str Num NameLoad NameLoad body Expr Str TryExcept body Assign TupleStore NameStore NameStore NameLoad handlers ExceptHandler type NameLoad body Assign NameStore NameStore NameLoad Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num Assign NameStore Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpMult NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad NameLoad Num Str Num NameLoad NameLoad body Expr Str Assign TupleStore NameStore NameStore TupleLoad SubscriptLoad AttributeLoad NameLoad attr Index Num SubscriptLoad AttributeLoad NameLoad attr Index Num If CompareIs NameLoad NameLoad body Assign NameStore BinOpSub BinOpDiv Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Num Num orelse Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore Call NameLoad keyword Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad keyword UnaryOpUSub NameLoad Assign NameStore BinOpAdd BinOpAdd NameLoad NameLoad NameLoad Assign NameStore NameLoad If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr ListLoad ListLoad Num Num ListLoad Num BinOpSub NameLoad Num ListLoad BinOpSub NameLoad Num BinOpSub NameLoad Num ListLoad BinOpSub NameLoad Num Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad ExtSlice Slice Index Num attr Assign NameStore BinOpAdd BinOpSub NameLoad NameLoad Num Assign NameStore BinOpAdd BinOpSub NameLoad NameLoad Num Assign NameStore Call AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad Assign NameStore TupleLoad NameLoad NameLoad Assign NameStore Call NameLoad keyword NameLoad Assign NameStore BinOpAdd NameLoad NameLoad Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults Num NameLoad body Expr Str Return Call NameLoad NameLoad NameLoad AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Assign TupleStore NameStore NameStore AttributeLoad NameLoad attr Assign TupleStore NameStore NameStore NameLoad Assign NameStore Call AttributeLoad NameLoad attr BinOpAdd BinOpPow BinOpSub NameLoad NameLoad Num BinOpPow BinOpSub NameLoad NameLoad Num Assign NameStore BinOpMult BinOpDiv NameLoad Num Call AttributeLoad NameLoad attr Num Assign NameStore BinOpAdd BinOpAdd NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr BinOpDiv UnaryOpUSub NameLoad NameLoad Call AttributeLoad NameLoad attr BinOpSub NameLoad NameLoad BinOpSub NameLoad NameLoad Assign SubscriptStore NameLoad ExtSlice Ellipsis Index Num BinOpAdd NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad Assign SubscriptStore NameLoad ExtSlice Ellipsis Index Num BinOpAdd NameLoad BinOpMult NameLoad Call AttributeLoad NameLoad attr NameLoad Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam NameParam defaults NameLoad Num Num Num NameLoad Num Str Num NameLoad NameLoad body Expr Str If CompareIs NameLoad NameLoad body Assign NameStore BinOpDiv SubscriptLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Slice Num Num Assign NameStore Dict Str Str Str Str NameLoad NameLoad NameLoad NameLoad Return Call NameLoad NameLoad NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad decorator_list
N/A N/A numpy np scipy ndimage ndi measure block_reduce _geometric warp SimilarityTransform AffineTransform _convert_warp_input _clip_warp_output _to_ndimage_mode resize N/A N/A image output_shape order mode cval clip preserve_range N/A 1 constant 0 True False N/A N/A Resize image to match a certain size.

    Performs interpolation to up-size or down-size images. For down-sampling
    N-dimensional images by applying the arithmetic sum or mean, see
    `skimage.measure.local_sum` and `skimage.transform.downscale_local_mean`,
    respectively.

    Parameters
    ----------
    image : ndarray
        Input image.
    output_shape : tuple or ndarray
        Size of the generated output image `(rows, cols[, dim])`. If `dim` is
        not provided, the number of channels is preserved. In case the number
        of input channels does not equal the number of output channels a
        3-dimensional interpolation is applied.

    Returns
    -------
    resized : ndarray
        Resized version of the input.

    Other parameters
    ----------------
    order : int, optional
        The order of the spline interpolation, default is 1. 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.  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`.

    Notes
    -----
    Modes 'reflect' and 'symmetric' are similar, but differ in whether the edge
    pixels are duplicated during the reflection.  As an example, if an array
    has values [0, 1, 2] and was padded to the right by four values using
    symmetric, the result would be [0, 1, 2, 2, 1, 0, 0], while for reflect it
    would be [0, 1, 2, 1, 0, 1, 2].

    Examples
    --------
    >>> from skimage import data
    >>> from skimage.transform import resize
    >>> image = data.camera()
    >>> resize(image, (100, 100)).shape
    (100, 100)

     N/A N/A rows cols N/A N/A output_shape N/A 0 N/A output_shape N/A 1 N/A N/A orig_rows orig_cols N/A N/A N/A image shape N/A 0 N/A N/A image shape N/A 1 N/A row_scale N/A N/A float orig_rows rows N/A col_scale N/A N/A float orig_cols cols N/A N/A N/A N/A len output_shape 3 N/A N/A N/A image ndim 2 N/A N/A output_shape N/A 2 N/A N/A image shape N/A 2 N/A N/A ndi_mode N/A _to_ndimage_mode mode N/A dim N/A output_shape N/A 2 N/A N/A N/A image ndim 2 N/A N/A image N/A image N/A N/A N/A N/A N/A np newaxis N/A orig_dim N/A N/A image shape N/A 2 N/A dim_scale N/A N/A float orig_dim dim N/A N/A map_rows map_cols map_dims N/A N/A np mgrid N/A N/A rows N/A cols N/A dim N/A map_rows N/A N/A row_scale N/A map_rows 0.5 0.5 N/A map_cols N/A N/A col_scale N/A map_cols 0.5 0.5 N/A map_dims N/A N/A dim_scale N/A map_dims 0.5 0.5 N/A coord_map N/A N/A np array N/A map_rows map_cols map_dims N/A image N/A _convert_warp_input image preserve_range N/A out N/A N/A ndi map_coordinates image coord_map order order mode ndi_mode cval cval N/A N/A _clip_warp_output image out order mode cval clip N/A N/A N/A N/A rows 1 N/A cols 1 N/A N/A tform N/A AffineTransform translation N/A N/A N/A orig_cols 2.0 0.5 N/A N/A orig_rows 2.0 0.5 N/A N/A src_corners N/A N/A N/A np array N/A N/A 1 1 N/A 1 rows N/A cols rows 1 N/A dst_corners N/A N/A np zeros N/A src_corners shape dtype N/A np double N/A N/A dst_corners N/A N/A N/A 0 N/A N/A col_scale N/A N/A src_corners N/A N/A N/A 0 0.5 0.5 N/A N/A dst_corners N/A N/A N/A 1 N/A N/A row_scale N/A N/A src_corners N/A N/A N/A 1 0.5 0.5 N/A tform N/A AffineTransform N/A N/A N/A tform estimate src_corners dst_corners N/A out N/A warp image tform output_shape output_shape order order mode mode cval cval clip clip preserve_range preserve_range N/A out N/A rescale N/A N/A image scale order mode cval clip preserve_range N/A 1 constant 0 True False N/A N/A Scale image by a certain factor.

    Performs interpolation to upscale or down-scale images. For down-sampling
    N-dimensional images with integer factors by applying the arithmetic sum or
    mean, see `skimage.measure.local_sum` and
    `skimage.transform.downscale_local_mean`, respectively.

    Parameters
    ----------
    image : ndarray
        Input image.
    scale : {float, tuple of floats}
        Scale factors. Separate scale factors can be defined as
        `(row_scale, col_scale)`.

    Returns
    -------
    scaled : ndarray
        Scaled version of the input.

    Other parameters
    ----------------
    order : int, optional
        The order of the spline interpolation, default is 1. 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.  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`.

    Examples
    --------
    >>> from skimage import data
    >>> from skimage.transform import rescale
    >>> image = data.camera()
    >>> rescale(image, 0.1).shape
    (51, 51)
    >>> rescale(image, 0.5).shape
    (256, 256)

     N/A N/A N/A N/A row_scale col_scale scale N/A N/A N/A TypeError N/A N/A row_scale col_scale scale N/A N/A orig_rows orig_cols N/A N/A N/A image shape N/A 0 N/A N/A image shape N/A 1 N/A rows N/A N/A np round N/A row_scale orig_rows N/A cols N/A N/A np round N/A col_scale orig_cols N/A output_shape N/A rows cols N/A N/A resize image output_shape order order mode mode cval cval clip clip preserve_range preserve_range N/A rotate N/A N/A image angle resize center order mode cval clip preserve_range N/A False None 1 constant 0 True False N/A N/A Rotate image by a certain angle around its center.

    Parameters
    ----------
    image : ndarray
        Input image.
    angle : float
        Rotation angle in degrees in counter-clockwise direction.
    resize : bool, optional
        Determine whether the shape of the output image will be automatically
        calculated, so the complete rotated image exactly fits. Default is
        False.
    center : iterable of length 2
        The rotation center. If ``center=None``, the image is rotated around
        its center, i.e. ``center=(rows / 2 - 0.5, cols / 2 - 0.5)``.

    Returns
    -------
    rotated : ndarray
        Rotated version of the input.

    Other parameters
    ----------------
    order : int, optional
        The order of the spline interpolation, default is 1. 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.  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`.

    Examples
    --------
    >>> from skimage import data
    >>> from skimage.transform import rotate
    >>> image = data.camera()
    >>> rotate(image, 2).shape
    (512, 512)
    >>> rotate(image, 2, resize=True).shape
    (530, 530)
    >>> rotate(image, 90, resize=True).shape
    (512, 512)

     N/A N/A rows cols N/A N/A N/A image shape N/A 0 N/A N/A image shape N/A 1 N/A N/A center None N/A N/A center N/A N/A N/A N/A np array N/A cols rows 2.0 0.5 N/A N/A center N/A N/A np asarray center N/A tform1 N/A SimilarityTransform translation center N/A tform2 N/A SimilarityTransform rotation N/A N/A np deg2rad angle N/A tform3 N/A SimilarityTransform translation N/A center N/A tform N/A N/A tform3 tform2 tform1 N/A output_shape None N/A resize N/A N/A corners N/A N/A np array N/A N/A 0 0 N/A 0 N/A rows 1 N/A N/A cols 1 N/A rows 1 N/A N/A cols 1 0 N/A corners N/A N/A tform inverse corners N/A minc N/A N/A N/A corners N/A N/A N/A 0 min N/A minr N/A N/A N/A corners N/A N/A N/A 1 min N/A maxc N/A N/A N/A corners N/A N/A N/A 0 max N/A maxr N/A N/A N/A corners N/A N/A N/A 1 max N/A out_rows N/A N/A maxr minr 1 N/A out_cols N/A N/A maxc minc 1 N/A output_shape N/A N/A np ceil N/A out_rows out_cols N/A translation N/A minc minr N/A tform4 N/A SimilarityTransform translation translation N/A tform N/A tform4 tform N/A N/A warp image tform output_shape output_shape order order mode mode cval cval clip clip preserve_range preserve_range N/A downscale_local_mean N/A N/A image factors cval clip N/A 0 True N/A N/A Down-sample N-dimensional image by local averaging.

    The image is padded with `cval` if it is not perfectly divisible by the
    integer factors.

    In contrast to the 2-D interpolation in `skimage.transform.resize` and
    `skimage.transform.rescale` this function may be applied to N-dimensional
    images and calculates the local mean of elements in each block of size
    `factors` in the input image.

    Parameters
    ----------
    image : ndarray
        N-dimensional input image.
    factors : array_like
        Array containing down-sampling integer factor along each axis.
    cval : float, optional
        Constant padding value if image is not perfectly divisible by the
        integer factors.

    Returns
    -------
    image : ndarray
        Down-sampled image with same number of dimensions as input image.

    Examples
    --------
    >>> a = np.arange(15).reshape(3, 5)
    >>> a
    array([[ 0,  1,  2,  3,  4],
           [ 5,  6,  7,  8,  9],
           [10, 11, 12, 13, 14]])
    >>> downscale_local_mean(a, (2, 3))
    array([[ 3.5,  4. ],
           [ 5.5,  4.5]])

     N/A N/A block_reduce image factors N/A np mean cval N/A _swirl_mapping N/A N/A xy center rotation strength radius N/A N/A N/A N/A x y N/A xy T N/A N/A x0 y0 center N/A rho N/A N/A np sqrt N/A N/A N/A x x0 2 N/A N/A y y0 2 N/A radius N/A N/A radius 5 N/A N/A np log 2 N/A theta N/A N/A rotation N/A strength N/A N/A np exp N/A N/A rho radius N/A N/A np arctan2 N/A y y0 N/A x x0 N/A N/A xy N/A N/A N/A 0 N/A x0 N/A rho N/A N/A np cos theta N/A N/A xy N/A N/A N/A 1 N/A y0 N/A rho N/A N/A np sin theta N/A xy N/A swirl N/A N/A image center strength radius rotation output_shape order mode cval clip preserve_range N/A None 1 100 0 None 1 constant 0 True False N/A N/A Perform a swirl transformation.

    Parameters
    ----------
    image : ndarray
        Input image.
    center : (row, column) 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 1. 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.  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`.

     N/A N/A center None N/A N/A center N/A N/A N/A N/A np array N/A image shape N/A 2 2 N/A warp_args N/A center rotation strength radius center rotation strength radius N/A N/A warp image _swirl_mapping map_args warp_args output_shape output_shape order order mode mode cval cval clip clip preserve_range preserve_range N/A