Hiding Space Invaders In QR Codes

One of the lovely aspects of QR codes is the variable levels of error correction built in.  On even the most basic code you can obscure or deform up to 7% of the code and most readers will still decode it.

This leads us in to the amusing territory of "hiding" human readable data in the code.  I say "hiding" because we are hiding it from the scanner - not from the human.

One of the more famous examples of this is Duncan Robertson's BBC logo.

BBC Logo in a QR CodeWhat works particularly well is the fact that the BBC logo is already black and white, and fairly blocky.

Aliens!

After my sojourn alien hunting in Paris, I realised that there is another blocky character which most people will recognise - the humble Space Invader!

In this first code, I've made the Invader small and hidden her in some blank space.
Hidden Space Invader
Because she's around the same size as the surrounding pixels, any error she generates is cancelled out.

We can also use Duncan's technique and obscure part of the code.
Space Invader

How Not To Be Seen

While the boys of Monty Python can tell you how not to be seen, for computer vision, it's rather different.

Essentially, what most QR scanners do is look at a greyscale view of the image in front of them.  The lighter the colour, the more likely the optical recognition algorithm is to see it as "white".  This allows you to put dark coloured QR codes on to a light coloured background and still have them read.

So, in theory, we could fill up every pixel of white space with a different light colour and still be perfectly readable.

In this example, I've filled in some of the white space with light green.
Space Invader hidden in whitespace
When seen in greyscale, the green is discarded and no extra error is introduced.

Other Examples

Optiscan have gone a whole lot further and coloured in the entire code
Playing with QR Code artwork :)  http://twitpic.com/352shu #q... on Twitpic

They claim that their app will quite happily read this code. As it's iPhone only, I wasn't able to verify - but as a rule, increasing the colour complexity will reduce the chances of a phone being able to successfully read your code. It's a fine balance between readability and aesthetic improvement.

The excellent QR Monkey has a blog post detailing several different techniques for prettifying your QR Codes.

QR Monkey

Another example of how far you can go is this QR Quilt from Rubi Studios.
QR Quilt

In short - you can go pretty wild with your QR designs. Just remember to up the error correction and make sure that contrast between the colours you use is sufficiently high for most scanners. When in doubt - test!


9 Responses to “Hiding Space Invaders In QR Codes”

  1. Benjamin Image of Benjamin

    Love'em :) - Are there any good ways to check how badly you've mangled the QR code once you've redesigned it, or is it just a matter of %'age change?

    Reply
  2. Steve Image of Steve

    Hi Terence, thanks for including my alien QR in your blog post! I guarantee it reads perfectly (and quickly) in Optiscan, although I know others have issues. Error correction helps, but - as you say - getting the balance right between light and dark is essential. One complete failure of QR Code use recently was in a print piece for the Vatican - the QR Code colours were reversed to fit the ad better and so consequently didn't read at all!

    Reply

What Do You Reckon?