Convert image to line drawing (Draw)

I apologize in advance for badly explaining my request; I’m sure there are technical terms to use, but I don’t know them.

With LO Draw, I would like to convert an image of a physical part into a more block-ish, cartoon-y version of it. This is where those technical terms would come in handy. Is that “posterize” or some such?

The key here is that the resulting image has clearly delineated faces (especially if the source image is isometric).

For example, from this:

99781 image

… to something like this:

99781 BRACKET 1x2 - 1x2 (99781)

Obviously, the resulting image above is not exactly from the first image; I just used those as example. But the intent is that the shape of the part would be the same, just the look would be different.

I fiddled with the Image Effects, especially with the Image Color Mode, but couldn’t achieve what I wanted.

Thanks

Draw application has only the reverse conversion procedure: from vector graphic to pixel graphic.
It is not too easy to recognize the very similar shades as continuous contour lines.

I think you might need two other programs.
In the GIMP

  1. click Filters > Edge Detect > Edge select Algorithm *Sobel, Amount 2, Border behaviour Clamp and OK
  2. Click Colours > Invert
  3. Click Colours > Levels and under Input levels drag the White slider to the left of the right hand peaks to remove fuzzy artefacts, drag the black slider up to close to the White slider. When all looks OK click OK.
    You should have a bitmap image that looks a bit like a line drawing.
    EdgeDetect

In Inkscape

  1. Drag in the “line drawing” you just created
  2. Click Path > Trace Bitmap, in the dialogue select Centreline tracing (autotrace) and OK with defaults to see result. Click Update to render.
  3. you can separate and delete the bitmap from the image. Then select the path, click Edit > Resize page to selection OK and save as svg.
    The problem with this file is that it is not a line drawing, just stacked fills but it might look the part and will scale without problem. You can add line to it and change colour of line and fill in Draw
    EdgeDetected.odg (26.0 KB)
1 Like

Thanks for your instructions. GIMP gets me most of the way there; I can fudge the rest with Paint.NET to get close enough to my expectation. Lot of work though, seeing that I have hundreds to do. Will look into automation/scripting.

I would have thought that Paint.NET could do the initial edge detect, etc, I don’t have the program installed so cannot check. The Trace Bitmap can give a more cartoonish looking object by vaying the selections.

The resulting svg can be edited in Draw by selecting it, clicking Shape > Break then with it still selected, select a continuous line in the sidebar under Line and then you can alter colours.

Good luck with the scripting, I have done a little in Photoshop but not in other programs.