projective geometry and light
play

Projective Geometry and Light Various slides from previous courses - PowerPoint PPT Presentation

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


  1. 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).

  2. Last Class What is a camera? Who invented cameras? Photography – Life of a Photograph - from Light to Pixels Shutter Speed / Aperture Size / ISO sensitivity

  3. 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)

  4. 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

  5. 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).

  6. Life of a Photograph Slide by Steve Seitz

  7. 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

  8. 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

  9. ISO sensitivity – Should be small ideally https://www.exposureguide.com/iso-sensitivity/

  10. 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?

  11. 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

  12. 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 ê ú ë û

  13. Homogeneous coordinates vs Cartesian coordinates Conversion Converting to homogeneous coordinates homogeneous image homogeneous scene coordinates coordinates Converting from homogeneous coordinates

  14. 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

  15. 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

  16. 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

  17. 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 ë û

  18. 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 ë û

  19. 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

  20. Oriented and Translated Camera R j w X t k w O w i w x

  21. 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 ë û

  22. 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 ë û

  23. 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 ë û

  24. 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

  25. 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 ë û

  26. 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

  27. Light • What determines the color of a pixel? Figure from Szeliski

  28. BRDF (Bidirectional reflectance distribution function) Slide by Aaron Bobick

  29. BRDF (Bidirectional reflectance distribution function) Slide by Aaron Bobick

  30. Reflection Slide by Aaron Bobick

  31. Phong Reflection Model Slide by Aaron Bobick

  32. Phong Reflection Model https://en.wikipedia.org/wiki/Phong_reflection_model

  33. Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model

  34. Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model

  35. Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model

  36. Phong Reflection Model - Recap https://en.wikipedia.org/wiki/Phong_reflection_model

  37. 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

  38. Same ideas used in Computer Graphics • Ray Tracing • Radiosity • Photon Mapping

  39. Reflection Slide by Aaron Bobick

  40. 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

  41. Slide by Aaron Bobick

  42. The other extreme – Only Specular Reflection Slide by Aaron Bobick

  43. Pr Problem in Compute ter Vision: Intrinsic Image Decomposition Given this Extract this Images by Marc Serra

  44. Probl blem in n Co Comput puter Visi sion: n: Shape from Shading Given this Extract this Images by Aaron Bobick

Recommend


More recommend