Friday, July 11, 2008

daily RADHMM video

I tried to make a video of the daily RDAHMM results for the time from 2008-1-1 to 2008-6-14 in the following way:
1. Get the big Google map picture of California, save it as a background of the video frames;
2. Get the position coordinates of all stations in the background picture. Google map has an API to do so: fromLatLngToDivPixel(latlng);
3. Get daily rdahmm results for everyday, draw markers of stations on the background image, with their colors decided on the stations' states on each day. So we get one image for each day during the time from 2008-1-1 to 2008-6-14;
4. Make a video from all these images with mencoder.
Right now we have a separate program to draw images for everyday. We can integrate these functions to the daily RDAHMM service later. And in order to use mencoder to make the video, we need to install it on every server where the service runs. Besides, we'll figure out a way to add one more image to an existed video, so that we don't have to make a new video from all raw images for every next day.

No comments: