A small program for capturing timelapse images.
- POSIX compliant environment (e.g. Linux)
$ ./capture_timelapse <timeout> <duration> <destination>
<timeout>is in seconds, should be an integer greather than zero
<duration>is how long the timelapse capture should be run for. It's of the format
DD:hh:mm:ss. Please include a leading zero.
DDis a value between
hhis a value between
mmis a value between
ssis a value between
<destination>folder where to save all of the images that are captured
If any of the parameters are invalid or there is some sort of error, the timelapse program will exit with a message. At any time to stop the program send an interrupt, terminate, or quit signal. The program will also stop when the capture is complete, or if the user runs out of disk space.
This program assumes that you have only one webcam isntalled, and will use the "default," one that OpenCV will go to. If anyone wants support for multiple cameras, please add something in the GitHub issue tracker.
All images are saved to a
.jpg extension and have a UNIX timestamp of when
they were captured. e.g.
1405282940.jpg would be the capture made on July
13th, 2014 at 20:22:20 UTC (alternatively the time when Mario Goetze kicked the
winning goal of the FIFA 2014 final match). The program will not run if there
is not enough space detected on the disk for all of the images.
A text file called
info.txt will be left in
<destination> with some
information about the timelapse capture.
If you want to compile the images into a film, a small bash script called
mkfilm.sh is provided in the
./src/ directory. It requires
ffmpeg to be
installed. I would suggest reading the comments in the header of the script so
you know how it works.
./toybox/is just a little place where I tinker with code. Some of it may be moved into the main source code.
./src/main source directory.