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? Photography – Life of a Photograph - from Light to Pixels Shutter Speed / Aperture Size / ISO sensitivity

slide-3
SLIDE 3
  • 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)

Today’s Class

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

About the Course

CS4501-001: Introduction to Computer Vision

slide-5
SLIDE 5

Office Hours

Paola Cascante-Bonilla (pc9za at virginia.edu) Office Hours: Fridays from 2pm to 4pm (Rice Hall 442) Ziyan Yang (zy3cx at virginia.edu) Office Hours: Thursdays from 12:30pm to 2:30pm (Rice Hall 442). Vicente Ordonez (vicente at virginia.edu) Office Hours: Tuesdays from 4pm to 6pm (Rice Hall 310).

slide-6
SLIDE 6

Life of a Photograph

Slide by Steve Seitz

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

Fast Shutter Speed

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

Doesn’t allow much light Allows a lot of light Slow Shutter Speed Large Aperture Size Small Aperture Size

slide-9
SLIDE 9

ISO sensitivity – Should be small ideally

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

slide-10
SLIDE 10

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

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-12
SLIDE 12

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

Homogeneous coordinates vs Cartesian coordinates

Conversion

Converting to homogeneous coordinates

homogeneous image coordinates homogeneous scene coordinates

Converting from homogeneous coordinates

slide-14
SLIDE 14

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

Homogeneous coordinates vs Cartesian coordinates

slide-15
SLIDE 15

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

[ ]X

I K x =

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

K

Slide Credit: Savarese

Projection matrix: from World to Image Coordinates

Intrinsic Assumptions

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

Extrinsic Assumptions

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

X x

slide-17
SLIDE 17

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-18
SLIDE 18

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

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-20
SLIDE 20

Oriented and Translated Camera

Ow iw kw jw

t R

X x

slide-21
SLIDE 21

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-22
SLIDE 22

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

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

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-25
SLIDE 25

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

slide-27
SLIDE 27

Light

  • What determines the color of a pixel?

Figure from Szeliski

slide-28
SLIDE 28

BRDF (Bidirectional reflectance distribution function)

Slide by Aaron Bobick

slide-29
SLIDE 29

BRDF (Bidirectional reflectance distribution function)

Slide by Aaron Bobick

slide-30
SLIDE 30

Reflection

Slide by Aaron Bobick

slide-31
SLIDE 31

Phong Reflection Model

Slide by Aaron Bobick

slide-32
SLIDE 32

Phong Reflection Model

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

slide-33
SLIDE 33

Phong Reflection Model - Recap

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

slide-34
SLIDE 34

Phong Reflection Model - Recap

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

slide-35
SLIDE 35

Phong Reflection Model - Recap

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

slide-36
SLIDE 36

Phong Reflection Model - Recap

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

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

slide-38
SLIDE 38

Same ideas used in Computer Graphics

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

Reflection

Slide by Aaron Bobick

slide-40
SLIDE 40

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-41
SLIDE 41

Slide by Aaron Bobick

slide-42
SLIDE 42

The other extreme – Only Specular Reflection

Slide by Aaron Bobick

slide-43
SLIDE 43

Pr Problem in Compute ter Vision: Intrinsic Image Decomposition

Given this Extract this

Images by Marc Serra

slide-44
SLIDE 44

Given this Extract this

Images by Aaron Bobick

Probl blem in n Co Comput puter Visi sion: n: Shape from Shading

slide-45
SLIDE 45

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source ?

Slide by James Hays

slide-46
SLIDE 46

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source

Slide by James Hays

slide-47
SLIDE 47

A photon’s life choices

  • Absorption
  • Diffuse Reflection
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source

Slide by James Hays

slide-48
SLIDE 48

A photon’s life choices

  • Absorption
  • Diffusion
  • Specular Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source

Slide by James Hays

slide-49
SLIDE 49

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source

Slide by James Hays

slide-50
SLIDE 50

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source

Slide by James Hays

slide-51
SLIDE 51

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ1 light source λ2

Slide by James Hays

slide-52
SLIDE 52

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source

Slide by James Hays

slide-53
SLIDE 53

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

t=1 light source t=n

Slide by James Hays

slide-54
SLIDE 54

A photon’s life choices

  • Absorption
  • Diffusion
  • Reflection
  • Transparency
  • Refraction
  • Fluorescence
  • Subsurface scattering
  • Phosphorescence
  • Interreflection

λ light source (Specular Interreflection)

Slide by James Hays

slide-55
SLIDE 55

The Eye

  • The human eye is a camera! (not quite)
  • 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-56
SLIDE 56

Next Class: Image Processing and Image Filters

slide-57
SLIDE 57

Questions?

57