Thicker Lines On Trace Bitmap

General discussions about Inkscape.
derekmhart
Posts: 7
Joined: Fri Jan 11, 2019 7:05 am

Thicker Lines On Trace Bitmap

Postby derekmhart » Fri Jan 11, 2019 7:38 am

If I bring in a simple bitmap illustration image, such as this: https://www.screencast.com/t/8kTkOAQkdF

And then I run a Trace Bitmap, Inkscape traces around the lines like this:
https://www.screencast.com/t/TpTNbhra

So it traces AROUND the lines themselves. Now I know I can always set the Fill and Stroke properties to be thicker lines, like this:
https://www.screencast.com/t/OY1hBih2B

I am building these paths for use in Sparkol Videoscribe animation software. Too many paths are created to make this animate well. Is there any setting that would create a better path, and/or use thicker lines to only create one path when it's an illustration such as this dog image?

If that was possible it would eliminate all hand tracing for this type of project.

Thank you... Derek

User avatar
brynn
Posts: 10307
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Thicker Lines On Trace Bitmap

Postby brynn » Fri Jan 11, 2019 11:01 am

You could try Centerline Trace extension: https://github.com/fablabnbg/inkscape-centerline-trace Do you need instructions for installing an extension?

derekmhart
Posts: 7
Joined: Fri Jan 11, 2019 7:05 am

Re: Thicker Lines On Trace Bitmap

Postby derekmhart » Fri Jan 11, 2019 11:56 am

Oh wow this looks good. Yes, how do I install an extension?

derekmhart
Posts: 7
Joined: Fri Jan 11, 2019 7:05 am

Re: Thicker Lines On Trace Bitmap

Postby derekmhart » Fri Jan 11, 2019 1:06 pm

I installed a file called "inkscape-centerline-trace-0.8c-20180905-setup" and then executed that in the program. It errors. Do I need another program also, or further instructions? Help!

derekmhart
Posts: 7
Joined: Fri Jan 11, 2019 7:05 am

Re: Thicker Lines On Trace Bitmap

Postby derekmhart » Fri Jan 11, 2019 1:21 pm

I found these directions. Are these the directions to follow on Windows 7 64-bit? No idea how to do a portion of this. Cannot get 1.5 to work. First I need to know if these are the right instructions, then how the heck to get this done if I cannot get past 1.5 - I downloaded the text from https://pip.pypa.io/en/stable/installing/ and placed it into a text file called get-pip.py, then copied into the Inkscape folder. Then changed directories to cd "\Program Files\Inkscape" - but then trying to execute some command "python\python get-pip.py --trusted-host pypi.python.org --ignore-installed" makes no sense to me. Am I anywhere near on track? Do I need some installation of Python? Help!


Installing the Centerline Trace Extension for Inkscape in Windows 8.x or 10
1. Install PIP and Pillow for Inkscape’s bundled Python:
1.1. Download get-pip.py from https://pip.pypa.io/en/stable/installing/ (right click on the link and save
to a file).
1.2. Drag get-pip.py from your browser downloads directory to your Inkscape program directory (e.g.,
c:\Program Files\Inkscape or c:\Program Files (x86)\Inkscape). You’ll have to give
administrator permission.
1.3. Start an administrator shell. (Win-X and choose “Command Prompt (Admin)”)
1.4. Change to your Inkscape directory, e.g.,
cd "\Program Files\Inkscape"
1.5. Install PIP in administrator shell:
python\python get-pip.py --trusted-host pypi.python.org --ignore-installed
1.6. Install Pillow in administrator shell:
python\Scripts\pip --trusted-host pypi.python.org install pillow
2. Install autotrace executable for Inkscape:
2.1. Download a Windows autotrace.exe. I got one from here: https://github.com/scottvr/autotracewin64-
binaries/raw/master/bin/autotrace.exe (this is for 64-bit, but it will also work fine with 32-
bit Inkscape as long as you have a 64-bit system).
2.2. Drag it to your Inkscape extensions directory, e.g., c:\Program Files\Inkscape\share\extensions.
You’ll have to give administrator permission.
3. Install centerline trace extension for Inkscape:
3.1. Download the latest centerline trace extension zip file from:
https://github.com/fablabnbg/inkscape-c ... master.zip
3.2. Open the zip file.
3.3. Go to its inkscape-centerline-trace-xxx directory.
3.4. Drag centerline-trace.inx, centerline-trace.py and rof.py to your Inkscape extensions directory
(see 2.2). You’ll have to give administrator permission.
4. Use:
4.1. Start or restart Inkscape.
4.2. Copy in a bitmap.
4.3. Keep bitmap selected.
4.4. Extensions | Images | Centerline trace.
4.5. Select options. Press Apply.

User avatar
brynn
Posts: 10307
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Thicker Lines On Trace Bitmap

Postby brynn » Fri Jan 11, 2019 3:33 pm

Yes, those are the same instructions I found just now. But clearly they aren't appropriate for newbies, or even some more experienced users. I have no idea how to use shell mode, myself.

I actually installed the same extension without doing all that (a couple of months ago). I followed these instructions: https://inkscape.org/learn/faq/#how-ins ... n-sets-etc

