1
Probability Models for High Dynamic Range Imaging Chris Pal 1,2 , Rick Szeliski 1 , Matt Uyttendaele 1 and Nebojsa Jojic 1 1 Microsoft Research, Redmond, WA, USA 2 University of Waterloo, School of Computer Science, Canada Overview Expand dynamic range by combining images taken with different camera settings Current techniques assume camera imaging function is the same modulo an exposure change Need to deal with more complex non-linear transformations Fig. 1. Three images of an HDR scene taken with different exposure Our Approach Construct a probability model with weak priors for functions Estimate a different function for each image us- ing only pixel intensity values Fig. 2. Left to right. Two mid exposure images and an HDR composite image. Imaging Devices Factors impacting irradiance-pixel relationship: aperture size (or f-stop) shutter speed (or exposure time) white balance settings ISO settings (electronic gain/bias) color saturation settings and general DSP Imaging Functions Parametric Forms Grossberg and Nayar (2003) describe a database of over 200 different response functions Mann (2000) enumerates parametric forms, two most common are: f (r )= α + βr γ , (1) where r is the irradiance, α, β and γ are model parameters. f (r )= e b r a e b r a +1 c , (2) where a, b, c and e are model parameters. Semi-Parametric Forms Debevec and Malik (1997) f (r )= f (ar ), (3) Known pre-nonlinearity multiplicative gain a Estimate h = ln f -1 , using smoothness regu- larize least squares F = N X i=1 P X k =1 ( h(x k,i ) - ln(r i ) - ln(a k ) ) 2 + λ x max -1 X x=x min +1 h 00 (x) 2 , (4) Mitsunaga and Nayar (1999): high-order poly- nomial for g = f -1 r = g (x)= N X n=0 c n x n , (5) Tsin et al. (2001): white balancing is pre- nonlinearity scaling a and offset b f (r )= f (ar + b), (6) A Generative Model f 1 (x) x 11 x 21 r 1 r 2 r N f (x) f K (x) x 21 x KN Irradiance (At a given spatial location) Image 1 Image 2 Image K x 22 Fig. 3. A probability model for image pixel val- ues, irradiances and imaging functions. Generate an irradiance r i from uniform p(r i ) for pixel location i in image k f k = f k (r ) is discretized imaging function v k (r ) is level-dependent variance. p(x 1...K,1...N ,r 1...K ,f 1...K ,v 1...K )= N Y i=1 K Y k =1 N (x k,i ; f k (r i ),v k (r i )) p(r i ) p(f k ) p(v k ). (7) A Generative Model for Functions Generate (i - 1)th derivative by integrating the ith with integrating matrix A 0 Generative model for functions: random vari- ables for derivatives f 00 , f 0 and scalars b 1 ,b 0 Encode priors on smoothness (second deriva- tive) and first derivative b 1 b 0 f '' f ' f b 1 b 0 f '' f z f Fig. 4. Illustrating a generative model for func- tions as a Bayesian Network. Priors for Functions Marginal distribution of f can be written p(f (r )) = N (f ; Aμ z , Φ), (8) where Φ = AΨA T . Close relationship between equation (8) and smoothness regularization methods. Optimization of the Model Optimize log of the marginal probability (in- tractable) Soln: Construct variational bound on log marginal use Dirac deltas for Q. - E Q {log P ({x i,k }, {r i }, {f k }, {v k })} = - K X k =1 N X i=1 log N (x k,i ; ˜ f k r i ), ˜ v k r i )) + N X i=1 log pr i )+ K X k =1 log p( ˜ f k )+ K X k =1 log pv k ) . (9) Iterate: Update ˜ f k (r ) then ˜ r i Variational parameters are estimates of func- tions and irradiances Set the derivative of (9) w.r.t. variational pa- rameters to zero f new k = h ˜ Λ T k ˜ Σ -1 k ˜ Λ k + Φ -1 i -1 h ˜ Λ T k ˜ Σ -1 k x k + Φ -1 Aμ z i MAP values for ˜ r new i = arg min r - K X k =1 log N (x k,i ; f k (r), ˜ v k (r)) -log(p(r)) ! Update prior parameters for functions using Expectation Maximization (EM) steps Results Fig. 5. (Upper left to lower right) highest, mid- dle, lowest gain image. HDR image with lu- minances remapped using the global function in Reinhard et al. (2002) 0 100 200 300 400 500 600 0 50 100 150 200 250 Estimated Irradiance Pixel Intensity 0 100 200 300 400 500 600 0 50 100 150 200 250 Estimated Irradiance Pixel Intensity 0 100 200 300 400 500 600 0 50 100 150 200 250 Estimated Irradiance Pixel Intensity 100 200 300 400 500 600 0 50 100 150 200 250 Estimated Irradiance Pixel Intensity Fig. 6. (Left to Right) Iteration 0,1, and 6. (Far Right) Final iteration, curves used for Fig. 2. Fig. 7. Mapping the lowest gain to highest. (Left to Right) (1) Highest gain (2) Multiplicative function (3) Multiplicative and bias. (Right) Our Algorithm.

