12,078,370 members (48,146 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 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

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
 Richard MacCutchan 400 Dave Kreskowiak 315 Richard Deeming 280 CHill60 200 OriginalGriff 175
 Dave Kreskowiak 3,151 OriginalGriff 3,070 Richard MacCutchan 2,574 CPallini 1,772 CHill60 1,579