Thursday, March 7, 2013

QR Code Scanner for FirefoxOS

I just published a very first version of the QR Code Scanner for FirefoxOS that I've been working on lately. It's also available on http://ffosqr.w69b.com/ (without offline support). The GUI is till pretty simple but it does the basic jobs. And this is how it looks like:


The App is AngularJS powered, test-driven by Testacular, scaffolded with Yeoman and built with Grunt. It uses a custom port of the ZXing barcode processing library together with iconv.js and utf8.js to decode QR Codes. To grab images, it uses the getUserMedia API if available and falls back a static image picker else. Currently Opera Mobile is the only Mobile Browser that supports getUserMedia (and only the presto version, the new webkit-based beta does not), but you can also try it with a recent Desktop Browser (Firefox 20+, or Chrome 21+).

The captured images are transferred to a web worker where the real work happens. This works quite smooth, even with Opera on my Android-powered mobile devices. Though I could not test it on any low-end device yet.

Besides obvious GUI improvements, in future versions I'll add support for more barcode types and speed up the detection by offloading some image prepossessing work to the GPU using WebGL.

No comments:

Post a Comment