Replies: 8 comments 6 replies
-
I have had various prototypes I wrote many years ago lying around, with various degrees of success. So what does your input look like? |
Beta Was this translation helpful? Give feedback.
-
one approach is to first skeletonize the shape and then prune the tree until you get the central axis |
Beta Was this translation helpful? Give feedback.
-
Interesting, would you skeletonize before or after vectorization? I'm interesting in applying this to hand-drawn animation/cartoon images. The line quality is usually very good (see attached), but there a cases where the drawing is done with a thicker pencil which could make it harder. But even getting centerline tracing on an image like this would be huge... |
Beta Was this translation helpful? Give feedback.
-
the skeleton does not have to be perfect to begin with, it just needs to tell us the topology roughly the above "rough" algorithm was included in https://docs.rs/visioncortex/latest/visioncortex/struct.BinaryImage.html#method.to_skeleton but it would fall short when the line is very thick: |
Beta Was this translation helpful? Give feedback.
-
I see you, the thickness of your lines are very manageable! |
Beta Was this translation helpful? Give feedback.
-
One thing I did was to first detect all junction (or intersections) and then decompose the shapes into simplier patches before skeletonizing |
Beta Was this translation helpful? Give feedback.
-
Sorry, forgot to respond here. How are you using the intersections? Not sure I follow this:
I do think making the problem simpler with junction detection is a fruitful approach, but it seems like your output here has gaps in the junctions |
Beta Was this translation helpful? Give feedback.
-
As a general approach, why not start with the paths and reduce them down into pencil strokes, eg: https://www.youtube.com/watch?v=tEZF7Fo6Fpg |
Beta Was this translation helpful? Give feedback.
-
It's listed on the readme that "Pencil tracing" (i.e. centerline tracing) is on the roadmap. I'm working on a project where this could be super valuable and might be able to contribute to the development/discussion.
But where to even start? Aside from Autotrace and a few SIGGRAPH papers I haven't seen much work in this area. It would be great if someone with experience here could summarize the common approaches or provide some direction.
Beta Was this translation helpful? Give feedback.
All reactions