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

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

问题描述

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

我写了这个程序,它只是检查像素值,没有人知道是否有任何库工具做到这一点。

#void%20matchTemplate%28InputArray%20image,%20InputArray%20temp,%20OutputArray%20result,%20int%20method%29rel =nofollow noreferrer> matchTemplate 。 这里是我的答案之一,展示了如何从虚拟宇宙飞船探测太阳。 这里是更新的教程OpenCV使用 matchTemplate 。现在,使用 matchTemplate 方法有一些注意事项。如果图像A在图像B中可以是任意姿势(例如,比例,旋转,透视等等的变化),那么 matchTemplate 不会工作得很好。如果发生这种情况,您将需要使用Adrian Popovici建议的功能检测路线。


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.

解决方案

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天全站免登陆