Thursday, December 20, 2012

Vectorizing scans

I am always unhappy about the way my scanned handwritten documents look. Pencil looks especially bad. I have earlier used the fantastic inkscape to trace bitmaps and create vectorized versions of my scans, with success. But the process is somewhat cumbersome, and I tend to forget how to do it between the times I need it.

The result is worth it, though. Black is real black, and since it produces vector graphics the edges are not pixelated, even if you zoom in.

Original scan, grey and pixelated.

After the vectorizing, black and white, and no visible pixelation (you may distinguish pixels here, since I converted the image from pdf to png).

Here comes a way to do it in one command from a terminal.