• Stars
    star
    138
  • Rank 264,508 (Top 6 %)
  • Language
    C++
  • Created over 11 years ago
  • Updated over 11 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Implementation of the Zhang-Suen thinning algorithm using OpenCV

Zhang-Suen Thinning

This is the implementation of the Zhang-Suen thinning algorithm using OpenCV. The algorithm is explained in "A fast parallel algorithm for thinning digital patterns" by T.Y. Zhang and C.Y. Suen. See the tutorial in opencv-code.com.

To use the thinning function, simply copy the thinning() and thinningIteration() function to your code. See the main() block for an example on how to use the function.

Both thinning.cpp and thinning.py are similar, except that the former written in C++ and the latter in Python.

Contact

Feel free to ask question and report bugs to nash [at] opencv-code [dot] com.

Credit

Many thanks for DG (dangets [at] gmail [dot] com) for the pointer access code for improving the speed.