Class ConvertColor

Inheritance Relationships

Base Type

Class Documentation

class ConvertColor : public mindspore::dataset::TensorTransform

Change the color space of the image.

Public Functions

explicit ConvertColor(ConvertMode convert_mode)

Constructor.

Example
/* dataset is an instance of Dataset object */
dataset = dataset->Map({std::make_shared<vision::Decode>(),
                        std::make_shared<vision::ConvertColor>(ConvertMode::COLOR_BGR2RGB)}, // operations
                       {"image"});                                                           // input columns

参数

convert_mode[in] The mode of image channel conversion.

~ConvertColor() = default

Destructor.