paniz_image package

Submodules

paniz_image.paniz_image module

paniz_image.paniz_image.rotate_image(img, rot_num=1)[source]

rotates the image counterclockwise for a given number of rotationslike np.rot90(img)

Parameters
  • img (numpy.ndarray) – A numpy array representing the image.

  • rot_num (int) – An integer determining the number of rotations.

Returns

The rotated image.

Return type

numpy.ndarray

Examples

>>> from paniz_image import paniz_image
>>> import numpy as np
>>> image =  np.arange(18).reshape(3,2,3)
>>> paniz_image.rotate_image(image, 6)
array([[[15, 16, 17],
    [12, 13, 14]],
[[ 9, 10, 11],

[ 6, 7, 8]],

[[ 3, 4, 5],

[ 0, 1, 2]]])

Module contents