views:

35

answers:

0

I found the following algorithm to work fairly well for enhancement of various images of whiteboards, etc:

  1. duplicate the layer, make sure the top layer is active
  2. (gaussian)blur the new layer. You shouldn't be able to read the text anymore.
  3. set the layer mode to dodge
  4. invert the layer

I tried it out in gimp and it looks promising. I'd like to try it en-masse for a large number of images and make it available as a command line tool.

I realize I can script gimp, but that feels too heavy for this purpose. Imagemagick seems ideal for this, but I don't know if I can do the layering with it.

So the question is:

  • Is there a way to script imagemagick to do the above algorithm without the use of a temporary file?
  • Is there a reasonable alternative library/tool that can be integrated with Python?