Auto-Detecting blurry regions of an image

computer-vision, image-processing

Solution

As lain_b pointed out, with an image like this you can use an edge detector and look for an absence of edges. I tried it on your image and it seems to work pretty well. First I used the kernel

[0,1,0,
 1,-4,1,
 0,1,0]

Which is a simple edge detector. Its result was

Then I used a threshold to get

Then I closed the image and opened it to get

This is obviously not a finished version, the top right portion did not recognize well at all. Perhaps you could improve it by blurring before performing thresholding, or by choosing better values for the threshold and the radii of the opening and closing operations. A lot of the decisions you will need to make depend on the constraints you can put on your problem. I think this technique will work for you though.

Edit If you are looking for blur detection of arbitrary images you are going to have to investigate a wide variety of techniques. Things are much easier if you can make assumptions about your set of input images. Without any assumptions I don't know what will work best for you. Here is some reading on the topic

Image Blur Metrics

Reserach paper on using the Harr wavelet transform

Similar SO Question and look at the question that question links to

Blur detection is a very active research field, there is no one answer. You will just need to try all the methods you can find (these were found by googling detect blur in image).

Problem

I am working on images that are partially blur on some sections. These are noises that should be taken care of, but here is the problem: Are there methods to detect whether an image is blur or partially blur at some sections of an image? For instance, take a look at sample image below: You can see in the image that there are 3 sections that are visually blur: bottom-left, near center region and top-right. Now, is it possible to detect that any portion of an image is blur programming-wise or mathematically?

Original source

Related problems