Deblurring Text Images Via L - Regularized Intensity and Gradient Prior
Deblurring Text Images Via L - Regularized Intensity and Gradient Prior
Deblurring Text Images Via L - Regularized Intensity and Gradient Prior
Abstract
1
due to large camera motion, and the deblurred result from 0.1 0.8
0.7
0.5
0.06
In this paper, we propose a novel L0 -regularized in- 0.4
0.04 0.3
tensity and gradient prior for text image deblurring, and 0.2
0.02
0
0 50 100 150 200 250 300 −150 −100 −50 0 50 100 150
half-quadratic splitting method. The splitting method guar-
(a) (b) (c)
antees that each sub-problem has a closed-form solution and 0.1 0.4
0.3
lationship with other methods based on salient edges, and 0.06 0.25
0.2
show that the proposed algorithm generates reliable inter- 0.04 0.15
0.1
mediate results for kernel estimation without any ad-hoc 0.02
0.05
ods [1, 2], the proposed algorithm is simple and easy to im- (d) (e) (f)
plement as it requires no additional operations (e.g., adap- Figure 2. Statistics of text images. (a) clean text image. (b) his-
tive segmentation [1], smoothing intermediate latent im- togram of pixel intensities from (a). (c) histogram of horizontal
ages, or SWT [2]). In the latent image restoration step, we gradients from (a). (d) blurred image. (e) histogram of pixel in-
present a simple method to deal with artifacts. Furthermore, tensities from (d). (f) histogram of horizontal gradients from (d).
we show that the proposed algorithm can also be applied to
gradient histograms of one clean text image and one blurred
effectively process natural blurred images containing text
image. The nonzero values of blurred image gradients are
and low illumination images which are not handled well by
denser than those of clear text image gradients. Thus we use
most state-of-the-art deblurring methods.
L0 -regularized prior, Pt (∇x), to model image gradients.
2. Text Deblurring via L0 -Regularized Prior The image prior for text image deblurring is defined as
In this section, we present a novel L0 -regularized prior P (x) = σPt (x) + Pt (∇x), (2)
of intensity and gradient for text image deblurring. where σ is a weight. Although P (x) is developed based
2.1. L0 -Regularized Intensity and Gradient Prior on the assumption that background regions of a text image
are uniform, we show that this prior can also be applied to
The proposed L0 intensity and gradient prior is based
image deblurring with complex backgrounds.
on the observation that text characters and background re-
gions usually have near uniform intensity values in clean 2.2. Text Deblurring via L0 -Regularized Prior
images without blurs. Figure 2(b) illustrates that the pixel The proposed prior P (x) is used as a regularization term
intensities of a clean text image (Figure 2(a)) center around for text deblurring,
two values and the distribution has two peaks (near 0 and
255). In other words, the pixel values of text images are min kx ∗ k − yk22 + γkkk22 + λP (x), (3)
very sparse if we only consider zero peaks. For a blurred x,k
0.8
Section 5.2.
0.6
0.4
0 10 20 30 40
Iterations
(a) Input and kernel (b) Our results (c) Kernel similarity plot
Figure 5. Convergence of the proposed algorithm.
4.3. Deblurring Non-document Text Images
Although the prior P (x) is developed based on the as-
sumptions that text images have uniform backgrounds, the (a) (b) (c) (d)
proposed method can be applied to text deblurring in non- Figure 7. Saturated images. (a) Clear images with saturated areas
document text images as shown in Figure 6. and kernel. (b) Blurred images with saturated areas. (c) Binary
images of (a). (d) Binary images of (b). (c) and (d) are obtained
from (a) and (b) with the same threshold value.
5. Experimental results
(a) Blurred image (b) Intermediate result x (c) Our results
Figure 6. An example with complex background regions. The size We present experimental evaluations of the proposed al-
of estimated kernel is 99 × 99 pixels. gorithm against the state-of-the-art methods for text deblur-
ring and results for saturated images in this section. All the
In the proposed Algorithm 1, the solution u from (10) experiments are carried out on a desktop computer with an
contains large intensity values and g from (11) contains Intel Xeon processor and 12 GB RAM. The execution time
large gradient values. That is, u and g contain main struc- for a 255×255 image is around 50 seconds on MATLAB. In
tures of x. Thus, the intermediate result from (7) is likely all the experiments, we set λ = 4e−3 , γ = 2, and σ = 1, re-
to inherit the properties of u and g. Compared to the nat- spectively. We empirically set βmax = 23 and µmax = 1e5
ural image deblurring method [20], our intermediate latent in Algorithm 1. More experimental results can be found
image restoration step introduces the intensity prior Pt (x). in the supplementary document, and the MATLAB code
This prior can help preserve more salient edges in the inter- and datasets are available at http://eng.ucmerced.
mediate latent image rather than destroy the salient edges edu/people/zhu/cvpr14_textdeblur.
Blurred image Cho and Lee Xu and Jia Krishnan et al. Levin et al. Xu et al. Zhong et al. Ours
40
35
30
Average PSNR Values
25
20
15
10
0
im01 im02 im03 im04 im05 im06 im07 im08 im09 im10 im11 im12 im13 im14 im15
Image index
Figure 8. Quantitative comparison on the dataset. The numbers below the horizontal axis denote the image index. Our method performs
the best.
5.1. Document Images 5.2. Non-document Images
Synthetic images: We provide the example from [2] as Non-document text images: We present an example in
shown in Figure 4 for comparison. Table 1 shows the SSIM Figure 10 where the complex image contains rich text and
values and the kernel similarity values of the recovered im- cluttered background regions. The state-of-the-art natural
ages and estimated kernels by some state-of-the-art meth- image deblurring methods [3, 18, 21, 20, 6] do not perform
ods. Overall, the proposed algorithm performs well in terms well in this image. Although the text deblurring method [2]
of both metrics. In addition, we build a dataset containing handles this image well, the estimated kernel contains a cer-
15 ground truth document images and 8 kernels from [11]. tain amount of noise and the deblurred result contains some
For each sharp image, we compute the average PSNR on the unnatural colors as a result of the SWT process. In con-
blurred images from different kernels and compare among trast, the proposed algorithm generates the deblurred image
different methods [16, 3, 18, 10, 12, 20, 21] in Figure 8. The (clear text, sharp edges, and natural color) and blur kernel
details about this dataset can be found in the supplementary well. Figure 10(h) and (i) show the results using the pro-
document. posed algorithm without Pt (x) and Pt (∇x), respectively.
The results in (h)-(i) show that sharp images cannot be ob-
Real images: We evaluate the proposed algorithm and other tained by using only the gradient prior or intensity prior,
methods using real images. For fair comparison with [2], which indicates that the proposed prior P (x) plays a criti-
we use an example from [2] and show the deblurred re- cal role in text image deblurring.
sults in Figure 9. The natural image deblurring methods
do not perform well on text images. The deblurred result Low-illumination images: It is known that most state-
of [1] contains some ringing artifacts and some details are of-the-art deblurring methods are less effective in process-
missing. Although the state-of-the-art method by Cho et ing blurred images with saturated regions [4] which often
al. [2] performs well, the motion blur is not fully removed appear in low-illumination scenes. As discussed in Sec-
as shown in the red box in Figure 9(g). In addition, the tion 4.4, the proposed algorithm is likely to handle this
deblurred results contain unnatural colors as a result of the problem to a certain extent.
SWT process. Compared with [2], the proposed algorithm Figure 11 shows a real captured image which contains
generates a sharper and visually more pleasant deblurred several saturated regions (red boxes in (a)). We com-
image. We note that the L0Deblur [20] does not estimate pare the proposed algorithm with the state-of-the-art meth-
the blur kernel or deblurs the image well which also demon- ods [3, 18, 10, 21, 20]. As the priors of the state-of-the-art
strates the importance of Pt (x) of the proposed prior P (x). methods are developed to exploit salient edges for motion
Table 1. Quantitative comparison using the example shown in Figure 4(a).
[3] [18] [12] [20] [21] [2] Ours without Pt (x) Ours without Pt (∇x) Ours
SSIM of images 0.6457 0.6269 0.5611 0.4867 0.6190 0.5526 0.5812 0.7473 0.8659
Kernel similarity 0.5200 0.5200 0.4170 0.6407 0.4938 0.6456 0.6303 0.7133 0.9140
(a) Blurred image (b) Cho and Lee [3] (c) Xu and Jia [18] (d) L0Deblur [20]
(e) Zhong et al. [21] (f) Chen et al. [1] (g) Cho et al. [2] (h) Our results
Figure 9. A real blurred image from [2]. The part in the red box in (g) contains some blur and unnatural colors.
deblurring, these algorithms do not perform well for images age deblurring.
containing numerous saturated regions. While the recent
method [21] is developed to handle large Gaussian noise, it Acknowledgements We thank Hojin Cho for generating
is less effective for saturated images. Although the saturated the deblurred results of his method [2]. Jinshan Pan and
areas (e.g., the highlighted blobs, streaks, and the characters Zhixun Su are supported by the NSFC (Nos. 61300086,
in Figure 11(a)) are large due to motion blur, as discussed 61173103 and 91230103), the China Postdoctoral Science
in Section 4.4, the L0 -regularized prior P (x) favors a clean Foundation, and National Science and Technology Ma-
image with few blobs and streaks. Thus, the proposed al- jor Project (2013ZX04005021). Zhe Hu and Ming-Hsuan
gorithm is able to estimate the blur kernel well due to the Yang are supported partly by the NSF CAREER Grant (No.
proposed prior P (x). The recovered image shown in Fig- 1149783) and NSF IIS Grant (No. 1152576).
ure 11(g) is sharper and clearer and characters can be rec-
ognized. We note that while our method is able to estimate References
the blur kernel well, there still exist some ringing artifacts [1] X. Chen, X. He, J. Yang, and Q. Wu. An effective document image deblurring
due to the limitation of the final latent image estimation pro- algorithm. In CVPR, pages 369–376, 2011. 1, 2, 4, 6, 7
cess (Figure 11(g)). To generate better deblurred results, we [2] H. Cho, J. Wang, and S. Lee. Text image deblurring using text-specific proper-
ties. In ECCV, pages 524–537, 2012. 1, 2, 4, 6, 7, 8
employ the non-blind deconvolution method [17]. The de- [3] S. Cho and S. Lee. Fast motion deblurring. ACM Trans. Graph., 28(5):145,
blurred results shown in Figure 11(h) contain clearer text 2009. 1, 3, 4, 6, 7, 8
information and finer textures which demonstrates the ef- [4] S. Cho, J. Wang, and S. Lee. Handling outliers in non-blind image deconvolu-
tion. In ICCV, pages 495–502, 2011. 5, 6
fectiveness of the proposed algorithm for kernel estimation.
[5] B. Epshtein, E. Ofek, and Y. Wexler. Detecting text in natural scenes with stroke
width transform. In CVPR, pages 2963–2970, 2010. 1, 4
6. Conclusion [6] R. Fergus, B. Singh, A. Hertzmann, S. T. Roweis, and W. T. Freeman. Remov-
ing camera shake from a single photograph. ACM Trans. Graph., 25(3):787–
In this paper, we propose a simple yet effective prior 794, 2006. 1, 4, 6
for text image deblurring. While the proposed prior is [7] Z. Hu and M.-H. Yang. Good regions to deblur. In ECCV, pages 59–72, 2012.
5
based on the properties of two-tone text images, it can also [8] R. Köhler, M. Hirsch, B. J. Mohler, B. Schölkopf, and S. Harmeling. Recording
be effectively applied to non-document text images and and playback of camera shake: Benchmarking blind deconvolution with a real-
world database. In ECCV, pages 27–40, 2012. 1
low-illumination scenes with saturated regions. With this
[9] D. Krishnan and R. Fergus. Fast image deconvolution using Hyper-Laplacian
prior, we present an effective optimization method based priors. In NIPS, pages 1033–1041, 2009. 3, 4
on a half-quadratic splitting strategy, which ensures that [10] D. Krishnan, T. Tay, and R. Fergus. Blind deconvolution using a normalized
each sub-problem has a closed-form solution. The pro- sparsity measure. In CVPR, pages 2657–2664, 2011. 1, 4, 6, 8
posed method does not require any complex processing [11] A. Levin, Y. Weiss, F. Durand, and W. T. Freeman. Understanding and evaluat-
ing blind deconvolution algorithms. In CVPR, pages 1964–1971, 2009. 6
techniques, e.g., filtering, adaptive segmentation or SWT. [12] A. Levin, Y. Weiss, F. Durand, and W. T. Freeman. Efficient marginal likelihood
In addition, we develop a simple latent image restoration optimization in blind deconvolution. In CVPR, pages 2657–2664, 2011. 1, 3,
method which helps reduce artifacts effectively. Our future 6, 7
[13] T.-H. Li and K.-S. Lii. A joint estimation approach for two-tone image de-
work will focus on a better non-blind deconvolution method blurring by blind deconvolution. IEEE Transactions on Image Processing,
and extend the proposed algorithm to non-uniform text im- 11(8):847–858, 2002. 1
(a) Blurred image (b) Cho and Lee [3] (c) Xu and Jia [18] (d) Krishnan et al. [10] (e) L0Deblur [20]
(f) Zhong et al. [21] (g) Cho et al. [2] (h) Ours without Pt (x) (i) Ours without Pt (∇x) (j) Our results
Figure 10. A blurred image with rich text. Our method performs well at kernel estimation and image recovery.
(a) Blurred image (b) Cho and Lee [3] (c) Xu and Jia [18] (d) Krishnan et al. [10]
(e) L0Deblur [20] (f) Zhong et al. [21] (g) Our results (h) Our kernel + [17]
Figure 11. A real blurred image with numerous saturated regions. The red boxes in (a) enclose some saturated pixels (e.g., the highlighted
blobs, streaks, and the characters).
[14] Y. Lou, A. L. Bertozzi, and S. Soatto. Direct sparse deblurring. Journal of [18] L. Xu and J. Jia. Two-phase kernel estimation for robust motion deblurring. In
Mathematical Imaging and Vision, 39(1):1–12, 2011. 1 ECCV, pages 157–170, 2010. 1, 4, 6, 7, 8
[15] J. Pan and Z. Su. Fast `0 -regularized kernel estimation for robust motion de- [19] L. Xu, C. Lu, Y. Xu, and J. Jia. Image smoothing via l0 gradient minimization.
blurring. IEEE Signal Processing Letters, 20(9):841–844, 2013. 5 ACM Trans. Graph., 30(6):174, 2011. 2, 3, 4
[20] L. Xu, S. Zheng, and J. Jia. Unnatural l0 sparse representation for natural image
[16] Q. Shan, J. Jia, and A. Agarwala. High-quality motion deblurring from a single deblurring. In CVPR, pages 1107–1114, 2013. 1, 4, 5, 6, 7, 8
image. ACM Trans. Graph., 27(3):73, 2008. 1, 3, 4, 6
[21] L. Zhong, S. Cho, D. Metaxas, S. Paris, and J. Wang. Handling noise in single
[17] O. Whyte, J. Sivic, and A. Zisserman. Deblurring shaken and partially saturated image deblurring using directional filters. In CVPR, pages 612–619, 2013. 6,
images. In ICCV Workshops, pages 745–752, 2011. 5, 7, 8 7, 8