Spring2008.CSCI110Homework4 History

Hide minor edits - Show changes to output

Added lines 1-72:
'''Assigned Date''': Tuesday, Apr. 22, 2008\\
'''Due Date''': Tuesday, Apr. 29, 2008\\
'''Due Time''': noon

Last modified on {$LastModified} (see [[http://www.cs.cofc.edu/~manaris/index.php/Spring2008/CSCI110Homework4?action=diff&source=n&minor=n | updates]])

!!Purpose

This assignment focuses on creating stereoscopic 3D images using Python, and on combining different technologies to create an interesting artifact (e.g., digital cameras, HTML, etc.).

!!Assignment

Write a Python program to generate anaglyph 3D images.

[[http://en.wikipedia.org/wiki/Anaglyph_image | Anaglyph images]] provide a stereoscopic 3D effect, when viewed with 2-color (e.g., red-cyan) glasses.

%center% http://img.skitch.com/20080421-ryjb16defx55c5w6yt3jcs7akr.jpg

To create an anaglyph image, you start with two images of the same subject taken from two slightly different angles.

%center% %thumb% Attach:bear_left.jpg %thumb% Attach:bear_right.jpg

Then you combine the two images into one. For every pixel of the result image, use the red value from the left image, and the green and blue values of the right image.

%center% %thumb% Attach:bear_anaglyph.color.jpg

The stereoscopic effect is generated by the visual cortex of the brain, since each eye is getting information from the corresponding (left or right) image.

!!Implementation

!!!Step 1

First write out your Python program to combine two images into one, using one of the two algorithms above. Test it to make sure it works. Here are some more images:


!!!Step 2

Go around campus and find five artifacts that would look interesting in 3D. Use a digital camera to take pictures. Use a program like [[http://www.irfanview.com/ | IrfanView]] to resize the images to a small enough size (between 100KB and 1MB each).

!!!Step 3

Create an HTML page with your images (left, right, and 3D). Add titles and interesting text describing the artifacts. Be creative.

!!Grading

Your grade will be based on correctness (e.g., good 3D images), aesthetic effect (e.g., interesting images), and presentation (e.g., nice web page).

!!Submissions

# Submit the following to WebCT:

** the Python program
** the original and 3D images (name them well, e.g., statue_left.jpg, statue_right.jpg, statue_3D.jpg)
** the HTML page

# Post your HTML page to your student web space.

# [[mailto:manarisb@cofc.edu | Email]] me, with subject "'''CSCI 110: Homework 4'''", the link (URL) to your page on server stu.cofc.edu.

!!Test

For testing, here are some more left and right images [-(all shot with an iPhone camera)-]:

%center% %thumb% Attach:betty_left.jpg %thumb% Attach:betty_right.jpg

%center% %thumb% Attach:music_left.jpg %thumb% Attach:music_right.jpg

%center% %thumb% Attach:vase_left.jpg %thumb% Attach:vase_right.jpg

!!Credits

The idea for this assignment comes from [[http://www.cs.uni.edu/~schafer/ | J. Ben Schafer]] and [[http://www.cs.uic.edu/~troy/ | Patrick A. Troy]] through the Mediacomp-teach mailing list.