course 10 shading. 1. basic concepts: light source: radiance: the light energy radiated from a unit...

21
Course 10 Shading

Upload: elfrieda-cain

Post on 05-Jan-2016

225 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Course 10 Shading

Page 2: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Course 10 Shading

1. Basic Concepts:Light Source:

Radiance: the light energy

radiated from a unit area of

light source (or surface) in

a unit solid angle.

Solid angle:

If light source is a point source, the “ unit area” is omitted in above definition.

sin2

r

s

Page 3: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Illumination: light energy radiated or received on a unit area of surface.

For a point light source,

where is the radiance of light source in the

direction ; is due to the foreshorten of

effective area of the surface patch in the radiation

direction.

iiiiii ddIL cossin),(

),( iiI

),( ii icos

Page 4: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Surface:

Bi-directional reflectance distribution function (BRDF):

BRDF of a surface is the ratio of energy radiated from

a surface patch in some direction to the energy

arriving at the surface from some direction.

Where --- incident angle;

--- emitting angle

),;,( eeiifBRDF

),( ii

),( ee

Page 5: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Radiance (reflectance) :

The is the brightness of an object surface that you look at.

iiiieeiiee ddfIL

sincos),;,(),(2

0 0

0

2

),( eeL

Page 6: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Imaging :

Assume that the irradiance at a point (X,Y) of an image plane is equal to the radiance from a corresponding surface patch, i.e.,

E(X,Y) = L(x,y,z) =

This indicates that the terms of brightness, intensity and gray-level will have the same meaning as irradiance for an image.

Note: radiance ----- out-going energy

irradiance ----- in-going energy

),( eeL

Page 7: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

2. Surface Reflectance 1) Lambertain surface (Diffuse surface) in micro: rough

in macro: smooth

Def. Lambertain surface is a kind of surface that reflects incident light equally in all directions regardless the direction of incident light. A Lambertain surface is assumed not to absorb any incident illumination.

π

1),φ;θ,φθfBRDF eeii (

Page 8: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

where I0 ----- illumination of incident light.

----- incident angle to surface.

Remark: For a Lambertain surface, its brightness percieved by a viewer do not relate to the position of the viewer. But the brightness is strongly related to the direction from which the light is illuminated to the surface.

i

i0

ee cosθπ

I),φL(θ

Page 9: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

2) Specula surface (mirror)

3) Combinational surface:Surface with reflectance between Lambertain and specular surfaces:

Where -----weigh factor

),;,( eeiifBRDF ii

ieie

cossin

)()(

),( eeL

)1(

BRDF

),( iiI

ii

ieie

cossin

)()(

Page 10: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

3. Shape from shading (Horn,1970)Assumptions: i) Lambertain surface ii) Parallel light source from known direction iii) Orthographic projection for image

Imaging: given the condition of light source and object surface in 3D, the intensity of each pixel in image plane can be uniquely determined.

Question: If an image is given, can we evaluate the structure of the 3D surface? i.e., can we find the surface normal at each surface point? How is about the illumination of light source?

Page 11: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Surface Orientation :

Let a 3D surface be z=z (x,y), then,

Denote

p= , q=

Surface normal

yy

zx

x

zz

x

z

y

z

221

)1,,(ˆ

qp

qp

n

nn

Page 12: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Note: p and q are the functions of 3D point (x,y,z) at a surface. Under the assumption of orthographic projection p and q are also the functions of (X,Y) of image, i.e.

p = p(x,y) = p(X,Y), q = q(x,y) = q(X,Y)

Question : How to determine the two functions from image clue?

Page 13: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

1) Reflectance mapAssume: Lambertain surface

E(x,y) = =

When image intensity is normalized by

then

On another hand, for a 3D surface, let

be surface normal; Let be incident direction of light, then

),( eeL i

I

cos0

plane} image),();,(max{

),(),(

yxyxE

yxEyxI

iyxI cos),( )1,,(ˆ qpn

)1,,(ˆ sss qpn

),(11

12222

qpRqpqp

qqpp

ss

ss

Page 14: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Where is called reflectance map of a 3D

surface.

To solve for p(x,y) and q(x,y) , we can use variation to

minimize [I(x,y) R(p,q)]2 over image plane:

Note that this is an ill-conditional problem, to solve for

functions p = p(x,y) and q = q(x,y), we enforce

smoothness constraint:

),( qpR

min)],(),([ 2 dxdyqpRyxIei

0),(2 yxp 0),(2 yxq

Page 15: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Thus, the minimization becomes

In discrete images:

Let

min})()[()],(),({[ 22222 dxdyqpqpRyxIei

ijijjijijijiijij pppppppp )(4

1,1,11,1,

2

ijijij qqq 2

0),(

p

yxe

0),(

q

yxe

Page 16: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

We get

So,

0]),([)],(),([

pyxpp

RqpRyxI

0]),([)],(),([

qyxqq

RqpRyxI

p

RqpRyxIyxpyxp

)],(),([1

),(),(

q

RqpRyxIyxqyxq

)],(),([1

),(),(

Page 17: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Since and are computed from the value of the neighbor pixels of p(x,y), iterative method should be used to solve for p(x,y) and q(x,y).

For a Lambertain surface,

),( yxp ),( yxq

)()()1( })],(),({[1

),(),( nnn

p

RqpRyxIyxpyxp

)()()1( })],(),({[1

),(),( nnn

q

RqpRyxIyxqyxq

11

1),(

2222

ss

ss

qpqp

qqppqpR

Page 18: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Remark:

1) assumed incident light direction is known.

2) the choice of initial values of p(x,y) and q(x,y)

is

important to get a convergence at global

minimum.

 

Page 19: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

4. Photometric stereoAssume:i) Fixed camera positionii) Light source located at 3 different positions to surface, a

t each position, One images is obtained.iii) Lambertain surfaceiv) Orthographic projection for three images.Let incident direction be :

, i=1,2,31

)ˆˆˆ(ˆ

22

sisi

sisi

iqp

zyqxps

Page 20: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Surface normal: , unknownImage: normalized image:From reflectance map of Lambertain:

Write

Then we have . This is a linear equation ,which can be solved by

n̂3,2,1),,( iyxIi

3,2,1,ˆˆ

inSIii

zyx

zyx

zyx

sss

sss

sss

s

s

s

S

333

2221

111

3

2

1

ˆ

ˆ

ˆ

3

2

1

I

I

I

I

nSIˆ

ISnˆˆ 1

Page 21: Course 10 Shading. 1. Basic Concepts: Light Source: Radiance: the light energy radiated from a unit area of light source (or surface) in a unit solid

Further reading: In estimation of surface orientation, we need to know the direction of the illumination from light source first !!

How to estimate the direction of light source from an intensity image?

---- Pentland’s method

---- Lee & Rosenfeld’s method

---- Tsai and Shah’s method

---- Zheng & Chellapa’s method

All assume that the 3D surface is a part of share in the stage of estimation of illumination direction of light source.