【发布时间】:2016-01-25 09:51:33
【问题描述】:
当我再次使用变换矩阵的逆矩阵应用 warpPerspective() 时,我得到了第一张图像:
M = cv2.getPerspectiveTransform(pts1,pts2)
warped = cv2.warpPerspective(img, M, (cols,rows))
# ... some operations, obtain a rectangle
ret, IM = cv2.invert(M)
restored = cv2.warpPerspective(warped, IM, (cols,rows))
但是,我对warped 应用了一些操作,并在图像上得到了一些位置(如矩形)。如何在restored图像上找到矩形的对应坐标?
感谢 Python 和 C++ 的答案。
【问题讨论】:
标签: python c++ opencv matrix linear-algebra