Skip to content

Instantly share code, notes, and snippets.

@MetroWind
Last active October 13, 2021 09:19
Show Gist options
  • Save MetroWind/78fcf13ed448e466d97f5c74919bcff9 to your computer and use it in GitHub Desktop.
Save MetroWind/78fcf13ed448e466d97f5c74919bcff9 to your computer and use it in GitHub Desktop.
High-pass filter + binarize in Imagemagick
# convert -bias 50% -morphology Convolve DoG:0,0,10 -threshold 40% source.png result.png
convert input.jpg \( -clone 0 -blur 0x100 \) \( -clone 0 -clone 1 +swap -compose mathematics -set option:compose:args "0,1,-1,0.5" -composite \) -delete 0,1 -threshold 40% result.png
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment