csci 1290: comp photocs.brown.edu/courses/csci1290/lectures/03_lab_camerabasics.pdf · accidental...
TRANSCRIPT
![Page 1: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/1.jpg)
CSCI 1290: Comp PhotoFall 2018 @ Brown University
James Tompkin
Many slides thanks to James Hays’ old CS 129 course, along with all of its acknowledgements.
![Page 2: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/2.jpg)
Questions from Tuesday
• Ishaan: what is quantum efficiency?• https://en.wikipedia.org/wiki/Quantum_efficiency
• Literally “the percentage of photons hitting the device's photoreactive surface that produce charge carriers. It is measured in electrons per photon or amps per watt.”
• Leslie: does the eye alias?• Spatially, apparently not. The retina (sensor) has high resolution, but the
optics of the eye cannot meet that resolution, and so the image is blurred optically before being sampled (removes high-frequency content!)
![Page 3: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/3.jpg)
[Don Pettit]
![Page 4: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/4.jpg)
[Don Pettit]
![Page 5: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/5.jpg)
Lenses
![Page 6: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/6.jpg)
Let’s design a camera
Idea 1: Put a sensor in front of an object
Do we get a reasonable image?
Slide source: Seitz
sensor
![Page 7: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/7.jpg)
Let’s design a camera
Idea 2: Add a barrier to block most rays– Pinhole in barrier
– Only sense light from one direction.• Reduces blurring.
– In most cameras, this aperture can vary in size.
Slide source: Seitz
sensor
![Page 8: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/8.jpg)
Pinhole camera model
Figure from Forsyth
f
f = Focal length
c = Optical center of the camera
c
Real
object
![Page 9: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/9.jpg)
Projection: world coordinates→image coordinates
Camera
Center
(0, 0, 0)
=
Z
Y
X
P.
.
. f Z Y
=
V
Up
.V
U
Z
fXU *−=
Z
fYV *−=
What is the effect if f and Z are equal?
p = distance from
image center
Image
center
(u0, v0)
![Page 10: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/10.jpg)
Camera Obscura
The first camera• Known to Aristotle
• Depth of the room is the effective focal length
Camera Obscura, Gemma Frisius, 1558
![Page 11: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/11.jpg)
Home-made pinhole camera
http://www.debevec.org/Pinhole/
Why so
blurry?
![Page 12: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/12.jpg)
Shrinking the aperture
Less light gets through
[Steve Seitz]
Integrate over fewer angles
![Page 13: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/13.jpg)
Shrinking the aperture
Why not make the aperture as small as possible?• Less light gets through
• Diffraction effects…
Less light gets through
Slide by Steve Seitz
![Page 14: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/14.jpg)
Shrinking the aperture
![Page 15: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/15.jpg)
The reason for lenses
Slide by Steve Seitz
![Page 16: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/16.jpg)
Focus and Defocus
A lens focuses light onto the film• There is a specific distance at which objects are “in focus”
– other points project to a “circle of confusion” in the image
• Changing the shape of the lens changes this distance
“circle of
confusion”
Slide by Steve Seitz
![Page 17: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/17.jpg)
Thin lenses
Thin lens equation:
• Any object point satisfying this equation is in focus
• What is the shape of the focus region?
• How can we change the focus region?
• Thin lens applet: https://sites.google.com/site/marclevoylectures/applets/operation-of-a-thin-lens(by Andrew Adams, Nora Willett, Marc Levoy) Slide by Steve Seitz
1
𝑓−
1
𝑑𝑜=
1
𝑑𝑖
![Page 18: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/18.jpg)
Beyond Pinholes: Real apertures
Bokeh:
[Rushif – Wikipedia]
![Page 19: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/19.jpg)
Depth Of Field
![Page 20: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/20.jpg)
Depth of Field
http://www.cambridgeincolour.com/tutorials/depth-of-field.htm
![Page 21: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/21.jpg)
Aperture controls Depth of Field
Changing the aperture size affects depth of field• A smaller aperture increases the range in which the object is
approximately in focus
• But small aperture reduces amount of light – need to
increase exposure
![Page 22: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/22.jpg)
Varying the aperture
Large apeture = small DOF Small apeture = large DOF
![Page 23: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/23.jpg)
Depth of Field
![Page 24: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/24.jpg)
Shutters
[The Slo-Mo Guys]
![Page 25: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/25.jpg)
Shutters
[The Slo-Mo Guys]
![Page 26: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/26.jpg)
Shutters
[The Slo-Mo Guys]
![Page 27: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/27.jpg)
Sensor ISO
ISO = old film terminology
= sensitivity to light
ISO 200 is twice as sensitive as ISO 100.
Digital Photography:
ISO = ‘gain’ or amplification of sensor signal
![Page 28: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/28.jpg)
Sensors: Rolling shutter vs. global shutter
Some cameras have purely digital shutters.
[Reddit – r/educationalgifs – u/Mass1m01973]
![Page 29: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/29.jpg)
EXPOSURE AND NOISE
![Page 30: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/30.jpg)
Play with these settings in lab.
Come back at end to see the relationship.
https://sites.google.com/site/marclevoylectures/applets/variables
-that-affect-exposure
![Page 31: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/31.jpg)
Beyond Pinholes: Real apertures
Bokeh:
[Rushif – Wikipedia]
![Page 32: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/32.jpg)
Accidental Cameras
Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture.
Antonio Torralba, William T. Freeman
![Page 33: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/33.jpg)
Accidental Cameras
James Hays
![Page 34: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/34.jpg)
Field of View (Zoom)
![Page 35: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/35.jpg)
Field of View (Zoom)
![Page 36: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/36.jpg)
Field of View (Zoom) = Cropping
![Page 37: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/37.jpg)
f
FOV depends of Focal Length
Smaller FOV = larger Focal Length
f
![Page 38: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/38.jpg)
From Zisserman & Hartley
![Page 39: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/39.jpg)
Field of View / Focal Length
Large FOV, small f
Camera close to car
Small FOV, large f
Camera far from the car
![Page 40: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/40.jpg)
Fun with Focal Length (Jim Sherwood)
http://www.hash.com/users/jsherwood/tutes/focal/Zoomin.mov
![Page 41: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/41.jpg)
Lens Flaws
![Page 42: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/42.jpg)
Lens Flaws: Chromatic Aberration
Dispersion: wavelength-dependent refractive index• (enables prism to spread white light beam into rainbow)
Modifies ray-bending and lens focal length: f()
Color fringes near edges of image
Corrections: add ‘doublet’ lens of flint glass, etc.
![Page 43: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/43.jpg)
Chromatic Aberration
Near Lens Center Near Lens Outer Edge
![Page 44: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/44.jpg)
Radial Distortion (e.g. ‘barrel’ and ‘pin-cushion’)
Straight lines curve around the image center
![Page 45: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/45.jpg)
Radial Distortion
Radial distortion of the image• Caused by imperfect lenses
• Deviations are most noticeable for rays
that pass through the edge of the lens
No distortion Pin cushion Barrel
Corrected Barrel Distortion
Image from Martin Habbecke
![Page 46: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/46.jpg)
![Page 47: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/47.jpg)
![Page 48: CSCI 1290: Comp Photocs.brown.edu/courses/csci1290/lectures/03_Lab_CameraBasics.pdf · Accidental Pinhole and Pinspeck Cameras Revealing the scene outside the picture. Antonio Torralba,](https://reader034.vdocuments.mx/reader034/viewer/2022043005/5f8b5d75e238475bd12e5f32/html5/thumbnails/48.jpg)