(Originally posted 2011-04-04.)
Inspired by two of Bob Leah’s posts on QR Codes – here and here I started experimenting with creating and consuming QR codes.
But what is a QR code? In short it’s a two-dimensional barcode that can contain e.g plain text or a URL. In the latter case a QR code reader can pick up the URL – maybe from a real-world object – and open it in a browser.
Creating QR Codes
In my experiment I created the barcode differently from how Bob did: As my laptop is running Ubuntu Linux I looked for a command-line tool. In my case I used the qrencode package. This takes a string and encodes it as a PNG graphic. Here is an example:
This is rather small – which might be handy from the perspective of printing labels.
Command line is important to me because it means I could automate generating QR codes – maybe a page of labels at a time.
Reading QR Codes
On my iPhone I installed a nice QR Code reader app: qrafter (in fact the free version). Although the QR code above is rather small it could read it perfectly well. I’m sure there are QR code readers for all kinds of mobile devices. Nowadays anything with a camera can do all sorts of things like barcode reading, QR code reading, document scanning (with or without OCR).
The ultimate aim of the experiment is to be able to tag objects: If you can tolerate sticking a small QR code label on an object you can annotate it: You could stick a URL on the object and then your device of choice could read the URL and open the page in a browser.
But what could the URL be? In my imagination it could be in two parts:
- The URL points to a web server that maintains a database of information about objects. (In fact the URL points you to a page where you can view the information about the object – and optionally edit it.)
- The search string is the object number. Each QR code has a different number. Actually it need not be a number, strictly speaking.
Of course you COULD do this with RFID tags. But this seems to me a lighter-weight way to get started. Of course there are many objects you wouldn’t or couldn’t stick paper labels on: Such as clothing. But there are lots of things you could annotate this way.
There are lots of possibilities here. I was just experimenting – admittedly in my hotel room on a Sunday night. I’d be interested in ideas and thoughts on this.