Class Solarize

Inheritance Relationships

Base Type

Class Documentation

class Solarize : public mindspore::dataset::TensorTransform

Invert pixels within a specified range.

Public Functions

explicit Solarize(const std::vector<float> &threshold)

Constructor.

Parameters

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).

Example
/* Define operations */
auto decode_op = vision::Decode();
auto solarize_op = vision::Solarize({0, 255});

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

Destructor.