行程宽度变换(SWT)实现(Python) [英] Stroke Width Transform (SWT) implementation (Python)

查看:2490
本文介绍了行程宽度变换(SWT)实现(Python)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

任何人都可以描述如何使用opencv或simplecv在python中实现SWT?

解决方案

p>

有关实施细节的链接,请使用底部的代码下载链接: SWT



为了完整起见,还提到SWT或笔划宽度变换是由Epshtein和其他人在2010年设计的,一种最成功的文本检测方法直到日期。它不使用机器学习或精心测试。基本上在输入图像上的Canny边缘检测之后,它计算组成图像中的对象的每个笔划的粗细。



链接中给出的实现是使用C ++,OpenCV和Boost 库,它们用于连接图遍历等,在计算SWT步骤之后。个人我已经在Ubuntu上测试它,它的工作相当好(和有效),虽然准确性不确切。


Can anyone describe how can i implement SWT in python using opencv or simplecv ?

解决方案

Ok so here goes:

The link that has details on the implementation with the code download link at the bottom: SWT

For the sake of completeness, also mentioning that SWT or Stroke Width Transform was devised by Epshtein and others in 2010 and has turned out to be one of the most successful text detection methods til date. It does not use machine learning or elaborate tests. Basically after Canny edge detection on the input image, it calculates the thickness of each stroke that makes up objects in the image. As text has uniformly thick strokes, this can be a robust identifying feature.

The implementation given in the link is using C++, OpenCV and the Boost library they use for the connected graph traversals etc. after the SWT step is computed. Personally I've tested it on Ubuntu and it works quite well (and efficiently), though the accuracy is not exact.

这篇关于行程宽度变换(SWT)实现(Python)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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