Live data from Hacker News

Show HN: QuaggaJS, a barcode scanner written in JavaScript

serratus.github.io

11–20 of 28 posts

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#11
> Safari and IE do not allow the access to the camera yet, neither on desktop, nor on mobile. You can check caniuse for updates.

I assume this could be solved by wrapping the JS library in something like PhoneGap and installing it as a native app?

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#12

> Safari and IE do not allow the access to the camera yet, neither on desktop, nor on mobile. You can check caniuse for updates. I assume this could be solved by wrapping the JS library in something like PhoneGap and installing it as a native app?

That's correct. Phonegap/Cordova gets you access to the camera, and would provide the ability to capture an image for local-processing with this library.

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#14
post #7

This is great news. I just wrote a QRcode-reader Django widget to be used on a mobile browser, using the LazarSoft library ( https://github.com/LazarSoft/jsqrcode ). The library worked great, but the HTML5 bits turned out to be surprisingly painful. Camera selection works differently in different browsers - Android Chrome has an API, Firefox throws up a selection dialog every time. Mobile Chrome doesn't let you emit…

I've had similar issues on Google Glass, which has no auto-focus. Commercial libraries like Scandit and even the paid app by the zxing author have better support for blurry images and are able to handle, for example pixels which are partially white/black instead of trying to bin everything into on or off, but the open source version lacks this capability. So sometimes it is possible to do without good focus if you have a better algorithm.

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#16
Fantastic library, we've tried a few like it before and none of them really worked quickly or reliably enough.

We did a quick mashup of our API and this to create a basic (but functional) mobile PoS using the phone camera as a scanner.

https://pbs.twimg.com/media/B3TWAKxIYAALMp7.jpg

https://pbs.twimg.com/media/B3TYETSIAAErP8U.jpg

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#18
post #2

Invariant to scale and rotation in JS on mobile? That's fantastic! I just tested the Red Laser native app on my phone and it can handle scale/rotation too. But I never thought about rotation for the Red Laser app and always tried to align it properly between the [ ] brackets. I think apps that support scale/rotation should not show [ ] brackets but instead a central red +. Haven't dug deeply into how barcode_locator.…

Thanks for the input, I haven't really thought of that before. But since the barcode is usually in the center of the viewport this makes a lot of sense. I'll give it a try and thanks for adding an improvement issue on GitHub.

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#19
post #7

This is great news. I just wrote a QRcode-reader Django widget to be used on a mobile browser, using the LazarSoft library ( https://github.com/LazarSoft/jsqrcode ). The library worked great, but the HTML5 bits turned out to be surprisingly painful. Camera selection works differently in different browsers - Android Chrome has an API, Firefox throws up a selection dialog every time. Mobile Chrome doesn't let you emit…

I'm still facing the same problems with the missing autofocus. For some devices it works out of the box, like the HTC one mini, but for the most it does not. There is actually an open issue about that in the Chrome-Browser for Android (https://code.google.com/p/chromium/issues/detail?id=343894)

It would help a lot to get continous autofocus working in the browsers. Especially with barcodes, since their size requires the camera to be really close.

Re: Show HN: QuaggaJS, a barcode scanner written in JavaScript

#20
post #3

There's also a port of ZBar using Emscripten / asm.js: https://github.com/yurydelendik/zbarjs and a hand-made port of ZXing by Wojciech Szela here: https://github.com/wojciechszela/zxingjs

The hand-made port looks really promising. This could work alongside QuaggaJS as the decoding part, since ZXing does not locate the barcode.
Post reply on HN