Imaging Results - Polytechnique Montréal · imaging function is the same mo dulo an exp osure c hange Need to deal with more complex non-linear transformations Fig. 1. Three images

  • Upload
    lamnga

  • View
    212

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Imaging Results - Polytechnique Montréal · imaging function is the same mo dulo an exp osure c hange Need to deal with more complex non-linear transformations Fig. 1. Three images

' &

$ %

Pro

bability

Models

for

Hig

hD

ynam

icR

ange

Imagin

gC

hri

sPal1

,2,R

ick

Sze

lisk

i1,M

att

Uytt

endaele

1and

Nebojs

aJojic

1

1M

icro

soft

Res

earc

h,Red

mond,W

A,U

SA

2U

niv

ersity

ofW

ate

rloo

,Sch

oolofCom

pute

rSci

ence

,Canada

� �� �

Overv

iew

•E

xpan

ddyn

amic

range

byco

mbin

ing

imag

es

take

nw

ith

diff

eren

tca

mer

ase

ttin

gs

•C

urr

ent

tech

niq

ues

assu

me

cam

era

imag

ing

funct

ion

isth

esa

me

mod

ulo

anex

pos

ure

chan

ge

•N

eed

todea

lw

ith

mor

eco

mple

xnon

-lin

ear

tran

sfor

mat

ions

Fig

.1.

Thre

eim

agesofan

HD

Rsc

ene

taken

with

diff

ere

nt

exposu

re

� �� �

Our

Appro

ach

•C

onst

ruct

apro

bab

ility

mod

elw

ith

wea

kpri

ors

for

funct

ions

•E

stim

ate

adiff

eren

tfu

nct

ion

for

each

imag

eus-

ing

only

pix

elin

tensi

tyva

lues

Fig

.2.

Left

tori

ght.

Tw

om

idexposu

reim

ages

and

an

HD

Rco

mposi

teim

age.

� �

� �Im

agin

gD

evic

es

Fac

tors

impac

ting

irra

dia

nce

-pix

elre

lati

onsh

ip:

•ap

ertu

resi

ze(o

rf-st

op)

•sh

utt

ersp

eed

(or

expos

ure

tim

e)

•w

hit

ebal

ance

sett

ings

•IS

Ose

ttin

gs(e

lect

ronic

gain

/bia

s)

•co

lor

satu

rati

onse

ttin

gsan

dge

ner

alD

SP

� �

� �Im

agin

gFunct

ions

� �� �

Para

metr

icForm

s

•G

ross

ber

gan

dN

ayar

(200

3)des

crib

ea

dat

abas

e

ofov

er20

0diff

eren

tre

spon

sefu

nct

ions

•M

ann

(200

0)en

um

erat

espar

amet

ric

form

s,tw

o

mos

tco

mm

onar

e:

f(r

)=

α+

βrγ,

(1)

wher

er

isth

eir

radia

nce

,α,β

and

γar

em

odel

par

amet

ers.

f(r

)=

(

ebra

ebra

+1

)

c ,(2

)

wher

ea,b

,can

de

are

mod

elpar

amet

ers.

� �� �

Sem

i-Para

metr

icForm

s

•D

ebev

ecan

dM

alik

(199

7)

f(r

)=

f(a

r),

(3)

Known

pre

-non

linea

rity

mult

iplic

ativ

ega

ina

•E

stim

ate

h=

lnf−

1 ,usi

ng

smoo

thnes

sre

gu-

lari

zele

ast

squar

es

F=

N∑

i=1

P∑ k=

1

(

h(x

k,i)−

ln(r

i)−

ln(a

k))

2

xm

ax−

1∑

x=

xm

in+

1

h′′(x

)2 ,

(4)

•M

itsu

nag

aan

dN

ayar

(199

9):

hig

h-o

rder

pol

y-

nom

ialfo

rg

=f−

1

r=

g(x

)=

N∑ n=

0

c nx

n,

(5)

•T

sin

etal

.(2

001)

:w

hit

ebal

anci

ng

ispre

-

non

linea

rity

scal

ing

aan

doff

setb

f(r

)=

f(a

r+

b),

(6)

� �� �

AG

enera

tive

Model

f 1(x

) x 1

1 x 2

1

r 1

r 2

r N

f 2(x

)

f K(x

)

x 21

x KN

Irra

dian

ce (

At a

giv

en s

pati

al lo

cati

on)

Imag

e 1

Imag

e 2

Imag

e K

x 22

Fig

.3.

Apro

bability

