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? Image Formation

  3. Today’s Class • Practical Session on Photography • Camera Parameters • Brief Introduction to Projective Geometry (Computer Graphics) • Light

  4. About the Course CS4501-008: Introduction to Computer Vision • Instructor: Vicente Ordonez • Email: vicente@virginia.edu • Website: http://vicenteordonez.com/vision/ • Class Location: Thornton Hall E316 • Class Times: Monday-Wednesday 2pm - 3:15pm • Piazza: http://piazza.com/virginia/spring2018/cs4501008/home 4

  5. Teaching Assistants + Office Hours Fengyang Zhang Gautam Somappa Siva Sivaraman Wednesday 3:30 to 4:30pm (Rice 436) Tuesday 3pm to 4pm (Rice 340) Monday 4pm to 5pm (Rice 436) Thursday 2pm to 3pm (Rice 340) Thursday 3pm to 4pm (Rice 340) Tuesday 2pm to 3pm (Rice 436)

  6. Cameras

  7. What do you need to make a camera from scratch?

  8. Camera obscura

  9. Digital camera • A digital camera replaces film with a sensor array • Each cell in the array is light-sensitive diode that converts photons to electrons • Two common types • Charge Coupled Device (CCD) • CMOS • http://electronics.howstuffworks.com/digital-camera.htm Slide by Steve Seitz

  10. Sensor Array CMOS sensor

  11. Digital Camera Pipeline Slide by Steve Seitz

  12. Cameras Nikon D90 Nikon D3300 $1200 $700

  13. How to Shoot Photos in Manual? • Shutter time • Aperture • ISO • Focus / Auto-focus (Yes, you can shoot in manual and also probably should focus in manual)

  14. Small Shutter Time / Speed http://www.photographymad.com/pages/view/shutter-speed-a-beginners-guide

  15. Long Shutter Time

  16. Long Shutter Time

  17. Very Long Shutter Time – 25 seconds https://www.davemorrowphotography.com/shutter-speed-chart

  18. Long Shutter Time? Think of Buying a Tripod Manfrotto Mountaineer Carbon Fiber Tripod $200 Aluminum Tripod $140 Carbon Fiber Tripod $1300

  19. Large vs Small Aperture http://www.pgphotoclub.com/articles/aperture.html

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

  21. Final Thoughts - Take with grain of salt • Shooting in Automatic, especially in low light conditions will often go the easy route of just increasing the ISO all the way up • Sometimes in low light conditions instead you want to increase the shutter time to compensate the low light, or increase the aperture. (or use Flash) • No shame in using Automatic in a clear day, unless trying to achieve some effect.

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

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

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

  25. Homogeneous coordinates Conversion Converting to homogeneous coordinates homogeneous image homogeneous scene coordinates coordinates Converting from homogeneous coordinates

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

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

  28. Projection matrix X x Intrinsic Assumptions Extrinsic Assumptions • No rotation • Unit aspect ratio • 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

  29. Remove assumption: known optical center Intrinsic Assumptions Extrinsic Assumptions • No rotation • Unit aspect ratio • 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 ë û

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

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

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

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

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

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

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

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

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

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

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

  41. Reflection Slide by Aaron Bobick

  42. Reflection Slide by Aaron Bobick

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

  44. Slide by Aaron Bobick

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

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

  47. Pr Problem in Computer Vision: Shape from Shading Given this Extract this Images by Aaron Bobick

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

  49. Phong Reflection Model Slide by Aaron Bobick

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

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

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

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

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend