Function mindspore::dataset::GetRotationMatrix2D

Function Documentation

bool mindspore::dataset::GetRotationMatrix2D(float x, float y, double angle, double scale, LiteMat &M)

Matrix rotation.

Parameters
  • x[in] The value of the x-axis of the coordinate rotation point.

  • y[in] The value of the y-axis of the coordinate rotation point.

  • angle[in] Rotation angle.

  • scale[in] Scaling ratio.

  • M[in] Output transformation matrix.

Returns

Return true if transform successfully.

Example
/* Get Rotation matrix */
double angle = 60.0;
double scale = 0.5;
LiteMat M;
GetRotationMatrix2D(1.0f, 2.0f, angle, scale, M);
std::cout << M.width_ << " " << M.height_ << " " << M.channel_ << std::endl;