ericblade / quagga2

An advanced barcode-scanner written in Javascript and TypeScript - Continuation from https://github.com/serratus/quaggajs
MIT License
766 stars 85 forks source link

halfSample investigation #455

Open ericblade opened 2 years ago

ericblade commented 2 years ago

Presently working with the 2.0 branch, although this likely applies to the 1.x branch as well:

with default halfSample settings (usually off during tests, but on for some configs), 19 browser scans are failing in the test suite.

with halfSample forced off, the same 19 scans fail in the test suite. This leads me to believe that halfSample is likely not useful ,or is utterly failing on certain readers, versus others. I'd need to spend some time comparing the full output from both to ensure that's the case.

with halfSample forced on, nearly all of the tests in the suite fail.

i'm concluding that halfSample is either seriously broken, or not nearly as useful as it wants to be.

also, halfSample seems to be used on image acquisition in frame_grabber_browser, in the grayAndHalfSampleFromCanvasData function -- but is also being used in barcode_locator::locate() where it directly calls halfSample().

ericblade commented 2 years ago

it's actually a separate setting that is undocumented and unknown -- halfSample in frame_grabber_browser is in the inputStream block of the config, while halfSample in the locator block is used everywhere.