Seminar on Applied Perception in Graphics and Visualization (4005-769-02)
 

Assignment 1


Autostereogram Generator

Assigned: March 18, 2013

Due: March 27, 2013


A stereogram is a pair of stereo images that provides the illusion of depth when viewed using a stereoscope. An autostereogram provides the illusion of depth from a single image without the need for a stereoscope. 

Wikipedia provides an excellent discussion about autostereograms: http://en.wikipedia.org/wiki/Autostereogram

The goal of this assignment is to create an autostereogram generator. This program must be automatic and take in a depth map. A depth map is usually a grayscale picture where dark is interpreted as being closer. For example:

http://www.dbki.de/tutorials/eng/landscape/pic/depth.jpg

http://upload.wikimedia.org/wikipedia/commons/3/3e/Stereogram_Tut_Shark_Depthmap.png

The assignment consists of two parts:

Part 1 - Basic autostereogram generator - Algorithm outline:

Start at the left pixel of each row. (i.e. let x =1)
    Randomly pick a color C *
        Color location x with color C
        Look up the depth (Z) for the corresponding location in the depth map
        Map Z to a displacement value d (something like d = 100 + Z / 2)
        x = x + d
        if x is still in the image (that is, if you haven't gone off the right edge)
            loop to "Color location x with color C"
        if x isn't in the image
            set x to the position of the the leftmost pixel that isn't colored at yet
            loop to "Randomly pick color C"
end

* You do have to choose a color, but it does not necessarily have to be random.

Part 2 - Extensions (Choose 1):

Option 1 - Moving autostereograms: Create a depth map that changes over time and show the corresponding autostereogram over time. This might entail creating a depth map that is a mathematical function that depends on time or frame number. It might be easy to do this as a java applet or you could save the results as a movie. See example of a moving autostereogram at:

http://en.wikipedia.org/wiki/File:Stereogram_Tut_Animated_Shark.gif

Option 2 - Create an autostereogram "paint" tool: Given a depth map, there are pixels that are required to be the same color. When you generate a autostereogram, usually, you pick a color for a pixel then propagate that color across a line in the image. After you've made an autostereogram, if you want to "change" the color of a pixel, then you need to propagate that change left and right across the image. Create a "paint" tool that allows you to interactively create and modify the color choices of the autostereogram.

Option 3 - Make better autostereograms: The random dot pictures created using the basic algorithm are less compelling than many magic eye pictures for example:

http://3.bp.blogspot.com/_SJP3Lr5NHA4/SfD4UP7srEI/AAAAAAAAIA8/pB2jZNxs3Lo/s1600-h/021.jpg

http://upload.wikimedia.org/wikipedia/commons/7/7d/Stereogram_Tut_Highlight.png

Develop an approach for creating more compelling autostereograms.

Submission:

Email me a link to a webpage where your results are posted. You webpage must include the following:

You must also submit a zip of all files (code, depth maps, results, readme, etc) to the appropriate dropbox on myCourses.