Shortcuts

mmcv.image.imflip

mmcv.image.imflip(img: numpy.ndarray, direction: str = 'horizontal')numpy.ndarray[source]

Flip an image horizontally or vertically.

Parameters
  • img (ndarray) – Image to be flipped.

  • direction (str) – The flip direction, either “horizontal” or “vertical” or “diagonal”.

Returns

The flipped image.

Return type

ndarray