I am trying to take a screenshot, then convert it to a numpy array. I then want to run cv2.matchTemplate using the screenshot. So far the only way I have gotten this to work is to save the image: cv2.imwrite('temp.png',imcv) and then use that image in cv2.matchTemplate. This seems horribly wrong. How can I convert the numpy array properly to avoid saving and just pass it straight to the cv2.matchTemplate function?
I am doing this project in Ubuntu btw.
import …Run Code Online (Sandbox Code Playgroud)