!! Cameras and Sensors Today Pinhole camera! Lenses! Exposure! Sensors! photo by Abelardo Morell BIL721: Computational Photography! Spring 2015, Lecture 2! Aykut Erdem! Hacettepe University! Computer Vision Lab (HUCVL)! 2! Today It receives light from all directions Pinhole camera! Lenses! Exposure! Sensors! 3! From Photography, London et al.
Pinhole camera Simplest possible camera 1. light tight box with hole! 2. film! Rays are selected simply by occlusion! slide by Steve Marschner! From Photography, London et al. Cornell CS6640 Fall 2012! Worth a look www.kodak.com/ek/us/! en/pinhole_camera.htm! slide by Ramesh Raskar! Abelardo Morell slide by Ramesh Raskar! Abelardo Morell slide by Ramesh Raskar! Abelardo Morell
Solargraphy In the beginning Justin Quinnell's photograph of the Clifton Suspension Bridge! Exposure Time: Dec 19, 2007 Jun 21, 2008! slide by Ramesh Raskar! slide by Ramesh Raskar! slide by Ramesh Raskar! Mo-Ti (Chinese philosopher) 470-390 BC
Pinhole Camera / Camera Obscura Tim s Vermeer (2013) slide by Gordon Wetzstein! J. Vermeer The Milkmaid, 1658! http://sonyclassics.com/timsvermeer/! 14! slide by Ramesh Raskar! Daguerrotype+1836+ slide by Ramesh Raskar! Daguerre & Niepce 1838
slide by Ramesh Raskar! 35 mm Leica / Leitz slide by Ramesh Raskar! Charge-coupled Device (CCD) 1969 @ Bell Labs Focal length f Pinhole Optics! s Film/ sensor pinhole scene
Focal length: pinhole optics Pinhole size? What happens when the focal length is doubled? Projected object size is doubled Amount of light gathered is divided by 4 f d 2f s Film/ sensor pinhole scene From Photography, London et al. Small pinhole is sharper Small pinhole is sharper slide by Steve Marschner! Cornell CS6640 Fall 2012! slide by Steve Marschner! Cornell CS6640 Fall 2012!
Diffraction Wave nature of light Smaller aperture means more diffraction For Fourier fans: diffraction pattern = Fourier transform of the aperture. Smaller aperture means bigger Fourier spectrum. d w diffraction of water waves Youtube demos http://www.youtube.com/watch?v=kh57di7sj0c http://www.youtube.com/watch?v=lin-bljnxpy http://www.cambridgeincolour.com/tutorials/ diffraction-photography.htm http://www.youtube.com/watch?v=ksig_eaifrw http://www.youtube.com/watch?v=sjmbcm84ia4 Camera, version 0: box with hole Simple, distortion-free, charmingly analog, but:! Large pinholes produce blurry images! Small pinholes produce dim images! Diffraction limits sharpness for very small pinholes!! Francesco Capponi Blown egg transformed! into a wide-angle! pinhole camera! slide by Steve Marschner! Cornell CS6640 Fall 2012! http://petapixel.com/2011/04/25/eggstransformed-into-pinhole-cameras/
! Today Pinhole camera! Lenses! Exposure! Sensors! Replacing pinholes with lenses Solution: Refraction! slide by Steve Marschner! Cornell CS6640 Fall 2012! 29! Lenses Lenses focus light magnify objects gather more light! But need to be focused slide by Gordon Wetzstein! Nimrud lens - 2700 years old! From Photography, London et al.
Lenses Essentially add multiple pinhole images ~ shift them to align (refraction) Alignment works only for one distance From From Photography, London London et al. et al. Cornell CS6640 Fall 2012! slide by Steve Marschner! Camera, v. 1: Box with lens & shutter First practical cameras had! film (roll film or glass plate)! lens (small aperture)! mechanism for winding film mechanism for triggering shutter! Limitations cannot control exposure! focus is fixed (like an inexpensive cell phone camera today)! want to be outdoors in strong light! George Eastman Kodak Camera! 1888! More ingredients Camera, v. 2: 3 variables, 5 controls slide by Steve Marschner! Timed shutter with a UI for setting the duration of the exposure ( exposure time )!! Variable aperture! effective size of the hole through which light enters can be changed with a UI for setting the size ( aperture )!! Viewfinder some way better than guessing! to tell what you are photographing! Cornell CS6640 Fall 2012! photo: Ken Rockwell slide by Steve Marschner! turn to focus Cornell CS6640 Fall 2012! pull to wind film turn to adjust aperture turn to adjust shutter speed press to take picture photo: Ken Rockwell 36!
slide by Steve Marschner! Basic camera controls Adjustments that must be set for each image by you or by the camera s software! modern cameras for consumers hide these but they are still there!! Shutter speed! interacts with aperture to determine exposure! interacts with subject/camera motion to affect sharpness!! Aperture size! interacts with shutter speed to determine exposure interacts with focus and diffraction to affect sharpness!! Focus determines what is sharp and what is not! depth of focus related to aperture size and subject distance!! Cornell CS6640 Fall 2012! 37! Thin lens optics Simplification of geometrical optics for well-behaved lenses All parallel rays converge to one point on a plane located at the focal length f f All rays going through the center are not deviated Hence same perspective as pinhole How to trace rays Start by rays through the center How to trace rays Start by rays through the center Choose focal length, trace parallels f
How to trace rays Start by rays through the center Choose focal length, trace parallels You get the focus plane for a given scene plane All rays coming from points on a plane parallel to the lens are focused on another plane parallel to the lens f Demo" " Operation of a thin lens" " http://graphics.stanford.edu/courses/cs178/applets/thinlens.html! 42! 43! 44!
45! 46! 47! 48!
49! 50! 51! 52!
53! 54! 55! 56!
57! 58! 59! 60!
Field of view & focusing What happens to the field of view when one focuses closer? It's reduced Demo" " Gaussian lens formula" " http://graphics.stanford.edu/courses/cs178/applets/gaussian.html film focused close film focused at infinity 61! Focal length in practice 24mm Perspective vs. viewpoint Telephoto makes it easier to select background (a small change in viewpoint is a big change in background. 50mm 135mm
Changing FOV magnification constant Hitchcock zoom ( Vertigo effect ) Changing FOV magnification constant Hitchcock zoom ( Vertigo effect ) moving back while changing the focal length lets you keep objects at one depth the same size See: http://www.petapixel.com/2012/05/03/trippy-example-of-hitchcock-zoom-shot-on-a-beach/ Focal length & sensor What happens when the film is half the size? Application: Real film is 36x24mm On the 40D, the sensor is 22.5 x 15.0 mm Conversion factor on the 40D? On the SD500, it is 1/1.8 " (7.18 x 5.32 mm) What is the 7.7-23.1mm zoom on the SD500? Sensor size Similar to cropping f d ½ s Film/ sensor pinhole scene source: canon red book
http://www.photozone.de/3technology/digital_1.htm Lens imperfections 1. Spherical aberration iphone 5/6 4.20x3.6 From Wikipedia Lens inperfections 2. Chromatic aberration Correcting Chromatic Aberration Use multiple lens elements Green & Blue in focus! acromatic From Wikipedia Red, Green & Blue in focus! apochromatic From Wikipedia
Radial Distortion Radial Distortion (e.g. Barrel and pin-cushion) straight lines curve around the image center!! No distortion! Pin cushion! Barrel! Radial distortion of the image! Caused by imperfect lenses! slide by Alyosha Efros! Deviations are most noticeable for rays that pass through the edge of the lens! 73! slide by Alyosha Efros! 74! Recap Pinhole is the simplest model of image formation Lenses gather more light But get only one plane focused Focus by moving sensor/film Cannot focus infinitely close Focal length determines field of view From wide angle to telephoto Depends on sensor size In practice, it s a little more complex Various lens elements can move inside the lens Here in blue Source: Canon red book.
! Today Pinhole camera! Lenses! Exposure! Sensors! Exposure Get the right amount of light to sensor/film Two main parameters: Shutter speed Aperture (area of lens) 77! Shutter speed Main effect of shutter speed Controls how long the film/sensor is exposed Pretty much linear effect on exposure Usually in fraction of a second: 1/30, 1/60, 1/125, 1/250, 1/500 Get the pattern? On a normal lens, normal humans can hand-hold down to 1/60 In general, the rule of thumb says that the limit is the inverse of focal length, e.g. 1/500 for a 500mm Motion blur From Photography, London et al.
Effect of shutter speed Freezing motion Shutter Various technologies Goal: achieve uniform exposure across image Walking people Running people Car Fast train 1/125 1/250 1/500 1/1000 From Camera Technology, Goldberg Aperture Diameter of the lens opening (controlled by diaphragm) Expressed as a fraction of focal length, in f-number f/2.0 on a 50mm means that the aperture is 25mm f/2.0 on a 100mm means that the aperture is 50mm Disconcerting: small f number = big aperture What happens to the area of the aperture when going from f/ 2.0 to f/4.0? Typical f numbers are f/2.0, f/2.8, f/4, f/5.6, f/8, f/11, f/16, f/22, f/32 See the pattern?
Aperture & physical lens size On telephoto, the lens size is directly dictated by the max (that is min) f number Other lenses, not always clear The aperture can be internal or not Main effect of aperture Depth of field Zoom lenses usually have a variable maximal aperture Why? From Photography, London et al Depth of Field Depth of field Point in focus sensor lens Object with texture slide by Gordon Wetzstein! http://photographywisdom.com/! 87!
Depth of field We allow for some tolerance Depth of field Point in focus sensor lens Object with texture Max acceptable circle of confusion Depth of focus sensor lens Point in focus Object with texture Depth of field What happens when we close the aperture by two stop? Aperture diameter is divided by two Depth of field is doubled Depth of field Diaphragm sensor lens Point in focus Object with texture From Photography, London et al
Depth of field & focusing distance What happens when we divide focusing distance by two? Similar triangles => divided by two as well Depth of field & focusing distance What happens when we divide focusing distance by two? Similar triangles => divided by two as well Half depth of field Half depth of field sensor lens Point in focus From Photography, London et al Depth of Field: Dependence on Aperture Depth of Field: Dependence on Focus
Depth of Field: Dependence on Focal Length Remember definition of f-stop = diameter/focal length Exposure Two main parameters: Aperture (in f stop) Shutter speed (in fraction of a second) Reciprocity The same exposure is obtained with an exposure twice as long and an aperture area half as big From Photography, London et al. Exposure Two main parameters: Aperture (in f stop) Shutter speed (in fraction of a second) Reciprocity The same exposure is obtained with an exposure twice as long and an aperture area half as big - Hence square root of two progression of f stops vs. power of two progression of shutter speed - Reciprocity can fail for very long exposures From Photography, London et al. Reciprocity Assume we know how much light we need We have the choice of an infinity of shutter speed/ aperture pairs What will guide our choice of a shutter speed? Freeze motion vs. motion blur, camera shake What will guide our choice of an aperture? Depth of field, diffraction limit Often we must compromise Open more to enable faster speed (but shallow DoF)
From Photography, London et al From Photography, London et al Sensitivity (ISO) Third variable for exposure Linear effect (200 ISO needs half the light as 100 ISO) Film photography: trade sensitivity for grain igital photography: trade sensitivity for noise Digital photography: trade sensitivity for noise Gain From Photography, London et al From dpreview.com
Common Sensor Sizes Exposure (shutter speed) Sony: full frame, APS, micro four thirds! exposure = irradiance * time (e.g. 1/250, 1/60, 1, 15, bulb)! slide by Gordon Wetzstein! wikipedia! 113! slide by Gordon Wetzstein! wikipedia! % sec, f/3.3, ISO 200! 2 sec, f/6.3, ISO 80! 114! ISO ( film speed ) Dynamic Range sensitivity! of sensor! to light! digital gain! ratio between largest and smallest possible value! bit depth also important! common bit depths: 12-14 bits RAW / 8 bits JPEG!!! bits JPEG! high dynamic range! slide by Gordon Wetzstein! 115! slide by Gordon Wetzstein! Kevin McCoy! 116!
Rolling Shutter vs Global Shutter Inside a Camera at 10,000fps slide by Gordon Wetzstein! Jason Mullins, flickr! http://scorpionvision.co.uk/! 117! https://www.youtube.com/watch?v=cmjecchgrqo 118! Photons to RAW Image Noise Overview noise is (usually) bad! photons! slide by Gordon Wetzstein! photon! noise! fixed pattern! noise! sensor! additive noise! amplifier (gain,iso)! quantization! noise! ADC! (quantization)! RAW image! 119! slide by Gordon Wetzstein! many sources of noise: heat, electronics, amplifier gain, photon to electron conversion, pixel defects, read,...! different noise follows different statistical distributions, two are crucial:! Gaussian! Poisson! 120!
Scientific Sensors e.g., Andor ixon Ultra 897: cooled to -100 C!! scientific CMOS & CCD!! reduce pretty much all noise, except for photon noise!! Demo" " Exposure, ISO Dynamic Range" " http://graphics.stanford.edu/courses/cs178/applets/exposure.html slide by Gordon Wetzstein! 125! slide by Gordon Wetzstein! 126! Additional Reading A. Levin, R. Fergus, F. Durand, and B. Freeman, Image and Depth from a Conventional Camera with a Coded Aperture, SIGGRAPH 2007! 200 235 245 255 265 275 285 295 305 Figure 1: Left: Image captured using our coded aperture. Center: Top, closeup of captured image. Bottom, closeup of recovered sharp image. Right: Recovered depth map with color indicating depth from camera (cm) (in this this case, without user intervention). Programming Assignment 1! Due March 10, 2015! (a) Conventional (b) Coded 127! 128!
Problem 1: Bad Photos 1 Problem 2: Ken Burns Effect Take some photos with a digital camera of yours that one might consider technically bad but even so interesting and aesthetic in some way. You are required to submit at least 3 photos (max. 8), meeting one of the specifications given below. In your report, please explain the conditions about how you took the picture, what camera setting you used, etc., and most importantly indicate which requirements each of your photo meets.! Specification 1: At least one photo should be poorly exposed. That is, most of the image should be either very close to black (underexposed) or close to flat!white to due oversaturation (overexposed).! Specification 2: The main subject of at least one photograph must be motion-!blurred, either due to movement of the subject or movement of the camera.! Specification 3: In at least one photo, nothing at all should be in focus. It s hard to take a good looking photo where nothing is in focus, so be creative! 1 Adapted from the assignment developed by Marc Levoy, Andrew Adams, and Jesse Levinson at Stanford University. 129! https://www.youtube.com/watch?v=wjdwvmjgba0! 130! Next week Image processing basics! 131!