Function mindspore::dataset::GetPerspectiveTransform
Defined in File image_process.h
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;
- Parameters
src_point – [in] Input coordinate point.
dst_point – [in] Output coordinate point.
M – [in] Output matrix.
- Returns
Return true if transform successfully.