title: How can I measure the level of ambient light from an image?
body: <p>I am looking at making an app that uses a camera to measure the amount of light present when an image is taken. Some conditional behavior would take place based on how much light was present - ie display a message saying "Looks like bedtime" if it looks like it is dark.</p>
  
  <p>I understand that this will be a pretty poor measure of the actual amount of light present due to exposure and things like that, but it doesn't need to be super accurate.</p>
  
  <p>I have no experience with image processing, so I don't even know what to ask, or what is feasible. Is this possible? Are there any C libraries for doing something like this?</p>