I am using remote sensing (satellite) images and am trying and differentiate (automatically i.e. using a computer and without viewing the image myself) between areas that fall under cloud cover (with respect to the sun, not with respect to the satellite), the clouds themselves, and areas that are receiving full sunlight.

It is proving difficult to find sources of data to be able to validate the method I am using and I am now looking outside the box. My question is this: would it be possible to use combination of metadata (such as mentioned in this question) from an image file to estimate whether or not the photograph was taken under clear sky conditions or cloudy conditions?

The estimation does not need to be very accurate, more along the lines of "lots of natural light", "not a lot of natural light".

EDIT for clarity:

I am able to identify clouds in the satellite images quite easily and flag the pixels in a pre-processing step, but its is not possible to validate that all the pixels in thousands of these processed images have been correctly flagged. Thus I am concerned with using any information possible from photographs taken on the ground to see if I can validate that the pixels that contain cloud cover have been correctly flagged.

  • \$\begingroup\$ If you're taking similar pictures you could do an a priori algorithm with random samples and libjpeg to determine how close it is to "dark" or "light" \$\endgroup\$
    – SailorCire
    Apr 20, 2015 at 16:28
  • 1
    \$\begingroup\$ Where does your images come from? Do you have any control on how the images are taken? Or are you just looking for random pictures with gps data on the Web? \$\endgroup\$
    – Fumidu
    Apr 21, 2015 at 16:04
  • \$\begingroup\$ Indirectly, yes, if the image is geotagged. I'd simply look up the nearest city and get the weather report for the time the image was taken. :) \$\endgroup\$ Apr 22, 2015 at 0:26
  • 5
    \$\begingroup\$ I'm voting to close this question as off-topic because this is a remote-sensing question; it is not about the art, science, or business of photography itself. \$\endgroup\$
    – mattdm
    May 30, 2017 at 15:59

5 Answers 5


If the ExposureMode is an automatic or semi-automatic one, such as A, P, S, but not M, you could reverse the Sunny 16 rule to find out if the photo has been exposed for a sunny or overcast day. By comparing the actual exposure with the exposure based on the Sunny 16 rule, you can estimate if it was sunny or not.

The lighting from the sun is close to constant, so an ideal exposure will always be the same with direct lighting.

But it will work only if the picture is more or less grey(the closer to a 18% grey card, the better). It won't work with a picture of a white patch of ice, nor with a black coal mine. But it will probably work with vegetation.


