谁能描述我如何在 python 中使用 opencv 或 simplecv 实现 SWT?
Can anyone describe how can i implement SWT in python using opencv or simplecv ?
好的,就这样吧:
底部有代码下载链接的实现细节链接:SWT
The link that has details on the implementation with the code download link at the bottom: SWT
为了完整起见,还提到 SWT 或 Stroke Width Transform 是 Epshtein 和其他人在 2010 年设计的,并且已证明是迄今为止最成功的文本检测方法之一.它不使用机器学习或复杂的测试.基本上在对输入图像进行 Canny 边缘检测之后,它会计算构成图像中对象的每个笔划的粗细.由于文本的笔画粗细一致,这可能是一种强大的识别功能.
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.
链接中给出的实现是使用 C++、OpenCV 和 Boost 库,它们用于连接图遍历等.计算 SWT 步骤.我个人已经在 Ubuntu 上对其进行了测试,它工作得很好(而且效率很高),尽管准确度并不准确.
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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!