Learn how to program
by playing video games.

OpenCV Object Detection in Games

Learn how to use Python and OpenCV for object detection in video games.

OpenCV Object Detection in Games Python Tutorial #1
OpenCV is an open source computer vision library with hundreds of functions for processing and understanding images. In this tutorial, I'm going to show you …
Thresholding with Match Template
Detect multiple objects with OpenCV's match template function by using thresholding. In this tutorial, we dig into the details of how this works. Links GitHub …
Grouping Rectangles into Click Points
Learn the trick to using OpenCV groupRectangles() for multiple object detection. This is part 3 in the OpenCV Python tutorial for gaming. Links Grab the …
Fast Window Capture
Learn how to capture window data in real-time as a video stream for processing with OpenCV. We try several different methods searching for the fastest …
Real-time Object Detection
Learn how to detect objects inside a game window in real-time using OpenCV. Links Grab the code on GitHub: https://github.com/learncodebygaming/opencv_tutorials In the first three parts …
HSV Color Range Thresholding
Improve your object detection by using the HSV Thresholding technique in OpenCV. I'll also show you how to use the OpenCV GUI builder to adjust …
Canny Edge Detection? ORB Feature Matching?
Learn from my explorations with using Canny Edge Detection and ORB Feature Matching to detect objects in video games in real-time. Links Grab the code …
Training a Cascade Classifier
In this tutorial, we train an OpenCV Cascade Classifier entirely on Windows to detect objects in a video game in real-time. Making your own Haar …
How To Build a Bot with OpenCV
Learn how to combine OpenCV object detection with PyAutoGUI and Threading to build a custom Python video game bot. Using the OpenCV image recognition techniques …
Ben Johnson My name is Ben and I help people learn how to code by gaming. I believe in the power of project-based learning to foster a deep understanding and joy in the craft of software development. On this site I share programming tutorials, coding-game reviews, and project ideas for you to explore.