From-Scratch Build · Computer Vision
Point a camera at an album sleeve and HoloVinyl works out which record it is and where it sits in the frame — then warps an overlay onto it. The augmented-reality visual is the front end; the real engine is a Python/OpenCV pipeline that recognises the sleeve and recovers its pose. On 72 photographed-style queries it hits 100% match accuracy with a mean of 201 RANSAC inliers, and rejects random non-covers as no match.
What it is
Anything drawn on top of the record has to stick to it as it tilts and rotates — if the overlay slides, the illusion breaks. So before any visual flourish, HoloVinyl solves a pure vision problem: find the sleeve in the photo, confirm which album it is, and recover the homography that says exactly how it's positioned. That same matrix then warps the overlay into correct perspective so it lands glued to the surface.
The engine is real and runs in holovinyl/recognize.py. Album art is copyrighted, so the database is six original abstract covers generated procedurally and committed to the repo; queries are made by photographing-style augmentation — perspective warp, cluttered background, brightness jitter and blur — so recognition is tested on deliberately degraded inputs, not pristine scans.
demo.py.The pipeline
Every step below is real OpenCV in holovinyl/recognize.py and overlay.py.
Detect up to 1500 keypoints and their binary descriptors on the query photo.
kNN-match query descriptors against each enrolled cover with a Hamming brute-force matcher.
Keep a match only when the best neighbour beats the second by 0.75×, dropping ambiguous pairs.
Fit a cover→frame transform robustly and count geometric inliers; most-inliers wins, ≥15 to accept.
Push an overlay through that same homography so it lands warped exactly onto the tilted sleeve.
Too few inliers ⇒ no match, so random clutter is never hallucinated into an album.
Architecture
One pass of the recognition pipeline, exactly as the Python core runs it:
ORB keypoints + binary descriptors on the query image.
kNN-match against every enrolled cover; keep only confident pairs via Lowe's 0.75 ratio test.
Fit a cover→frame homography and count inliers; the cover with the most inliers (≥15) is the match.
Map the cover's corners through the homography to get the sleeve's outline in the photo.
Push the overlay through the same matrix so it sits in correct perspective on the sleeve.
Try it
Drag the four corners of the sleeve to tilt it. The disc overlay is warped onto the quad through a homography computed in JavaScript — the same cv2.warpPerspective idea the Python engine uses, just rendered here so you can feel it. The recognition that finds the sleeve and recovers this pose from a real photo is the OpenCV core in the repo.
Reflection