29
HDRI capturing from multiple exposures • We want to obtain the response curve

HDRI capturing from multiple exposures

  • Upload
    sukey

  • View
    52

  • Download
    8

Embed Size (px)

DESCRIPTION

HDRI capturing from multiple exposures. We want to obtain the response curve. HDRI capturing from multiple exposures. Image series. • 1. • 1. • 1. • 1. • 1. • 2. • 2. • 2. • 2. • 2. • 3. • 3. • 3. • 3. • 3. D t = 2 sec. D t = 1 sec. D t = 1/2 sec. D t = 1/4 sec. - PowerPoint PPT Presentation

Citation preview

Page 1: HDRI capturing from multiple exposures

HDRI capturing from multiple exposures

• We want to obtain the response curve

Page 2: HDRI capturing from multiple exposures

• • 33• • 33

• • 11• • 11 • •

22• • 22

t =t =1/4 sec1/4 sec

• • 33• • 33

• • 11• • 11 • •

22• • 22

t =t =1 sec1 sec

• • 33• • 33

• • 11• • 11

• • 22• • 22

t =t =1/8 sec1/8 sec

• • 33• • 33

• • 11• • 11 • •

22• • 22

t =t =2 sec2 sec

Image seriesImage seriesImage seriesImage series

• • 33• • 33

• • 11• • 11 • •

22• • 22

t =t =1/2 sec1/2 sec

HDRI capturing from multiple exposures

)( jiij tEfZ

jiij tEZf )(1

1ln where,lnln)( fgtEZg jiij

Page 3: HDRI capturing from multiple exposures

Idea behind the math

jiij tEZg lnln)(

ijZ

ji tE lnln

Page 4: HDRI capturing from multiple exposures

Idea behind the math

jiij tEZg lnln)(

ijZ

ji tE lnln

Page 5: HDRI capturing from multiple exposures

Idea behind the math

jiij tEZg lnln)(

ijZ

ji tE lnln

Page 6: HDRI capturing from multiple exposures

Math for recovering response curve

Page 7: HDRI capturing from multiple exposures

Recovering response curve

• The solution can be only up to a scale, add a constraint

• Add a hat weighting function

Page 8: HDRI capturing from multiple exposures

How to optimize?

1. Set partial derivatives zero2.

N

2

1

N

2

1

ii

b

:

b

b

x

a

:

a

a

bxa ofsolution square-least)(min1

2M

i

Page 9: HDRI capturing from multiple exposures

Sparse linear system

Ax=b

256 n

n×p

1

254

g(0)

g(255)

lnE1

lnEn

:

::

Page 10: HDRI capturing from multiple exposures

Questions

• Will g(127)=0 always be satisfied? Why and why not?

• How to find the least-square solution for an over-determined system?

Page 11: HDRI capturing from multiple exposures

Least-square solution for a linear system

bAx nm n mnm

The are often mutually incompatible. We instead find x to minimize the norm of the residual vector .If there are multiple solutions, we prefer the one with theminimal length .

bAx bAx

x

Page 12: HDRI capturing from multiple exposures

then is the least-square solution.

Least-square solution for a linear system

If we perform SVD on A and rewrite it as TUΣA V

bUVΣx T1ˆ pseudo inverse

n

1

Σ

Page 13: HDRI capturing from multiple exposures

Libraries for SVD

• Matlab

• GSL

• Boost

• LAPACK (recommended)

• ATLAS

Page 14: HDRI capturing from multiple exposures

Matlab code

Page 15: HDRI capturing from multiple exposures

Matlab codefunction [g,lE]=gsolve(Z,B,l,w)

n = 256;A = zeros(size(Z,1)*size(Z,2)+n+1,n+size(Z,1));b = zeros(size(A,1),1);

k = 1; %% Include the data-fitting equationsfor i=1:size(Z,1) for j=1:size(Z,2) wij = w(Z(i,j)+1); A(k,Z(i,j)+1) = wij; A(k,n+i) = -wij; b(k,1) = wij * B(i,j); k=k+1; endend

A(k,129) = 1; %% Fix the curve by setting its middle value to 0k=k+1;

for i=1:n-2 %% Include the smoothness equations A(k,i)=l*w(i+1); A(k,i+1)=-2*l*w(i+1); A(k,i+2)=l*w(i+1); k=k+1;end

x = A\b; %% Solve the system using SVD

g = x(1:n);lE = x(n+1:size(x,1));

Page 16: HDRI capturing from multiple exposures

Recovered response function

Page 17: HDRI capturing from multiple exposures

Recovering response curve

• We want

If P=11, N~25 (typically 50 is used)

• We prefer that selected pixels are well distributed and sampled from constant regions. They picked points by hand.

• It is an overdetermined system of linear equations and can be solved using SVD

Page 18: HDRI capturing from multiple exposures

Constructing HDR radiance map

combine pixels to reduce noise and obtain a more reliable estimation

Page 19: HDRI capturing from multiple exposures

Varying shutter speeds

Page 20: HDRI capturing from multiple exposures

Reconstructed radiance map

Page 21: HDRI capturing from multiple exposures

What is this for?

• Human perception• Vision/graphics applications

Page 22: HDRI capturing from multiple exposures

(145, 215, 87, 149) =

(145, 215, 87) * 2^(149-128) =

(1190000, 1760000, 713000)

(145, 215, 87, 103) =

(145, 215, 87) * 2^(103-128) =

(0.00000432, 0.00000641, 0.00000259)

Ward, Greg. "Real Pixels," in Graphics Gems IV, edited by James Arvo, Academic Press, 1994

Radiance format (.pic, .hdr, .rad)

Red Green Blue Exponent

32 bits/pixel

Page 23: HDRI capturing from multiple exposures

Demo

http://www.hdrsoft.com/examples.html

Page 24: HDRI capturing from multiple exposures

Image alignment

Page 25: HDRI capturing from multiple exposures

Median Threshold Bitmap (MTB) alignment

• Consider only integral translations. It is enough empirically.

• The inputs are N grayscale images. (You can either use the green channel or convert into grayscale by Y=(54R+183G+19B)/256)

• MTB is a binary image formed by thresholding the input image using the median of intensities.

Page 26: HDRI capturing from multiple exposures

Search for the optimal offset

• Try all possible offsets.• Gradient descent• Multiscale technique

• log(max_offset) levels• Try 9 possibilities for

the top level• Scale by 2 when

passing down; try its 9 neighbors

Page 27: HDRI capturing from multiple exposures

Threshold noise

exclusion bitmap

ignore pixels that are close to the threshold

Page 28: HDRI capturing from multiple exposures

Results

Success rate = 84%. 10% failure due to rotation. 3% for excessive motion and 3% for too much high-frequency content.

Page 29: HDRI capturing from multiple exposures

Equipment

We provide 3 sets:

Contact TA for checkout.