introduction to computer vision...– actually, electromagnetic energy • imaging starts with light...

18
Introduction to Computer Vision CS / ECE 181B Tues, May 18, 2004 Ack: Matthew Turk (slides) Outline Radiance and Irradiance Lambertian and Specular surfaces Bidirectional reflectance distribution function (BRDF) Fundamental Radiometric Relation Gradient Space Reflectance Map Photometric Stereo

Upload: others

Post on 01-Oct-2020

2 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Introduction to Computer Vision

CS / ECE 181B

Tues, May 18, 2004

Ack: Matthew Turk (slides)

Outline

• Radiance and Irradiance

• Lambertian and Specular surfaces

• Bidirectional reflectance distribution function (BRDF)

• Fundamental Radiometric Relation

• Gradient Space

• Reflectance Map

• Photometric Stereo

Page 2: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Geometry and Radiometry

• In creating and interpreting images, we need to understandtwo things:– Geometry – Where scene points appear in the image (image

locations)

– Radiometry – How “bright” they are (image values)

• Geometric enables us to know something about the scenelocation of a point imaged at pixel (u, v)

• Radiometric enables us to know what a pixel valueimplies about surface lightness and illumination

• This is relevant to both computer vision and computergraphics

– Ray tracing

– Illumination and shading models

Radiometry

• Radiometry is the measurement of light

– Actually, electromagnetic energy

• Imaging starts with light sources– Emitting photons – quanta of light energy

– The sun, artificial lighting, candles, fire, blackbody radiators …

• Light energy interact with surfaces– Reflection, refraction, absorption, fluorescence…

– Also atmospheric effects (not just solid surfaces)

• Light energy from sources and surfaces gets imaged by acamera

– Through a lens, onto a sensor array, finally to pixel values – animage!

Page 3: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Ray tracing

Reversible:

- From camera to light sources

- From light sources to camera

visibility?

light source

pixels

camera

center

surface

reflection

What’s the intensity value (and color) at this pixel?

Page 4: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Computer graphics examples

Page 5: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

CG example: Pixar

Geri’s Game

1997 Oscar Award

Best Animated Short Film

Illumination and shading in CG

• The illumination model describes how light interacts with

the surface

– A set of calculations for determining color and intensity at a given

surface point, given a lighting model (model of light sources)

– E.g., what color is that point on that surface?

– Local vs. global

Whether or not computation takes into account other elements

in the scene (local model doesn’t)

– May be empirical or experimental

– Should model the effects of ambient light, incident light, surface

reflection (diffuse and specular), etc.

Page 6: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Illumination models

• An illumination model is a function of

– Time (exposure time)

– Position and orientation of

Object surface

Lighting sources

Camera

– Wavelength of

Lighting sources

Surface reflectance function

– Surface albedo ( )

The fraction of incident light that is reflected by the surface,

independent of wavelength

Corresponds to intuitive notion of surface lightness

Three surface reflectance functions/models

Ideal diffuse(Lambertian)

Directionaldiffuse

Idealspecular

Page 7: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Cook-Torrance Model

Different parameters give different surface appearances

Radiometry

• Radiometry – the science of measurement of

electromagnetic radiation

– The complete EM spectrum (not just visible light)

• To understand radiometry, we have to understand the

notions of foreshortening and solid angle

Page 8: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Foreshortening

• Principal of foreshortening – When a patch of area A is

tilted at an angle with respect to a distant view point p, it

appears to have an area A cos

• This is true for viewing a light source from the point of

view of a surface patch; and also for viewing a surface

patch from the point of view of a light source

Page 9: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Which plate will heat faster?

Irradiance cos

Solid angle

• Around any point on a surface is a hemisphere of

directions

– Parameterized by two angles, and

• We’ll be considering light entering and exiting such

hemispheres

Page 10: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Solid angle

• Solid angle of a cone of directions – the area cut out by the

cone on the unit sphere

– Solid angle ( ) = surface area at r=1

– = A/r2

• Solid angle of a complete sphere = 4 steradians (sr)

What’s the area of a circle?What’s the surface area of a sphere?