This method will give you a lot of false negative (it's sunny, but the picture was taken in the shade, or inside), but it won't give you a lot of false positive, as there aren't many pictures of things lit by a lightsource as powerful as the sun. The main source of false positive will probably be, as MichaelT said, the fog, or maybe thin clouds.


Another idea is maybe to use the white balance? But again, you will have a lot a false positive and negative. You will probably need a lot of images taken at the same place and time in order to deduce something...

  • 1
    \$\begingroup\$ I don't think I understand your answer. The pictures are already taken, the author just wants to know if there is an automatic way to determine how much ambient light is present. \$\endgroup\$
    – SailorCire
    Apr 20, 2015 at 18:55
  • \$\begingroup\$ I have understood that the picture is already taken. By comparing the actual exposure with the exposure based on the Sunny 16 rule, you can estimate if it was more or less sunny. I have modified my explanation. Is it clearer now? \$\endgroup\$
    – Fumidu
    Apr 20, 2015 at 22:02
  • \$\begingroup\$ I'm pretty sure that Satellite imagery does not adhere to the Sunny/16 rule, and if the results were sunny that it might be sun reflecting off clouds. But well done for trying! :) \$\endgroup\$ Apr 21, 2015 at 14:04
  • \$\begingroup\$ It is obvious that we are lacking a lot of information, like, what type of camera, what focal, what wavelenghts etc. Nonetheless, any camera is a sort of light sensor, and just by measuring the light reflected by the ground, I'm pretty sure you can have a decent success rate to discriminate between cloud, vegetation lit by sun and overcast vegetation. And the fact that @nicholaschris mentions that the camera provides Exif data might imply that the camera is not so exotic after all. \$\endgroup\$
    – Fumidu
    Apr 21, 2015 at 14:32
  • \$\begingroup\$ And I'm also pretty sure that satellite imagery, provided that it's done with visible light on the lit face of the earth, will always adhere to something similar to the Sunny 16 rule, as it is always taking a picture of something (the planet) uniformly lit by the sun. I'm extrapolating here, but maybe the exposure used by a satellite is always the same? If that's the case, my solution won't work, and the only solution is probably to use the histogram. \$\endgroup\$
    – Fumidu
    Apr 21, 2015 at 14:40

I think you would have a tough time with simply EXIF metadata, but there are other options.

If you would expand your selection to include a histogram that can evaluate the complete tonal range of an image, you could get a rough idea if it was cloudy or not based on the contrast of the image. Contrast is typically not something that can be understood simply by looking at the standard EXIF data though, as the aperture, shutter speed, or program mode selected does not typically do much to indicate the contrast - although with some interpretation it could.

Take a look at this answer and specifically the section on contrast for more information: How and why do you use an image histogram?


No, meta-data (and from it exposure value) isn't enough to determine if the sky is clear or not.

A while back, I decided I wanted to photograph the fog and get some grain to it (I was shooting film (I did get the grain I was after but that's another story)).

Golden gate bridge from Fort Point

This happens to be shot at 1600 speed (it was Tri-X 400 pushed two stops) at f/16 (as slow as the Nikon 85mm f/1.8 can go) at either 1/4000th of a second or 1/8000th of a second.

When you stick all those numbers together, it is an EV of either 16 or 17 (based on this chart). An EV of 15 is the classic Sunny 16 and an EV of 16 is often described as "Subjects in bright daylight on sand or snow". An EV of 17 is "Rarely encountered in nature".

You can see, that this is not a sunny day though it was very bright.

Thus, quite simply said - no, the exposure information alone will not tell you about if the conditions are overcast or not.


I think most the answers concentrate on what is traditionally considered "META/EXIF data" by photographers. That is Aperture, Shutter speed and ISO.

I would't expect satellite images to have varying aperture and/of shutter speeds (I could be wrong) but what's also included in the META/EXIF data is the histogram. This can be very useful.



enter image description here

enter image description here


enter image description here

enter image description here

Notice how the brighter image shifts to the right and the more shadowy one is more to the left.

I'm not an expert on jpeg headers and file structures but I'm sure this can be found. These might be some interesting articles:

http://digital-photography-school.com/how-to-read-and-use-histograms/ http://dev.exiv2.org/projects/exiv2/wiki/The_Metadata_in_JPEG_files


I wanted to write this as a comment but I had more to say.

  • \$\begingroup\$ This is exactly what my answer focused on lol. \$\endgroup\$
    – dpollitt
    Apr 21, 2015 at 3:05
  • \$\begingroup\$ For some reason by answer is 9 hours behind yours but I didn't see yours when I posted it. I may have skimmed past it... \$\endgroup\$
    – BBking
    Apr 21, 2015 at 5:39

The metadata will not tell you anything especially useful in the situation of trying to estimate ground conditions from a satellite image.

If the metadata includes the details of the area covered in the image then you may be able to do a data mashup with weather radar imagery to estimate cloud conditions and extrapolate them to light available on the ground but you would get a more reliable result from the image data.

If you need to automate a solution then you may be able to play with machine vision libraries like OpenCV which might show you the cloud cover in the images and allow you to estimate where they would fall on the ground.

-- post edit update --

Definitely nothing about that would give you what you need from metadata.

You would be down to some amount of image processing even if automated by OpenCV or similar, where you have a few options to cross check your processing.

One option you could use is to examine the output of webcams. You can find publically available ones through services like earthcam to see (again using tools like OpenCV) to see if the data at those sites match your expectations. The image processing and selecting cameras make take a bit of effort but it's a one-time activity.

You could also compare your results to cloud radar, where you have point sources like Copernicus or the output of other cloud satellite imagery like that available at sat24.

  • \$\begingroup\$ Thank you for the information, I have edited my question to make it clearer. \$\endgroup\$ Apr 21, 2015 at 15:41

Not the answer you're looking for? Browse other questions tagged or ask your own question.