QR Fun

I was reading about QR codes lately.  They fascinate me somehow; just like mazes and fractals, they have this esoterical yet recognizable form, but unlike them, they can be much, much more: they store content. Finding QR encoders is easy enough (PhpQrCode works very well).  Since the specs are open (although a thorough explanation of the math behind it goes beyond my comprehension), I guess its easy to implement.  The real problem must be in the decoding procedure.  Since QR codes were meant to be decoded in warehouses using hand-held scanners, physical hurdles like dirt and image quality must be a nightmare to handle.  I found this library called ZXing that gives an impressive array of features.  Written essentially for handhelds, there’s also a C++ port.  Once compiled, the default application does the job of reading QR codes in all image formats.

Now the real fun begins:  In the xkcd book (volume 0), there are 5 QR codes located on the left side of page 100012 (you did notice that it uses a base 3 paging count, did you ?).  I scanned the page and ran it each QR code through the ZXing.  The results ?  Well, let’s just say that Randall is a fan of  Mario Cart on the Wii and he’s being the nice guy he always seems to be. 😉

My next test was really interesting: I have an ash grey T-Shirt with a QR code on the back in crimson color, measuring 3 x 3 inches.  You can guess this was going to be a little more challenging.  Since I don’t have a handheld device, I merely used the camera on my iPod nano to film it and extracted each frame with MPlayer on my PC.  The first films I took were short with awful results, so I decided to take a longer film, zooming in and out, and tilting the camera to minimize the skewing and warping of the images.  This time, I got 106 hits out of 1066 frames, a 10% hit rate which is very good considering that I was randomly moving my camera.  No doubt with a real handheld, I would have gotten more precise hits.

  1. Awesome! Thanks for the breadpig shoutout. Something you may not have known about the xkcd book is that all of our publisher profits are donated to Room to Read to promote literacy in the developing world. Check out the first xkcd school we visited (it’s in Laos): http://breadpig.com/2010/10/08/laos-the-kengthan-incomplete-primary-school/

    • narc
    • 01/06. 2011 6:48pm

    @alexis Sure thing. I don’t mind the subtle <wink> <wink> advert on my page. 😉 Keep up the good work. We need more people like you that make this world suck less.

  2. Do you mind if I quote a few of your articles as long as I podvire credit and sourcesback to your weblog? My website is in the exact same areaof interest as yours and my users would really benefit from a lot of the information you podvirehere. Please let me know if this alright with you. Many thanks!

    • narc
    • 12/13. 2015 2:39pm

    Well, a quote is a quote: it’s not the complete article, and it’s more appropriate to give a direct link to a post after quoting.

  3. I guess you have produced some rather interesting points. Not as well many ppl would really think about this the way you just did. I am really impressed that there is so much about this subject that has been revealed and you made it so nicely, with so considerably class. Tiptop one, man! Really fantastic things right here. Wishing you Happy New Year 2011!VA:F [1.6.5_908]please wait…VA:F [1.6.5_908](from 0 votes)

  1. No trackbacks yet.

return top