Card Level Test — Step 1 Refinement + Step 3 Mask
Steps 2 & 3 are FROZEN. Step 1 now adds a local boundary-refinement stage that snaps the selected candidate onto the actual physical edge (orange=original candidate, green=refined). Verify the refined polygon hugs the slab/holder and the carpet falls outside it, so Step 3 makes it transparent.
Mode:
ORIGINAL
Select a card and run detection
DETECTION OVERLAY (Step 1)
No detection yet
STEP 1 REFINEMENT (orange=orig · green=passing side · cyan=accepted · red=rejected)
No refinement debug yet
STEP 1B PER-SIDE DIAGNOSTICS
Run detection to view per-side refinement diagnostics
LEVELED RESULT (Step 2 · contain)
No leveled result yet
CLOSE SAFETY CROP — STEP 2.5 (opaque, ~5% padding)
No safety crop yet
MASK DEBUG (transformed polygon)
No mask debug yet
BACKGROUND REMOVED (Step 3 · PNG)
No transparent result yet
REGRESSION SET
No images marked yet. Run detection and mark PASS/FAIL to build the regression set.
FULL STEP 3 REGRESSION
0 images in set · valid images are leveled; EXPECTED_FAIL_BAD_CAPTURE images are not leveled (correct rejection = pass)Step 1 detection (FROZEN): multi-candidate edge + projection + holder scan with image-frame rejection. Step 2 leveling: warps the approved polygon with max-of-opposite-sides dims + 2.5% external padding; clippingDetected must be false. No background removal or transparency yet.