Member-only story
Destroying Duck Hunt with OpenCV — image analysis for beginners
Write code that will beat every Duck Hunt high score
Duck Hunt is hard; let’s write some code that will top all high scores without even having to touch our mouse! We’ll apply some OpenCV techniques that will analyze our screen, search for ducks and shoot them by clicking on them. It will do this many times per second so don’t count on seeing that dog laugh at you ever again!
At the end of this article you’ll be able to beat your own games’ highscores without touching the mouse. Check out the end result here.
Series
This article is part of a series about OpenCV image processing. Check out the other articles:
- Reading images, video’s, your screen and the webcam
- Detecting and blurring faces
- Destroying Duck Hunt with template matching (📍 You are here!)
- Creating a motion-detector
- Detecting shapes without AI (under construction; coming soon)
- Detecting and reading text from images (under construction; coming soon)
Hunting birds
Obviously we’re not playing the original game; that needs to be played with the NES Zapper…