Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light •...

33
Radiometry Nuno Vasconcelos UCSD

Transcript of Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light •...

Page 1: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Radiometry

Nuno VasconcelosUCSD

Page 2: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• Last class: geometry of image formation• pinhole camera:

– point (x,y,z) in 3D scene projected into image pixel of coordinates (x’, y’)

– according to the perspective projection equation:

⎟⎟⎟

⎜⎜⎜

⎛=⎟⎟

⎞⎜⎜⎝

zy

zx

fyx

''

2

Page 3: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Perspective projection• the inverse

dependence on depth (Z) – causes objects to

shrink with distance

• while pinhole isa good mathematicalmodel

• in practice, cannot really use it– not enough light for

good pictures

3

Page 4: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Lenses

• the basic idea is:– lets make the

aperture bigger so that we can have many rays of light into the camera

– to avoid blurring we need to concentrate all the rays that start in the same 3D point

– so that they end up on the same image plane point

4

Page 5: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Lenses• fundamental relation

– note that it does not depend on the vertical position of P– we can show that it holds for all rays that start in the plane of P

⎟⎟⎠

⎞⎜⎜⎝

⎛−

−≈

2

212

11

11dn

Rnn

nd

R

lensd2

imageplane

P

P’

d1

5

Page 6: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Lenses

6

• note that, in general,– can only have in focus objects that are in a certain depth range– this is why background is sometimes out of focus

– by controlling the focus you are effectively changing the planeof the rays that converge on the image plane without blur

• for math simplicity, we will work with pinhole model!

Page 7: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• today : what is the pixel brightness or image intensity?• clearly, depends on three factors:

– lighting of the scene– the reflectance properties of the material– various angles

α1

α2

incident light

reflected light

image brightness

7

Page 8: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• clearly, the angles involved play an important role• consider the following experiment

• to formulate this mathematically we need to define a few concepts related to angles:– viewing hemisphere, forshortening, and solid angle

sheet of paper

lots of reflected light no reflection

8

Page 9: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• 1) viewing hemisphere:

– hemisphere of all directions from which light can reach a surface at point x.

• parameterized in spherical coordinates:– r = 1– θ: angle with surface

normal– φ: angle along the

surface

• usually,– we need to integrate

over φ, hence – not a problem if it is not

clear what the origin is.

9object surface

Page 10: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• 2) foreshortening: very important concept

– tilted surface looks smaller than when seen at 90o

– best understood by example– if I show you a tilted person it looks smaller than when you view

you at 90o

foreshortening

10

Page 11: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light

11

• what is the foreshortened area for a patch of area dA?

• hence, foreshortened area isdA’= dl1’ dl2’ = dl1 dl2 cos θ = dA cos θ

• it can be shown that this holds for a patch of any shape.– foreshortened area = area x cos (angle between viewing

direction and surface normal)

dl1

dl2

dA

θ

dl1’

dl2’

θ

θ

dl2

dl2 cos θ

Page 12: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• 3) Solid angle: 3D generalization of angle.• solid angle subtended by a patch at x1 is obtained by:

– projecting the patch in the unit sphere centered at x1 – measuring the area of the projection.

• to understand this– start by assuming that patch is perpendicular to the line that contains

the radius of the sphere.

• note that:– ratio between area of projected and

original patch– must be the same as ratio of between

surface area of unit sphere and sphere that contains the patch.

x

dA

rdA’

12

Page 13: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light

13

• assuming patch is at distance r from x

• the solid angle is dA/dr2

• what if patch is not perpendicular to radius?– there is an equivalent forshortened patch– which is perpendicular to radius– we have just seen that this has area

– from which

x

dA

rdA’

22

2

'4

4' r

dAdArrdAdA

=⇔==π

π

θcos'' dAdA =

2

cos''r

dAdA θ=

x

dA

rdA’

dA’’

Page 14: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Radiance• with these definitions we can study light• first important concept is radiance

– appropriate unit for measuring distribution of light

• Definition: radiance is– power (energy/unit time) traveling at x

in direction V– per unit area perpendicular to V– per unit solid angle

• measured in – watts/square meter x steradian (w x m-2 x sr -1)– (steradian = radian squared)

• it follows that it is a function of a point x and a direction V

x

