Card Detection
A real-time computer-vision system that detects and identifies playing cards from a webcam feed using contour analysis and ORB feature matching.
Recognizing playing cards from a live camera is a deceptively hard CV problem: cards rotate, overlap, catch glare, and have to be matched against a 52-card template set fast enough to feel real-time.
I split it into detection and recognition. Contour analysis isolates card-shaped quadrilaterals in each frame and warps them flat; ORB feature matching then identifies each card against a set of template images. The pipeline is modular so each stage can be tested on its own.
Contour-based detection
Finds and perspective-corrects card-shaped contours in the webcam feed, handling multiple cards per frame.
ORB recognition
Matches each detected card against template images using Oriented FAST and Rotated BRIEF features — rotation-tolerant and license-free.
Live visual feedback
Draws bounding boxes and card identities straight onto the video, with a clean module split (card, detector, matcher, utils).
Classic computer vision still goes a long way before you reach for a neural net. Getting the contour and warp stages right made recognition almost easy — most of the accuracy was won in preprocessing.