12,398,000 members (47,637 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.

Thank you!
Posted 29-May-12 11:07am

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

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

Top Experts
Last 24hrsThis month
 OriginalGriff 380 Richard Deeming 244 Richard MacCutchan 200 Karthik Bangalore 190 ppolymorphe 100
 OriginalGriff 6,508 Karthik Bangalore 2,572 ppolymorphe 2,540 F-ES Sitecore 1,977 Richard MacCutchan 1,952