I would like to convert a scanned signature to a vector file. Specifically, I’d like to obtain a clean, small SVG, like Barack Obama’s signature on Wikipedia. It consists solely of paths with no fill and a black stroke of width 1.4.
Here is an example scanned signature. I’ve tried the tracing functionality built into Inkscape 0.48 and Illustrator CS6 but was only able to obtain paths with anchors at the boundaries, plus fill and no stroke. Needless to say, the resulting SVG is not clean (path has varying width) and it’s size is roughly four times that of the Obama signature.
Do any tools exist that can decently trace a scanned signature/line art as strokes, not as paths? If not, how would I go about creating the strokes manually with the pen tool in Illustrator?
Thank you for visiting the Q&A section on Magenaut. Please note that all the answers may not help you solve the issue immediately. So please treat them as advisements. If you found the post helpful (or not), leave a comment & I’ll get back to you as soon as possible.
The method you are looking for is “centerline tracing”. This converts a bitmap to a vector line rather than an object graphic. Very few tracers will be able to do that.
There is a free Open Source tool AutoTrace which does this fairly well but with limitations depending on the quality of the source image. Tracing the signature you provided as a JPEG-image will lead to lots of artifacts. These are the steps I took to get a single line vector image from your example:
Reduce the image information as far as possible leaving 2 colors (object, background) only:
Best and fastest results were obtained by tracing the bitmap to an object vector graphic. This was then exported as PNG bitmap again as shown above.
Run AutoTrace with at least the following options:
autotrace -centerline -color-count 2 -output-file output.svg -output-format SVG input.png
Fine tune the strokes and add the desired stroke strength:
If you’re uncomfortable with the command line you can install the graphical frontend Frontline for AutoTrace.
Binaries for Windows are available from the project’s SourceForge page, Linux users may be able to install it from their default repositories.
This may not be the most efficient method, but here is what I do:
Take the file into photoshop, fiddle with the levels and brightness-contrast to get a high contrast image.
Then make it black and white and maybe fiddle a little more with the contrast. Remove the background (the white), and save it as an image with transparency (e.g. png).
Then, in illustrator choose the tracing options; and here you can play around depending on if you want a vector stroke or fill.
Hope this helps.