Solid angle

• The solid angle subtended by a patch of area dA is given by

2

cos

r

dAd =

• The solid angle subtended by a patch

of angular size (d , d ) is

ddd sin=

Page 11: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Radiance and irradiance

• Radiance (L) – energy exiting a source or surface

• Irradiance (E)– incoming energy

L

L

L

LE

E

E

E

Which (E or L) does a camera sensor array directly measure?

Example

• Luminance of common sources:

– surface of the sun: 2,000,000,000 cd/m2

– sunlit clouds: 30,000 cd/m2

– clear day: 3000 cd/m2

– overcast day: 300 cd/m2

– moonlight: 0.03 cd/m2

– moonless sky: 0.00003 cd/m2

• Luminance = commonly called “brightness”

– Density of radiated power

• Radiance = “scene brightness”

• Irradiance = “image brightness”

Photometricterm

Radiometricterms

Page 12: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Irradiance

• A surface experiencing radiance L(x, , ) coming in from

solid angle d experiences irradiance

( ) dxLE cos,,=

radiance

foreshorteningfactor

solidangle

Calculating Irradiance

• Integrate weighted incident radiance over hemisphere

=2

0

2

0

sincos ddLE

solidangle

ddd sin=Since

Page 13: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Light and surfaces

• When light energy hits a surface, several things can happen,

depending on the surface properties (texture, color, opacity,

material, …)

– Reflection

– Absorption

– Refraction

– Transmission

– Scattering

– Various combinations

• The result is called reflectance, and it is a function of the

incoming (incident) and outgoing angles of the light

Reflectance example

Irradiance (E)

Surface Reflectance

Radiance (L)

?? KK

Page 14: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Bidirectional Reflectance Distribution Function

• The BRDF tells us how bright a surface appears whenviewed from one direction while light falls on it fromanother one– General model of local reflection

• More precisely, it is the ratio of reflected radiance dLr inthe direction toward the viewer to the irradiance dEi in thedirection toward the light source

=

0

),,,(: ooiifBRDF

Reflected energy

Incident energy

i o

NN

BRDF models

For many surfaces, a simple BRDF suffices

• Lambertian (diffuse, matte) surface (e.g., white powder)

– Independent of exit angle

Looiif =),,,(

===

otherwise 0

and if sincos

1

),,,( oioi

ooiif

• Specular surface (e.g., a mirror)

• Combinations (Phong, Lambertian+Specular, …)

Page 15: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Surface Brightness

How bright will a Lambertian surface be when it is illuminated by a point

source of radiance E?

A point source located in direction has radiance E:

The term ensures that the integral of this expression is just E, that is:

Cosine or Lambert’s law

of reflection

Examples (again)

Ideal diffuse(Lambertian)

Directionaldiffuse

Idealspecular

Page 16: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Image formation by thin lens

Image irradiance on the image plane

• The image irradiance (E) is proportional to the object

radiance (L)

E =4

d

f

2

cos4

L

Lens diameter

Focus distance

Angle off optical axis

What the image reports to us

via pixel values

What we really want to know

Page 17: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Power captured by the lens

• Power captured by the lens from the surface patch is the product of the

following three terms

– The radiance L of the surface patch in the direction of the lens

– The foreshortened area of the patch in the direction of the

lens

– The solid angle subtended by the aperture of the lens at the surface patch

Foreshortened area of the aperture in the direction of the patch

Square of the distance of the aperture from the patch

Fundamental Radiometric Relation

Irradiance

Page 18: Introduction to Computer Vision...– Actually, electromagnetic energy • Imaging starts with light sources – Emitting photons – quanta of light energy – The sun, artificial

Radiometry summary

• Radiometry tells us how light energy from sources

interacts with object surfaces and eventually gets collected

(by photons releasing electrons) in the image sensor array

• Light is additive and the process is linear

– Double the power of the light source and the image value doubles

(sort of…)

• Modeling the true paths of all light sources (including

surface interreflections, atmospheric effects, etc.) is

impossible – our models are approximations

• Can we determine the shape of an object by its image? By

detecting shadows?

• What about color?