This simple Bash script inspects all images in current dir, and copies those with enough change to a separate dir. The original from laurent22/pmcam grabed images from a webcam. In my case I use a tethered camera that takes images at regular intervals to a date named directory, and then use this script to copy images with enough change to a output directory. Then every now and then I clear the source dir from old pictures.
brew install imagemagick
sudo apt-get install imagemagick
(Not tested)
- Install ImageMagick
The primary config options are:
DIFF_LIMIT cut-off for what changes should be saved
OUTPUT_DIR where to save matching imgs
SOURCE_WILDCARD what images to process
TIME_STAMP imagemagick code to set a time-stamp
RESIZE set if images should be resized
Booleans, true/false
REMOVE_SOURCE Remove source images
DISPLAY_SKIPPED display info about ignored images
SINGLE_PASS run once or loop for ever
Set them as you see fit.
cd to dir where images to be processed are located, then run it as:
./pmcam.sh
To stop the script, press Ctrl + C. If REMOVE_SOURCE is set you can stop and resume at any time.
MIT