Hello OpenCV Community. I'm trying to understand how exactly the Template Matching algorithm works. I've read the documentation as well as the explanation in the o'reilly book on page 215ff and have a basic understanding of how the images are matched. However none of theses sources explains in detail why the formulas look like they do. So I'm searching for a mathematical explanation of the CV_TM_CCORR formula and especially the three parts of the CV_TM_CCOEFF formula. I tried to read how the cross correlation stuff works but I'm not a great mathematician and did not fully understand it. Additionally, the formulas in both linked sources seem to have one or two mistakes which does not make it easier to understand. I would very much appreciate if someone could help me with this, as I need it for my current university project.
Thanks in advance, j