Hello everybody,
I'm new around here, and I hope I'm not making a fool of myself by asking something that's been already answered a million times, in that case I apologize - the problem is the following: I would like to convert a scanned ink (or pencil) line into a vector path, as shown here (done by hand in GIMP):
With "Trace bitmap" in Inkscape the result is something completely different, that I can't use (and all searches for answers have led me back to Trace bitmap, without giving me a solution). What am I doing wrong?
Thanks,
AKir
How to convert ink lines to vector paths?
Re: How to convert ink lines to vector paths?
Welcome aboad!
Inkscape doesn't offer a centerline trace as per se, you need an autotrace-based vectorizing for that (inkscape uses potrace).
Or you can try manual editing with interpolating.
No worry, it is a frequently asked questions, there are more topics on it here.
Inkscape doesn't offer a centerline trace as per se, you need an autotrace-based vectorizing for that (inkscape uses potrace).
Or you can try manual editing with interpolating.
No worry, it is a frequently asked questions, there are more topics on it here.
Re: How to convert ink lines to vector paths?
Thanks a lot, "centerline trace" was indeed the search term I was missing!
Found this via here, and it seems to work so far, brilliant!
Edit: Since it's not completely straightforward for some reason, here's my workflow: Export drawing as .png in GIMP, use the online-tool to "centerline"-convert to svg, which shows the picture in Firefox. "View page source", then "Save page as", save with .svg extension (instead of .php Firefox suggests). Then import the svg as path in GIMP into the original image. Doesn't work with big, complex images though, but for small bits it's fine. Will have to experiment some with dividing up bigger images...
Found this via here, and it seems to work so far, brilliant!
Edit: Since it's not completely straightforward for some reason, here's my workflow: Export drawing as .png in GIMP, use the online-tool to "centerline"-convert to svg, which shows the picture in Firefox. "View page source", then "Save page as", save with .svg extension (instead of .php Firefox suggests). Then import the svg as path in GIMP into the original image. Doesn't work with big, complex images though, but for small bits it's fine. Will have to experiment some with dividing up bigger images...
Re: How to convert ink lines to vector paths?
Additional info for Linux users:
EDIT: also confirmed to work on a Mac (thanks, @cleversomeday for testing! Instructions / links a few posts below)
You can use the centerline trace extension from here:
https://github.com/fablabnbg/inkscape-centerline-trace (works with Inkscape 0.91)
For 0.48.x, you need to make the changes suggested here:
https://github.com/fablabnbg/inkscape-c ... e/issues/1
This version does not crash as often as the other one:
https://github.com/Moini/inkscape-centerline-trace
You need to install 'autotrace' to make it work (if you don't have autotrace installed, and use the first linked version, you will get a full-blown Inkscape crash).
It's also available as a Debian / Ubuntu package, but then without the fixes.
EDIT: also confirmed to work on a Mac (thanks, @cleversomeday for testing! Instructions / links a few posts below)
You can use the centerline trace extension from here:
https://github.com/fablabnbg/inkscape-centerline-trace (works with Inkscape 0.91)
For 0.48.x, you need to make the changes suggested here:
https://github.com/fablabnbg/inkscape-c ... e/issues/1
This version does not crash as often as the other one:
https://github.com/Moini/inkscape-centerline-trace
You need to install 'autotrace' to make it work (if you don't have autotrace installed, and use the first linked version, you will get a full-blown Inkscape crash).
It's also available as a Debian / Ubuntu package, but then without the fixes.
Last edited by Moini on Sun Sep 18, 2016 8:36 am, edited 1 time in total.
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 62
- Joined: Tue Jan 19, 2010 6:52 am
Re: How to convert ink lines to vector paths?
Is there any way to run this extension on the MacOS version, Moini. And is this in line to become a standard feature in the future?
Re: How to convert ink lines to vector paths?
@cleversomeday: I have no clue as to both questions, sorry. To find out yourself, you need to find out if
'autotrace' is available for OSX, to install it, and to see what kind of error messages you may get (if you get any).
Inside the .py file, there is a comment by the author, asking if it works on Windows. I don't think they had OS X in mind when writing the extension, but I guess that it might work (but might need some tweaking, and I can't help there).
'autotrace' is available for OSX, to install it, and to see what kind of error messages you may get (if you get any).
Inside the .py file, there is a comment by the author, asking if it works on Windows. I don't think they had OS X in mind when writing the extension, but I guess that it might work (but might need some tweaking, and I can't help there).
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 62
- Joined: Tue Jan 19, 2010 6:52 am
Re: How to convert ink lines to vector paths?
I was able to install autotrace on my Mac, and the extension doesn't crash, but it doesn't yield a result either, unfortunately.
Re: How to convert ink lines to vector paths?
Mmh. That's not so bad. Can you do the following:
- Trace your image using the extension
- After this, do a 'Select all' (on Win/Linux that would be Ctrl+A, not sure what it's for you) or drag a lasso selection around the image, so you would select all objects that are created in the area of the image
- Check if there are invisible lines (new objects) where the image is
If so:
- Congrats, it works
- Seriously: check your picture for transparencies. If the image you are trying to trace does contain any transparencies, remove them by adding a layer of white below in a raster editing software of your choice (or make a bitmap copy of the image with a white rectangle beneath it in Inkscape).
If not:
not even error messages? :/
- Trace your image using the extension
- After this, do a 'Select all' (on Win/Linux that would be Ctrl+A, not sure what it's for you) or drag a lasso selection around the image, so you would select all objects that are created in the area of the image
- Check if there are invisible lines (new objects) where the image is
If so:
- Congrats, it works

- Seriously: check your picture for transparencies. If the image you are trying to trace does contain any transparencies, remove them by adding a layer of white below in a raster editing software of your choice (or make a bitmap copy of the image with a white rectangle beneath it in Inkscape).
If not:
not even error messages? :/
Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
-
- Posts: 62
- Joined: Tue Jan 19, 2010 6:52 am
Re: How to convert ink lines to vector paths?
That worked! I added a white background before making a bitmap copy and the centerline trace was successful. Thanks so much!
-
- Posts: 62
- Joined: Tue Jan 19, 2010 6:52 am
Re: How to convert ink lines to vector paths?
For any of you Mac folks, here are the instrux I followed to install autotrace. http://www.getmacapps.info/install-autotrace-on-macos
Re: How to convert ink lines to vector paths?
Cool
Thanks for reporting back, @cleversomeday!

Something doesn't work? - Keeping an eye on the status bar can save you a lot of time!
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)
Inkscape FAQ - Learning Resources - Website with tutorials (German and English)