Image.rotate#
- Image.rotate(angle: float, centre=None, center=None) Self[source]#
Rotate an image
- Parameters:
angle (scalar) – rotatation angle [radians]
centre (array_like(2)) – centre of rotation, defaults to centre of image
center (array_like(2), optional) – synonym for
centre
- Returns:
rotated image
- Return type:
Rotate the image counter-clockwise by angle
anglein radians.Example:
>>> from machinevisiontoolbox import Image >>> img = Image.Read('monalisa.png') >>> out = img.rotate(0.5) >>> out.disp() <matplotlib.image.AxesImage object at 0x7f076d9aef60>
Note
Rotation is defined with respect to a z-axis which is into the image, therefore counter-clockwise is a positive angle.
The pixels in the corners of the resulting image will be undefined.