• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

linbojin/Skeletonization-by-Zhang-Suen-Thinning-Algorithm: Skeletonization by Zh ...

原作者: [db:作者] 来自: 网络 收藏 邀请

开源软件名称(OpenSource Name):

linbojin/Skeletonization-by-Zhang-Suen-Thinning-Algorithm

开源软件地址(OpenSource Url):

https://github.com/linbojin/Skeletonization-by-Zhang-Suen-Thinning-Algorithm

开源编程语言(OpenSource Language):

Python 58.5%

开源软件介绍(OpenSource Introduction):

Zhang-Suen Thinning Algorithm, Python and Matlab Implementation

Algorithm Description:

This algorithm is used for thinning binary image. Two steps will be successively applied to the image.
Here arrange the eight neighbors of P1 in a clockwise order:

 P9 P2 P3 
 P8 P1 P4 
 p7 P6 P5 

Define N(P1) = the number of non-zore pixel neighbours of P1 ( = sum(P2 .. P9) )
Define S(P1) = the number of transitions from 0 to 1, (0 -> 1) in the sequence P2,P3,...,P8,P9,P2.

Step 1:

All pixels are tested and pixels satisfying all the following conditions (simultaneously) are just noted at this stage. After iterating over the image and collecting all the pixels satisfying all step 1 conditions, all these noted pixels are set to 0.

Condition 0: The pixel is 1 and has eight neighbours 
Condition 1: 2 < = N(P1) < = 6 
Condition 2: S(P1) = 1
Condition 3: P2 * P4 * P6 = 0 
Condition 4: P4 * P6 * P8 = 0 

Step 2:

All pixels are again tested and pixels satisfying all the following conditions are just noted at this stage. After iterating over the image and collecting all the pixels satisfying all step 2 conditions, all these noted pixels are again set to 0.

Condition 0: The pixel is 1 and has eight neighbours 
Condition 1: 2 < = N(P1) < = 6  
Condition 2: S(P1) = 1   
Condition 3: P2 * P4 * P8 = 0   
Condition 4: P2 * P6 * P8 = 0   

Iteration:

If any pixels were set in this round of either step 1 or step 2 then all steps are repeated until no image pixels are so changed. The last thing to note for this algorithm is that in each step the deletion of the noted points must be delayed until all the pixels of the image have been visited in order to avoid changing of pixels of the image during each step.

Reference:

Page48-50, "Character Recognition Systems: A Guide for Students and Practitioners" By Mohamed Cheriet, Nawwaf Kharma, Cheng-Lin Liu, Ching Suen

Implement Results:

Testing Environment:
Python 2.7 (scikit-image + matplotlib)
Matlab 2012

image image image




鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap