Class CenterCrop

Inheritance Relationships

Base Type

Class Documentation

class CenterCrop : public mindspore::dataset::TensorTransform

Crop the input image at the center to the given size.

Public Functions

explicit CenterCrop(std::vector<int32_t> size)

Constructor.

Parameters

size[in] A vector representing the output size of the cropped image. If the size is a single value, a squared crop of size (size, size) is returned. If the size has 2 values, it should be (height, width).

~CenterCrop() = default

Destructor.