I grabbed some images tagged with "sky" from Flickr with yesterday's image wall code. One thing interests me that if there is a simple way to tell the color of sky. I am not a digital image person. Let's us see what a layman can do abut it during the lunch break.
The most simple idea is that averaging the color of the upper 3/4 part of the image. After tried with several images, the result of averaged RGB value are mostly some gray colors. The HSB color system seems to be a much better choice.
The averaged H(hue) shall do the job. Here is the some examples with Quartiles[h](1/4, 1/2, 3/4) and Mean[h].
Median probably works better than Mean does for identifying the main sky color, and the color changes of different quartiles may be used as the indicator about the cloudy sky. I don't have time to go further.
note: RGBtoHSV is part of the image processing package.
No comments:
Post a Comment