我希望在单个点上使用WarpPerspective()。
当前我正在图像上使用它,并且正在工作:
Mat warpMatrix = CvInvoke.GetPerspectiveTransform(_srcCorners, _destCorners);
Image<Bgra, byte> dstImg = new Image<Bgra, byte>(width, height);
CvInvoke.WarpPerspective(img, dstImg, warpMatrix, new System.Drawing.Size(width, height),
Inter.Linear, Warp.Default, BorderType.Transparent);
我希望在一个点(Pointf)上执行相同的操作。我做了一些测试,但是每次得到0,0:/。示例:
Mat warpMatrix = CvInvoke.GetPerspectiveTransform(_srcCorners, _destCorners);
VectorOfPointF src = new VectorOfPointF(new PointF[] { point });
VectorOfPointF ret = new VectorOfPointF();
CvInvoke.WarpPerspective(src, ret, warpMatrix, new Size(1,1),
Inter.Linear, Warp.Default, BorderType.Transparent);
请,你能帮我吗? :)
OpenCV使用不同的函数来转换点和/或向量。看到文档的perspectiveTransform部分。