📜 ⬆️ ⬇️

One cool gist: whiteboardCleaner

Good day, dear habravchane. On the Internet, I met one miniature and very interesting Bash script. Using ImageMagick, he handles photos of a white tutorial in an amazing way, cleansing up the "contents" of everything that is superfluous:

#!/bin/bash convert $1 -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 $2 


Before:


image
')

After:


image

How to use:

 ./whiteboardClean.sh {name of input file} {name of file to output to} 

 ./whiteboardClean.sh example1.jpg output1.png 


And to create this script, the author pushed the post " How to clean up photos of whiteboards with Gimp ".

Gist

Thank you all for your attention.

UPD: dshost habrauzer made a web service that performs the same task - http://api.o2b.ru/whiteboardcleaner

Source: https://habr.com/ru/post/218195/


All Articles