// the find
LingDong-/skeleton-tracing
A new algorithm for retrieving topological skeleton as a set of polylines from binary images
A divide-and-conquer algorithm that converts skeletonized binary images into polylines (arrays of x,y coordinates) rather than raster output. It ships implementations in 14 languages, from C to Julia, so you can drop it into almost any existing pipeline. The sweet spot is creative coding and computer vision work where you need strokes you can manipulate, not just thin pixel maps.
The core algorithm is genuinely novel — the recursive splitting approach is parallelizable in a way traditional thinning isn't, and the C implementation hits 1316 FPS on a 300x149 image. The multi-language coverage is real, not token implementations: Go and Rust have their own idiomatic versions with parallelism, not just SWIG wrappers. The README walks through the algorithm step by step with enough detail that you could port it yourself if your language isn't listed. Performance benchmarks are honest and include unflattering numbers (Python is 1000x slower than C, and they say so).
Last commit was 2022 and the issue tracker has unresolved edge cases around junction handling — complex intersections with 4+ branches can produce fragmented polylines instead of a clean crossroad. The algorithm still requires a raster skeletonization pass first (Zhang-Suen is bundled), and that thinning step often takes longer than the tracing itself, which limits how much the parallelism actually helps end-to-end. Compiled binaries (`a.out`) are checked into the repo, which is sloppy. The C# implementation benchmarks at 17% of C speed tested inside Unity, not as a standalone library, so those numbers are not directly comparable.