Space-Variant Single-Image Blind Deconvolution for Removing Camera Shake

Stefan Harmeling, Michael Hirsch, Bernhard Schölkopf

Introduction

Traditional deblurring algorithms often rely on a mathematically convenient but physically inaccurate assumption: space-invariance. This principle assumes that every pixel in an image is blurred by the exact same "point spread function" (PSF) or blur kernel. However, in real-world handheld photography, this is rarely the case. Slight camera rotations during exposure or varying depths of field mean that the blur at the edges of a photo often looks vastly different from the blur in the center.

This paper tackles the complex challenge of "blind deconvolution" under space-variant conditions—recovering a sharp image when neither the original image nor the specific, spatially varying blur kernels are known. Because there are infinitely many combinations of sharp images and blurs that could result in the same blurry photo, this is a highly ill-posed problem. By modeling blur as a space-variant process, the authors develop a new algorithm capable of restoring sharp details in real-world handheld photos where traditional, uniform-blur methods fail.

Methodology

To bridge the gap between computational efficiency and the complexity of space-variant blur, the authors introduce a framework built on three main components:

  1. Efficient Filter Flow (EFF): Calculating a unique blur kernel for every single pixel is computationally prohibitive. Instead, the authors utilize the EFF framework, which covers the image with overlapping patches, calculates a distinct PSF for each patch, and smoothly blends them together to approximate a continuously varying blur field.
  2. Two-Stage Algorithm:
  3. PSF Estimation: Adapting the fast "Cho and Lee" approach, the algorithm uses a prediction step that applies filters to artificially sharpen edges, helping to guess the blur kernels. Crucially, they introduce a regularization term that forces neighboring patches to have similar blurs, reflecting the physical reality of continuous camera motion.
  4. Non-Blind Deblurring: Once the varying blurs are estimated, the system employs a generalized version of the "Krishnan and Fergus" algorithm. This relies on sparsity priors—the assumption that sharp images consist mostly of flat areas separated by a few sharp edges—to reconstruct the final image.
  5. Taxonomy of Shakes: The paper provides a formal classification of camera shakes based on PSF variation (Constant, Smooth, Segmented) and depth variation, offering a clear roadmap for the types of blur their algorithm can successfully handle.

Novel Experimental Setup for Ground Truth

Because standard pre-existing datasets for space-variant blur did not exist, the authors developed a highly inventive experimental setup to create ground-truth data for evaluation.

Composite image displayed on a screen, with the sharp photograph in the red channel and a grid of dots in the blue channel.

They displayed a composite image on a high-quality computer screen. The Red channel contained a sharp target photograph, while the Blue channel contained a grid of tiny, sharp dots. They then took a handheld photo of the screen with a DSLR camera.

The resulting captured image, where the blurred blue dots provide exact, spatially-varying point spread functions (PSFs).

By separating the color channels of the captured photo afterward, the Red channel provided the "real-world" blurry image. Simultaneously, the Blue channel's blurred dots provided the exact, spatially-varying PSFs (the ground truth) at various points across the image, allowing for precise evaluation of their estimation algorithm.

Key Insights

  • The "Smoothness" Constraint: A critical insight of the paper is that while blur varies across an image, it does not vary randomly. Because blur stems from the continuous physical motion of a camera, the blur kernels of adjacent patches must be mathematically similar. This constraint is vital for solving the ill-posed nature of the problem.
  • Spatially Adaptive Thresholding: During the prediction step, a global threshold for edges proved ineffective. Strong edges in one part of the image could "drown out" useful gradient information in less-textured regions. Applying thresholds patch-by-patch was necessary to capture local structural information accurately.
  • Software vs. Hardware: The authors demonstrated that a purely software-based approach using a single image could achieve results comparable to complex methods that rely on specialized hardware (like gyroscopes and accelerometers) to track camera motion.

Results and Limitations

Qualitatively, the proposed method showed significant superiority over state-of-the-art space-invariant methods. On test images, it successfully recovered fine details—such as license plate numbers and house numbers—that were completely lost by uniform deblurring algorithms. It proved robust against "Rotated Shift" and "Pure Tilt" motions, which are common in handheld photography but break the assumptions of simpler models.

Despite these successes, the method has limitations. It can struggle if the blur is extremely large or if the PSF changes too abruptly (e.g., at the boundary of a moving foreground object against a static background). Furthermore, in textureless regions like a clear sky, inferring a blur kernel is nearly impossible; the algorithm relies on a heuristic to propagate neighboring kernels into these gaps, which could be mathematically refined.

Finally, while the 30-minute processing time for a standard image in Matlab was a significant achievement for space-variant blind deconvolution at the time of publication, transitioning the implementation to GPU processing would be necessary for practical consumer applications.

Summary updated

BibTeX
@inproceedings{harmeling2010space,
  author = {Stefan Harmeling and Michael Hirsch and Bernhard Schölkopf},
  title = {{Space-Variant Single-Image Blind Deconvolution for Removing Camera Shake}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2010},
}
Figure