Weather Software > Station Software Development
Determining the amount of clouds during the day from a webcam image in C#
iisfaq:
I would like to write a function to help determine the amount of cloud cover in a day using the oktas ranges.
see http://worldweather.wmo.int/oktas.htm for Oktas scale.
My theory is that using a webCam image we could take a sky portion of the image (maybe the top 1/2) and then divide that into 16 squares.
From that we could reduce the colors in the image to 16.
We could then determine if the colors in the image are White, Silver, Grey, Blue or something else.
From this we could calculate the Oktas scale and also a cloud density value as well.
The Oktas scale really covers is there any blue in the area and if so what %.
If we had blue and white and gray then we have potentially a cloudy day with rain clouds?
Your thoughts on this approach?
I am trying at the moment to determine if a RGB Pixel is blue or not. Since to a human any share of blue is blue I need to reproduce that foruma in a function and even though it sounds easy I am not having a lot of luck yet.
Chris
wuhu_software:
That is an interesting problem. I suppose the first step would be to run the image through some type of pixel color classification algorithm. It seems there are a few different approaches out there for such a task. Searching Google, the Naive Bayes classifier algorithm or AdaBoost algorithm.
One area where these seem to be used frequently is in facial detection. Here is one page with some source, maybe you could pull out what you need to classify the colors extracting the blue pixels from the rest of the image:
http://www.hackchina.com/en/cont/90303
Here is another interesting paper on pixel color classification:
http://cseweb.ucsd.edu/~kastner/papers/fccm10-color_classification.pdf
Once you can classify the pixels, you could probably just compare the blue pixels to the rest of the data. The sun's effect might be a problem depending on where your camera is pointed.
KaliforniaKid:
not sure that I understand what you are trying to accomplish here. wouldn't it be just as good or better to have an actual webcam image to see weather it were cloudy or clear? or are you trying to digitize it somehow to convert to a numerical number you can input into a formula of some sort?
gwwilk:
He may suffer from the same problem I do: local NOAA METAR is loco. It often says 'Clear' when it's cloudy, or 'Mist' when it foggy, etc. My non-solution is to just put up with it and hope that my webcams and data can tell the real tale.
utahweatherbear:
ASOS has its limitations. For sky, it first just looked straight overhead for conditions, now I believe it shoots up at 3 angles over time to make a guess. It also is augmented by humans at major airports. As far as mist/fog, that is based on prevailing visibility. It will go with BR(mist) with vsby ...crap can't remember exacty... over 1 mile I think, but FG(fog) less than that. My exact numbers may be off but you get the idea.
Navigation
[0] Message Index
[#] Next page
Go to full version