And the extension seems to work just fine. I don't know, maybe there are some other features which are provided by installing all that other stuff, that I don't have. But I can run the extension without errors, and it gives an expected result. (I'm on Windows 7, 64-bit)

And I have some other instructions that I wrote for beginners, which give a few more details than at the link above. If you need more details, look on the bottom half of this page: https://forum.inkscapecommunity.com/index.php

User avatar
brynn
Posts: 10307
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Thicker Lines On Trace Bitmap

Postby brynn » Fri Jan 11, 2019 3:38 pm

You know, I think it's possible to find centerline trace engines on the internet. The only one I knew about disappeared a few years ago, but probably another one (or 2) are available. I'd have to search myself. Well, let's see if I can find something....

Oh ok, I found this one: https://online.rapidresizer.com/tracer.php I haven't tried it yet, so I'm not sure how well it might work (or not). But it certainly can't hurt to try it.

Edit
Yeah, my search turned up a few different results. So research is possible if you need to.

Moini
Posts: 3246
Joined: Mon Oct 05, 2015 10:44 am

Re: Thicker Lines On Trace Bitmap

Postby Moini » Sat Jan 12, 2019 5:39 am

How about using the instructions provided on the page brynn linked to?

https://github.com/fablabnbg/inkscape-centerline-trace
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)

derekmhart
Posts: 7
Joined: Fri Jan 11, 2019 7:05 am

Re: Thicker Lines On Trace Bitmap

Postby derekmhart » Sat Jan 12, 2019 12:01 pm

Okay after going in circles for 4 hours trying to get this installed, I need to take a breath and start over. The rapidresizer is not nearly good enough above.

Brynn, please verify that you are on Windows 64 bit. I believe you are. Even though I have now tried multiple versions of Inkscape, 32-bit, 64 bit... can you please verify the version of Inkscape that you have installed? I at least need to make sure the latest version of Inkscape should work.

If you are able to take a payment to help install this, I will gladly make one.

Going to start over and try again. I cannot find anything else on the market that can do this.

derekmhart
Posts: 7
Joined: Fri Jan 11, 2019 7:05 am

Re: Thicker Lines On Trace Bitmap

Postby derekmhart » Sat Jan 12, 2019 12:58 pm

Okay I got the thing installed. Somehow I found this file: "inkscape-centerline-trace-0.8c-20180905-setup.exe" - and it worked.

A couple questions. I tried a file that looks like the following, and it worked very well. The file on the left is the original, and the Centerline Trace extension did a perfect job:

https://www.screencast.com/t/4bLiJg8GbMJ

So then I try a simple sketch of a dog, more realistic to have lines that vary in thickness, and here is the result:

https://www.screencast.com/t/zx4g5y9R0X

Somewhat comical. So am I dealing with an extension is nowhere near capable of doing because the very simple first sketch?

I have attached the image... would so much appreciate if you would try on yours Brynn, or anybody else that uses this extension. I also attached the first one.

Here are the settings I have used, but I have tried many settings:

https://www.screencast.com/t/5THqtm5lo1s

Feedback appreciated!
Attachments
Dog Cat Hover 013.png
Dog Cat Hover 013.png (15.38 KiB) Viewed 2010 times
dog black 2.png
dog black 2.png (18.95 KiB) Viewed 2010 times

User avatar
brynn
Posts: 10307
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Thicker Lines On Trace Bitmap

Postby brynn » Sun Jan 13, 2019 3:16 pm

Sorry I wasn't here today. I'm on Windows 7 64-bit and using Inkscape 0.92.3. I don't think you need to install all that extra stuff which is outlined in the PDF file. Just use these: https://inkscape.org/learn/faq/#how-ins ... n-sets-etc or the instructions on this page: https://forum.inkscapecommunity.com/index.php.

Yes, I get the exact same result as you do, with the sketch-like dog image. The problem is that apparently the centerline trace extension is having a hard time identifying a center line. I'm not sure if it's the non-smooth outer edges, or the variation of multiple shades of gray (like in the spine of the dog).

You could try processing the sketch-like image with a raster editor, and make it solid black. That would at least give us a clue if the shades of gray are part of the problem. Actually, I think I might know how to do that, so I'll try it, and be right back.

User avatar
brynn
Posts: 10307
Joined: Wed Sep 26, 2007 4:34 pm
Location: western USA
Contact:

Re: Thicker Lines On Trace Bitmap

Postby brynn » Sun Jan 13, 2019 3:53 pm

Yes, that gave a much more expected result. Not perfect by any means, but close enough that you could fix the problems relatively quickly.

I should note that the centerline trace engine is not designed to work with sketches, and that's probably why you see the weird results. I was only guessing that it might work. But at least now you know you can make that type of image a solid color, and you'll get better results.

Or if you want a variable width line, for example, where the sketch is lightest it would have the thinnest line and darkest would have the widest lines, you might want to hand trace and use the Powerstroke LPE (which is applied automatically with Pen or Pencil tool in Triangle In or Triangle Out shapes). You'd still have to tweak the lines after you draw them, but that sounds like a much nicer result to me.

Edit
Oops, just re-read your original message. I don't think the variable width lines would work with videoscribe. I don't know for sure though.


Return to “General Discussions”

Who is online

Users browsing this forum: No registered users and 1 guest