Why the fuck would you build a Pre-Grader?!!
Is what everyone would say.. I saw my nephew sending in card after card to PSA and TAG. Some came back as 9's and 10's but most came in below.
18 frames captured. Zero passed.
The card looks fine. The lighting looks fine. The detector disagreed 18 times in a row, so the grade is blocked.
When the scan can't measure cleanly, the tool says so.
Step zero before any scan.
Level the phone within 3 degrees on both axes. If it's tilted, the burst button stays disabled. A grader sets the card down on a flat surface. The phone has to do the same.
A thing I had to learn:
Diagnostic logging meant to find one bug becomes part of the load profile. The tool gets slower because the tool is watching itself.
Spent a morning ripping out breadcrumbs from a fix that's been working for a week..
Spent A week convinced iPhone Safari hated our scanner.
Wasn't iPhone. Wasn't Safari.. Was a quiet interaction between how a computer-vision library loads on the web and how JavaScript resolves promises.
Fix was a few lines... as always..
Stupid
The confidence number isn't one number. It's four.
How sure we are the corners are right. How clean the lighting is. How well the centering measurement converged. How much the frames agreed with each other.
Anything below the gate, we don't show a grade. We show why.
A $50 raw card. submission: $15
If it grades a 9, you spent $15 to find it's worth 40bucks.. If it grades a 10, you cleared maybe $85.
The expected value of submitting cards under $100 is mostly negative...
Three pieces shipped today:
- Find the card in the frame
- Flatten the perspective so it's a clean rectangle
- Measure the centering
Code has to do all three before it gets to think about a grade.
What the scanner sees while it's deciding whether to scan you at all.
Steadiness, tilt. check before a single grading thought happens.
Hold your hand steady mah man. The machine knows.
First piece that worked: the steadiness gate.
Hold the phone still for 1.5 seconds. If it shakes, the scan doesn't start. If the gyro says you're tilted, the scan doesn't start.
A grader sets the card down on a flat surface. Build a little debugger.
Day 1: I pulling out a ruler (and a scanner)
Centering on a graded card is a millimeter call. PSA tolerances go to the half-percent at times. But I figured if TAG can do it, I can too.