Ask Your Question

Revision history [back]

minMaxLoc is doing everything for you. It returns the min value, the max value, their position. If you call this function on the result of matchTemplate, you will have the best position of the patch (in maxLoc), and the similarity score (in maxValue). If you used 'CV_TM_SQDIFF', you have to get the min instead of max, but it's done with the same function.

I hope it's clear...