Image Blur Detection via Hough Transform — I

It is often necessary to identify and classify images based on their clarities. For instance, it is desirable for an automated process to locate blurred images within a large digitized image library and then automatically sharpen the blurred images via inverse filtering or blind deconvolution. In the following series of articles, I will discuss a practical method in detecting blur images using Hough Transform.

Background

Image blur is typically caused by

  • Motion (e.g. the relative movement between the camera and the object during exposure)
  • Out-of-focus
  • Low lighting condition

Other types of image blur may also occur in photography (such as Bokeh). And it is desirable to be able to automatically distinguish desired image blur (e.g. Bokeh caused by camera lens with a shallow depth of field) from un-intended blur (e.g. out of focus).

When reference images (e.g. a series of images with different focus settings) are present, detecting image blur is a relatively simple task. For instance, in passive auto-focus cameras, a series of scene images are captured with progressive focus settings. And the intensity differences are calculated within the same region across these different images. Thus, the image with the highest intensity difference corresponds to the correct focus setting. In Active-focus cameras, image blur detection problem is circumvented by measuring the distance between the lens and the object.

The problem becomes more difficult if we are only given a single image. Since many parameters that we used above in camera auto-focusing are not present in a single image setting, we could not reliably infer image sharpness by the method used in passive auto-focusing as we do not have sufficient knowledge to re-construct the series of images necessary for comparison.

We can however, tell whether an image is in-focus by calculating the intensity differences along the edges in an image. If the calculated intensity is higher than a predefined threshold, we deduce that the image is sharp. And if the calculated intensity is lower than a predefined threshold, we conclude that the image is blurred. So now we shifted the problem to identifying such optimal regions where the intensities are calculated.

Algorithm Overview

In this algorithm, we first use Canny edge detection to obtain the edges in the image. The edges are then parameterized using Hough transform. We then calculate the pixel gradients along the parameterized lines detected and finally we use the gradients to decide whether the image is blurred.

I will discuss some technical and implementation details in the up-coming posts. Stay tuned.

Be Sociable, Share!

5 Comments

  1. Denson Smith says:

    Is there any chance of getting the source code for this? I’m working on a project in a software engineering class and this is perfect for what we are trying to do.

    The assignment is to develop a utility useful for a professional photographer.

  2. tch2002 says:

    hi,Denson Smith,I badly need your projection,if give any help, thank you very much.

  3. Hi,

    it’s one of my topic of interest, we are thinking to add a blurry photo detection routine, but I see there are a lot of articles, but I can’t find any sample of implementation ? do you know any implementation of your research to test this with our own set of test pictures ?

    cheers,

Leave a Reply