1 / 13

Stereo Images

Stereo Images. Doug Blank Bryn Mawr College Based on work by J. Ben Schafer. What is this?. Old-fashioned “stereograph”. Two images from slightly different perspectives If you can get one eye to see one photo and the other eye to see the other photo then you can create a 3D effect.

butch
Télécharger la présentation

Stereo Images

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Stereo Images Doug Blank Bryn Mawr College Based on work by J. Ben Schafer

  2. What is this?

  3. Old-fashioned “stereograph” • Two images from slightly different perspectives • If you can get one eye to see one photo and the other eye to see the other photo then you can create a 3D effect

  4. Left Eye

  5. Right Eye

  6. Viewmaster

  7. But how would a computer scientist do this with our tools from Myro? • Answer: • Anaglyphs! • Make one photo that can be seen as two • One eye sees one image • One eye sees the other • But you need those funny glasses!

  8. But how would a computer scientist do this with our tools from Myro? • Answer: • Anaglyphs! • Make one photo that can be seen as two • One eye sees the red channel (normally the left) • One eye sees the cyan channels (blue/green) (normally the right eye) • But you need those funny glasses!

  9. Sidebar: Why is red on left? The 2 color light system on a plane or boat allows you to immediately know your position relative to the path of the plane or boat, depending on what combination of lights you see. The green light is on the right (starboard) and the red on the left (port).So if you see a green light on the left and a red light on the right, the plane or boat is heading directly toward you!

  10. What would the algorithm look like? • Get a left and right picture • Make a new picture that is the same size as left and right • For every pixel in the new picture: • Get the red part from the left picture • Get the green and blue from the right

  11. So what would the code look like? def anaglyph(left,right): output = makePicture(getWidth(left),getHeight(left)) for x in range(1,getWidth(left)): for y in range(1,getHeight(left)): target = getPixel(output,x,y) left_pix = getPixel(left,x,y) right_pix = getPixel(right,x,y) setRed(target,getRed(left_pix)) setGreen(target,getGreen(right_pix)) setBlue(target,getBlue(right_pix)) return output

  12. Sources for images • Several Websites • http://www.studio3d.com/pages/anaglyph.html • http://www.studio3d.com/pages/stereophoto.html • Take them yourself • Take two photos with one slightly to the right of the other • Gee, where could we get two cameras?

More Related