Project Two. Due Tuesday, Feb 21.

This programming assignment has two options. You may choose one of the two options. You may work in groups of size up to 2. If you have questions, feel free to ask them in general on the newsgroup.

  1. Option 1: Image mosaic. This project has a basic portion and several extensions. Completing the basic project successfully gets will earn a "C+\B-" grade on the project. A complete solution for any one of the extensions will earn an "A", provided the presentation and write-up are complete.
    1. Base Option: Write a program which takes two images, you click or otherwise input corresponding points, it finds their transformation and makes a mosaic. (Note, this can be "partially automatic". That is you can manually click on (or otherwise determine) corresponding points, and, say, solve for a homography matrix in one system (like matlab), and then "hard code" or read that transform in from a file and warp the images in another system (like java). of course you may do it all in one system as well.).
    2. Extensions (Choose 1).
      1. Automate the program. Here the idea is to write a program that doesn't need user intervention. This can be done by:
        1. Find corresponding points automatically, or
        2. Solving directly for the homography based on the image intensity derivatives (as we did recently in class), or
        3. "Guess and check" gradient descent method to solve for homography.
      2. Correct non-geometric distortions. Sometimes images are taken with a camera that has moved, and has changed its iris or brightness settings. This option requires that you automate the "histogram correction" or similar transform in order to make the images match up as well as possible in the overlapping region.
      3. Make an "independent motion detector". When the camera rotates in a mostly static scene, but there is some parts of the scene moving (maybe people walking or so), then you can find the independently moving objects by: first, solve for best fitting transformation between two frames, then find image regions that don't fit that transformation (ie, where the pixels in one image, after you transform them, still don't look like the pixels to which they were moved).
        Sample pictures with moving objects: skateboarder
        
        or this pair of images:
        jump, land
        jump, land
        
      4. Homography Chaining... Potential Images: Mars rover data
  2. Option 2, Autostereogram Generator. Not recommended if you can't see autostereograms.
    1. Base Project, (earns "C+\B-"). Write a program that makes an autostereogram. This program must be automatic, and take in a depth map, and (perhaps a texture source, or you can generate the texture randomly). You turn in a web page, with your favorite (2 or 3) example outputs (and the depth map they came from).
      Program input:  depth map, such as those available from:
      or here, or here (where dark should be closer), or, here, or any thing else you can find.
      
      The depth map is usually a grayscale picture, and you need to map the
      color (probably from 0-256) to a distance (how far apart the next
      pixel should be over).  Often mapping depths of 0-256 into the range
      of disparities of 100-250 pixels is about right, but it depends on
      your monitor/printer.
      
          Vague Algorithm:
      
              Start at the left pixel of each row.  (ie, let x = 1)
                randomly pick color C **.
          	    color location x with color C.
      	    look up the depth (Z) at pixel location x on that row.
      	    map Z onto a displacement 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)
                    then loop to "color location x..."
      
               if x isn't still in the image, set x to the position of the the
                  leftmost pixel that isn't colored at all yet, 
               loop to "randomly pick color C"
      
           end
      
         ** you do have to choose a color, but it does not have to be random.  
      
    2. Extensions (choose 1)
      1. Moving autostereograms (good java choice). The idea here is to create a depth map that changes through time, and then show the autostereogram images through time (so that you see a moving depth map). This might entail creating a depth map that is a mathematical function that depends on time (or frame number t): d(x,y) = 4 + sin( (x+t) /150) Now, continually update the autostereograms as the depth map changes. This would be a nice java applet, or you could save the results as a movie (mpeg or avi).
      2. Explore transparency in autostereograms. If you have a partially transparent surface over a more "solid" surface, we can often see both depths at once. The Project is to explore this idea in the following way: make one autostereogram. make another one with a smaller depth. make the second one slightly (or very, I don't know) transparent, and put it one top of the first autostereogram. How can you make it transparent? Option 1, only use every 5th pixel (or so)... for the second autostereogram. Option 2, instead of completely coloring the pixels, have the transparent layer only partially change the colors of the pixels. Make a collection of "2 layer autostereograms" and answer the following questions: ..) does it matter if neither, one, or both of the two autostereograms is random dot (ie, does it help if they have more structure? ...) how seperated, in depth, can the two surfaces be?
      3. 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 propogate 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. The project asks you to implement a "paint" tool where, given a depth map, you can interactively create and modify the color choices of the autostereogram. (This is probably both hard and potentially rewarding, extensions to the project deadline are likely if evidence of considerable progress is turned in by the project due date).