Class Crop

Inheritance Relationships

Base Type

Class Documentation

class Crop : public mindspore::dataset::TensorTransform

Crop an image based on location and crop size.

Public Functions

Crop(std::vector<int32_t> coordinates, std::vector<int32_t> size)

Constructor.

Parameters
  • coordinates[in] Starting location of crop. Must be a vector of two values, in the form of {x_coor, y_coor}.

  • size[in] Size of the cropped area. 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).

~Crop() = default

Destructor.