12,757,627 members (42,268 online)
Rate this:
See more:
hi
anyone could give me an example of an algorithm for thinning (skeletonization) using OpenCV in C # / C + + or without OpenCV.?
need an algorithm that leave a letter or word with only one pixel wide.
Please can someone help me?

Thank you!
Posted 29-May-12 12:07pm

Rate this:

## Solution 2

Beware, thinning is not equal to erosion! You find a good article about thinning here: Thinning Algorithm[^]
stib_markc 30-May-12 4:57am

5! for the link.
nv3 30-May-12 5:02am

Thanks!
Rate this:

## Solution 1

This is a morphological image processing. As an example of algorithm:
Iteratively delete (or erode) pixels inside the object (letter) to shrink it without shortening it or breaking it apart. Note that this is an iterative process. In general, you may stop the iteration after several times. Iterate it 3-5 times gives good and fast result.

You may find third party for this kind of image processing. The following thir party has that function.
http://www.artuxsoft.com[^]
http://www.artuxsoft.com/image-erosion.aspx[^]

Regards.
Rate this:

## Solution 3

you can use distance transform(with chessborad distance metric,seems good.) first, then find the minimum distance points on the image which is will be the skeleton that you want. :)

jkchan
http://cgmath.blogspot.com
Rate this:

## Solution 4

Here is an overview See weather this help[^]

This will give an overview

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Top Experts
Last 24hrsThis month
 Graeme_Grant 526 Karthik Bangalore 194 Jochen Arndt 175 Richard Deeming 120 Er. Puneet Goel 105
 OriginalGriff 4,157 Peter Leow 3,209 Karthik Bangalore 2,529 ppolymorphe 2,524 Graeme_Grant 2,251

Advertise | Privacy | Mobile
Web02 | 2.8.170217.1 | Last Updated 30 May 2012