7
CS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017 1 Summary I stickly follow the project timeline. At this time, I finish the main body the image deblurring, and the next step is to analysis the results and make comparison with other methods. This project is based on the paper ’Blind Image Deblurrring Using Dark Channel Prior’. I write code to realise the method in the paper step by step. I first compute the dark channle of the blur image, and then compute the latent image. Based on the latent image, the blur kernel is computed. After severl iteration, the latent image becomes more clear and the kernal becomes more realistic. With the kernel, the blur image can be recovered. The method is implemented with Matlab, when all parts of implementation have been finished, the code will be posted on the project home page (http://pages.cs.wisc.edu/ liangz/). The proposal and mid-term report are also published on the project home page. 2 Motivation Image blur is often caused by camera shake when taking the photos. As mobile photes, digital cameras and GoPros are already very common in use to take photos, and camera shake are inevitalbe, a lot of images are blured. The blur images are undesirable, sometimes the user are able to delete the blur image and retake a new photo. However, oftern the time, the capture moments are difficult to reproduce (for example, photots that were token by GoPros when the user who were skiing, or photots the were token by drone, like Dajiang). At such time, removing the blur and highly desired. Deblurring to generate higher-quality images are demanded and in greate need. An example of deblur is shown in Figure 1. 1

CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

  • Upload
    lecong

  • View
    216

  • Download
    3

Embed Size (px)

Citation preview

Page 1: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

CS766 Project Mid-Term Report

Blind Image Deblurring

Liang Zhang (lzhang432)

April 7, 2017

1 Summary

I stickly follow the project timeline. At this time, I finish the main body the image deblurring,and the next step is to analysis the results and make comparison with other methods. Thisproject is based on the paper ’Blind Image Deblurrring Using Dark Channel Prior’. I writecode to realise the method in the paper step by step. I first compute the dark channle of theblur image, and then compute the latent image. Based on the latent image, the blur kernelis computed. After severl iteration, the latent image becomes more clear and the kernalbecomes more realistic. With the kernel, the blur image can be recovered. The method isimplemented with Matlab, when all parts of implementation have been finished, the codewill be posted on the project home page (http://pages.cs.wisc.edu/ liangz/). The proposaland mid-term report are also published on the project home page.

2 Motivation

Image blur is often caused by camera shake when taking the photos. As mobile photes,digital cameras and GoPros are already very common in use to take photos, and camerashake are inevitalbe, a lot of images are blured. The blur images are undesirable, sometimesthe user are able to delete the blur image and retake a new photo. However, oftern the time,the capture moments are difficult to reproduce (for example, photots that were token byGoPros when the user who were skiing, or photots the were token by drone, like Dajiang).At such time, removing the blur and highly desired. Deblurring to generate higher-qualityimages are demanded and in greate need. An example of deblur is shown in Figure 1.

1

Page 2: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

Figure 1: Examples of Blur image(left image) and Deblurred image (right image)

3 Literature Review

To deblur a image, we always need to recover a blur kernel and get a shart latent image.The deblurring is a classical problem[1] and have be researched within last decade. If blur isuniform, spatially invariant, we can use B = I ~ k + n to model the blur process (B, I, k, nrepresents blur image, latent imae, blur image noise). For the blur image, we have B, butwe have many pairs of I and k to the same blur image B. In order to well pose the blinddeblurring, assuming sparsity of image gradient are widely used[2, 3, 4]. However, based onthis perior tend to favor blurry image. Ohter deblurring methods, which favors clean iamgesover blurred images are developped, for example deblurring methods based on normalizedsparsity prior [5], based on internal patch recurrence[6]. However the natural image modelsdo not handle face, text, and low illumination images well. To slove the problem, darkchannel prior based method was developped[7], and was proved to handle deblurring well fornature, face, text and low illumination well[8].

4 Current Progress

4.1 Measure the Dark Channel

The dark channel is expressed as D(I)(x) = miny∈N(x)

( minc∈r,g,b

Ic(y)), the N(x) is the image patch

which center is x, and Ic indicates the color channel [8]. In this project, all color images arefirst transfered to gray images, so the dark channel means the lowest value among the imagepatch.The original blur image and the dark channel is shown in Figure 2:

2

Page 3: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

(a) Blur Image (b) Dark Channel

Figure 2: Blur Image and Dark Channel

(a) Dark Channel (b) Latent Image

Figure 3: Dark Channel and Latent Image

4.2 Compute Latent Image

The dark channel can be used to record the postion of dark pixel. With position, therelationship between the latent image and dark channel can be calcualted. Then we canestimate the latent image [8]. As shown in Figure 3.

4.3 Estimate Blur Kernel

Based on the latent iamge, the blur kernel can be estimated. Usually, blur image requiresiteration to get realistic blur kernel. Latent image and blur kernel are updated for eachiteration. The result of irtation is shown in Figure 4.

3

Page 4: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

(a) 1st irtataion (b) 2nd irtation

(c) 3rd irtataion (d) 4th irtation

(e) 5th irtation

Figure 4: irtation

4

Page 5: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

4.4 Deblur with the Blur Kernel

With the blur kernel, we can get the deblur image easily. There are a lot of ways to recovethe clear image with blur kernel. The deblur image we recover is shown in Figure 5.

Figure 5: Deblur Image

4.5 Application

The deblur meothod is not restricted to a specific kind of blur image. The deblur methodhas good deblur effect on text, nature, and face. I applied the deblur method on blur text,nature, and face image. The deblur result is shown in Figure 6 (next page).

5 Current Problems

The current problem is that the deblur is computation extensive, so the deblur process isquite slow. For large image, from coarse to fine estimation should be a good idea. Fromthe result, the deblur method has good estimation for different kinds of blur image, I willcompare the deblur result with specialized mthods in the next step.

5

Page 6: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

(a) Text blur image (b) Text deblur image

(c) Nature blur image (d) Nature deblur image

(e) Face blur image (f) Face deblur image

Figure 6: Application6

Page 7: CS766 Project Mid-Term Report Blind Image …pages.cs.wisc.edu/~liangz/mid-term_report.pdfCS766 Project Mid-Term Report Blind Image Deblurring Liang Zhang (lzhang432) April 7, 2017

References

[1] L.B.Lucy. An iterative technique for the rectification of observed distributions. AstronomyJournal, 79(6):745-754, 1974.

[2] T, Chan anc C.Wong. Total variation blind deconvolution.. IEEE TIP, 7(3):370-375, 1998.

[3] R.Fergus, B.Singh, A.Hertzmann, S.T.Roweis, and W.T.Freeman. Removing camerashake from a single photograph. ACM SIGGRAPH, 25(3):787-794, 2006.

[4] Y.Hacohen, E. Shechtman, and D.Lischinski. Deblurring by example using dense corre-spondence. In ICCV, pages2384-2391, 2013

[5] D.Krishnan, T.Tay, and R.Fergus. Blind deconvolution using a normalized sparsit mea-sure. In CVPR, pages2657-2664, 2011

[6] T.Michaeli and M.Irani Blind deblurring using internal patch recurrence. In ECCV,pages783-798, 2014

[7] K.He, J.Sun, and X.Tang Single image haze removal using dark channel prior. In CVPR,pages1956-1963, 2009

[8] Jinshan Pan, Deqing Sun, Hanspeter Pfister, and Ming-Hsuan Yang Blind Image Deblur-ring Using Dark Channel Prior. In CVPR, 2016

7