richardoneill.com.au » Articles » Background Noise in CAPTCHAS

Background Noise in CAPTCHAS

28 August 2007 PHP, Programming, Security, Web Design

One thing I keep noticing is the use of background noise or clutter in CAPTCHAS. It's now well known in the OCR (Optical Character recognition) field that background noise can be easily removed by computers. It's basically useless at hindering spam bots.

It's so easy that I was able to clean the following CAPTCHA up in only 20 lines of PHP code.

CAPTCHA

Here's how...

At a glance, you can see the CAPTCHA's background noise has a blue tint. CAPTCHA RGBLooking at the RGB value of the image in Photoshop, I can see that all parts of the background have a blue value higher than 180.

That's the only piece of information needed to remove the background.

The code simply loops through every pixel of the image and checks the RGB value of it. If the blue (B) value is higher than 180, color it white.

Here's the final image. The characters can now be easily separated and identified using OCR software.

CAPTCHA

So you can see why most background noise is basically useless in CAPTCHAS.

Mike

I heard rumor that the hotmail captchas had been cracked.. which seems like th beginning of the end for captchas all together. Anyone heard any truth to this?

Avidan The Sane

This is true. these were first used in the military web for some kind of confirmation. Capcha sites are now shutting down everywhere. Capchas are done for.

Comment on this article
Name
Website
Canberra Web Design