Class Affine
Defined in File vision_lite.h
Inheritance Relationships
Base Type
public mindspore::dataset::TensorTransform
(Class TensorTransform)
Class Documentation
-
class Affine : public mindspore::dataset::TensorTransform
Apply affine transform on the input image.
Public Functions
-
explicit Affine(float_t degrees, const std::vector<float> &translation = {0.0, 0.0}, float scale = 0.0, const std::vector<float> &shear = {0.0, 0.0}, InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, const std::vector<uint8_t> &fill_value = {0, 0, 0})
Constructor.
- Parameters
degrees – [in] The degrees to rotate the image.
translation – [in] The values representing vertical and horizontal translation (default = {0.0, 0.0}). The first value represents the x axis translation while the second represents the y axis translation.
scale – [in] The scaling factor for the image (default = 0.0).
shear – [in] A float vector of size 2, representing the shear degrees (default = {0.0, 0.0}).
interpolation – [in] An enum for the mode of interpolation.
fill_value – [in] A vector representing the value to fill the area outside the transformation in the output image. If 1 value is provided, it is used for all RGB channels. If 3 values are provided, it is used to fill R, G, B channels respectively.
-
~Affine() = default
Destructor.
-
virtual std::shared_ptr<TensorOperation> Parse() override
The function to convert a TensorTransform object into a TensorOperation object.
- Returns
Shared pointer to TensorOperation object.
-
explicit Affine(float_t degrees, const std::vector<float> &translation = {0.0, 0.0}, float scale = 0.0, const std::vector<float> &shear = {0.0, 0.0}, InterpolationMode interpolation = InterpolationMode::kNearestNeighbour, const std::vector<uint8_t> &fill_value = {0, 0, 0})