In a digital photo, detecting if a mountain is obscured by clouds.

Posted by Gavin Brock on Stack Overflow See other posts from Stack Overflow or by Gavin Brock
Published on 2010-03-27T06:13:39Z Indexed on 2010/03/27 6:23 UTC
Read the original article Hit count: 427

The problem

I have a collection of digital photos of a mountain in Japan. However the mountain is often obscured by clouds or fog.

What techniques can I use to detect that the mountain is visible in the image? I am currently using Perl with the Imager module, but open to alternatives.

All the images are taken from the exact same position - these are some samples.

Sample Images

My naïve solution

I started by taking several horizontal pixel samples of the mountain cone and comparing the brightness values to other samples from the sky. This worked well for differentiating good image 1 and bad image 2.

However in the autumn it snowed and the mountain became brighter than the sky, like image 3, and my simple brightness test started to fail.

Image 4 is an example of an edge case. I would classify this as a good image since some of the mountain is clearly visible.

© Stack Overflow or respective owner

Related posts about image-processing

Related posts about object-detection