import cv2
img=cv2.imread("1.jpeg")
tag=cv2.imread("11.jpg")
gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
tg = cv2.cvtColor(tag, cv2.COLOR_BGR2GRAY)
h=img.shape[0]
w=img.shape[1]
height=tg.shape[0]
width=tg.shape[1]
def matcher(a,b):
for x in range(0,height):
for y in range(0,width):
if not tg[x,y]==gray[a+x,b+y]:
break
for c in range(0,h-height):
for d in range(0,w-width):
if matcher(c,d)==1:
cv2.rectangle(img, (d,c), (d + width - 1,c + height - 1), (0, 255, 0), 3)
cv2.imshow("hi", img)
cv2.waitKey(0)