A timelapse script using python and opencv