Class RandomSharpness

Inheritance Relationships

Base Type

Class Documentation

class RandomSharpness : public mindspore::dataset::TensorTransform

Adjust the sharpness of the input image by a fixed or random degree.

Public Functions

explicit RandomSharpness(const std::vector<float> &degrees = {0.1, 1.9})

Constructor.

参数

degrees[in] A float vector of size 2, representing the range of random sharpness adjustment degrees. It should be in (min, max) format. If min=max, then it is a single fixed magnitude operation (default = (0.1, 1.9)).

样例
/* Define operations */
auto decode_op = vision::Decode();
auto random_op = vision::RandomSharpness({0.1, 1.5});

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

Destructor.