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.
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.
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.
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.
Please check some thinning implementations in my blog:
Both using OpenCV 2.x API.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With