Just another WordPress.com site

Adventures in Heat Mapping: Optical Illusions!


In more savage days when we were constantly on the lookout for animals who would like nothing more than to pounce on and eat us, it was really helpful that our mammalian eyes were specially tuned to identify and sharpen shifts in patterns.  Maybe we could spot those lion eyes more readily in a sea of tall grass.  These days, among other things, it serves to confound designers and developers of heat map engines.

 Yes, You Are Crazy

See the slight darkening of the circles at their edges where they overlap?  Those dark bands are created in your retina/brain and aren’t really there.  Weird, right?  The illusion is thought to be caused by lateral inhibition.  When the light enters your eye it hits receptors and those receptors send the message to your brain.  But the receptors that are hit inhibit the firing of the receptors right next door so the result is a kind of artificial sharpening or increase in contrast.

When your eye tracks the gradient of the circle and the regular/expected shift is interrupted by the overlap of the other circle, your eyes send your brain an artificially increased contrast signal.  The result is those phony bologna darkened bands.  The nature of the bands are very similar to the optical illusion known as Mach Bands.

What the Deuce?

So imagine our head scratching when at the beginning of the development of IDV’s heat mapping engine, we saw these confounded dark line artifacts all over our heat maps and no amount of eyedropping could identify an actual dip in luminance.  Daniel Briggs, our lead heat map developer, first suggested that we were seeing things that weren’t really there and identified them as something akin to Mach Bands, named after eclectic 19th century science philosopher Ernst Mach (the same dude who lent his name to the speed of sound stuff -and, by extension, safety razors).

The Mitigating Effect of Context

Good news.  It turns out, when you are looking at a heat map in an actual map, the pesky optical illusion isn’t so noticeable.

In the illustrations to the left you can see some obvious Mach Bands at the intersection of these two luminance blobs that contribute to the creation of a frequency heat map.

The banding is reduced if viewed over a pattern that helps to break up the continuous nature of the radial gradient shift.

And, conveniently, when viewed over a map the banding pretty much disappears.

Since I don’t care an awful lot about frequency heat maps when they aren’t draped over a base map, then I won’t stay up at nights worrying about phone calls regarding dark rings everywhere.  But if we do, there is a perfectly reasonable explanation: biology.

More on Context -it Matters

Here we have an image of the luminance score that goes into making a heat map.  You can see (or at least think you see) the Mach Bands pretty clearly.

When a color theme is applied to the luminance score and the heat map is generated, you can still totally see those Mach Bands -which is distracting and a real bummer.

But when viewed in a cartographic environment that provides some amount of background variance the Mach Bands for the most part die.  The reduction of the illusion is commensurate with the general business of the cartographic context.  The irregularity of the heat map can have a reducing effect as well.  More matrix-oriented heatmap inputs will tend to have more obvious Mach Bands.  When the input phenomena of a heat map are more organic and tend to clump or coagulate (as our data tends to do), the effect is diminished further.  So you can rest assured knowing that IDV is out there fretting to this extent over delivering the best possible visualization tools.


John Nelson / IDV Solutions / john.nelson@idvsolutions.com


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s