3

Using pen and paper I drew a castle (monochrome, only lines, no fillings, no gradients, no pen pressure differences), then scanned it and vectorized it with Trace Bitmap in Inkscape:

enter image description here

I want to reduce the number of nodes to make the drawing look smoother and easier to edit. Here is a detail showing how not-smooth my hand-drawing is: enter image description here

I thought Path>Simplify would work but unfortunately it simplifies too much and creates black areas that feel unnatural for a pen-drawn line drawing:

enter image description here

Is there another feature I could use, which would make the lines smoother? Ideally the tool would understand what a pen-drawn line is, and use that knowledge to maintain consistent line widths.

I use Inkscape but I can also use any other free tool available on Linux.

5

You could use the centerline trace extension available from here: https://github.com/fablabnbg/inkscape-centerline-trace to trace your scanned image in Inkscape.

Or you could set the simplifying threshold in the settings: Edit > Preferences > Behavior : Simplification threshold.

Inkscape centerline trace

Applied to the question's line drawing:

enter image description here

The transformation takes about 10 seconds. As you can see, the tool understands the concept of pen lines, and does not create the kind of dark areas that Simplify generates. It makes the drawing easy to modify manually. Be sure to adjust the Median filter until you obtain a good result.

3

You could trace the drawing manually using the Bézier tool (aka the Pen tool), then you would be able to control the number of nodes precisely. A tool with a human at the other end is the only kind of tool I know that understands anything about pen-drawn lines.

If you want something fully automated, you already tried that. Other software like Illustrator is similar. It's similar Auto Trace functionality produces lots of anchors. Simplifying or even reducing the number of paths/corner in the Auto Trace distorts the image similarly.

  • 1
    I agree, there's no one-click solution. But I'm wondering why you have to vectorize the drawing? When I work with line-art I often make a 1-bit 1200 ppi version of the drawing which will look as crisp as vector on print. But of course not as easy to work with. – Wolff Mar 10 at 12:00
  • @Wolff - yes, I agree totally. Why vectorise at all if you have a good enough scan. – Billy Kerr Mar 10 at 12:01
  • @Wolff: I need vector because I must correct a few things, for instance align the French garden a bit better, and remove a tower. – Nicolas Raoul Mar 10 at 12:25
  • @NicolasRaoul - if that's the case, then manual tracing would work best for that. – Billy Kerr Mar 10 at 12:27
  • @BillyKerr and should take less than a hour – joojaa Mar 10 at 19:42
1

I agree with others. You will get superior results if you take the pen tool and redraw your image. Have the scanned image in the bottom. Remember to lock it in the objects panel and draw different things with different colors to be able to select them by the sameness. (=Edit > Select same > Stroke color) As well you can insert new layers.

Snapping will help to align coincident nodes perfectly and you can draw closed areas for easy coloring.

You can also fill areas with the paint bucket to create closed shapes for coloring, but that works only in screen resolution. You may now and then notice harmful gaps which require editing with the node tool or inserting a stroke to create some extra width.

With the pen at first click only straight lines:

enter image description here

Then pull the handles out of the nodes with the node tool, hold shift at the same time. Insert new nodes only if absolutely needed. You can move nodes with the same tool.

enter image description here

The snapping is your friend. Learn its options carefully. And turn it temporarily off, if it tries to place a new node too eagerly onto an old node.

I reduced the opacity of your image to make the handles of the inserted nodes better visible.

For the future: Pencil sketches are useful because the pencil does exactly what is ordered and it needs no electricity. Quite soon you will notice that pencil sketckes can be quite simple major idea and dimension outlines, if you add finer details in Inkscape.

If you can draw onto paper with a pen which makes solid black strokes, you can use the scanned images as bitmap (as said already by others). They can be edited in bitmap editors such as GIMP. You can also insert data to them in Inkscape, but edits there are a little complex. You must insert covers to hide some totally wrong part.

Inkscape Centerline Tracing: I haven't got the suggested program to work. I suspect the fault is between my ears, so do not let that be a reason to skip it. I have used some stroke tracing capable programs, but they have been Win-only. None of them had made usable results from blurry and vague pencil sketches. As an opposite some of them succeeded pretty well with scanned solid black line technical drawings which are scanned in high resolution without JPG compression and had only circular arcs and straight lines. Unfortunately quite much editing was still needed. Just for curios readers I mention a few the tryouts:

  • Adobe Illustrator
  • Vextractor (guesses 90 degrees angles and circular arcs if wanted)
  • WinTopo (has also a free version)

There exists several online bitmap tracers. Beware: some of them want your image, so read the terms before. I have tried only free services. Most of them seem at best do the same as Inkscape. One of them did also centerline tracing. It was: https://online.rapidresizer.com/tracer.php There can be others, too.

The linked service performed well with solid lines. I haven't tried it with scanned pencil drawings. With solid lines it met difficulties at crossings. There it made non-existent doglegs. They can be avoided by erasing the crossing in a bitmap image editor and redrawing it after tracing in Inkscape. As well one could edit the extras off manually from the scanning result. Neither method gained substantial work savings.

One trick is left:

Remove in Inkscape the fill of the tracing result and insert a thin stroke. Then split the curves at the ends. Delete the unwanted half. If you have a ring, goto Path > Break Apart and delete the hole shape.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.