基于模板匹配的多圆识别算法
2017-09-28陈令刚
陈令刚
(安徽理工大学计算机科学与工程学院,安徽淮南232001)
基于模板匹配的多圆识别算法
陈令刚
(安徽理工大学计算机科学与工程学院,安徽淮南232001)
圆形是基本的几个图形,对圆形的识别也是计算机视觉的基本任务之一。圆形检测在工业制造、通检测、虹膜识别、生物医药、武器制造等领域都有着广泛的应用。模板匹配是图像识别的常用的方法之一,但是模板匹配仅能匹配图片视场中匹配度最高的位置。该文通过改进匹配策略,提出了一种基于距离的识别算法,使得能够匹配出视场中所有的圆形。合成图片上实验结果表明了该算法的有效性,精度为像素级。
圆形识别;模板匹配;计算机视觉
Abstract:Circle is one of the basic graphics.Circular recognition is also one of the basic tasks of computer vision.Circle detec⁃tion in the industrial manufacturing,traffic detection,iris recognition,bio-medicine,weapons manufacturing and other fields has a wide range of application.Template matching is one of the commonly used methods of image recognition,but which can only match the highest degree of location in the image field of view.In this paper,a new algorithm Based on distance is proposed by improving the match strategy,so that all the circles in the field of view can be matched.The experimental results on the synthetic image show that the algorithm is effective and the precision is pixel level.
Key words:Circle detection;Template matching;Computer vision
1 概述
圆形的识别是图像测量中最基本和最重要的任务之一,圆检测在工业制造、交通检测、虹膜识别、生物医药、武器制造等领域都有着广泛的应用。霍夫变换是最常用的圆形检测技术,但是该算法空间复杂度和时间复杂度的需求都比较高,且在噪声比较大的图片背景下识别效果并不理想[1]。模板匹配是一种重要的图像识别技术,已经在很多计算机视觉中得到了应用。如OCR、卫星遥感、PCB检测、视觉跟踪等。基本的模板匹配算法通过在源图像上滑动指定大小模板图模板图像,源图像与模板图像一一进行相似度的计算。源图像的每一个像素点都与模板图像计算之后就可以得到最佳匹配位置,也得到相应位置对应的相似值。最佳匹配位置的横纵坐标各加上模板的1/2高和宽,这样我们就得到了源图像中的一个圆形的圆心。……
