Class RGB2GRAY
Defined in File vision_lite.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RGB2GRAY : public mindspore::dataset::TensorTransform
-
Convert a RGB image or color image to a grayscale one.
说明
Convert RGB image or color image to grayscale image.
Public Functions
-
RGB2GRAY() = default
Constructor.
- Example
/* Define operations */ auto decode_op = vision::Decode(); auto rgb2gray_op = vision::RGB2GRAY(); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, rgb2gray_op}, // operations {"image"}); // input columns
-
~RGB2GRAY() = default
Destructor.
-
RGB2GRAY() = default