Class RandomPosterize
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RandomPosterize : public mindspore::dataset::TensorTransform
Reduce the number of bits for each color channel randomly.
Public Functions
-
explicit RandomPosterize(const std::vector<uint8_t> &bit_range = {4, 8})
Constructor.
- Example
/* Define operations */ auto decode_op = vision::Decode(); auto random_op = vision::RandomPosterize({4, 8}); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, random_op}, // operations {"image"}); // input columns
- 参数
bit_range – [in] Range of random posterize to compress image. uint8_t vector representing the minimum and maximum bit in range of [1,8] (Default={4, 8}).
-
~RandomPosterize() = default
Destructor.
-
explicit RandomPosterize(const std::vector<uint8_t> &bit_range = {4, 8})