visumorph.flip

Module Contents

Functions

flip(image[, v])

Flip image vertically or horizontally.

visumorph.flip.flip(image, v=0)[source]

Flip image vertically or horizontally.

Parameters:
  • image (visumorph.Image) – Image to be flipped.

  • v (int, optional) – Flip vertically if v=1, horizontally if v=0. By default, v=0.

Returns:

Flipped VisuMorph image.

Return type:

image

Raises:

TypeError – If the image is not a valid VisuMorph Image and/or v is not 0 or 1.

Examples

>>> import visumorph
>>> from visumorph.flip import flip
>>> img = visumorph.load_image("exampleimage.jpg")
>>> flip(img, v=1)