openCV matchTemplate函数不同参数对应的相似性度量
Compares a template against overlapped image regions.
The function slides through?image?,compares the overlapped patches of size? ?against?templ?using the specified method and stores the comparison results in?result?. Here are the formulae for the available comparison methods (?denotes?image,??template,??result?). The summation is done over template and/or the image patch:??* method=CV_TM_SQDIFF
After the function finishes the comparison,the best matches can be found as global minimums (when?CV_TM_SQDIFF?was used) or maximums (when?CV_TM_CCORR?or?CV_TM_CCOEFF?was used) using the?minMaxLoc()?function. In case of a color image,template summation in the numerator and each sum in the denominator is done over all of the channels and separate mean values are used for each channel. That is,the function can take a color template and a color image. The result will still be a single-channel image,which is easier to analyze. (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |