Thursday, June 19, 2014

Text segmentation

Stroke Width Transform

I compared three implementations of Stroke Width Transform.

1- The version Jue's matlab implementation uses from bresenham_swt.m
This version is designed for black and white images; so running them on grayscale images is irrelevant.

2- A version provided by a few Cornell students
http://stackoverflow.com/questions/4837124/stroke-width-transform-swt-implementation-java-c
This work is quick to run and provides very little false positives. However, a portion of true positive letters are also missed.

3- A version from CCV library
http://libccv.org/doc/doc-swt/
I don't suggest this library. It is hard to install but it does not provide a proper output.

You can see the results here. Because Jue's matlab implementation for swt was slow I ran it on only a few images.
https://dl.dropboxusercontent.com/u/20022261/reports/stroke_width_transform_benchmark.html

Using bounding-boxes to improve text segmentation

I applied some heuristics on our text-boxe annotations to segment out the text. I first determine whether the text is dark on light background or light on dark background. Then I do k-means on pixels with two components to get foreground and background.

Here are the results:
https://dl.dropboxusercontent.com/u/20022261/reports/text_foreground_benchmark.html

Next Steps

We planned to:
1- Use Jue's bounding boxes instead of annotation as the starting point for text segmentation.
2- Visualize the output on images
3- Use the output to determine which superpixels belong to text

No comments:

Post a Comment