Class Posterize
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class Posterize : public mindspore::dataset::TensorTransform
Posterize an image by reducing the number of bits for each color channel.
Public Functions
-
explicit Posterize(uint8_t bits)
Constructor.
- 参数
bits – [in] The number of bits to keep for each channel, should be in range of [0, 8].
样例/* Define operations */ auto decode_op = vision::Decode(); auto posterize_op = vision::Posterize(8); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, posterize_op}, // operations {"image"}); // input columns
-
~Posterize() override = default
Destructor.
-
explicit Posterize(uint8_t bits)