SWT stands for Stroke Width Transform which is an algorithm often used for text detection in an OCR application.
Primarily two online resources have been particularly appealing to me due to its open source nature. Both implementations are C/C++ based.
TextDetection is a direct implementation of the original SWT algorithm published in a CVPR paper Detecting text in natural scenes with stroke width transform 1
The related resources can be found in the following web page:
Text Detection on Nokia N900 Using Stroke Width Transform
1). Extract the stroke width at every pixel
Main differences from the original work
- allowing the gradient directions to be up to 90 apart, instead of 30
- cannot detect light-on-dark and dark-on-light text simultaneously. Run twice to achieve the effect
- The original mentions some capacity for doing this, but it’s unclear how its done
Main difference
- original work seems to do some kind of tracing of the rays formed in the first stage
- height threshold of 300 pixels is discarded
- the ratio of the diameter of a component to its SW mean
3). Chaining
Main difference
- vastly different results from the paper!