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?

Answers:

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.

Method 1

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:

    How to convert a signature from JPG to vector strokes?
    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.

Method 2

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.

enter image description here

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.

Stroke:
enter image description here

Fill:

enter image description here

Hope this helps.


All methods was sourced from stackoverflow.com or stackexchange.com, is licensed under cc by-sa 2.5, cc by-sa 3.0 and cc by-sa 4.0

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x