CS4501: Introduction to Computer Vision Projective Geometry and Light Various slides from previous courses by: D.A. Forsyth (Berkeley / UIUC), I. Kokkinos (Ecole Centrale / UCL). S. Lazebnik (UNC / UIUC), S. Seitz (MSR / Facebook), J. Hays (Brown / Georgia Tech), A. Berg (Stony Brook / UNC), D. Samaras (Stony Brook) . J. M. Frahm (UNC), V. Ordonez (UVA).
Last Class What is a camera? Who invented cameras? Photography – Life of a Photograph - from Light to Pixels Shutter Speed / Aperture Size / ISO sensitivity
Today’s Class • Recap from Last Class on Shutter Speed / Aperture / ISO sensitivity • Camera Parameters • Brief Introduction to Projective Geometry (Computer Graphics) • Light Models (Diffuse Light vs Specular Light)
About the Course CS4501-001: Introduction to Computer Vision • Instructor: Vicente Ordóñez • Email: vicente@virginia.edu • Website: http://vicenteordonez.com/vision/ • Class Location: Olsson Hall 120 (Capacity 148) • Class Times: Monday-Wednesday 5pm - 6:15pm • Piazza: https://piazza.com/virginia/fall2019/cs4501001 • UVA Collab (for submitting assignments / quizzes / etc) 4
Office Hours Vicente Ordonez Paola Cascante-Bonilla Ziyan Yang (vicente at virginia.edu) (pc9za at virginia.edu) (zy3cx at virginia.edu) Office Hours: Office Hours: Office Hours: Tuesdays from Fridays from Thursdays from 4pm to 6pm 2pm to 4pm 12:30pm to 2:30pm (Rice Hall 310). (Rice Hall 442) (Rice Hall 442).
Life of a Photograph Slide by Steve Seitz
How to Shoot Photos in Manual? • Shutter speed • Aperture size • Focus / Auto-focus (Yes, you can shoot in manual and also probably should focus in manual) • ISO sensitivity
Doesn’t allow much light Allows a lot of light Fast Shutter Speed Slow Shutter Speed Small Aperture Size Large Aperture Size http://www.photographymad.com/pages/view/shutter-speed-a-beginners-guide
ISO sensitivity – Should be small ideally https://www.exposureguide.com/iso-sensitivity/
Projection: world coordinates à image coordinates . é X ù ê ú = P Y ê ú ê ú Z ë û . . Z f Y V . Camera Center (0, 0, 0) U é ù U = V p ê ú If X = 2, Y = 3, Z = 5, and f = 2 ë û What are U and V?
Projection: world coordinates à image coordinates . é X ù ê ú = P Y ê ú ê ú Z ë û . . Z f Y V . Camera Center (0, 0, 0) U é ù U = V p ê ú f 2 ë û = - U X * = - U 2 * Z 5 f 2 = - V Y * = - V 3 * Z 5
Projection: world coordinates à image coordinates . é X ù ê ú = P Y Optical ê ú Center ê ú Z ë û ( u 0 , v 0 ) . . f Z Y v . Camera Center (t x , t y , t z ) u é u ù = v p ê ú ë û
Homogeneous coordinates vs Cartesian coordinates Conversion Converting to homogeneous coordinates homogeneous image homogeneous scene coordinates coordinates Converting from homogeneous coordinates
Homogeneous coordinates vs Cartesian coordinates é ù é ù Invariant to scaling x kx é ù é ù kx x ê ú ê ú = Þ = kw w k y ky ê ú ê ú ê ú ê ú ky y ë û ë û ê ú ê ú kw w w kw ë û ë û Homogeneous Cartesian Coordinates Coordinates Point in Cartesian is ray in Homogeneous
Projection: world coordinates à image coordinates . é X ù ê ú = P Y ê ú ê ú Z ë û . . Z f Y V . Camera Center (0, 0, 0) U é ù U = V p ê ú f 2 ë û = - U X * = - U 2 * Z 5 f 2 = - V Y * = - V 3 * Z 5
Projection matrix: from World to Image Coordinates X x Intrinsic Assumptions Extrinsic Assumptions • Unit aspect ratio • No rotation • Camera at (0,0,0) • Optical center at (0,0) K • No skew é ù x é ù é ù u f 0 0 0 ê ú [ ] X y ê ú ê ú ê ú x = K I 0 = w v 0 f 0 0 ê ú ê ú ê ú z ê ú ê ú 1 0 0 1 0 ë û ë û ê ú 1 ë û Slide Credit: Savarese
Remove assumption: known optical center Intrinsic Assumptions Extrinsic Assumptions • Unit aspect ratio • No rotation • Camera at (0,0,0) • No skew é ù x é u ù é f 0 u 0 ù ê ú [ ] X 0 y ê ú ê ú x = ê ú K I 0 = w v 0 f v 0 ê ú ê ú 0 ê ú z ê ú ê ú 1 0 0 1 0 ê ú ë û ë û 1 ë û
Remove assumption: square pixels Intrinsic Assumptions Extrinsic Assumptions • No skew • No rotation • Camera at (0,0,0) é ù x a é u ù é 0 u 0 ù ê ú 0 [ ] X y ê ú ê ú ê ú x = = b K I 0 w v 0 v 0 ê ú ê ú 0 ê ú z ê ú ê ú 1 0 0 1 0 ê ú ë û ë û 1 ë û
Remove assumption: non-skewed pixels Intrinsic Assumptions Extrinsic Assumptions • No rotation • Camera at (0,0,0) é ù x a é u ù é s u 0 ù ê ú [ ] X 0 y ê ú ê ú x = ê ú K I 0 = b w v 0 v 0 ê ú ê ú 0 ê ú z ê ú ê ú 1 0 0 1 0 ê ú ë û ë û 1 ë û Note: different books use different notation for parameters
Oriented and Translated Camera R j w X t k w O w i w x
Allow camera translation Intrinsic Assumptions Extrinsic Assumptions • No rotation é ù x a é u ù é 0 u ù é 1 0 0 t ù ê ú [ ] X 0 x y ê ú ê ú ê ú x = ê ú K I t = b w v 0 v 0 1 0 t ê ú ê ú ê ú 0 y ê ú z ê ú ê ú ê ú 1 0 0 1 0 0 1 t ê ú ë û ë û ë û z 1 ë û
Slide Credit: Saverese 3D Rotation of Points Rotation around the coordinate axes, counter-clockwise: é ù 1 0 0 ê ú a = a - a R ( ) 0 cos sin ê ú x ê ú a a 0 sin cos ë û p b b ’ é ù cos 0 sin g ê ú b = R ( ) 0 1 0 ê ú p y y ê ú - b b sin 0 cos ë û g - g é ù cos sin 0 ê ú g = g g R ( ) sin cos 0 ê ú z z ê ú 0 0 1 ë û
Allow camera rotation [ ] X x = K R t é ù x a é u ù é s u ù é r r r t ù ê ú 0 11 12 13 x y ê ú ê ú ê ú ê ú = b w v 0 v r r r t ê ú ê ú ê ú 0 21 22 23 y ê ú z ê ú ê ú ê ú 1 0 0 1 r r r t ê ú ë û ë û ë û 31 32 33 z 1 ë û
Projection matrix (Word Coordinates to Image Coordinates) R,t j w X k w O w i w x [ ] X x : Image Coordinates: (u,v,1) x = K R t K : Intrinsic Matrix (3x3) R : Rotation (3x3) Intrinsic Camera Properties: K t : Translation (3x1) X : World Coordinates: (X,Y,Z,1) Extrinsic Camera Properties: [R t] Slide Credit: Savarese
Degrees of freedom [ ] X x = K R t 5 6 é ù x a é u ù é s u ù é r r r t ù ê ú 0 11 12 13 x y ê ú ê ú ê ú ê ú = b w v 0 v r r r t ê ú ê ú ê ú 0 21 22 23 y ê ú z ê ú ê ú ê ú 1 0 0 1 r r r t ê ú ë û ë û ë û 31 32 33 z 1 ë û
Things to Remember for Quiz • Pinhole camera model • Focal length in the pinhole camera model • Shutter Time / Aperture / ISO • Homogeneous Coordinates • Extrinsic Camera Properties and Intrinsic Camera Properties • Describe mathematically (and intuitively) the conversion process from World Coordinates to Image Coordinates
Light • What determines the color of a pixel? Figure from Szeliski
BRDF (Bidirectional reflectance distribution function) Slide by Aaron Bobick
BRDF (Bidirectional reflectance distribution function) Slide by Aaron Bobick
Reflection Slide by Aaron Bobick
Phong Reflection Model Slide by Aaron Bobick
Phong Reflection Model https://en.wikipedia.org/wiki/Phong_reflection_model
Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model
Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model
Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model
Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model
Phong’s Shading / Illumination Model Originally from Vietnam / • PhD from Utah, Professor at Utah, and later Stanford. Died at age 32 from • leukemia Phong’s professor Ivan Sutherland went on to win the • Turing Award (Nobel Prize in CS) for lifelong contributions to Computer Graphics
Same ideas used in Computer Graphics • Ray Tracing • Radiosity • Photon Mapping
Reflection Slide by Aaron Bobick
Diffuse Reflection – Lambertian Surface / BRDF Light intensity does • not depend on the outgoing direction. Only incoming. It is independent of • where the viewer stands. Smooth surface, not • glossy. Can think of any examples? Slide by Aaron Bobick
Slide by Aaron Bobick
The other extreme – Only Specular Reflection Slide by Aaron Bobick
Pr Problem in Compute ter Vision: Intrinsic Image Decomposition Given this Extract this Images by Marc Serra
Probl blem in n Co Comput puter Visi sion: n: Shape from Shading Given this Extract this Images by Aaron Bobick
Recommend
More recommend