V

),( VxL

14

Page 15: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Radiance• why do we need all this stuff?

– Q: if I have a radiating patch, what is the power that can reach the second?

– by definitionpower = radiance x

area perp. to r xsolid angle

– this is

– why do we need all this?

),( rxL 1cosθ1A dx

222 cos

rdAx θ

x

15

Page 16: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Radiance• why do we need all this stuff?

– radiance: property of source patch, says that patch emits a certain power in the direction of interest

– area perp to r: capturesintuition that the emitted poweris smaller if the directionis not perp. to patch

– this is really just theforshortened area of the patch

– solid angle: only a portion ofthe emitted energy actuallyreaches the second patch

),( rxL 1cos θ1A dx

222 cos

rdAx θ

x

16

Page 17: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Radiance• note that we can also write down the equation for power

that actually reaches patch 2– once again, by definition

power = radiance xarea perp. to r xsolid angle

– this is now

– assuming that the mediumhas no loss, the two powersare the same

),( ryL 2cosθ2A dx

211 cos

rdAx θ

y

17

Page 18: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Radiance• hence, for a lossless medium:

• or

• this proves that:– “in a lossless medium

radiance is constant alongstraight lines”

• vision: medium is air,this always holds

y2

1122

coscos),(r

dAdAryL θθ

=

222

11coscos),(r

dAdArxL θθ

),(),( ryLrxL =

x

18

Page 19: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• going back to our original picture, we now know:

– whatever radiance is emitted by the object at Po

– is the radiance that is received by the image at Pi

• note that this decouples the power from the angles– to compute the real power we simply have to account for the

angles of the particular patches of surface and image

α1

α2

incident light

reflected light

image brightness

Po

Pi

V

),(),( VPLVPL io =

19

Page 20: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Light• the next question is:

– what is the relation between • the illumination that reaches the object• and the reflected light?

• this is measured by the bidirectional reflectance distribution function (BRDF)

α1

α2

incident light

reflected light

image brightness

Po

Pi

V

20

Page 21: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Irradiance• incident light is measured in terms of irradiance

(we will see why soon)• Definition: irradiance is power per unit area (not

forshortened)• hence:

– a patch at P– illuminated with radiance L(P,V),– originating from a source patch that

subtends solid angle dω at P– receives irradiance

P

θV

( )

ϖθ

ϖθ

ddAVPL

ddAVPLdA

cos),(

cos),(1=

21

Page 22: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

BRDF• Definition: ratio of radiance in outgoing

direction (Vo) to irradiance in incoming direction (Vi)

• note:– this immediately allows us to write outgoing vs incoming

radiance

– and is the reason to define the BRDF in terms of irradiance– it gives us a very nice way to propagate light around a scene

θo

θi ViVo

ϖθ

ρdVPL

VPLVVPii

ooibd cos),(

),(),,( =

ϖθρ dVPLVVPVPL iioibdo cos),(),,(),( =

22

Page 23: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

BRDF• suppose we have two objects

– from definition of BRDF

θ1

Po

Vo

θ2

P1

V1

V2

121112121 cos),(),,(),( ϖθρ dVPLVVPVPL bd =23

Page 24: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

BRDF• suppose we have two objects

– from constancy of radiance in lossless medium

θ1

Po

Vo

θ2

P1

V1

V2

121112121 cos),(),,(),( ϖθρ dVPLVVPVPL bd =

),(),( 1011 VPLVPL =

24

Page 25: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

BRDF• suppose we have two objects

– from definition of BRD

θ1

Po

Vo

θ2

P1

V1

V2

121112121 cos),(),,(),( ϖθρ dVPLVVPVPL bd =

),(),( 1011 VPLVPL =

010001010 cos),(),,(),( ϖθρ dVPLVVPVPL bd =

25

Page 26: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

26

BRDF• combining everything

– we get

• conclusion:– we can relate the radiances at any point on the trajectory by

successively multiplying ρbd and cos θ !

θ1

Po

Vo

θ2

P1

V1

V2

121112121 cos),(),,(),( ϖθρ dVPLVVPVPL bd =

),(),( 1011 VPLVPL =

010001010 cos),(),,(),( ϖθρ dVPLVVPVPL bd =

011010

21210021

cos),,(cos),,(),(),(

ϖϖθρθρ

ddVVPVVPVPLVPL

bd

bd

x

x =

Page 27: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Ray-tracing

27

• this is the basic principle of the ray-tracing technique in computer graphics– given a 3D model of the scene– compute the depth of each object

point– this allows us to create a z-buffer

(depth buffer)– tells us what are the points that

are visible in the scene– we can then shoot a ray from

each image position and followit as it bounces around

– the previous equation tells uswhat amount of light we willhave in the image

Page 28: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Ray-tracing• this produces amazingly complicated images

(note all the reflections of objects in others)

28

Page 29: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Ray-tracing• and quite realistic ones too

29

Page 30: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Computer graphics• is it really that simple?

– no, there are many other things one has to account for– refraction, light absorption, macroscopic inter-reflections,

specularities– it is, after all, a complex world– but in the hw, you will see you can do a lot with this

• for vision, – there is no need to consider much more complexity– in fact, the equation

– is usually simplified

ϖθρ dVPLVVPVPL iioibdo cos),(),,(),( =

30

Page 31: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

BRDF• recall that

– BRDF depends on four angles– this makes it quite hard to measure

• illuminate from all possible directions• measure reflection in all possible directions• move on to next surface point

• important property (Helmoltz reciprocity)– for two surfaces in thermal equilibrium– radiation reaching one from the other is the same– otherwise, the one receiving more radiation would

warm up, and the other would cool down

• implies that the BRDF is symmetric

θo

θi ViVo

φi

φo

),,(),,( iobdoibd VVPVVP ρρ =

31

Page 32: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

Lambertian surfaces• this makes measurements much easier

– we only need to shine light inone direction

– reading how much light is reflected inall dimensions

– tells us the complete BRDF at that point

• but we can do even simpler than this– for some surfaces, the BRDF does not depend

on the direction at all– these are called Lambertian surfaces– they reflect light equally in all directions– the BRDF only depends on the point P

θo

θi ViVo

φi

φo

)(),,( PVVP bdoibd ρρ =

32

Page 33: Review of linear algebra - SVCL...– appropriate unit for measuring distribution of light • Definition: radiance is –power(energy/unit time) traveling at x in direction V –

33