SciPy

scipy.misc.imrotate

scipy.misc.imrotate(*args, **kwds)

imrotate is deprecated! imrotate is deprecated in SciPy 1.0.0, and will be removed in 1.2.0. Use skimage.transform.rotate instead.

Rotate an image counter-clockwise by angle degrees.

This function is only available if Python Imaging Library (PIL) is installed.

Warning

This function uses bytescale under the hood to rescale images to use the full (0, 255) range if mode is one of None, 'L', 'P', 'l'. It will also cast data for 2-D images to uint32 for mode=None (which is the default).

Parameters:
arr : ndarray

Input array of image to be rotated.

angle : float

The angle of rotation.

interp : str, optional

Interpolation

  • ‘nearest’ : for nearest neighbor
  • ‘bilinear’ : for bilinear
  • ‘lanczos’ : for lanczos
  • ‘cubic’ : for bicubic
  • ‘bicubic’ : for bicubic
Returns:
imrotate : ndarray

The rotated array of image.

Previous topic

scipy.misc.imresize

Next topic

scipy.misc.imsave