modelfo

rim

age

pix

elval-

ues,

irra

dia

nce

sand

imagin

gfu

nct

ions.

•G

ener

ate

anir

radia

nce

r ifr

omunifor

mp(r

i)fo

r

pix

ello

cati

oni

inim

age

k

•f

k=

fk(r

)is

dis

cret

ized

imag

ing

funct

ion

•vk(r

)is

leve

l-dep

enden

tva

rian

ce.

p(x

1...K

,1...N

,r1.

..K

,f1.

..K

,v1.

..K

)=

N∏ i=

1

K∏ k=

1N(x

k,i;f

k(r

i),v

k(r

i))p(r

i)p(f

k)p(v

k).

(7)

� �� �

AG

enera

tive

Modelfo

rFunct

ions

•G

ener

ate

(i−

1)th

der

ivat

ive

byin

tegr

atin

gth

e

ith

wit

hin

tegr

atin

gm

atri

xA

0

•G

ener

ativ

em

odel

for

funct

ions:

random

vari

-

able

sfo

rder

ivat

ives

f′′,f

′an

dsc

alar

sb 1

,b0

•E

nco

de

pri

ors

onsm

ooth

nes

s(s

econ

dder

iva-

tive

)an

dfir

stder

ivat

ive

b 1

b 0

f '' f ' f

b 1

b 0

f ''

f

z f

Fig

.4.

Illu

stra

ting

agenera

tive

modelfo

rfu

nc-

tions

as

aB

ayesi

an

Netw

ork

.

� �� �

Pri

ors

for

Functions

•M

argi

nal

dis

trib

uti

onof

fca

nbe

wri

tten

p(f

(r))

=N

(f;A

µz,Φ

),(8

)

wher

=A

ΨA

T.

•C

lose

rela

tion

ship

bet

wee

neq

uat

ion

(8)

and

smoo

thnes

sre

gula

riza

tion

met

hod

s.

� �� �

Optim

ization

ofth

eM

odel

•O

pti

miz

elo

gof

the

mar

ginal

pro

bab

ility

(in-

trac

table

)

•Soln

:C

onst

ruct

vari

atio

nal

bou

nd

onlo

g

mar

ginal

use

Dir

acdel

tas

forQ

.

−E

Q{l

ogP

({x

i,k},{r

i},{

fk},{v

k})}

=

[

K∑ k=

1

N∑

i=1

logN

(xk,i;f

k(r

i),v

k(r

i))

+

N∑

i=1

logp(r

i)+

K∑ k=

1

logp(f

k)+

K∑ k=

1

logp(v

k)]

.

(9)

� �� �

Itera

te:

Update

fk(r

)th

en

r i

•V

aria

tion

alpar

amet

ers

are

esti

mat

esof

func-

tion

san

dir

radia

nce

s

•Set

the

der

ivat

ive

of(9

)w

.r.t

.va

riat

ional

pa-

ram

eter

sto

zero

fnew

k=

[

ΛT kΣ−

1k

Λk

+Φ−

1]−

1[

ΛT kΣ−

1k

xk

+Φ−

1 Aµ

z

]

•M

AP

valu

esfo

rrnew

i=

arg

min

r

(

−K∑ k=

1

(

logN

(xk,i;f

k(r

),vk(r

)))

−lo

g(p(r

))

)

•U

pdat

epri

or

para

met

ers

for

funct

ions

usi

ng

Exp

ecta

tion

Max

imiz

atio

n(E

M)

step

s

� �� �

Resu

lts

Fig

.5.

(Upper

left

tolo

wer

right)

hig

hest

,m

id-

dle

,lo

west

gain

image.

HD

Rim

age

with

lu-

min

ance

sre

mapped

usi

ng

the

glo

bal

funct

ion

inR

ein

hard

et

al.

(2002)

010

020

030

040

050

060

0

050100

150

200

250

Est

imat

ed Ir

radi

ance

Pixel Intensity

010

020

030

040

050

060

0

050100

150

200

250

Est

imat

ed Ir

radi

ance

Pixel Intensity

010

020

030

040

050

060

0

050100

150

200

250

Est

imat

ed Ir

radi

ance

Pixel Intensity

100

200

300

400

500

600

050100

150

200

250

Est

imat

ed Ir

radi

ance

Pixel Intensity

Fig

.6.

(Left

toR

ight)

Itera

tion

0,1

,and

6.

(Far

Rig

ht)

Fin

alitera

tion,cu

rves

use

dfo

rFig

.2.

Fig

.7.

Mappin

gth

elo

west

gain

tohig

hest

.(L

eft

toR

ight)

(1)H

ighest

gain

(2)M

ultip

lica

tive

funct

ion

(3)

Multip

lica

tive

and

bia

s.(R

ight)

Our

Alg

ori

thm

.