Skip to content

Instantly share code, notes, and snippets.

@JoshM1994
Created January 14, 2018 14:48
Show Gist options
  • Save JoshM1994/8ab288466500c26e7fcc62a388249abe to your computer and use it in GitHub Desktop.
Save JoshM1994/8ab288466500c26e7fcc62a388249abe to your computer and use it in GitHub Desktop.
Use ImageMagick to filter out overly blurry photos
#!/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