python - 是否可以使用 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]))
问题:
现在我有一个额外的源点的坐标,我不知道目标图像中的坐标。是否可以使用计算的单应性计算目标图像中点的坐标?
解决方案
推荐阅读
- python - 推文没有存储在 csv 文件中。我尝试了很多方法。实际上我收到了推文,但它们没有存储在我的工作簿中
- c# - 带有多个 ||(Or) 语句的 C# While 循环不起作用
- android - 带有 Android 10 的三星 S10 上的通知(唤醒)无法按预期工作
- php - htaccess 的 Ajax Post 问题
- swiftui - 将 SwiftUI 绑定包装在另一个绑定中时无法更新值
- python - 测试链接 api python
- javascript - array.map 无法导出对象?
- javascript - 如何在 Adobe XD 中为 strokeDashOffset 设置动画?
- python - 采购“设置”文件时出现问题
- arrays - Visio VBA 试图获取容器和成员形状的列表