Lecture 3: Cameras II Justin Johnson EECS 442 WI 2020: Lecture 3 - 1 January 16, 2020
Administrative HW0 is released will be due Friday 1/24 at 11:59pm Justin Johnson EECS 442 WI 2020: Lecture 3 - 2 January 16, 2020
Administrative HW0 is released will be due Friday 1/24 Wednesday 1/29 at 11:59pm (Had to split Cameras into 2 lectures; this makes HW0 due after linear algebra lectures) Justin Johnson EECS 442 WI 2020: Lecture 3 - 3 January 16, 2020
Recap: Pinhole Camera Model Focal length y f X (x,y,z) z O P x Coordinate system: O is origin, XY in image, Z sticks out. XY is image plane, Z is optical axis. (x,y,z) projects to (fx/z,fy/z) via similar triangles Source: L Lazebnik Justin Johnson EECS 442 WI 2020: Lecture 3 - 4 January 16, 2020
Recap: Homogenous Coordinates Trick: add a dimension! This also clears up lots of nasty special cases Physical Homogeneous Physical Point Point Point π£ π¦ π£/π₯ π€ π§ π€/π₯ Concat Divide π₯ w=1 by w Justin Johnson EECS 442 WI 2020: Lecture 3 - 5 January 16, 2020
Recap: Homogenous Coordinates Ξ»[x,y,w] Triple / Double / [x,y,w] Equivalent Equals π£ π£ π£ ( π£ ( y π€ π€ β‘ π€ ( β = π π€ ( π₯ π₯ π₯ ( π₯ ( z π β 0 Two homogeneous coordinates are x equivalent if they are proportional to each other. Not = ! Justin Johnson EECS 442 WI 2020: Lecture 3 - 6 January 16, 2020
Recap: Projection Matrix Projection (x, y, z) -> (fx/z, fy/z) is matrix multiplication f O π π 0 0 0 ππ¦/π¨ ππ¦ π = β‘ 0 π 0 0 ππ§ ππ§/π¨ π π¨ 0 0 1 0 1 π 3D homogenous 2D homogenous point point Slide inspired from L. Lazebnik Justin Johnson EECS 442 WI 2020: Lecture 3 - 7 January 16, 2020
Recap: Perspective Model Intrinsic Extrinsic Matrix K Matrix [R,t] π 0 π£ 6 πΊ 898 π 89; πΈ β‘ π =9; 0 π π€ 6 0 0 1 πΈ β‘ π³ πΊ | π π β‘ π΅ 89= π =9; Nice interactive demo: http://ksimek.github.io/2012/08/22/extrinsic/ Justin Johnson EECS 442 WI 2020: Lecture 3 - 8 January 16, 2020
Pinhole Model: Big Issue Photosensitive Material Film captures all the rays going through a point (a p encil of rays). How big is a point? Slide inspired by S. Seitz; image from Michigan Engineering Justin Johnson EECS 442 WI 2020: Lecture 3 - 9 January 16, 2020
Math vs Reality β’ Math: Any point projects to one point β’ Reality β’ Donβt image points behind the camera / objects β’ Donβt have an infinite amount of sensor material β’ Other issues β’ Light is limited β’ Spooky stuff happens with infinitely small holes Justin Johnson EECS 442 WI 2020: Lecture 3 - 10 January 16, 2020
Limitations of Pinhole Model Ideal Pinhole 1 point generates 1 image Low-light levels Finite Pinhole 1 point generates region Blurry. Why is it blurry? Slide inspired by M. Hebert Justin Johnson EECS 442 WI 2020: Lecture 3 - 11 January 16, 2020
Limitations of Pinhole Model Small pinhole gives sharper image (but also needs longer exposure time) When pinhole is too small, diffraction effects take over! Slide Credit: S. Seitz Justin Johnson EECS 442 WI 2020: Lecture 3 - 12 January 16, 2020
Adding a Lens β’ A lens focuses light onto the film Justin Johnson EECS 442 WI 2020: Lecture 3 - 13 January 16, 2020
Adding a Lens: Thin Lens Model β’ A lens focuses light onto the film β’ Thin lens model : β’ Rays passing through the center are not deviated (pinhole projection model still holds) Justin Johnson EECS 442 WI 2020: Lecture 3 - 14 January 16, 2020
Adding a Lens: Thin Lens Model focal point f β’ A lens focuses light onto the film β’ Thin lens model : β’ Rays passing through the center are not deviated (pinhole projection model still holds) β’ All rays parallel to the optical axis pass through the focal point Justin Johnson EECS 442 WI 2020: Lecture 3 - 15 January 16, 2020
Whatβs the catch? βcircle of confusionβ β’ Thereβs a distance where objects are βin focusβ β’ Other points project to a βcircle of confusionβ Justin Johnson EECS 442 WI 2020: Lecture 3 - 16 January 16, 2020
Circle of Confusion Object is too close: Point projects to circle (blurry image) Object is just right: Point projects point (sharp image) Object is too far: Point projects to circle (blurry image) Question : How can we tell if the object is just right? Image Source: Wikipedia Justin Johnson EECS 442 WI 2020: Lecture 3 - 17 January 16, 2020
Thin Lens Formula Want relationship between y, D, Dβ, f that causes the object to be in focus D ΚΉ D f y focal point image object lens plane Diagram credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 18 January 16, 2020
Thin Lens Formula Thin lens assumptions: 1. Rays through the lens center not deviated image object lens plane Diagram credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 19 January 16, 2020
Thin Lens Formula Thin lens assumptions: 1. Rays through the lens center not deviated 2. Rays parallel to the optical axis pass through the focal point The object is in focus when both rays intersect on the image plane image object lens plane Diagram credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 20 January 16, 2020
Thin Lens Formula Letβs derive the relationship between object distance D, image plane distance Dβ, and focal length f. D ΚΉ D f y y ΚΉ image object lens plane Diagram credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 21 January 16, 2020
Thin Lens Formula π§ = πΈ ( β π πΈ ( β π = π§ π§β² π§β² One set of similar triangles: π π D ΚΉ D f y y ΚΉ image object lens plane Diagram credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 22 January 16, 2020
Thin Lens Formula π§β² π§ = πΈβ² πΈβ² = π§ π§β² Another set of similar triangles: πΈ πΈ D ΚΉ D f y y ΚΉ image object lens plane Justin Johnson EECS 442 WI 2020: Lecture 3 - 23 January 16, 2020
Thin Lens Formula πΈ + 1 1 πΈβ² = 1 πΈβ² πΈ = πΈβ² β π Set them equal: π π D ΚΉ D f y y ΚΉ image object lens plane Justin Johnson EECS 442 WI 2020: Lecture 3 - 24 January 16, 2020
Thin Lens Formula Suppose I want to take a picture of a lion with D big? Which of D, Dβ, f are fixed? How do we take pictures of things at different distances? D ΚΉ D f πΈ + 1 1 πΈβ² = 1 π image lens object plane Diagram credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 25 January 16, 2020
Depth of Field http://www.cambridgeincolour.com/tutorials/depth-of-field.htm Slide Credit: A. Efros Justin Johnson EECS 442 WI 2020: Lecture 3 - 26 January 16, 2020
Controlling Depth of Field Diagram: Wikipedia Changing the aperture size affects depth of field A smaller aperture increases the range in which the object is approximately in focus Justin Johnson EECS 442 WI 2020: Lecture 3 - 27 January 16, 2020
Controlling Depth of Field Diagram: Wikipedia If a smaller aperture makes everything focused, why donβt we just always use it? Justin Johnson EECS 442 WI 2020: Lecture 3 - 28 January 16, 2020
Varying the Aperture Small aperture = large DOF Large aperture = small DOF Slide Credit: A. Efros, Photo: Philip Greenspun Justin Johnson EECS 442 WI 2020: Lecture 3 - 29 January 16, 2020
Varying the Aperture Justin Johnson EECS 442 WI 2020: Lecture 3 - 30 January 16, 2020
Field of View π π Photo. Material π π π = tan I; 2π tan -1 is monotonic increasing. How can I get the FOV bigger? Justin Johnson EECS 442 WI 2020: Lecture 3 - 31 January 16, 2020
Field of View Slide Credit: A. Efros Justin Johnson EECS 442 WI 2020: Lecture 3 - 32 January 16, 2020
Field of View Slide Credit: A. Efros Justin Johnson EECS 442 WI 2020: Lecture 3 - 33 January 16, 2020
Field of View and Focal Length Large FOV, small f Camera close to car Small FOV, large f Camera far from the car Slide Credit: A. Efros, F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 34 January 16, 2020
Field of View and Focal Length standard wide-angle telephoto Slide Credit: F. Durand Justin Johnson EECS 442 WI 2020: Lecture 3 - 35 January 16, 2020
Dolly Zoom Change f and distance at the same time Video Credit: Goodfellas 1990 Justin Johnson EECS 442 WI 2020: Lecture 3 - 36 January 16, 2020
More Bad News β’ First a pinholeβ¦ β’ Then a thin lens modelβ¦. Slide: L. Lazebnik Justin Johnson EECS 442 WI 2020: Lecture 3 - 37 January 16, 2020
Radial Distortion Lens imperfections cause distortions as a function of distance from optical axis Less common these days in consumer devices Photo: Mark Fiala, U. Alberta Justin Johnson EECS 442 WI 2020: Lecture 3 - 38 January 16, 2020
Radial Distortion y f Photo. Material r z y' Ideal Distorted π§β² = π π§ π§β² = (1 + π ; π O + β― ) π§ π¨ π¨ Justin Johnson EECS 442 WI 2020: Lecture 3 - 39 January 16, 2020
Recommend
More recommend