I have a webcam, connected to my Raspberry Pi server. Photos are taken every five minutes with fswebcam. Such collection of photos you can use for creating eg. time lapse video (here is an example of one-day video taken from my window). But you can also perform an analysis of image composition and it's variation over time.
Wen we have photos taken during a day gargered in one directory, we can use a simple script to analyse subsequent frames. ImageMagick is used to convert photos to 1x1 px size and get their HSB and RGB values.
Then we use a gnuplot script to get pretty plots:
HSB, with different methods of curves smoothing
RGB, with different methods of curves smoothing
To get the plots almost live, we can use rrdtool to gather, store and plot those data. First, create rrd database:
Then add such lines to your webcam script (launched from cron every 5 minutes). $OUT_FILE is variable pointing to a just taken photo.
Finally, after some data are collected, we can plot a nice graph (actually, we can plot it every five minutes, as new data arrives):