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

projective geometry and light
SMART_READER_LITE
LIVE PREVIEW

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


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

slide-2
SLIDE 2

Last Class

What is a camera? Who invented cameras? Image Formation

slide-3
SLIDE 3
  • Practical Session on Photography
  • Camera Parameters
  • Brief Introduction to Projective Geometry (Computer Graphics)
  • Light

Today’s Class

slide-4
SLIDE 4
  • 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

About the Course

CS4501-008: Introduction to Computer Vision

slide-5
SLIDE 5

Teaching Assistants + Office Hours

Fengyang Zhang

Tuesday 3pm to 4pm (Rice 340) Thursday 3pm to 4pm (Rice 340)

Gautam Somappa

Monday 4pm to 5pm (Rice 436) Tuesday 2pm to 3pm (Rice 436)

Siva Sivaraman

Wednesday 3:30 to 4:30pm (Rice 436) Thursday 2pm to 3pm (Rice 340)

slide-6
SLIDE 6

Cameras

slide-7
SLIDE 7

What do you need to make a camera from scratch?

slide-8
SLIDE 8

Camera obscura

slide-9
SLIDE 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

slide-10
SLIDE 10

Sensor Array

CMOS sensor

slide-11
SLIDE 11

Digital Camera Pipeline

Slide by Steve Seitz

slide-12
SLIDE 12

Cameras

Nikon D90 $1200 Nikon D3300 $700

slide-13
SLIDE 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)

slide-14
SLIDE 14

Small Shutter Time / Speed

http://www.photographymad.com/pages/view/shutter-speed-a-beginners-guide

slide-15
SLIDE 15

Long Shutter Time

slide-16
SLIDE 16

Long Shutter Time

slide-17
SLIDE 17

Very Long Shutter Time – 25 seconds

https://www.davemorrowphotography.com/shutter-speed-chart

slide-18
SLIDE 18

Long Shutter Time? Think of Buying a Tripod

Aluminum Tripod $140 Carbon Fiber Tripod $200 Manfrotto Mountaineer Carbon Fiber Tripod $1300

slide-19
SLIDE 19

Large vs Small Aperture

http://www.pgphotoclub.com/articles/aperture.html

slide-20
SLIDE 20

ISO – Should be small ideally

https://www.exposureguide.com/iso-sensitivity/

slide-21
SLIDE 21

Final Thoughts - Take with grain of salt

  • Shooting in Automatic, especially in low light conditions will
  • ften 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.

slide-22
SLIDE 22

Projection: world coordinatesàimage coordinates

Camera Center (0, 0, 0)

ú ú ú û ù ê ê ê ë é = Z Y X P

. . .

f Z Y

ú û ù ê ë é = V U p

.

V U If X = 2, Y = 3, Z = 5, and f = 2 What are U and V?

slide-23
SLIDE 23

Projection: world coordinatesàimage coordinates

Camera Center (0, 0, 0)

ú ú ú û ù ê ê ê ë é = Z Y X P

. . .

f Z Y

ú û ù ê ë é = V U p

.

V U

Z f X U *

  • =

Z f Y V *

  • =

5 2 * 2

  • =

U 5 2 * 3

  • =

V

slide-24
SLIDE 24

Projection: world coordinatesàimage coordinates

Camera Center (tx, ty, tz)

ú ú ú û ù ê ê ê ë é = Z Y X P

. . .

f Z Y

ú û ù ê ë é = v u p

.

Optical Center (u0, v0)

v u

slide-25
SLIDE 25

Homogeneous coordinates

Conversion

Converting to homogeneous coordinates

homogeneous image coordinates homogeneous scene coordinates

Converting from homogeneous coordinates

slide-26
SLIDE 26

Homogeneous coordinates

Invariant to scaling Point in Cartesian is ray in Homogeneous

ú û ù ê ë é = ú û ù ê ë é Þ ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é

w y w x kw ky kw kx

kw ky kx w y x k

Homogeneous Coordinates Cartesian Coordinates

slide-27
SLIDE 27

Slide Credit: Savarese

Projection matrix (Word Coordinates to Image Coordinates)

[ ]X

t R K x =

x: Image Coordinates: (u,v,1) K: Intrinsic Matrix (3x3) R: Rotation (3x3) t: Translation (3x1) X: World Coordinates: (X,Y,Z,1)

Ow iw kw jw

R,t X x Intrinsic Camera Properties: K Extrinsic Camera Properties: [R t]

slide-28
SLIDE 28

[ ]X

I K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1 z y x f f v u w

K

Slide Credit: Savarese

Projection matrix

Intrinsic Assumptions

  • Unit aspect ratio
  • Optical center at (0,0)
  • No skew

Extrinsic Assumptions

  • No rotation
  • Camera at (0,0,0)

X x

slide-29
SLIDE 29

Remove assumption: known optical center

[ ]X

