COLOR mode (default): place the phone, tap START, then tap on the ball in the live feed to set the target color. The pill in the bottom-left shows the picked color.
MOTION mode: tap the bottom-left pill to switch. Then STEP AWAY for 2 seconds while the background calibrates. Re-tap CALIBRATE if drift creeps in.
Place the phone 1.5–3m away. Plain background helps in either mode.
Juggle. Each direction reversal of the ball is counted as a touch.
If detection is jumpy: lower SENSITIVITY (motion mode) or tap a cleaner spot on the ball (color mode).
Increase MIN RADIUS if small noise blobs trigger false counts.
DEBUG tints what the algorithm sees as "moving" or "matching color" — your main diagnostic tool.
RESET clears the count. FLIP CAM swaps front/back camera.
Best score is saved on this device. Camera frames stay on-device.