使用opencv的cvMatchTemplate,含源代码,要想自己调试源代码必须安装配置opencv scenel.jpg和template.jpg可以自己改成你想测试的例子。 滚动条代表了5种方法:CV_TM_SQDIFF、CV_TM_SQDIFF_NORMED、CV_TM_CCORR、 CV_TM_CCORR_NORMED、CV_TM_CCOEFF、CV_TM_CCOEFF_NORMED