Class RGBA2RGB

Inheritance Relationships

Base Type

Class Documentation

class RGBA2RGB : public mindspore::dataset::TensorTransform

Change the input 4 channel RGBA tensor to 3 channel RGB.

Public Functions

RGBA2RGB()

Constructor.

Example
/* Define operations */
auto decode_op = vision::Decode();
auto rgba2rgb_op = vision::RGBA2RGB();

/* dataset is an instance of Dataset object */
dataset = dataset->Map({decode_op, rgba2rgb_op},  // operations
                       {"image"});                // input columns

~RGBA2RGB() = default

Destructor.