Created
January 14, 2018 14:48
-
-
Save JoshM1994/8ab288466500c26e7fcc62a388249abe to your computer and use it in GitHub Desktop.
Use ImageMagick to filter out overly blurry photos
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple script used for filtering out photos taken on a timelapse camera | |
# Used in conjuction with [removeDark.sh](https://gist.github.com/JoshM1994/0481b41d4bc83e15af3dc49b8424943d) | |
mkdir -p tooBlurry | |
for f in `ls | sort -Vr`; do | |
SD=$(identify -verbose $f | grep "standard deviation" | head -1) | |
ISOK=$(echo "${SD:25:5} > 50" | bc) | |
if [ ${ISOK} -eq 0 ] | |
then | |
echo "Moving $f" | |
mv $f tooBlurry/ | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment