Digitizing Photos of Whiteboards Using the Command Line ➶
  1. Make sure you have ImageMagick installed.

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

    :::bash #!/bin/bash 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:

    :::bash alias wbclean="~/code/whiteboardClean.sh"

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

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

✶ Thursday, 3 April 2014

˳ · ˖

Prior entry:
Next entry: