Removing out-of-focus blur from a single image

Guodong Xu, Chaoqiang Liu, Hui JiarXiv 2018

Abstract

Reproducing an all-in-focus image from an image with defocus regions is of practical value in many applications, such as digital photography and robotics. Using the output of existing defocus map estimators, standard approaches segment a defocused image into multiple regions blurred by Gaussian kernels with different variances and then deblur each region accordingly. In this paper, we propose a blind deconvolution method specifically designed for removing defocus blurring. Our approach provides effective solutions to two critical problems: 1) suppressing artifacts caused by segmentation errors by introducing an additional variable regularized by a weighted $\ell_0$-norm; and 2) achieving more accurate defocus kernel estimation using non-parametric symmetry and low-rank constraints. Experiments on real datasets demonstrate the advantages of the proposed method over existing techniques.

Introduction

In photography, a shallow depth of field often results in images where only a specific plane is in focus, while the rest of the scene is blurred. While aesthetically pleasing, this "defocus blur" is problematic for computer vision tasks in robotics and digital photography that require sharp details across the entire image. Traditional methods attempt to solve this by estimating a defocus map and segmenting the image into regions of varying blur. However, these methods often fail due to imperfect segmentation and overly simplistic blur models (like the standard Gaussian kernel), leading to unsightly "ringing" artifacts.

Methodology: Robust Blind Deconvolution

The proposed method addresses these challenges through a blind deconvolution framework that simultaneously solves for the sharp image and the blur kernel.

1. Handling Segmentation Errors with an Error-Buffer

A major innovation is the introduction of a residual variable into the fidelity term of the optimization model. This variable is regularized by a weighted $\ell_0$-norm, which encourages sparsity.

  • Mechanism: When the model encounters a pixel that doesn't match the expected blur of its assigned segment—a common occurrence at region boundaries—the variable "absorbs" this error. This prevents the optimization process from forcing a bad fit, which typically generates artifacts.
Artifact suppression via the proposed method: (a) input, (b) segmentation map, (c) proposed result, (d) result with artifacts.

2. Physics-Informed Kernel Constraints

Rather than assuming a rigid Gaussian shape, the authors use a non-parametric kernel constrained by physical properties:

  • Low-Rank Constraint: Physical defocus kernels often exhibit a low-rank structure. Enforcing this constraint stabilizes the estimation process.
  • Symmetry Constraint: Real-world lenses produce symmetric blur. The model enforces eight-fold symmetry (transpose, row-flip, and column-flip invariance) to ensure the estimated kernel remains physically plausible and robust against noise.

Key Results

The researchers evaluated their method against state-of-the-art techniques using both simulated and real-world datasets, such as the CUHK defocus dataset.

Qualitative Performance

The proposed method demonstrates significantly sharper edges and recovered texture detail. By treating segmentation errors as sparse outliers, the algorithm is much more resilient to "sloppy" initial maps than competing methods.

Real-world deblurring result showing significant recovery of detail from input (a) to output (b).

Artifact Suppression

As shown in the comparative analysis, the inclusion of the $\ell_0$-regularized error-buffer effectively eliminates the ringing and pixelation that plague traditional deconvolution methods when segmentation boundaries are slightly off. Competing methods often struggle to maintain clean edges in these transition zones.

Conclusion

By moving away from rigid Gaussian assumptions and acknowledging the inherent imperfections in image segmentation, this research provides a more robust path toward all-in-focus imaging. The combination of physics-informed kernel constraints and a sparse error-handling mechanism allows for high-quality restoration of defocused images, making it a valuable tool for both consumer photography and advanced robotics.

Summary updated

BibTeX
@misc{xu2018removing,
  author = {Guodong Xu and Chaoqiang Liu and Hui Ji},
  title = {{Removing out-of-focus blur from a single image}},
  year = {2018},
  eprint = {1808.09166},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/1808.09166},
}
Figure