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.