Hello everyone, in the matchTemplate function there is a picture illustrating the slinding-window-approach (the one with the two black arrows). First of all: as I understand the code, the coordinates in this pictures are not right, are they? I came to this assumption, because the result-variable contains the match between left upper corner from template with left upper corner from queryimage (not the center of template with left upper corner from query as shown in the picture). If this is correct it means that the whole template has to fit on the searchimage. A situation as shown (half dogs had correlate to nothing) is not possible. Could someone confirm this assumption, please?
I also worked with the matlab version of the normalized cross-correlation normxcorr2. In this function the result space is in the dimensions of (rows.template + rows.query +1) x (cols.template + cols.query +1). Can you give me a hint, if or how such an output is possible as well with openCV? could adding a black boarder do the trick?