For this assignment, you are to combine two images into a single 3 dimension image. These images will be viewed using red/blue glasses to give the 3D effect. The final image will attempt to be a grayscale of the object in the original original images. However with the red/blue glasses, one eye will only see the red color while the other eye will see the green/blue color.
The two images will need to be pictures of the same thing taken from a slightly different view point. The first image will view the object just to the left of the view of the second image. The left image will be converted to a red-scale image. The right image will be converted to a green/blue-scale image.
Once the red-scale and green/blue-scale images have been created, they can be combined into a single image. At each pixel in the final image, the amount of red will come from the corresponding pixel in the red-scale image; while the amount of green and bluee will come from the corresponding pixel in the green/blue-scale image.
You are to verify that the two images have the same width and height before attempting to create the 3D image. If the images do not match, print out an error message and exit the program.
Check out the following images of UIC (courtesy of Google Earth):
These two combine to create the following 3D image:
The intermediate versions of the images are as follows. Note
that there is no reason to actually create and save these intermediate
versions. You should be able to go from the two original images directly
to the 3D image.
Other source images are:
Your code is to prompt the user for the left image first, then the right image. The final image is to be displayed and you are to prompt the user for a name to store the resulting image.
Your code must be commented and written in good programming style.
The easiest way to submit the UNIX turnin command, is to create a directory that contains all of the files needed for your project. Then you turnin the entire directory. For example, assume you create a subdirectory in your WWW directory called proj2directory. In this "proj2directory" directory you contain all of the files needed for this assignment. If you are in your WWW directory, you can the type in the command:
$> turnin -c cs101 -p proj2 proj2directoryTo verify what you submitted using the turnin command type:
$> turnin -c cs101 -p proj2 -v
Department of Computer Science
University of Illinois at Chicago