@Reference(type=Inproceedings, author={"Epshtein, B.","Ofek, E.","Wexler, Y."}, title="Detecting text in natural scenes with stroke width transform", year="2010", booktitle="Computer Vision and Pattern Recognition (CVPR), 2010 IEEE Conference on", pages={"2963","2970"}, customData={"keywords","image processing;text analysis;image operator;image pixel;natural images;natural scenes;stroke width transform;text detection;Colored noise;Computer vision;Engines;Filter bank;Geometry;Image segmentation;Layout;Optical character recognition software;Pixel;Robustness","doi","10.1109/CVPR.2010.5540041","ISSN","1063-6919"}) public class SWTTextDetector extends Object implements ImageAnalyser<FImage>
This is a (relatively) high-performance text detection technique that does not require training (except for parameter setting) and is language independent. The algorithm automatically identifies individual characters ("letters"), as well as performing word grouping and line segmentation.
There is an implicit assumption in this implementation that the text is *almost* horizontal. This implementation cannot be considered to be rotation invariant. It also has difficulties with curved text.
Modifier and Type | Class and Description |
---|---|
static class |
SWTTextDetector.Direction
Text search "directions": Dark text on a lighter background, light text
on a dark background and both.
|
static class |
SWTTextDetector.Options
Options for controlling the
SWTTextDetector . |
Modifier and Type | Field and Description |
---|---|
protected SWTTextDetector.Options |
options
The parameters of the algorithm
|
Constructor and Description |
---|
SWTTextDetector()
Construct the
SWTTextDetector with the default parameters. |
SWTTextDetector(SWTTextDetector.Options options)
Construct the
SWTTextDetector with the given parameters. |
Modifier and Type | Method and Description |
---|---|
void |
analyseImage(FImage image)
Analyse an image.
|
protected void |
analyseImage(FImage image,
FImage swt) |
List<LetterCandidate> |
getLetters()
Get the unfiltered detected characters.
|
List<LineCandidate> |
getLines()
Get the detected candidate lines of text
|
SWTTextDetector.Options |
getOptions()
Get the current options.
|
protected SWTTextDetector.Options options
public SWTTextDetector()
SWTTextDetector
with the default parameters.public SWTTextDetector(SWTTextDetector.Options options)
SWTTextDetector
with the given parameters.options
- the parameterspublic SWTTextDetector.Options getOptions()
public void analyseImage(FImage image)
ImageAnalyser
analyseImage
in interface ImageAnalyser<FImage>
image
- The image to process in place.protected void analyseImage(FImage image, FImage swt)
public List<LineCandidate> getLines()
public List<LetterCandidate> getLetters()
getLines()