jankovicsandras / imagetracerjs

Simple raster image tracer and vectorizer written in JavaScript.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Nice work! and some discussions on algorithm

tyt2y3 opened this issue · comments

Coincidentally I have also done the same thing, with same ideas except 2. Layer separation and 5. Tracing
You can find our work here visioncortex/vtracer

We used a hierarchical clustering technique such that when tracing photos, the layers are without holes.
And that the tracing step is less greedy. Note that the smile on the smiley face is not left-right symmetrical. I think it depends on the starting condition. To compare, Potrace uses a global optimization over the whole path.

Hi Chris,

Thanks for contacting me. VTracer looks great, congratulations to the whole group! I just skimmed the algorithm (didn't have much time), but it looks much more advanced than Imagetracer. Angle based splice points, cubic splines are ideas I wish to adapt.

Yes, I'm aware of the assymetrical smiley. I plan to have an option in the next version about the path walking direction, because everything is ClockWise now. I think a choice of CW, CCW and average CW+CCW would help with this.

There are many other limitations of Imagetracer, I plan to write documentation of these, but I never have enough time. :)
Some of these limitations can and will be fixed, but I aim to keep Imagetracer very simple, sometimes optimizing for simplicity and ease of use instead of precision.

First of all thank you.

Well I think yes it depends on CW/CCW direction and the starting condition. If you do that, I think the starting point should also moves from top left to top right. It should then be perfectly left-right symetric (but not top down?).

Keep up the nice work =)