You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 547aabd
Browse filesBrowse the repository at this point in the historyBrowse files
perf/robustness: bound QR and 1D scans; split scan_2d/scan_1d; add decode2d
Two decoders could stall for seconds on a cluttered full-frame photo:
- qr::scan ran the expensive thin-plate-spline dewarp on every failed finder-triple
hypothesis across all four binarization passes (~7s on a busy 1080p frame with no
QR). Cap dewarp to the best MAX_DEWARP_PER_PASS hypotheses per pass; a genuine
curved symbol's correct (high-scored) triple still dewarps, texture can't.
- scan1d's fine edge extractor pruned luminance extrema one at a time (superlinear),
so a textured full-width scanline stalled it. Bail when a profile has more than
MAX_FINE_EXTREMA swings — a barcode line never does; a crop stays far under it.
Also split pipeline::scan_all into scan_2d (self-localizing QR/DataMatrix/PDF417,
meant for whole frames, carries location) and scan_1d (linear, wants a located crop),
and add a wasm decode2d export returning each 2D code's bounding box. This lets a live
front-end read 2D codes directly off each frame, independent of the coarse locator.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments