so i'm using opencv in python to look at a specific part of screen using this code:
import numpy as np
from PIL import ImageGrab
import cv2
while(True):
printscreen_pil = ImageGrab.grab(bbox=(852,530,911,575))
printscreen = np.array(printscreen_pil.getdata(),dtype='uint8')\
.reshape((printscreen_pil.size[1],printscreen_pil.size[0],3))
cv2.imshow('window',cv2.cvtColor(printscreen, cv2.COLOR_BGR2GRAY))
if cv2.waitKey(25) & 0xFF == ord('q'):
cv2.destroyAllWindows()
break
I want to give an output whenever this part of the screen matches an image. I'm stuck and reading up on 100 different tutorials but I'm stuck at the moment.