I have been playing around a bit more with using a webcam and have set up a Galileo to take pictures and stitch them together into a video
I am using a Galileo Gen 1, running AlexT's version of Yocto and have a cheap UVC webcam
Install fswebcam program
Install memcoder or other program to convert images to video (either on Galileo or your laptop)
Capture the images
Run a program to convert the images to a video
Any UVC should do. Just connect it to the USB Host (for Galileo 1 need a micro to standard USB cable)
Run modprobe uvcvideo
Check /dev for video0 devices.
opkg install fswebcam
Install memcoder on Galileo (or laptop) or install similar to other OS machines (memcoder is part of mplayer program)
Uncompress and copy directory to:
(note: when I tried to use git, I got a security error, and when tired to uncompress, got bad magic number, so just downloaded and uncompressed on laptop)
make (this takes several hours)
Create program to capture images (I created a directory /media/realroot/timelapse to store images so don't fill up virtual disk space)
Takes a picture every 10 seconds and saves to a file with a timestamp in the name
based on a Python script by @AlexCorvis84
Connections: UVC webcam to usb host
start = 0
end = 8640 # 60 sec * 60 minutes * 24 hours/10 sec
print "Starting the Script with duration of 24 hours"
while start < end:
print "Capture image"
# Note the skip 2 is because I have a low quality webcam that initially makes corrupted images
os.popen("fswebcam -d /dev/video0 -r 640x400 -f 4 --no-banner --skip 2 /media/realroot/timelapse/test_%d%m%y_%H%M%S.jpg")
start = start+1
print "TIMELAPSE Process is finished. Now turn the pictures into a video"
Create a shell script to make a video (could be included in above)
ls *.jpg >stills.txt
mencoder -nosound -ovc lavc -lavcopts vcodec=mpeg4:aspect=16/9:vbitrate=8000000 -vf scale=1920:1080 -o timelapse.avi -mf type=jpeg:fps=24 mf://@stills.txt
chmod +x MakeVideo.sh
Run TimeLapse.py and when finished, run MakeVideo.sh