I'm writing a bot that interact with the pc. Briefly what I do is:
-Take a screenshot of the screen
-recognize an object (with cv2 matchTemplate) on this screenshot
-make some mouse action using the position found (example: move the mouse pointer on an icon found in the previous point)
-restart from the first point
Now, I have to interact with some object in movement on the screen, and so I need a fast way to take screenshot, or an alternative way to do this job, what can I do?