I K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1 z y x v f u f v u w

Intrinsic Assumptions

  • Unit aspect ratio
  • No skew

Extrinsic Assumptions

  • No rotation
  • Camera at (0,0,0)
slide-30
SLIDE 30

Remove assumption: square pixels

[ ]X

I K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1 z y x v u v u w b a

Intrinsic Assumptions

  • No skew

Extrinsic Assumptions

  • No rotation
  • Camera at (0,0,0)
slide-31
SLIDE 31

Remove assumption: non-skewed pixels

[ ]X

I K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1 z y x v u s v u w b a

Intrinsic Assumptions Extrinsic Assumptions

  • No rotation
  • Camera at (0,0,0)

Note: different books use different notation for parameters

slide-32
SLIDE 32

Oriented and Translated Camera

Ow iw kw jw

t R

X x

slide-33
SLIDE 33

Allow camera translation

[ ]X

t I K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1 1 1 1 z y x t t t v u v u w

z y x

b a

Intrinsic Assumptions Extrinsic Assumptions

  • No rotation
slide-34
SLIDE 34

3D Rotation of Points

Rotation around the coordinate axes, counter-clockwise:

ú ú ú û ù ê ê ê ë é

  • =

ú ú ú û ù ê ê ê ë é

  • =

ú ú ú û ù ê ê ê ë é

  • =

1 cos sin sin cos ) ( cos sin 1 sin cos ) ( cos sin sin cos 1 ) ( g g g g g b b b b b a a a a a

z y x

R R R

p p

g y z

Slide Credit: Saverese

slide-35
SLIDE 35

Allow camera rotation

[ ]X

t R K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1

33 32 31 23 22 21 13 12 11

z y x t r r r t r r r t r r r v u s v u w

z y x

b a

slide-36
SLIDE 36

Degrees of freedom

[ ]X

t R K x =

ú ú ú ú û ù ê ê ê ê ë é ú ú ú û ù ê ê ê ë é ú ú ú û ù ê ê ê ë é = ú ú ú û ù ê ê ê ë é 1 1 1

33 32 31 23 22 21 13 12 11

z y x t r r r t r r r t r r r v u s v u w

z y x

b a

5 6

slide-37
SLIDE 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

slide-38
SLIDE 38

Light

  • What determines the color of a pixel?

Figure from Szeliski

slide-39
SLIDE 39

BRDF (Bidirectional reflectance distribution function)

Slide by Aaron Bobick

slide-40
SLIDE 40

BRDF (Bidirectional reflectance distribution function)

Slide by Aaron Bobick

slide-41
SLIDE 41

Reflection

Slide by Aaron Bobick

slide-42
SLIDE 42

Reflection

Slide by Aaron Bobick

slide-43
SLIDE 43

Diffuse Reflection – Lambertian Surface / BRDF

Slide by Aaron Bobick

  • Light intensity does

not depend on the

  • utgoing direction.

Only incoming.

  • It is independent of

where the viewer stands.

  • Smooth surface, not
  • glossy. Can think of

any examples?

slide-44
SLIDE 44

Slide by Aaron Bobick

slide-45
SLIDE 45

The other extreme – Only Specular Reflection

Slide by Aaron Bobick

slide-46
SLIDE 46

Pr Problem in Compute ter Vision: Intrinsic Image Decomposition

Given this Extract this

Images by Marc Serra

slide-47
SLIDE 47

Given this Extract this

Images by Aaron Bobick

Pr Problem in Computer Vision: Shape from Shading

slide-48
SLIDE 48

Same ideas used in Computer Graphics

  • Ray Tracing
  • Radiosity
  • Photon Mapping
slide-49
SLIDE 49

Phong Reflection Model

Slide by Aaron Bobick

slide-50
SLIDE 50

Phong Reflection Model

https://en.wikipedia.org/wiki/Phong_reflection_model

slide-51
SLIDE 51

Phong Reflection Model - Recap

https://en.wikipedia.org/wiki/Phong_reflection_model

slide-52
SLIDE 52

Phong Reflection Model - Recap

https://en.wikipedia.org/wiki/Phong_reflection_model

slide-53
SLIDE 53

Phong Reflection Model - Recap

https://en.wikipedia.org/wiki/Phong_reflection_model

slide-54
SLIDE 54

Phong Reflection Model - Recap

https://en.wikipedia.org/wiki/Phong_reflection_model

slide-55
SLIDE 55

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

slide-56
SLIDE 56

The Eye

  • The human eye is a camera!
  • Iris - colored annulus with radial muscles
  • Pupil - the hole (aperture) whose size is controlled by the iris
  • What’s the “film”?

– photoreceptor cells (rods and cones) in the retina

Slide by Steve Seitz

slide-57
SLIDE 57

Next Class: Image Processing and Image Filters

slide-58
SLIDE 58

Questions?

58