Ask Your Question

Revision history [back]

Optimizing matchTemplate

I have been using matchTemplate to look for some patterns in a video. I build a template in one frame and look for that in a few subsequent frames. I'll like to optimize my search. In a different environment that I used in the past, the matching process worked better if the template is defined with odd numbered pixels for height and width. Is there a similar requirement in OpenCV? Are there any other specific heuristics to improve the performance of the matchTemplate function?