Hi, I am trying to write a module that can crack a fairly simple captcha. The one I am focusing on to start with is http://captchas.net/ a grainy monochrome captcha where the individual letters are slightly rotated. I've found a way to download hundreds of different images of the same captcha text. i.e. different images but same text. The plan is to use imagemagick to clean up the image and then train gocr to convert it to text. Do this 500 times check which is the most popular answer gocr has given me and then send it back to the registration script. The problem I'm having is cleaning the image. The best I can do at present is: system 'convert ' + $capfile + ' -paint 0.01 -paint 0.01 -paint 0.01 -paint 0.01 -paint 0.01 -paint 0.01 -quality 100 -shave 40x20 ' + $capfile This removes the background blocks up the text and trims the borders. But it isn't perfect by any means and when I start to train gocr even I can't guess what letters like e and a are because they've had the middles filled in. I've read about the threshold command but can't seem to get it to work. Is there any other image magick commands that could help clean up this file? I've read the post at bluehatseo and some other ones on the net but still can't find a way to really clean up the image. If some one could give me a little shove in the right direction I'd be very grateful.