10

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 ?

rup
  • 961
  • 3
  • 12
  • 25
  • 1
    Posting a comment as I can't give you a definite answer, but this is a problem of machine learning. You could detect images with least contrast / edges as the blurry ones, but what if it's a photo of a field or sunset? You can create a set of parameters which each image qualifies for to be marked as blurry or over exposed or whatever, but ultimately you'll need to create some sort of classifier based on a set of images your algorithm can learn from. Maybe someone's already done the hard work for you, I wouldn't be surprised. – Griffin Jul 17 '11 at 21:01
  • Are your photographs related to the themes/subjects? – Dr. belisarius Jul 17 '11 at 22:27
  • @Griffin I was thinking on similar lines. What I can do is gather training data while I take the pains to sort manually initially. @belisarius, no they have no particular theme or subject. I am adding a machine-learning tag, in case that shifts the audience. – rup Jul 18 '11 at 11:32

2 Answers2

11

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.

deathly809
  • 384
  • 4
  • 11
  • One attribute of over/under exposure might be low contrast. I.e. the difference between the darkest and lightest parts of the picture. However, this will vary by picture so you'd still want some additional factors. – GalacticCowboy Jul 18 '11 at 16:13
  • @GalacticCowboy If you only looked at low contrast you might throw out pictures that are very homogeneous, such as a desert picture or maybe a snowy landscape. I would suggest a two part test: Check for the average brightness and also check the contrast. – deathly809 Jul 18 '11 at 16:19
  • You're right, which is why I mentioned looking at other factors too. However, in both of the examples you mentioned, there should still be some contrast. (dune vs. sky, snow/shadows, etc.) In an over/under-exposed image, the difference between dark/light would be very narrow. (LDR? :) Opposite of HDR...) At the least, you could flag the image for manual review. – GalacticCowboy Jul 18 '11 at 17:35
0

Can I find images that are under or over exposed?

here histograms is recommended.

RY_ Zheng
  • 3,041
  • 29
  • 36