fablabnbg / inkscape-centerline-trace

A bitmap vectorizer that can trace along the centerline of a stroke. The builtin inkscape 'trace bitmap' can only trace edges, thus resulting in double lines for most basic use cases. It uses 'autotrace -centerline' and an optimal threshold to vectorize a pixel image.
https://github.com/fablabnbg/inkscape-centerline-trace/releases
GNU General Public License v2.0
243 stars 33 forks source link

Sometimes the created path is dislocated #11

Open unfa opened 7 years ago

unfa commented 7 years ago

Sometimes when I trace an image with centerline-trace, the resulting path is created not in the same location as my source bitmap, but somewhere else, usually close tho the origin (0,0) of the page.

It seems to be pretty random, I wasn't able to find any pattern there yet.

PS: Thank you so much for this tool, it saves me a lot of work. I design shapes the are then CNC-milled in metal and casted with plastic to produce various promotional gadgets, centerline-trace allows me to easily prepare the shapes for milling.

jnweiger commented 7 years ago

Please add an example bitmap where that errpr happens for you. Thanks.

Moini commented 7 years ago

Also, please add an example svg and tell us which Inkscape version you are using. Is it 0.91, by any chance? Then the famous layer-transform issue could be a reason.

jnweiger commented 6 years ago

I had this with 0.92.3 recently during a workshop. but I was unable to save the graphics. Very strange. In my case it was as far left of the X-Axis as it should have been right of the x-axis. Maybe the path was even mirror imaged.

jnweiger commented 6 years ago

inkscape-centerline-trace does not parse any scale, offset, or translation matrix of the image. This asks for code.enhancement.

Moini commented 6 years ago

Imported pdfs could be a possible cause, they seem to mess with the coordinate system, in my experience.

jnweiger commented 6 years ago

Reproduce: import a PNG file, mirror <-> the file, then try inkscape-centerline-trace. The created path will be at negative x coordinates and mirrored.