Lecture 7: Camera Models Professor Stanford Vision Lab 1
What we will learn toda? Pinhole cameras Cameras & lenses The geometr of pinhole cameras Reading: [FP]Chapters 1 3 [HZ] Chapter 6 2
What we will learn toda? Pinhole cameras Cameras & lenses The geometr of pinhole cameras Reading: [FP]Chapters 1 3 [HZ] Chapter 6 3
How do we see the world? Let s design a camera Idea 1: put a piece of film in front of an object Do we get a reasonable image? 4
Pinhole camera Add a barrier to block off most of the ras This reduces blurring The opening known as the aperture 5
Some histor Milestones: Leonardo da Vinci (1452-1519): first record of camera obscura Johann Zahn (1685): first portable camera 6
Some histor Milestones: Leonardo da Vinci (1452-1519): first record of camera obscura Johann Zahn (1685): first portable camera Joseph Nicephore Niepce (1822): first photo - birth of photograph Daguerréotpes(1839) Photographic Film (Eastman, 1889) Cinema (Lumière Brothers, 1895) Color Photograph (Lumière Brothers, 198) Photograph (Niepce, La Table Servie, 1822) 7
Some histor Motu (468-376 BC) Oldest eistent book on geometr in China Aristotle (384-322 BC) Also: Plato, Euclid Al-Kindi (c. 81 873) Ibn al-haitham (965-14) 8
9 Pinhole camera f f ' ' ' ' P P Derived using similar triangles Note: is alwas negative.
Pinhole camera P [, f ] f O P [, ] f ' 1
f Pinhole camera f Common to draw image plane in front of the focal point Moving the image plane merel scales the image. ' ' f f 11
Pinhole camera Is the sie of the aperture important? Kate lauka 12
Cameras & Lenses Shrinking aperture sie -Ras are mied up -Wh the aperture cannot be too small? -Less light passes through -Diffraction effect Adding lenses! 13
Cameras & Lenses A lens focuses light onto the film 14
Cameras & Lenses focal point f A lens focuses light onto the film Ras passing through the center are not deviated All parallel ras converge to one point on a plane located at the focal length f 15
Cameras & Lenses circle of confusion 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] 16
Cameras & Lenses Laws of geometric optics Light travels in straight lines in homogeneous medium Reflection upon a surface: incoming ra, surface normal, and reflection are co-planar Refraction: when a ra passes from one medium to another Snell s law n 1 sin α 1 n 2 sin α 2 α 1 incident angle α 2 refraction angle n i inde of refraction 17
Thin Lenses o ' f + o f R 2(n 1) Snell s law: n 1 sin α 1 n 2 sin α 2 Small angles: n 1 α 1 n 2 α 2 n 1 n (lens) n 1 1 (air) ' ' ' ' 18
Cameras & Lenses Source wikipedia 19
Issues with lenses: Chromatic Aberration Lens has different refractive indices for different wavelengths: causes color fringing f R 2(n 1) 2
Issues with lenses: Chromatic Aberration Ras farther from the optical ais focus closer 21
Issues with lenses: Chromatic Aberration Deviations are most noticeable for ras that pass through the edge of the lens No distortion Pin cushion Barrel (fishee lens) Image magnification decreases with distance from the optical ais 22
What we will learn toda? Pinhole cameras Cameras & lenses The geometr of pinhole cameras 23
f Pinhole camera c f focal length c center of the camera (,, ) R 3 E R 2 (f,f ) 24
Pinhole camera Is this a linear transformation? (,, ) (f,f ) No division b is nonlinear! How to make it linear? 25
Homogeneous coordinates homogeneous image coordinates homogeneous scene coordinates Converting from homogeneous coordinates 26
27 Homogeneous coordinates 1 1 ' f f f f P f f ' P i P M P ' M 3 H 4 R R Perspective Projection Transformation: Projection matri
From retina plane to images Piels, bottom-left coordinate sstems 28
From retina plane to images c 1. Off set C[c, c ] c (,,) (f + c, f + c ) 29
From retina plane to images c c 1. Off set 2. From metric to piels (,, ) ( f k + c, f l + c ) C[c, c ] Units: k,l :piel/m f :m Non-square piels α, β : piel 3
From retina plane to images c (,,) ( α + c, β + c) C[c, c ] c Matri form? 31
32 Camera matri c c C[c, c ] ) c, c ( ),, ( + + β α + + 1 1 ' c c c c P β α β α
33 Camera matri c c C[c, c ] ) c, c ( ),, ( + + β α 1 1 ' c c P β α
34 Camera matri ) c, c ( ),, ( + + β α c c C[c, c ] ν Skew parameter 1 1 ' c c s P β α
Camera matri P α s c P' K[ I ] P β c 1 1 P ' M Camera matri K K has 5 degrees of freedom! 35
Camera & world reference sstem R,T j w k w O w i w The mapping is defined within the camera reference sstem What if an object is represented in the world reference sstem? 36
Camera & world reference sstem R,T j w k w O w i w ' K[ R T ] P w P M P w In 4D homogeneous coordinates: P [ R T ] P w Internal parameters Eternal parameters 37
Projective cameras R,T j w k w O w i w P M P 3 1 w K R T Pw ' [ ] 3 3 4 1 3 4 K α s β c c 1 How man degrees of freedom? 5 + 3 + 3 11! 38
Projective cameras R,T j w k w O w i w P M P 3 1 w (,, ) w m ( m K R T Pw ' [ ] 3 3 4 1 1 3 P P w w, m m 2 3 P P w w ) 3 4 M m m m M is defined up to scale! Multipling M b a scalar won t change the image 1 2 3 39
4 Theorem (Faugeras, 1993) [ ] [ ] ] [ b A K T K R T R K M 3 2 1 a a a A 1 c c s K β α l f k; f β α
Properties of Projection Points project to points Lines project to lines 41
Properties of Projection Angles are not preserved Parallel lines meet Vanishing point 42
What we have learned toda? Pinhole cameras Cameras & lenses The geometr of pinhole cameras Reading: [FP]Chapters 1 3 [HZ] Chapter 6 43