首页 > 解决方案 > 是否可以使用 cv2.findHomography 计算未知点的坐标?

问题描述

我正在尝试创建图像的自上而下视图。目前我有一些已知的源点和已知的目标点:

src_pts = np.array([(1223,1511),(2238,1090),(1300,1115),(1330,943),(360,1139),(1731,811),(982,831)])
dst_pts = np.array([(636,1982),(1045,1498),(637,1498),(637,1040),(226,1498),(1045,102),(225,102)])

我可以使用以下方法转换图像:

h, status = cv2.findHomography(src_pts, dst_pts)
img_out1 = cv2.warpPerspective(img, h, (img_dst.shape[1], img_dst.shape[0]))

问题:

现在我有一个额外的源点的坐标,我不知道目标图像中的坐标。是否可以使用计算的单应性计算目标图像中点的坐标?

标签: pythonopencvhomographytopdown

解决方案


推荐阅读