<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/rss-style.xsl" type="text/xsl"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	    xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	     xmlns:dc="http://purl.org/dc/elements/1.1/"
	   xmlns:atom="http://www.w3.org/2005/Atom"
	     xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	  xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>
<channel>
	<title>Hiding Space Invaders In QR Codes &#8211; Terence Eden’s Blog</title>
	<atom:link href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/feed/" rel="self" type="application/rss+xml" />
	<link>https://shkspr.mobi/blog</link>
	<description>Regular nonsense about tech and its effects 🙃</description>
	<lastBuildDate>Mon, 10 Nov 2025 06:08:33 +0000</lastBuildDate>
	<language>en-GB</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0</generator>

<image>
	<url>https://shkspr.mobi/blog/wp-content/uploads/2023/07/cropped-avatar-32x32.jpeg</url>
	<title>Hiding Space Invaders In QR Codes &#8211; Terence Eden’s Blog</title>
	<link>https://shkspr.mobi/blog</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title><![CDATA[Hiding Space Invaders In QR Codes]]></title>
		<link>https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/</link>
					<comments>https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#comments</comments>
				<dc:creator><![CDATA[@edent]]></dc:creator>
		<pubDate>Wed, 10 Nov 2010 08:32:47 +0000</pubDate>
				<category><![CDATA[mobile]]></category>
		<category><![CDATA[qr]]></category>
		<category><![CDATA[BBC]]></category>
		<category><![CDATA[graphics]]></category>
		<category><![CDATA[hacks]]></category>
		<category><![CDATA[NaBloPoMo]]></category>
		<category><![CDATA[QR Codes]]></category>
		<category><![CDATA[space invaders]]></category>
		<guid isPermaLink="false">http://shkspr.mobi/blog/?p=2835</guid>

					<description><![CDATA[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 &#34;hiding&#34; human readable data in the code.  I say &#34;hiding&#34; because we are hiding it from the scanner - not from the human.  One of the more famous e…]]></description>
										<content:encoded><![CDATA[<p>One of the lovely aspects of QR codes is the variable levels of error correction built in.&nbsp; On even the most basic code you can obscure or deform up to 7% of the code and most readers will still decode it.</p>

<p>This leads us in to the amusing territory of "hiding" human readable data in the code.&nbsp; I say "hiding" because we are hiding it from the scanner - not from the human.</p>

<p>One of the more famous examples of this is <a href="https://web.archive.org/web/20101228174113/https://whomwah.com/2008/03/12/more-fun-with-qr-codes-and-the-bbc-logo/">Duncan Robertson's BBC logo</a>.</p>

<img class="aligncenter size-full wp-image-2836" title="BBC Logo in a QR Code" src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/2697480521_f30226a75d_t.jpg" alt="BBC Logo in a QR Code" width="100" height="100">

<p>What works particularly well is the fact that the BBC logo is already black and white, and fairly blocky.</p>

<h2 id="aliens"><a href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#aliens">Aliens!</a></h2>

<p>After <a href="https://shkspr.mobi/blog/2010/11/invasion-paris/">my sojourn alien hunting in Paris</a>, I realised that there is another blocky character which most people will recognise - the humble Space Invader!</p>

<p>In this first code, I've made the Invader small and hidden her in some blank space.
<a href="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader1.png"><img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader1.png" alt="Hidden Space Invader" title="Hidden Space Invader" width="164" height="164" class="aligncenter size-full wp-image-2849"></a>
Because she's around the same size as the surrounding pixels, any error she generates is cancelled out.</p>

<p>We can also use Duncan's technique and obscure part of the code.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader2.png" alt="Space Invader" title="Space Invader" width="164" height="164" class="aligncenter size-full wp-image-2850"></p>

<h2 id="how-not-to-be-seen"><a href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#how-not-to-be-seen">How Not To Be Seen</a></h2>

<p>While the boys of Monty Python can tell you <a href="https://www.youtube.com/watch?v=ifmRgQX82O4">how not to be seen</a>, for computer vision, it's rather different.</p>

<p>Essentially, what most QR scanners do is look at a <a href="http://en.wikipedia.org/wiki/Grayscale">greyscale</a> view of the image in front of them.&nbsp; The lighter the colour, the more likely the optical recognition algorithm is to see it as "white".&nbsp; This allows you to put dark coloured QR codes on to a light coloured background and still have them read.</p>

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

<p>In this example, I've filled in some of the white space with light green.
<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/invader3.png" alt="Space Invader hidden in whitespace" title="Space Invader hidden in whitespace" width="164" height="164" class="aligncenter size-full wp-image-2851">
When seen in greyscale, the green is discarded and no extra error is introduced.</p>

<h2 id="other-examples"><a href="https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/#other-examples">Other Examples</a></h2>

<p>Optiscan have gone a whole lot further and coloured in the entire code
<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/Alien-QR-Code.jpg" alt="QR Code coloured in to look like an alien." width="400" height="400" class="aligncenter size-full wp-image-33556"></p>

<p>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.</p>

<p>The excellent <a href="http://www.qrmonkey.com/">QR Monkey</a> has a <a href="https://web.archive.org/web/20100911180729/http://www.qrmonkey.com/2010/03/16/518/">blog post detailing several different techniques for prettifying your QR Codes</a>.</p>

<img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/QR-Monkey.png" alt="QR Monkey" title="QR Monkey" width="300" height="300" class="aligncenter size-full wp-image-2876">

<p>Another example of how far you can go is this <a href="https://web.archive.org/web/20101026152146/http://rubistudios.com/blog/?p=409">QR Quilt from Rubi Studios</a>.
<a href="http://rubistudios.com/blog/?p=409"><img src="https://shkspr.mobi/blog/wp-content/uploads/2010/11/QR-quiltweb2-297x300.jpg" alt="QR Quilt" title="QR Quilt" width="297" height="300" class="aligncenter size-medium wp-image-2877"></a></p>

<p>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!</p>
<img src="https://shkspr.mobi/blog/wp-content/themes/edent-wordpress-theme/info/okgo.php?ID=2835&HTTP_REFERER=RSS" alt="" width="1" height="1" loading="eager">]]></content:encoded>
					
					<wfw:commentRss>https://shkspr.mobi/blog/2010/11/hiding-space-invaders-in-qr-codes/feed/</wfw:commentRss>
			<slash:comments>7</slash:comments>
		
		
			</item>
	</channel>
</rss>
