笔画宽度变换 (SWT) 实现 (Python)

Stroke Width Transform (SWT) implementation (Python)(笔画宽度变换 (SWT) 实现 (Python))
本文介绍了笔画宽度变换 (SWT) 实现 (Python)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着跟版网的小编来一起学习吧!

问题描述

谁能描述我如何在 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)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!

本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!

相关文档推荐

Reading *.mhd/*.raw format in python(在 python 中读取 *.mhd/*.raw 格式)
Count number of cells in the image(计算图像中的单元格数)
How to detect paragraphs in a text document image for a non-consistent text structure in Python OpenCV(如何在 Python OpenCV 中检测文本文档图像中的段落是否存在不一致的文本结构)
How to get the coordinates of the bounding box in YOLO object detection?(YOLO物体检测中如何获取边界框的坐标?)
Divide an image into 5x5 blocks in python and compute histogram for each block(在 python 中将图像划分为 5x5 块并计算每个块的直方图)
Extract cow number from image(从图像中提取奶牛编号)