Skip to content

Stereogrammer

My final-year project at University was a program to generate Autostereograms, which at the time were enjoying a period of popularity.  The end result was a Win95 application which could generate Autostereogram images (i.e. 2D images in which depth can be perceived by a trick of focussing the eyes), using random dot textures or any arbitrary bitmap.  My research into the psychology and mathematics behind the Autostereogram resulted in a new algorithm for their generation, which I named the Horoptic algorithm, and which – to my eyes at least – produces better results than the existing algorithms I discovered at the time.

I wanted another project to help me learn C# and .NET (specifically, Windows Presentation Foundation this time), so I decided to update my project.  The result is Stereogrammer, which is a rather improved version of my final year project – albeit one with much the same end results.  Whether anybody out there still cares about the Autostereogram and would appreciate a utility for generating them remains to be discovered.

Get Stereogrammer here.

Stereogrammer on Facebook.

The basic principle behind the Autostereogram is to fool the brain into perceiving depth where none exists by exploiting the psychology behind stereoscopic vision.   To reverse-engineer the 3rd dimension from the images perceived by the eyes, the brain analyses the difference between them.   Points which have the same texture are assumed to be the same point in space, and the angle the eyes have to make to look at that point allow it to calculate how far away the point must be.

By focusing each eye on different, but similar, parts of a 2-dimensional image, we can fool the brain into believing it is looking at a 3-dimensional surface.  Essentially, a textured strip is repeated across the image at regular intervals, and the viewer then focuses each eye on different (but neighbouring) strips of the image.  The fact that each eye is reporting the same image convinces the brain it has focused on a solid object, but the divergent angle of the eyes leads the brain to miscalculate the distance to that object.  This effect can be perceived on any repeated pattern, e.g. strips of wallpaper.  It would not be of much interest if all we could do is make a flat, regular image appear to be closer or further away than it actually is, but the brain is smart enough to calculate the depth of every point in the visual field by noting differences between what the left and right eyes see which imply that a particular point is closer or further away than the focal point.  Autostereograms exploit this by peturbing neighbouring strips in such a way that the perceived depth of any point in the image can be controlled.

The technique does require practise, as decoupling the eyes’ focal points is not something we commonly find ourselves doing in normal life.  However, anybody with 2 functioning eyes can learn to see Autostereograms (and practise does make it much easier, to the point where it becomes second nature), and the effect of perceiving a very solid 3-dimensional object where intellectually we know that one can not be can be very dramatic.  It made enough of an impression on me that I felt compelled to research the phenomenon as a student, anyway.

To get the Stereogrammer software:

Look here.

All about Stereograms:

1. What is a Stereogram?

2. Psychology and Geometry of the Stereogram

3. Algorithms for generating Stereograms

4. Observations and conclusions

5. Further Reading

Stereogram generated with Stereogrammer

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

%d bloggers like this: