Skip to content

Instantly share code, notes, and snippets.

@alexbaldwin
Last active January 15, 2016 20:48
Show Gist options
  • Save alexbaldwin/702574d3f764baffd384 to your computer and use it in GitHub Desktop.
Save alexbaldwin/702574d3f764baffd384 to your computer and use it in GitHub Desktop.
Whiteboard cleaning command
# converts an image to png, extracts strokes, traces etc.
whiteboard() {
convert "$1" "$1.converted.png"
echo "Converted"
convert "$1.converted.png" \
-morphology Convolve DoG:15,100,0 \
-negate -normalize -blur 0x1 -channel RBG \
-level 60%,91%,0.1 \
"$1.cleaned.png"
echo "Cleaned"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment