mmcv.image.posterize¶ mmcv.image.posterize(img, bits)[source]¶ Posterize an image (reduce the number of bits for each color channel) Parameters img (ndarray) – Image to be posterized. bits (int) – Number of bits (1 to 8) to use for posterizing. Returns The posterized image. Return type ndarray