Shortcuts

mmcv.image.posterize

mmcv.image.posterize(img, bits)[源代码]

Posterize an image (reduce the number of bits for each color channel)

参数
  • img (ndarray) – Image to be posterized.

  • bits (int) – Number of bits (1 to 8) to use for posterizing.

返回

The posterized image.

返回类型

ndarray