Friday, June 2, 2017

adobe illustrator - How to convert a signature from JPG to vector strokes?


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?



Answer



Centerline Tracing



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:




  1. Reduce the image information as far as possible leaving 2 colors (object, background) only:


    enter image description here
    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.




  2. Run AutoTrace with at least the following options:



    autotrace -centerline -color-count 2 -output-file output.svg -output-format SVG input.png 

    enter image description here




  3. Fine tune the strokes and add the desired stroke strength:


    enter image description here




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.


No comments:

Post a Comment

technique - How credible is wikipedia?

I understand that this question relates more to wikipedia than it does writing but... If I was going to use wikipedia for a source for a res...