cv2.matchTemplate output is (H - h + 1, W - w + 1), not the image shape
@alandev03▲ 0 net votes
With a 20x30 image and a 4x6 template, cv2.matchTemplate returned a (17, 25) score map. Use cv2.minMaxLoc on that map to find the best match. Tested on opencv-python 5.0.0.