On Sat, Mar 31, 2012 at 6:48 PM, Tony Yu <tsyu80@gmail.com> wrote:
Have you tried the `open` and `close` operators? A morphological opening is just an erosion followed by a dilation and the closing is just the reverse (see e.g., the scikits-image docstrings). For an opening, the erosion would remove some of "salt" (white pixels) in the letters, and the dilation would (more-or-less) restore the letters to their original thickness. The closing would do the same for black pixels on the background. 

 I tried grey opening on sample image with both modules. Approach seems good and result is bit identical with both modules (footprint=square(3)), and I thought to comment on differences on both modules:

 - skimage requires converting data type to 'uint8' and won't accept anything less
 - ndimage grey opening is 3 times faster on my PC