luckydctaggregationforcamerashakeremoval · [4]m. delbracio and g. sapiro, “removing camera shake...

1
Lucky DCT Aggregation for Camera Shake Removal Sanjay Ghosh, Satyajit Naik, and Kunal N. Chaudhury Department of Electrical Engineering, Indian Institute of Science. Email: {sghosh, satyajit, kunal} @ee.iisc.ernet.in O BJECTIVES To remove the effect of camera shake during a long exposure in hand-held photography. A simple and cheap algorithm that can ef- fectively recover the original sharp image from multiple burst images. I NTRODUCTION Modern cameras come with a burst mode for capturing a series of images in quick succession. Multiple-image blind deconvolution [1, 2]: recover- ing a sharp image from such a burst. The mathematical model is that we have blurred versions y 1 ,y 2 , ..., y N of a sharp image x: y i = k i * x + σn i (i =1,...,N ), where (k i ) are the blurring kernels, (n i ) are i.i.d. N (0, 1), and σ is the noise level. The problem is to recover the unknown image x from the burst images y 1 ,y 2 , ..., y N . L UCKY DCT A GGREGATION The kernels a are used to model the camera shake which occurs due to hand tremor. The proposed method is built upon – lucky imaging using Dirichlet energy [3] and Fourier Burst Accumulation (FBA) [4]. The images (total N ) are sorted according to decreasing Dirichlet energy. Then the top N 0 images with larges energies aggregated. The Dirichlet energy for an image y is de- fined as [3]: E = X support(y ) X Ω k∇y ()k 2 . (1) where y is gradient of y and Ω is an n × n window around pixel . Let Y i denote the Gaussian-smoothed ver- sion of the DCT of burst image y i , that is, Y i = G (D (y i )). For some non-negative inte- ger p, we define the weights: ¯ w i (ν )= |Y i (ν )| p N 0 j =1 |Y i (ν )| p , (2) where ν is the frequency index for the DCT. The integer p controls the nature of the ag- gregation. The DCT of the aggregated image is: ˆ X (ν )= N 0 i=1 w i (ν )Y i (ν ) N 0 i=1 w i (ν ) . (3) The aggregated image is: ˆ x = D -1 ( ˆ X ), where D -1 stands for the inverse DCT. The complete algorithm is summarized at the left. The symbols , , and denote pixelwise addi- tion, multiplication, and division, performed on each of the c channels. a The kernels in our experiments were obtained from: http://dev.ipol.im/~mdelbra/fba/ P ROPOSED A LGORITHM Input: Images y 1 ,y 2 ,...,y N of size M 1 × M 2 × c. Parameters: Integers p 0 and N 0 N . Output: Output image ˆ x. Initialize: Null images w,Y,Z of size M 1 × M 2 × c; 1. for i =1, 2,...,N do Compute E i using (1); end 2. Rank images according to decreasing E i values 3. Select first N 0 images for i =1, 2,...,N 0 do ¯ Y i = D (y i ); % DCT Y i = G ( ¯ Y i ); % Smoothing Z = Z ⊕|Y i | p end 4. for i =1, 2,...,N 0 do ¯ w i = |Y i | p Zw i = G w i ); % Smoothing Y = Y ( w i Y i ) % Aggregation w = w w i end 5. ˆ X = Y w ; % Normalization 6. ˆ x = D -1 ( ˆ X ). % Inverse DCT R ESULTS For simplicity, we have assumed that the images in the burst are perfectly aligned [4]. (a) Input image (512 × 768). (b) FBA [4], 23.32 / 83.95, 1.76 s. (c) Proposed, 24.22 / 84.20, 0.62 s. Fig. 1. Deblurring results for the blured images (also with additive Gaussian σ =5) using FBA [4] and the proposed method. We used N 0 =2 for our method, from the dataset of total N = 14 blurred images. (a) Zoomed of Fig 1 (b). (b) Zoomed of Fig 1 (c). Fig. 2. Zoomed versions of the boxed portions of the deblurred images in Fig. 1. 0 5 10 15 20 22.5 23 23.5 24 24.5 25 FBA (p = 2) Proposed (p = 2) FBA (p = 3) Proposed (p = 3) Fig. 3. PSNR vs σ , where x is in Fig. 1 (a). The proposed method is faster than [4] by a factor of about N 0 /N , neglecting the overhead of computing the Dirichlet energies and ranking them. C ONCLUSIONS Better and faster camera shake correction is achieved through outlier rejection. Similar idea can be extended to remove camera shakes from videos. R EFERENCES [1] J.-F. Cai, H. Ji, C. Liu, and Z. Shen, “Blind motion deblur- ring using multiple images,” Journal of Comput. Phys., vol. 228, no. 14, 2009. [2] F. Sroubek and P. Milanfar, “Robust multichannel blind deconvolution via fast alternating minimization,” IEEE Transactions in Image Processing, vol. 21, no. 4, Apr. 2012. [3] G. Haro, A. Buades, and J.-M. Morel, “Photographing paintings by image fusion,” SIAM Journal in Imaging Science, vol. 5, no. 3, 2012. [4] M. Delbracio and G. Sapiro, “Removing camera shake via weighted fourier burst accumulation,” IEEE Transactions in Image Processing, vol. 24, no. 11, Nov. 2015. A CKNOWLEDGEMENTS Centenary Conference Travel Fund, Department of Electrical Engineering, IISc. SPCOM Student Travel Grant.

Upload: others

