Performance Notes
Frame processing strategy
Section titled “Frame processing strategy”The default scanner throttles document detection to around 10 FPS for stability and battery efficiency.
Processing resolution
Section titled “Processing resolution”Live detection uses a resized frame path (PROCESSING_WIDTH = 480) to balance quality and latency.
Detection behavior
Section titled “Detection behavior”- Contour smoothing reduces jitter between frames.
- Missed detections are tolerated briefly before clearing overlays.
- Candidate scoring favors large, centered, rectangular document quads.
Tuning suggestions
Section titled “Tuning suggestions”- Increase processing width for higher precision on high-end devices.
- Decrease processing width for low-end device responsiveness.
- Validate thresholds across varied lighting and paper backgrounds.
- Benchmark OCR latency separately from scan capture latency.