【发布时间】:2016-03-11 00:57:09
【问题描述】:
我使用了四组点来获得透视变换矩阵。然后使用warpPerspective 将矩阵A 转换为矩阵B。从垫子 A 点 a。我想在垫子 B 中获得新点 a 的位置。但 warpPerspective 不能这样做,而 perspectiveTransform 可以。
这里我想知道perspectiveTransform得到的位置是否与使用warpPerspective在矩阵B中的位置相同。
那么,warpPerspective 和 perspectiveTransform 有什么区别?
Mat trans = getPerspectiveTransform(dst, gpsPoints);
warpPerspective(A, B, trans, image.size());
Point2f a = Point2f(..., ...); //were known
vector<Point2f> obj(1);
obj[0] = a;
vector<Point2f> b;
perspectiveTransform(obj, b, trans);//if the new point in B is c, is c equals to b?
【问题讨论】: