← rsandan.github.ioComputer vision · in progress

Snap and Price

One photo of a binder page in, every card identified and priced out. Here's the scanner with its case off. Drag a card's corners and watch each step react.

01 · PhotoCard 5 of 9
02 · Straightened
03 · Fingerprint16×16
04 · Closest in a 60-card catalogbits that differ

Synthetic cards and a synthetic photo: real card art is copyrighted, so the demo draws its own. The page runs the same steps as the Python code, in your browser.

Five frames, one scan

What happens between the shutter and the price tag.

FRAME 01Find edges

Blur, Canny edges, contours. Keep four-cornered shapes with a card's 63 × 88 mm proportions.

FRAME 02Straighten

A homography maps the tilted quad to a flat 630 × 880 card. The lab does this live as you drag.

FRAME 03Fingerprint

A difference hash of the artwork: each bit says whether a pixel is brighter than its neighbor.

FRAME 04Match

Compare against every catalog card. The gap between first and second place sets the confidence.

FRAME 05Price

Look the match up in the daily price data from After the Pull.

Where real photos fight back

ProblemWhy it breaksFix to try
Sleeve glareWashes out art and fakes edgesMask blown-out pixels; CLIP embeddings
Same art, new foilReverse holo vs normal look nearly identicalSecond pass on holo texture and set number
Cards touchingNeighbors merge into one shapeUse the binder's 3 × 3 grid to fill gaps
SlabsCard sits in a case under a labelDetect the case, crop, read the label
Sports cardsNo free image catalog; /99 numbers matterOCR serials; catalog from my own scans

Your turn

Read the code ↗Back to portfolioPython · OpenCV · NumPy · this lab in plain JavaScript