Class AutoContrast

Inheritance Relationships

Base Type

Class Documentation

class AutoContrast : public mindspore::dataset::TensorTransform

Apply automatic contrast on the input image.

Public Functions

explicit AutoContrast(float cutoff = 0.0, const std::vector<uint32_t> &ignore = {})

Constructor.

Example
/* Define operations */
auto decode_op = vision::Decode();
auto autocontrast_op = vision::AutoContrast(10.0, {10, 20});

/* dataset is an instance of Dataset object */
dataset = dataset->Map({decode_op, autocontrast_op},  // operations
                       {"image"});                    // input columns

参数
  • cutoff[in] Percent of pixels to cut off from the histogram, the valid range of cutoff value is 0 to 50.

  • ignore[in] Pixel values to ignore.

~AutoContrast() = default

Destructor.