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 60a74b9
Browse filesBrowse the repository at this point in the historyBrowse files
fix(detect): isolate 1D barcodes from busy scenes via per-tile labelling
The locator flood-filled every edge-dense tile into one region, then judged
its family from the region's *average* h-vs-v edge balance. On a real photo
(printed text + artwork around a barcode) the whole scene merged into a single
frame-spanning blob whose averaged anisotropy read as a 2D matrix, so no linear
box was ever emitted over the barcode — the live demo had nothing to crop and
decode, even though the decoder reads the barcode fine when handed the crop.
Label each tile by its OWN edge balance before clustering (horizontal-dominant
/ vertical-dominant / balanced) and flood-fill only same-label tiles. A
barcode's directionally-coherent tiles now form their own component instead of
dissolving into the isotropic text. Linear boxes are grown one tile out for the
quiet zone; balanced regions thinner than 2 tiles in either axis (bar-end
strips, text runs) are dropped so the matrix family stays meaningful.
Verified end-to-end on testdata/real_scene_ean.png (native-res region of a real
capture): locate() now yields a linear box over the EAN-13, and crop-decoding
it reads 4901085663356. tests/real_world.rs::real_scene_locate_then_decode_ean
pins the full locate -> crop -> decode loop the demo runs.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
0 commit comments