In this article, you will learn how to record a screen with a decent frame rate by using Python and MSS. How to use template matching and edge detection with OpenCV. And if you wish you can make your machine to play a game.
Intro
I like automation and once I read a review written by Markus Rene Pae about yet another python library PyAutoGUI. The library allows you to manipulate by OS inputs like emitting a mouse or keyboard events. One of the challenges Markus proposed was to automate the Google Dino Game. And I was curious does PyAutoGUI allow me to capture a monitor in realtime, find Dino and perform a jump when it’s needed? I decided to give it a try and do not stick to a browser implementation, so Dino should run regardless is it a browser or standalone app. Later in this article you’ll find out for which tasks PyAutoGUI works well, for which it’s better to use other techniques.

#opencv #computer vision #screenshots #automation #algorithms

You never get bored playing with Computer Vision
2.65 GEEK