nabu.processing.rotation module

class nabu.processing.rotation.Rotation(shape, angle, center=None, mode='edge', reshape=False, **sk_kwargs)[source]

Bases: object

Initiate a Rotation object.

Parameters:
  • shape (tuple of int) – Shape of the images to process

  • angle (float) – Rotation angle in DEGREES

  • center (tuple of float, optional) – Coordinates of the center of rotation, in the format (X, Y) (mind the non-python convention !). Default is ((Nx - 1)/2.0, (Ny - 1)/2.0)

  • mode (str, optional) – Padding mode. Default is “edge”.

  • reshape (bool, optional) –

  • function (All the other parameters are passed directly to scikit image 'rotate') –

  • order

  • cval

  • clip

  • preserve_range.

supported_modes = {'constant': 'constant', 'edge': 'edge', 'edges': 'edge', 'periodic': 'wrap', 'reflect': 'reflect', 'sym': 'symmetric', 'symmetric': 'symmetric', 'wrap': 'wrap', 'zeros': 'constant'}
rotate(img, output=None)[source]