On The Foundations of Computational Photography
Yohann Tendero
Joint work with: Jean-Michel Morel Bernard Roug´ e
On The Foundations of Computational Photography Yohann Tendero - - PowerPoint PPT Presentation
On The Foundations of Computational Photography Yohann Tendero Joint work with: Jean-Michel Morel Bernard Roug e January, th Photographing moving scenes could only be done using short exposure times, until... Amit
Joint work with: Jean-Michel Morel Bernard Roug´ e
Amit Agrawal, one of the inventors of the flutter shutter method. The flutter shutter camera. Anat Levin, one of the inventors of the motion-invariant photography method. The motion-invariant photography camera.
Short Exposure Long Exposure Coded Exposure
Ground Truth Matlab Lucy Our result
Alternate Alternate Standard camera Standard camera Random Agrawal Agrawal et al. et al. Code Code Random Random
➓ Optimal code: J. Jelinek. “Designing the optimal shutter sequences
for the flutter shutter imaging method.” 2010.
➓ Gain: The gain (RMSE) of a flutter shutter is bounded above
r
J and “The gain for computational imaging is
r ” O. Cossairt, M. Gupta,
and S.K. Nayar. “When Does Computational Imaging Improve Performance?” 2012.
➓ What are the flutter shutter acquisition
➓ Main question: What is the MSE? ➓ Consequence 1) Optimal flutter shutter code for
➓ Consequence 2) Optimal snapshot theory ➓ Consequence 3) Paradox and its solution:
➓ ∆t length of a time interval ➓ u ✏ ✶r✁ 1
2 , 1 2 s ✝ g ✝ l ideal
X ✒ P ♣λq, P♣X ✏ kq ✏ λk e✁λ
k!
.
➓ ∆t length of a time interval ➓ v relative velocity (unit: pixels
➓ u ✏ ✶r✁ 1
2 , 1 2 s ✝ g ✝ l ideal
X ✒ P ♣λq, P♣X ✏ kq ✏ λk e✁λ
k!
.
5 10 15 20 25 30 35 40 45 50 −1.5 −1 −0.5 0.5 1 1.5
A non positive flutter shutter function.
−4 −3 −2 −1 1 2 3 4 1 2 3 4 5 6 7 8 9
The modulus of its Fourier transform.
The Agrawal et al. code. The binary flutter shutter function for the optimized Agrawal et al. code.
Code: ♣α0, ..., αL✁1q P ❘L ô Flutter shutter function: α♣tq ✏
L✁1
➳
k✏0
αk✶rk∆t,♣k1q∆tr♣tq.
Code: ♣α0, ..., αL✁1q P ❘L ô Flutter shutter function: α♣tq ✏
L✁1
➳
k✏0
αk✶rk∆t,♣k1q∆tr♣tq.
➓ Numerical samples: obs♣nq ✒ ➦L✁1
k✏0 αkP
✁➩♣k1q∆t
k∆t
u♣n ✁ vtqdt ✠ .
➓ Analog samples (α♣tq P r0, 1s): obs♣nq ✒ P
1
v ♣α♣ . v q ✝ uq♣nq
✟ .
➓ Band limited interpolate: obs♣xq ✒ ➦
nP❩ obs♣nqsinc♣x ✁ nq.
Velocity v : unit in pixel(s) per ∆t.
Agrawal et al. code. Random uniform on r✁1, 1s code. The motion-invariant photography code.
Flutter shutter α♣tq ✏ ➦L✁1
k✏0 αk✶rk∆t,♣k1q∆tr♣tq
α♣tq P r0, 1s function α♣tq (with αk P ❘ and ∆t → 0)
v α
v
1 v ♣α
v
var♣obs♣nqq 1
v α2 . v
✟ ✝ u ✟ ♣nq
1 v ♣α
.
v
✟ ✝ uq♣nq (observed)
✶r✁π,πs♣ξq ˆ α♣ξvq ✶r✁π,πs♣ξq ˆ α♣ξvq
Code: Agrawal et al.. RMSE ✏ 2.54 Code: random uniform on r✁1, 1s. RMSE ✏ 2.25 Code: motion-invariant photography. RMSE ✏ 2.31
The binary flutter shutter function for the optimized Agrawal et al. code.
−4 −3 −2 −1 1 2 3 4 5 10 15 20 25 30
The Fourier transform (modulus) of the flutter shutter function with the Agrawal et al. code.
α♣tq ✏ ➦L✁1
k✏0 αk ✶rk∆t,♣k1q∆tr♣tq
ˆ α♣ξq ✏ sinc ✁ ξ∆t
2π
✠ e
✁iξ∆t 2
➦L✁1
k✏0 αk e✁ikξ∆t.
Poisson noise. Deconvolved Poisson noise using the Agrawal et al. code.
Flutter shutter type Numerical Analog
k✏0 αk✶rk∆t,♣k1q∆tr♣tq
❊ ♣obs♣nqq ✁
1 v α
✁
. v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) var♣obs♣nqq ✁
1 v α2 ✁ . v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) Inverse filter ˆ γ♣ξq
✶r✁π,πs♣ξq ˆ α♣ξvq ✶r✁π,πs♣ξq ˆ α♣ξvq
❊♣ˆ ✉est♣ξqq ˆ u♣ξq✶r✁π,πs♣ξq ˆ u♣ξq✶r✁π,πs♣ξq (deconvolved) var♣ˆ ✉est♣ξqq
⑥α⑥2 L2♣❘q⑥u⑥L1 ⑤ ˆ α♣ξvq⑤2
✶r✁π,πs♣ξq
⑥α⑥L1 ⑥u⑥L1 ⑤ ˆ α⑤2♣ξvq
✶r✁π,πs♣ξq (deconvolved) MSE
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L2♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L1♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
Flutter shutter type Numerical Analog
Flutter shutter α♣tq ✏ ➦L✁1
k✏0 αk ✶rk∆t,♣k1q∆tr♣tq
α♣tq P r0, 1s function α♣tq (with αk P ❘ and ∆t → 0)
v α
v
1 v ♣α
v
var♣obs♣nqq ✁
1 v α2 ✁ . v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) Inverse filter ˆ γ♣ξq
✶r✁π,πs♣ξq ˆ α♣ξvq ✶r✁π,πs♣ξq ˆ α♣ξvq
❊♣ˆ ✉est♣ξqq ˆ u♣ξq✶r✁π,πs♣ξq ˆ u♣ξq✶r✁π,πs♣ξq (deconvolved) var♣ˆ ✉est♣ξqq
⑥α⑥2 L2 ⑥u⑥L1 ⑤ ˆ α♣ξvq⑤2
✶r✁π,πs♣ξq
⑥α⑥L1 ⑥u⑥L1 ⑤ ˆ α⑤2♣ξvq
✶r✁π,πs♣ξq (deconvolved) MSE
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L2♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L1♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
Flutter shutter type Numerical Analog
Flutter shutter α♣tq ✏ ➦L✁1
k✏0 αk ✶rk∆t,♣k1q∆tr♣tq
α♣tq P r0, 1s function α♣tq (with αk P ❘ and ∆t → 0) ❊ ♣obs♣nqq ✁
1 v α
✁
. v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) var♣obs♣nqq ✁
1 v α2 ✁ . v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed)
✶r✁π,πs♣ξq ˆ α♣ξvq ✶r✁π,πs♣ξq ˆ α♣ξvq
❊♣ˆ ✉est♣ξqq ˆ u♣ξq✶r✁π,πs♣ξq ˆ u♣ξq✶r✁π,πs♣ξq (deconvolved) var♣ˆ ✉est♣ξqq
⑥α⑥2 L2 ⑥u⑥L1 ⑤ ˆ α♣ξvq⑤2
✶r✁π,πs♣ξq
⑥α⑥L1 ⑥u⑥L1 ⑤ ˆ α⑤2♣ξvq
✶r✁π,πs♣ξq (deconvolved) MSE
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L2♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L1♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
Flutter shutter type Numerical Analog
Flutter shutter α♣tq ✏ ➦L✁1
k✏0 αk ✶rk∆t,♣k1q∆tr♣tq
α♣tq P r0, 1s function α♣tq (with αk P ❘ and ∆t → 0) ❊ ♣obs♣nqq ✁
1 v α
✁
. v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) var♣obs♣nqq ✁
1 v α2 ✁ . v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) Inverse filter ˆ γ♣ξq
✶r✁π,πs♣ξq ˆ α♣ξvq ✶r✁π,πs♣ξq ˆ α♣ξvq
var♣ˆ ✉est♣ξqq
⑥α⑥2 L2 ⑥u⑥L1 ⑤ ˆ α♣ξvq⑤2
✶r✁π,πs♣ξq
⑥α⑥L1 ⑥u⑥L1 ⑤ ˆ α⑤2♣ξvq
✶r✁π,πs♣ξq (deconvolved) MSE
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L2♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L1♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
Flutter shutter type Numerical Analog
Flutter shutter α♣tq ✏ ➦L✁1
k✏0 αk ✶rk∆t,♣k1q∆tr♣tq
α♣tq P r0, 1s function α♣tq (with αk P ❘ and ∆t → 0) ❊ ♣obs♣nqq ✁
1 v α
✁
. v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) var♣obs♣nqq ✁
1 v α2 ✁ . v
✠ ✝ u ✠ ♣nq
1 v ♣α
✁
. v
✠ ✝ uq♣nq (observed) Inverse filter ˆ γ♣ξq
✶r✁π,πs♣ξq ˆ α♣ξvq ✶r✁π,πs♣ξq ˆ α♣ξvq
❊♣ˆ ✉est♣ξqq ˆ u♣ξq✶r✁π,πs♣ξq ˆ u♣ξq✶r✁π,πs♣ξq (deconvolved)
⑥α⑥2
L2⑥u⑥L1
⑤ˆ α♣ξvq⑤2 ✶r✁π,πs♣ξq ⑥α⑥L1⑥u⑥L1 ⑤ˆ α⑤2♣ξvq ✶r✁π,πs♣ξq
MSE
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L2♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
1 2π
➩π
✁π ⑥u⑥L1♣❘q⑥α⑥L1♣❘q ⑤ ˆ α♣ξvq⑤2
dξ
➓ Numerical MSE✏ ⑥u⑥L1♣❘q 2π
✁π ⑥α⑥2
L2♣❘q
⑤ˆ α♣ξvq⑤2 dξ. ➓ Analog MSE✏ ⑥u⑥L1♣❘q 2π
✁π ⑥α⑥L1♣❘q ⑤ˆ α♣ξvq⑤2 dξ.
Recall: α♣tq ✏ ➦L✁1
k✏0 αk✶rk∆t,♣k1q∆tr♣tq.
Analog flutter shutter function α♣tq P r0, 1s.
kP❩
✁π⑤v⑤∆t
∆t qei ξ
2
2πq
Velocity v: unit in pixel(s) per ∆t.
10 20 30 40 50 60 −0.2 0.2 0.4 0.6 0.8 1 1.2
The flutter shutter function for a motion invariant photography code.
−4 −3 −2 −1 1 2 3 4 2 4 6 8 10 12 14
Red: Fourier transform (modulus) of the ideal motion-invariant photography function. Blue: Fourier transform (modulus) of the motion-invariant photography code, approximating the function in red. No need of motion direction a priori knowledge. Avoids physical camera acceleration.
➓ R. Raskar, J. Tumblin, and A. Agrawal. Method for deblurring
➓ R. Raskar. Method and apparatus for deblurring images,
➓ S. McCloskey, J. Jelinek, and K.W. Au. Method and system
➓ A. Levin, P. Sand, T.S. Cho, F. Durand, and W.T. Freeman.
➓ ...
⑥u⑥L1♣❘q 2π
✁π ⑥α⑥2
L2♣❘q
⑤ˆ α♣ξvq⑤2 dξ → 0. (Even though the exposure time
Velocity v: unit in pixel(s) per ∆t.
Agrawal et al. code, restored image. Random uniform on r✁1, 1s code, restored image. The motion- invariant photography code, restored image. The sinc-code, restored image. Code type: Agrawal et al. Random code M.I.P. code Sinc code RMSE 2.54 2.25 2.31 1.46
The flutter shutter function for a sinc-code. The Fourier transform (modulus) of the sinc-code, approximating the Fourier transform of the ideal gain function.
α♣tq ✏ ➦L✁1
k✏0 αk ✶rk∆t,♣k1q∆tr♣tq
ˆ α♣ξq ✏ sinc ✁ ξ∆t
2π
✠ e
✁iξ∆t 2
➦L✁1
k✏0 αk e✁ikξ∆t.
➓ Agrawal et al.: “Let us compare to an image captured with an
➓ Levin et al.: “(about the Agrawal et al. flutter shutter) ...the
✁π
2
Velocity v: unit in pixel(s) per ∆t.
a⑤ ✏ 1 and T ✏ 1)
Less than 1 indicates a loss compared to the optimal snapshot.
SIAM Journal on Imaging Sciences
Computational Photography” UCLA CAM Report 13-65
CAM Report 13-84
➓ Forward analysis: formula links ρ♣vq and the flutter shutter
➓ Perform the same optimization for the snapshot: optimal
➓ Backward analysis: get ρ♣vq from a given code
Probabilistic Velocity Models.” UCLA CAM Report 13-80.
➓ 5%, when ρ is uniform and exposure time 10 times greater
➓ 25%, when ρ is (truncated) Gaussian and exposure time 10
➓ 385%, when ρ♣vq ✏ 0.99δ0♣vq 0.01δ15♣vq and exposure
0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 10 20 30 40 50 60 Gain k Legend Flutter shutter code
The flutter shutter function for a (truncated) Gaussian velocity distribution.
0.2 0.4 0.6 0.8 1
2 4 6 8 Fourier tranforms (modulus) xi Legend Fourier tranform (modulus) of the optimized flutter shutter function Ideal Fourier tranform (modulus)
The modulus of its Fourier transform.
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0.5 1 1.5 2 Log of the Probability Velocity v Legend Velocity probability density of the first Agrawal et al. code
The probability density associated with the Agrawal et
higher resolution from a single motion-blurred image”, CVPR, 2007.) : x-axis motion (in signed pixels), y-axis: the logarithm of the velocity distribution (log♣1 ρ♣vqq).
0.2 0.4 0.6 0.8 1 1.2 1.4 1.6 1.8 2
0.5 1 1.5 2 Log of the Probability Velocity v Legend Velocity probability density of the second Agrawal et al. code
The probability density associated with the second Agrawal et al. (“Coded exposure deblurring: Optimized codes for PSF estimation and invertibility”, CVPR, 2009.) code: x-axis motion (in signed pixels), y-axis: the logarithm of the velocity distribution (log♣1 ρ♣vqq).
➓ The numerical flutter shutter is a temporal filter ➓ The observed is guarantee sharp, as soon as ⑤v⑤ ↕ 1