Simon Griffee · Time, light, movement & distance.

Digitizing Photos of Whiteboards Using the Command Line ➶

3 April 2014

1) Make sure you have ImageMagick installed.

2) Save the following somewhere such as ~/code/ and don’t forget to make it executable with chmod +x ~/code/

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

3) Add an alias to the above in your ~/.bashrc:

alias wbclean="~/code/"

4) To convert photo of a whiteboard to a cleaner diagram of the same you can now do:

cd /location/of/photo.jpg
wbclean photo.jpg diagram.png