mindspore.dataset.vision.c_transforms.RandomPosterize
- class mindspore.dataset.vision.c_transforms.RandomPosterize(bits=(8, 8))[source]
Reduce the number of bits for each color channel.
- Parameters
bits (sequence or int, optional) – Range of random posterize to compress image. Bits values must be in range of [1,8], and include at least one integer value in the given range. It must be in (min, max) or integer format. If min=max, then it is a single fixed magnitude operation (default=(8, 8)).
Examples
>>> import mindspore.dataset.vision.c_transforms as c_vision >>> >>> transforms_list = [c_vision.Decode(), c_vision.RandomPosterize((6, 8))] >>> data1 = data1.map(operations=transforms_list, input_columns=["image"])