规模和旋转模板匹配 [英] scale and rotation Template matching

查看:203
本文介绍了规模和旋转模板匹配的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用匹配模板的方法与 CV_TM_CCORR_NORMED 比较两个图像...我想让这个旋转和尺度不变..任何想法?



我试图对图像和模板的傅立叶变换使用相同的方法,但旋转后的结果不同


<当你的对象在场景中旋转或缩放时,与 matchTemplate 的模板匹配不好。



您应该从 Features2D Framework中尝试openCV函数。例如 SIFT SURF 描述符和 FLANN 匹配器。此外,您还需要 findHomography 方法。



这是一个在场景中查找旋转对象的好例子。



更新:



总之,算法是:


  1. 查找对象图像的关键点
    1.1。从这些关键点提取描述符


  2. 查找场景图像的关键点
    2.1从关键点提取描述符


  3. 匹配符匹配描述符


  4. 分析匹配


有不同类的FeatureDetectors,DescriptorExtractors和DescriptorMatches,你可以阅读它们并选择适合你的任务。




I'm using the method of match template with CV_TM_CCORR_NORMED to compare two images ... I want to make to make this rotation and scale invariant .. any ideas?

I tried to use the same method on the fourier transform of the image and the template , but still the result after rotation is different

解决方案

Template matching with matchTemplate is not good when your object is rotated or scaled in scene.

You should try openCV function from Features2D Framework. For example SIFT or SURF descriptors, and FLANN matcher. Also, you will need findHomography method.

Here is a good example of finding rotated object in scene.

Update:

In short, algorithm is this:

  1. Finding keypoints of your object image 1.1. Extracting descriptors from those keypoints

  2. Finding keypoints of your scene image 2.1 Extracting descriptors from keypoints

  3. Match descriptors by matcher

  4. Analyze your matches

There are different classes of FeatureDetectors, DescriptorExtractors, and DescriptorMatches, you may read about them and choose those, that fit good for your tasks.

这篇关于规模和旋转模板匹配的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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