thinr: Binary Image Thinning Algorithms

Thinning (skeletonization) algorithms for binary raster images. Provides seven algorithms behind a single dispatching function: Zhang-Suen (Zhang and Suen 1984) <doi:10.1145/357994.358023>, Guo-Hall (Guo and Hall 1989) <doi:10.1145/62065.62074>, a 2-D adaptation of Lee (Lee, Kashyap, and Chu 1994) <doi:10.1006/cgip.1994.1042>, K3M (Saeed, Tabedzki, Rybnik, and Adamski 2010) <doi:10.2478/v10006-010-0024-4>, the parallel form commonly attributed to Hilditch (1969, in 'Machine Intelligence 4'), OPTA / SPTA (Naccache and Shinghal 1984), and Holt and colleagues (1987) <doi:10.1145/12527.12531>. Also provides the medial axis transform (Blum 1967) and a distance transform implementation following Felzenszwalb and Huttenlocher (2012) <doi:10.4086/toc.2012.v008a019>. The drop-in thinImage() matches the signature of thinImage() in the 'EBImage' package on Bioconductor so existing code can switch parsers without changes. The wider thin() API selects the algorithm by name.

Version: 0.2.0
Depends: R (≥ 4.2)
Imports: Rcpp
LinkingTo: Rcpp
Suggests: bench, covr, knitr, lintr, rmarkdown, styler, testthat (≥ 3.0.0)
Published: 2026-05-27
DOI: 10.32614/CRAN.package.thinr (may not be active yet)
Author: Bill Denney ORCID iD [aut, cre] (affiliation: Human Predictions, LLC)
Maintainer: Bill Denney <wdenney at humanpredictions.com>
BugReports: https://github.com/humanpred/thinr/issues
License: LGPL-3
URL: https://github.com/humanpred/thinr, https://humanpred.github.io/thinr/
NeedsCompilation: yes
Materials: README, NEWS
CRAN checks: thinr results

Documentation:

Reference manual: thinr.html , thinr.pdf
Vignettes: Choosing a thinning method (source, R code)

Downloads:

Package source: thinr_0.2.0.tar.gz
Windows binaries: r-devel: not available, r-release: thinr_0.2.0.zip, r-oldrel: thinr_0.2.0.zip
macOS binaries: r-release (arm64): thinr_0.2.0.tgz, r-oldrel (arm64): thinr_0.2.0.tgz, r-release (x86_64): thinr_0.2.0.tgz, r-oldrel (x86_64): thinr_0.2.0.tgz

Linking:

Please use the canonical form https://CRAN.R-project.org/package=thinr to link to this page.