mindspore.dataset.vision.Invert
- class mindspore.dataset.vision.Invert[source]
Apply invert on input image in RGB mode. This operation will reassign every pixel to (255 - pixel).
- Raises
RuntimeError – If given tensor shape is not <H, W, C>.
- Supported Platforms:
CPU
Examples
>>> transforms_list = [vision.Decode(), vision.Invert()] >>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list, ... input_columns=["image"])