Opencv exact match
I have two images, and I need to find one image in another.
Source image: link
Need find this image: link
There is a simple python code that finds a match
import cv2
import numpy as np
source = cv2.imread('screen1.jpg')
template = cv2.imread('tpl.jpg')
result = cv2.matchTemplate(source,template,cv2.TM_CCOEFF_NORMED)
y,x = np.unravel_index(result.argmax(), result.shape)
print x,y
It returns coordinates
185 3
But they are wrong, because the image that we are looking for is not available in our image
How to make to return an exact match, and if not found then return false or 0 0