SciPy

scipy.misc.imrotate

scipy.misc.imrotate(arr, angle, interp='bilinear')[source]

Rotate an image counter-clockwise by angle degrees.

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

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