mitxela / plotterfun

MIT License
328 stars 63 forks source link

Linedraw algorithm can't get the result #22

Open binchen1998 opened 2 years ago

binchen1998 commented 2 years ago

Hi, this is a great work that I like so much! Thanks for your work.

The problem is I have a bright image(a photo captured by camera and I adjust it to a very bright version, see attachment) input into the Lindraw algorithm, but get blank result.

I have tried original linedraw.py, it works fine. I attach the image file and the output of linedraw.py, please take a look.

Tuning the parameters makes no help.

Original image: test

linedraw.py output: 20211203141457

mitxela commented 2 years ago

There aren't many differences between the original algorithm and plotterfun version, the main difference is that plotterfun sometimes resizes the image. For some reason the thin lines are being ignored, if you zoom in the image it works (but this probably wasn't the result you're after): image I could possibly fiddle with the algorithm to work better in this situation, or try to figure out where the difference is from the original, but if you're trying to put through linedraw something that's already a line drawing, there are better tools available - inkscape's Trace Bitmap, for instance.