计算机应用 ›› 2010, Vol. 30 ›› Issue (06): 1559-1561.

• 图形图像处理与模式识别 • 上一篇    下一篇

一种快速的模板匹配算法

唐琎1,李青2   

  1. 1. 中南大学
    2. 中南大学信息科学与工程学院
  • 收稿日期:2009-12-22 修回日期:2010-02-10 发布日期:2010-06-01 出版日期:2010-06-01
  • 通讯作者: 李青
  • 基金资助:
    国家自然科学基金重大研究计划重点项目

Fast template matching algorithm

  • Received:2009-12-22 Revised:2010-02-10 Online:2010-06-01 Published:2010-06-01

摘要: 针对传统的模板匹配算法通常效率较低、计算速度较慢的问题,提出了一种快速的模板匹配方法。该算法一开始取较少的点参与模板匹配,逐步增加参与匹配的点的数目。通过相关系数的比较来决定下一步增加匹配点继续匹配,或者放弃在该位置的匹配,移动模板到新的位置进行新的匹配。计算相关系数时,每次增加参与匹配的点后,首先只对新增的点进行计算,然后与原有的相关系数进行组合,得到新的相关系数。这样就大大减少了算法的计算量。此外,该算法在匹配的过程中所使用的点总是均匀覆盖模板,从而保证了算法的准确度。该算法速度快,准确程度高,能够满足实时性的要求。

关键词: 模板匹配,快速,机器视觉

Abstract: The traditional template matching method has low efficiency and low speed. This paper proposed a fast template matching algorithm. In the beginning, just a small part of points were involved in template matching, and gradually more and more points got involved in template matching. Through the comparison of correlation coefficients, it was determined whether to increase the number of matching points or to abandon the current matching position and move to a new position for a new match. When calculating the correlation coefficient, we just calculated with the new points, and then merged it with the original correlation coefficient to get a new correlation coefficient. This greatly reduced the computation of the algorithm. The points involved in calculating the correlation coefficient always were distributed on the template uniformly, which ensured the accuracy of method. The proposed algorithm has high accuracy and high speed, and it can satisfy the request of real-time.

Key words: template matching,fast,machine vision