Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to detect blur, exposure, orientation of an image programmatically?

I need to sort a huge number of photos, and remove the blurry images (due to camera shake), the over/under exposed ones and detect whether the image was shot in the landscape or portrait orientation. Can these things be done on an image using an image processing library or are they still beyond the realms of an algorithmic solution ?

like image 984
rup Avatar asked Jul 17 '11 16:07

rup


People also ask

Is there a way to detect if an image is blurry?

The easiest way to detect if an image is blurry or not is to look at the strength of the high frequency content. This can be done with a simple gradient of gaussian filter or a laplacian filter. Although this method is extremely easy to implement, it is not very robust.

How do you detect motion blur?

Thus, given an image, we can determine whether it is blurred by motion, by detecting areas where there is smoothness in one main direction and more significant difference of values in the vertical direction. If we found that motion blur, we can compute its direction of motion relatively to the camera.

How does Python identify blurry images?

This method is fast, simple, and easy to apply — we simply convolve our input image with the Laplacian operator and compute the variance. If the variance falls below a predefined threshold, we mark the image as “blurry”.

How do you know if an image is properly exposed?

A properly exposed photograph is one that is neither too light nor too dark. A good exposure will include highlights and shadows and a varying degree of contrast in between. It doesn't matter if the photo is in color or black and white. If a photo is too dark, it is underexposed.


1 Answers

Let's look at your question as three separate question.

Can I find blurry images?

There are some methods for finding blurry images either from :

  1. Sharpening an image and comparing it to the original
  2. Using wavelets to detect blurring ( Link1 )
  3. Hough Transform ( Link )

Can I find images that are under or over exposed?

The only way I can think of this is that your overall brightness is either really high or really low. But the problem is that you would have know if the picture was taken at night or day. You could create a histogram of your image and see if it is really skewed one way or the other and that might be some indication of over/under exposure.

Can I determine the orientation of the image?

There are techniques that have been used such as SVM, Color Moments, Edge Direction Histograms, Bayesian Framework using cues.

like image 162
deathly809 Avatar answered Sep 28 '22 08:09

deathly809