二进制(边缘)图像模板匹配的最佳方法 [英] best approach for template matching of binary (edge) images

查看:317
本文介绍了二进制(边缘)图像模板匹配的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于所有skimage和opencv专家,给定:

To all skimage and opencv gurus, given:

  1. 场景图像

  1. 模板图片

在场景图像中找到十字的最佳方法是什么?这些是从平滑滤波器和Canny滤波器输出的. 现在,我尝试了skimage中的各种示例,以及opencv模板匹配,但结果并不令人满意.

What is the best approach to find the cross in the scene image ? These are output from smoothing, and canny filters. Now, I tried all kinds of examples in skimage, and opencv template matching but the results are not satisfactory.

我的理想解决方案是旋转,平移不变(比例不变将是一个奖励).有没有一种方法可以只转换为轮廓点,然后它们会生成配准点云?那会更准确吗?我想到了RANSAC,但如何将输入提供给RANSAC?

My ideal solution will be rotation, translation invariant (scale invariant will be a bonus) . Is there a way to just convert to contour points and them do a registration point cloud ? Will that be more accurate ? I thought about RANSAC but how do I give the inputs to RANSAC?

谢谢

推荐答案

我解决类似问题的方法是创建大量旋转和缩放后的模板图像变体,并使用opencv的matchTemplate函数.

My approach to solving a similar problem was to create a large set of rotated and scaled variations of the template image and use opencv's matchTemplate function.

我还建议使用预处理步骤,将所有检测到的和闭合的轮廓(对于模板和场景图像)填充为白色,因为黑色的模板图像可能会在场景图像的黑色区域中产生误报.

I would also recommend the preprocessing step of filling all detected and closed contours (for both template and scene image) white since the largely black template image might create false positives in the black regions of the scene image.

这篇关于二进制(边缘)图像模板匹配的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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