Function mindspore::dataset::GetPerspectiveTransform

Function Documentation

bool mindspore::dataset::GetPerspectiveTransform(std::vector<Point> src_point, std::vector<Point> dst_point, LiteMat &M)

Perspective transformation.

Example
/* Get Perspective matrix */
std::vector<Point> src = {Point(165, 270), Point(835, 270), Point(360, 125), Point(615, 125)};
std::vector<Point> dst = {Point(165, 270), Point(835, 270), Point(100, 100), Point(500, 30)};
LiteMat M;
GetPerspectiveTransform(src, dst, M);
std::cout << M.width_ << " " << M.height_ << " " << M.channel_ << std::endl;

参数
  • src_point[in] Input coordinate point.

  • dst_point[in] Output coordinate point.

  • M[in] Output matrix.

返回

Return true if transform successfully.