细化算法 [英] algorithm for thinning

查看:101
本文介绍了细化算法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨 任何人都可以给我一个使用C#/C ++中的OpenCV或不使用OpenCV进行细化(骨架化)算法的示例. 需要一种仅留下一个像素宽的字母或单词的算法.
有人可以帮我吗?

谢谢!

解决方案

当心,细化不等于侵蚀!您可以在此处找到有关减薄的好文章:稀疏算法 [ http://www.artuxsoft.com [ ^ ]
http: //www.artuxsoft.com/image-erosion.aspx [ ^ ]

问候.


您可以先使用距离变换(使用国际象棋棋盘距离度量标准,看起来不错.),然后在图像上找到最小的距离点,这将是您想要的骨骼. :)

另请参见: http://homepages.inf.ed.ac.uk/rbf/HIPR2/distance.htm [^ ]

jkchan
http://cgmath.blogspot.com


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!

解决方案

Beware, thinning is not equal to erosion! You find a good article about thinning here: Thinning Algorithm[^]


Please try this:

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.


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. :)

see also this : http://homepages.inf.ed.ac.uk/rbf/HIPR2/distance.htm[^]

jkchan
http://cgmath.blogspot.com


这篇关于细化算法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