ah, right I’m not using the loop at all there. If I use “frame” instead of “cap” in the matchTemplate I get a different error.
File "main.py", line 75, in operation
result = cv2.matchTemplate(frame, searchFor, cv2.TM_CCOEFF_NORMED)
cv2.error: OpenCV(4.5.3) C:\Users\runneradmin\AppData\Local\Temp\pip-req-build-c2l3r8zm\opencv\modules\imgproc\src\templmatch.cpp:1164: error: (-215:Assertion failed) (depth == CV_8U || depth == CV_32F) && type == _templ.type() && _img.dims() <= 2 in function 'cv::matchTemplate'