Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A fast thinning algorithm

Tags:

I'm looking for a fast thinning algorithm that can be readily implemented using OpenCV. The mention of the library is because there are certain things that can be done in a jiffy in say, Mathematica or MATLAB which would require lines of handcode in OpenCV+C.

The algorithm must satisfy the 1 pixel thickness and connectedness criteria.

Has anyone got any experience in implementing one of the tons of available algorithms out there? - Literally spoilt for choice at the sheer number of papers Google threw up. Any pointers in the right direction would do.

like image 798
AruniRC Avatar asked Nov 10 '11 13:11

AruniRC


People also ask

What is a thinning algorithm?

The thinning algorithms are used for creation the skeleton of an object. The thinned image consists of the lines one pixel wide. The thinning or skeletonization reduces the image complexity. The thinning process is widely used in vectorization based on the thinning methods.

What is thinning or Skeletonization algorithm?

A technique called distance-ordered homotopic thinning (DOHT) for skeletonizing 3D binary images is presented. DOHT produces skeletons that are homotopic, thin, and medial. This is achieved by sequentially deleting points in ascending distance order until no more can be safely deleted.

What is edge thinning in image processing?

Brief Description. Thinning is a morphological operation that is used to remove selected foreground pixels from binary images, somewhat like erosion or opening. It can be used for several applications, but is particularly useful for skeletonization.


1 Answers

Please check some thinning implementations in my blog:

  1. Zhang-Suen algorithm. (copy on archive.org)
  2. Guo-Hall algorithm. (copy on archive.org)

Both using OpenCV 2.x API.

like image 147
flowfree Avatar answered Oct 23 '22 02:10

flowfree