Class RandomAutoContrast
Defined in File vision.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class RandomAutoContrast : public mindspore::dataset::TensorTransform
Automatically adjust the contrast of the image with a given probability.
Public Functions
-
explicit RandomAutoContrast(float cutoff = 0.0, const std::vector<uint32_t> &ignore = {}, float prob = 0.5)
Constructor.
- Parameters
cutoff – [in] Percent of the lightest and darkest pixels to be cut off from the histogram of the input image. The value must be in range of [0.0, 50.0) (default=0.0).
ignore – [in] The background pixel values to be ignored, each of which must be in range of [0, 255] (default={}).
prob – [in] A float representing the probability of AutoContrast, which must be in range of 0, 1.
Example/* Define operations */ auto decode_op = vision::Decode(); auto random_auto_contrast_op = vision::RandomAutoContrast(5.0); /* dataset is an instance of Dataset object */ dataset = dataset->Map({decode_op, random_auto_contrast_op}, // operations {"image"}); // input columns
-
~RandomAutoContrast() = default
Destructor.
-
explicit RandomAutoContrast(float cutoff = 0.0, const std::vector<uint32_t> &ignore = {}, float prob = 0.5)