I have a processed captcha image(Enlarged) look like :
As you can see, the font-size of the \"TEXT\
You could use your own dilate and erode functions, wich will remove the smallest lines. A nice implementation can be found here.