mindspore.dataset.vision.c_transforms.Decode
- class mindspore.dataset.vision.c_transforms.Decode(rgb=True)[source]
Decode the input image in RGB mode(default) or BGR mode(deprecated).
- Parameters
rgb (bool, optional) – Mode of decoding input image (default=True). If True means format of decoded image is RGB else BGR(deprecated).
- Raises
RuntimeError – If rgb is False, since this option is deprecated.
RuntimeError – If given tensor is not a 1D sequence.
- Supported Platforms:
CPU
Examples
>>> transforms_list = [c_vision.Decode(), c_vision.RandomHorizontalFlip()] >>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list, ... input_columns=["image"])