Flash QRcode reader as3

[update] Paul Hinrichsen pointed me to a new implementation of a QRCode Reader (Adobe Native Extension) build by Sbhave. It works BRILLIANTLY and VERY fast. It is built for Flex but there is also a build for Flash CS6 which is easy to set up. A native extension is really fast code (mostly c++, with a Actionscript API). More info in this discussion: http://forums.adobe.com/message/4699875 Google code project page: http://code.google.com/p/adobe-air-qr-barcode-zbar-ane/ ======== QRcode reader implementation that uses the QRCode Reader by Logosware (Libspark project). Code is improved with Adaptive Threshold (by Quasimondo) and other small modifications to improve the QRcode detection.

Modifications

  • Implemented Adaptive Threshold by Quasimondo (Mario Klingemann) in the GetQRimage Class.
  • Added the substract blur method that Mario Klingemann explains in his lecture about the process of reading QR codes. I’ve got less wrong strings in this mode and the detection runs faster. You can set it to false, to use the original method.
  • The outside parts of the video are cropped, to reduce image noise. By providing a markerGuide the user knows where to hold the marker.
  • The data from the onQrDecodeComplete event is compared with the data from a previous event as a way of extra error correction.
The user interface uses the minimalcomps by Keith Peters (bit-101) and the Hi-Res! stats by Mr. Doob.

Example (Flash Player 10 or higher)

Generate a QRcode and print it out.
You need a webcam and give Flashplayer access to the camera to see the example below :

Get Adobe Flash player

Used resources

Download : ReadQrSimple – source code Download : ReadQrMobile – source code (version tested on Galaxy S2, by Paul Hinrichsen). If you have suggestions for more improvements, please give your feedback in the comments.