Post on 23-Jul-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: LuckyDCTAggregationforCameraShakeRemoval · [4]M. Delbracio and G. Sapiro, “Removing camera shake via weighted fourier burst accumulation,” IEEE Transactions in Image Processing,

Lucky DCT Aggregation for Camera Shake RemovalSanjay Ghosh, Satyajit Naik, and Kunal N. Chaudhury

Department of Electrical Engineering, Indian Institute of Science.Email: sghosh, satyajit, kunal @ee.iisc.ernet.in

OBJECTIVESä To remove the effect of camera shake during

a long exposure in hand-held photography.

ä A simple and cheap algorithm that can ef-fectively recover the original sharp imagefrom multiple burst images.

INTRODUCTIONModern cameras come with a burst mode for

capturing a series of images in quick succession.Multiple-image blind deconvolution [1, 2]: recover-

ing a sharp image from such a burst.The mathematical model is that we have blurredversions y1, y2, ..., yN of a sharp image x:

yi = ki ∗ x+ σni (i = 1, . . . , N),

where (ki) are the blurring kernels, (ni) are i.i.d.N (0, 1), and σ is the noise level.

The problem is to recover the unknown image xfrom the burst images y1, y2, ..., yN .

LUCKY DCT AGGREGATION

ã The kernels a are used to model the camerashake which occurs due to hand tremor.

ã The proposed method is built upon – luckyimaging using Dirichlet energy [3] andFourier Burst Accumulation (FBA) [4].

ã The images (total N ) are sorted accordingto decreasing Dirichlet energy. Then the topN0 images with larges energies aggregated.

The Dirichlet energy for an image y is de-fined as [3]:

E =∑

`∈support(y)

∑Ω`

‖∇y(`)‖2. (1)

where∇y is gradient of y and Ω` is an n×nwindow around pixel `.

ã Let Yi denote the Gaussian-smoothed ver-sion of the DCT of burst image yi, that is,Yi = G(D(yi)). For some non-negative inte-ger p, we define the weights:

wi(ν) =|Yi(ν)|p∑N0

j=1 |Yi(ν)|p, (2)

where ν is the frequency index for the DCT.The integer p controls the nature of the ag-gregation.

ã The DCT of the aggregated image is:

X(ν) =

∑N0

i=1 wi(ν)Yi(ν)∑N0

i=1 wi(ν). (3)

The aggregated image is: x = D−1(X),where D−1 stands for the inverse DCT.

The complete algorithm is summarized at the left.The symbols ⊕,⊗, and denote pixelwise addi-tion, multiplication, and division, performed oneach of the c channels.

aThe kernels in our experiments were obtained from:http://dev.ipol.im/~mdelbra/fba/

PROPOSED ALGORITHMInput: Images y1, y2, . . . , yN of size M1 ×M2 × c.Parameters: Integers p ≥ 0 and N0 ≤ N .Output: Output image x.Initialize: Null imagesw, Y, Z of sizeM1×M2×c;1. for i = 1, 2, . . . , N do

Compute Ei using (1);end2. Rank images according to decreasing Ei values3. Select first N0 images for i = 1, 2, . . . , N0 do

Yi = D(yi); % DCTYi = G(Yi); % SmoothingZ = Z ⊕ |Yi|p

end4. for i = 1, 2, . . . , N0 do

wi = |Yi|p Z wi = G(wi); % SmoothingY = Y ⊕

(wi ⊗ Yi

)% Aggregation

w = w ⊕ wi

end5. X = Y w; % Normalization6. x = D−1(X). % Inverse DCT

RESULTSã For simplicity, we have assumed that the images in the burst are perfectly aligned [4].

(a) Input image (512× 768). (b) FBA [4], 23.32 / 83.95, 1.76 s. (c) Proposed, 24.22 / 84.20, 0.62 s.Fig. 1. Deblurring results for the blured images (also with additive Gaussian σ = 5) using FBA [4] andthe proposed method. We usedN0 = 2 for our method, from the dataset of totalN = 14 blurred images.

(a) Zoomed of Fig 1 (b). (b) Zoomed of Fig 1 (c).Fig. 2. Zoomed versions of the boxed portionsof the deblurred images in Fig. 1.

0 5 10 15 2022.5

23

23.5

24

24.5

25FBA (p = 2)

Proposed (p = 2)

FBA (p = 3)

Proposed (p = 3)

Fig. 3. PSNR vs σ, where x is in Fig. 1 (a).

ã The proposed method is faster than [4] by a factor of about N0/N , neglecting the overhead ofcomputing the Dirichlet energies and ranking them.

CONCLUSIONSä Better and faster camera shake correction is

achieved through outlier rejection.

ä Similar idea can be extended to removecamera shakes from videos.

REFERENCES

[1] J.-F. Cai, H. Ji, C. Liu, and Z. Shen, “Blind motion deblur-ring using multiple images,” Journal of Comput. Phys., vol.228, no. 14, 2009.

[2] F. Sroubek and P. Milanfar, “Robust multichannel blinddeconvolution via fast alternating minimization,” IEEETransactions in Image Processing, vol. 21, no. 4, Apr. 2012.

[3] G. Haro, A. Buades, and J.-M. Morel, “Photographingpaintings by image fusion,” SIAM Journal in ImagingScience, vol. 5, no. 3, 2012.

[4] M. Delbracio and G. Sapiro, “Removing camera shake viaweighted fourier burst accumulation,” IEEE Transactionsin Image Processing, vol. 24, no. 11, Nov. 2015.

ACKNOWLEDGEMENTS• Centenary Conference Travel Fund,

Department of Electrical Engineering, IISc.

• SPCOM Student Travel Grant.