opencv在另一个图像上查找图像坐标 [英] opencv finding image cordinates on another image

查看:53
本文介绍了opencv在另一个图像上查找图像坐标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何在包含图像A"的图像B"上找到图像A"的坐标.

How to find image "A" coordinates on image "B" which contains image "A".

我写了这个程序,它只检查像素值,有人知道有没有库工具可以做到这一点.

I wrote this program which is only checking pixel values, does anyone know is there any library tool do this.

推荐答案

正如 Throwback1986 建议的那样,您可能想要使用 matchTemplate.这里是我的答案之一展示了如何从虚拟航天器中检测太阳.这里是更新的教程OpenCV 关于使用 matchTemplate.现在,使用 matchTemplate 方法有一些注意事项.如果图像A"可以在图像B"中处于任意姿势(例如,缩放、旋转、透视等的变化),那么 matchTemplate 不会很好地工作.如果发生这种情况,您将需要使用 Adrian Popovici 建议的特征检测路线.

As Throwback1986 suggested, you will probably want to use matchTemplate. Here is one of my answers showing how to detect the Sun from virtual spacecraft. Here is the newer tutorial from OpenCV on using matchTemplate. Now, there are some caveats for using the matchTemplate approach. If image "A" can be at an arbitrary pose (e.g., changes in scale, rotation, perspective, etc) in image "B", then matchTemplate isn't going to work very well. If that happens to be the case, you will want to use to go the feature detection route as suggested by Adrian Popovici.

这篇关于opencv在另一个图像上查找图像坐标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