How to get straight lines svg from Potrace

833 Views Asked by At

Given an greyscale image already skeletonized by skimage.morphology.skeletonize or the bool array obtained.

Original Image

I'm trying to get an exact replica of image the in svg using Lines or Bézier curve but "open".

So i tryed Potrace:

Potrace Image

Autotrace with centerline (good svg format but lost pixels):

autotrace -centerline -input-format bmp -output-format svg -output-file demo.bmp.svg demo.bmp

Autotrace centerline

Then Autotrace without centerline:

autotrace -input-format bmp -output-format svg -output-file demo.bmp.svg demo.bmp

Same like Potrace

Potrace show all details but use closed path on the svg, i'm looking for like the path obtained with Autotrace -centerline, so an open path (straight line) with all details (without loosing pixels). I played with Autotrace options without success.

0

There are 0 best solutions below