Captcha testing
Warped captchas can be simply “unwarped” by removing the curvature of lines about both the axes.
Grid lines (which are now nearly horizontal/vertical) can be removed in a similar fashion by following them from the end to end. Since a grid line can be thicker than one pixel, a maximum thickness has to be defined in order to remove thicker lines while preserving the lettering.
The remaining noise is removed by thresholding contours by a minimum area.