16

I recently discovered the stroke width transform, as documented in the following research paper:

The algorithm is intended for detecting and extracting text from natural scenes.

However, I could not find any implementation, and from the paper I find it hard to determine all the details regarding the algorithm so I can implement it in practice. Does anyone know if this algorithm is implemented and used in practice in a system? Is there a C# or Java implementation of it?

Anshuman Kumar
  • 464
  • 1
  • 6
  • 20
user496607
  • 442
  • 1
  • 10
  • 21
  • Matlab implementation using C++ mex file can be found in [this answer](http://stackoverflow.com/a/19971599/1714410). – Shai Nov 14 '13 at 07:08
  • 2
    The link to the paper is broken. Can you include a full citation, including the title of the paper and the authors of the paper and where it was published, so we can find it again in the future? Now there is no clear way to identify which paper you are talking about. – D.W. Dec 09 '13 at 00:38

2 Answers2

27

My friend Andrew and I implemented Stoke Width Transform (SWT) on a mobile phone during a class project at Cornell. Maybe you can get hint from the report.

The report: http://www.cs.cornell.edu/courses/cs4670/2010fa/projects/final/results/group_of_arp86_sk2357/Writeup.pdf

Our code: https://sites.google.com/site/roboticssaurav/strokewidthnokia

Updated code: https://github.com/aperrau/DetectText

D.W.
  • 3,382
  • 7
  • 44
  • 110
Saurav Kumar
  • 286
  • 4
  • 3
  • 3
    Code and other related work are available here : https://sites.google.com/site/roboticssaurav/strokewidthnokia . Regards, Saurav Kumar – Saurav Kumar Apr 23 '11 at 08:56
  • 2
    The intent of this site is to be as content-independent as it can be. Please don't post answers consisting only in a link. And a link to your own blog is almost always considered spam if it is the only thing in the answer – Dr. belisarius Apr 25 '11 at 03:31
  • 1
    @above: the report explains the implementation pretty well, including shortfalls in the Epshtein paper. For our own program, where SWT was needed, we used the distance transform to get the stroke thickness. – AruniRC Aug 03 '11 at 13:14
7

Here is code that does what you asked for: http://libccv.org/doc/doc-swt/

Other projects that are relevant:

gongsun
  • 534
  • 7
  • 18
mrgloom
  • 20,061
  • 36
  • 171
  • 301
  • 1
    I think it is crossplatform, you just need to compile it in windows :) – mrgloom Jul 19 '12 at 12:00
  • Nah, tried it. It uses many C99+ features (not yet supported in Visual Studio 2010 SP1), plus includes UNIX only headers. – Yeti Jul 19 '12 at 16:12
  • @Yeti you can get even more https://www.google.com/search?q=text+detection+in+images http://funkybee.narod.ru/ http://sourceforge.net/projects/tirg/ – mrgloom Aug 10 '12 at 09:25