Class Resize

Inheritance Relationships

Base Type

Class Documentation

class Resize : public mindspore::dataset::TensorTransform

Resize the input image to the given size.

Public Functions

explicit Resize(std::vector<int32_t> size, InterpolationMode interpolation = InterpolationMode::kLinear)

Constructor.

Parameters
  • size[in] A vector representing the output size of the resized image. If the size is a single value, the image will be resized to this value with the same image aspect ratio. If the size has 2 values, it should be (height, width).

  • interpolation[in] An enum for the mode of interpolation.

    • InterpolationMode::kLinear, Interpolation method is linear interpolation.

    • InterpolationMode::kNearestNeighbour, Interpolation method is nearest-neighbor interpolation.

    • InterpolationMode::kCubic, Interpolation method is bicubic interpolation.

    • InterpolationMode::kArea, Interpolation method is pixel area interpolation.

    • InterpolationMode::kCubicPil, Interpolation method is bicubic interpolation like implemented in pillow.

~Resize() = default

Destructor.