Class RandomSolarize
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RandomSolarize : public mindspore::dataset::TensorTransform
Invert pixels randomly within a specified range.
Public Functions
-
explicit RandomSolarize(const std::vector<uint8_t> &threshold = {0, 255})
Constructor.
- Example
/* Define operations */ auto decode_op = vision::Decode(); auto random_op = vision::RandomSharpness({0, 255}); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, random_op}, // operations {"image"}); // input columns
- 参数
threshold – [in] A vector with two elements specifying the pixel range to invert. Threshold values should always be in (min, max) format. If min=max, it will to invert all pixels above min(max).
-
~RandomSolarize() = default
Destructor.
-
explicit RandomSolarize(const std::vector<uint8_t> &threshold = {0, 255})