[Plugin] Qr Code Decoder

Post your completed addons to share with the community

Post » Mon Sep 17, 2012 4:54 pm

Here's a plugin that decodes QR codes in Javascript only !
It's based on the work by Lazar Lazslo (the JS port of the ZXing library : https://github.com/LazarSoft/jsqrcode)


As you see, it's possible to recognize a QR Code captured byt the User Media plugin.

The demo showcase the recognition of a Sprite containing a QR Code (for example generated by my other plugin : QR Code Creator), but you can also recognize a snapshot taken from the webcam.

It works on FF and Chrome (surely on Opera and Safari desktop too, but I haven't tested it on my machine, I don't have a recent build of those on that one).

The demo : https://dl.dropbox.com/u/1412774/QRDecodeDemo/index.html
The plugin : https://dl.dropbox.com/u/1412774/QRDecodeDemo/pode_qrdecode.1.0.zip
The .capx : https://dl.dropbox.com/u/1412774/QRDecodeDemo/QRDecodeDemo.capx

QR Code for this page :
Pode2012-09-17 16:56:06
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Mon Sep 17, 2012 5:36 pm

Some informations (thanks @Yann) :
if the detection fails, the source of the problem can be
- improper lightning
- QR Code image skewed too much
- damaged or scratched QR Code
- "blurry" webcam (if the resolution of the cam isn't high enough, or if the lens isn't set properly).Pode2012-09-17 17:38:24
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Mon Sep 17, 2012 5:36 pm

Nice!!! Great work as always Pode, you're one big motherf... khm a really good plugin developer and I really like your plugins!
Be nice until it's time to not be nice
B
36
S
9
G
9
Posts: 293
Reputation: 6,652

Post » Mon Sep 17, 2012 5:39 pm

@JohnnySheffield : thanks a lot ! It's nice to know that people like my plugins .
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Oct 03, 2012 5:34 pm

is it possible to recognise codes from video, I mean if a qr code shows up in the camera the plugin will recognise it without the need of taking a snapshot?
B
6
S
1
Posts: 8
Reputation: 591

Post » Fri Oct 05, 2012 1:51 pm

@jcberrincha : no, you need to take a screenshot (even if it's in the background).
All the decoders are doing it like that. You can take a snapshot every 0.X seconds, and provide it to the decoder, doing it in the background if you want.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Tue Apr 02, 2013 5:32 pm

Hi! ^^
I'm building a game (for tablets) and i was really interested in integrating a QR code reader into it.

But i'm having two issues... and im not even sure if you can help me out here!..

The first problem is that the webcam box in your demo shows up black.. i've tried running it locally and the same thing happens... i'm not sure if its a hardware or software issue but... do you have any idea what could be going wrong here? I've got two webcams and they both are connected and work fine (i dont get any request to use the webcam on my browser).

Secondly, I'm not sure if i can run Javascript on a tablet... and i'm not interested in showing the menus or the webcam box... i just want the input.. is Javascript absolutely necessary or can it be run "behind" the front page?

I'm really sorry if my questions are out of line or hard to understand.. i was just hoping that someone could help me out here as i'm kind of lost - and i'd really like to use your work!

Thank you for your time and your work!
ViLa
B
8
S
1
Posts: 37
Reputation: 893

Post » Tue Apr 02, 2013 5:52 pm

Note:

I tried running the demo on IExplorer (i was on Firefox - where nothing happened) but i get the following error message:

[quote]Javascript Error!
'qrcode' isn't defined
http://localhost:50000/Pode_QRDecodeplugin.js, line 50 (col undefined)

This is either a bug in Construct 2 or a problem in a third party plugin or behavior - please report it to the developer![/quote]




p.s.: i've re-checked: the webcams are fully operational - so its not a hardware issue!
B
8
S
1
Posts: 37
Reputation: 893

Post » Wed Apr 03, 2013 9:23 am

@vila4480 : is your browser recent enough to use getUSerMedia() to access the webcam ?
And by the way, you won't be able to access the webcam on a tablet this way, it's not allowed by the browser.
B
33
S
9
G
6
Posts: 709
Reputation: 6,704

Post » Wed Apr 03, 2013 2:33 pm

[QUOTE=Pode] @vila4480 : is your browser recent enough to use getUSerMedia() to access the webcam ?
And by the way, you won't be able to access the webcam on a tablet this way, it's not allowed by the browser.[/QUOTE]

Yeah i think so... i tried:
-Firefox 19.0.2 (oops its updating now!)
-IE 9.0.8112.16421 64bit
-Chrome 26.0.1410.43 m (latest)

Nevertheless i really need something like this on a tablet - do you think any other solution might be available?

Also, i tried compiling every info on barcodes on this post.

Kyatric mentioned your solution!
Sorry for bothering and thank you for your efforts!
B
8
S
1
Posts: 37
Reputation: 893

Next

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 0 guests