Binary image thinning (skeletonization) algorithms for R. Designed as a drop-in replacement for EBImage::thinImage() with additional algorithms behind a single dispatching function.
Installation
# Once on CRAN:
# install.packages("thinr")
# From GitHub:
# install.packages("remotes")
remotes::install_github("humanpred/thinr")Algorithms
| Method | Status (v0.2) | Notes |
|---|---|---|
zhang_suen |
Full | Default; matches EBImage::thinImage(). |
guo_hall |
Full | Slightly better diagonal-corner preservation. |
lee |
Full (2-D) | Four directional sub-iterations; crossing-number Euler-invariance. |
k3m |
Full | Six-phase lookup-table thinning; strongest corner preservation. |
See vignette("choosing-a-method") for guidance.