Page 1 of 2

Captcha Breaking with PHP GD

PostPosted: Wed Aug 04, 2010 5:46 pm
by adlez
I have a captcha, all backgrounds are the same, all letters are in 40x40 circles. I'm able to filter out everything so that I have 5 cicles each containing a letter, I just am not sure how to detect where the circles are. So if any of you have any suggestions on how to detect each circle, any help is greatly appreaciated.

Re: Captcha Breaking with PHP GD

PostPosted: Wed Aug 04, 2010 11:08 pm
by tgoe
I'm able to filter out everything so that I have 5 cicles each containing a letter, I just am not sure how to detect where the circles are.


...doesn't make sense :?

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 12:00 am
by Assassian360
Could you perhaps show some example images?
That may help to give a clearer view of what you have got it to.

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 1:33 am
by adlez
Image

I'm trying to figure out how to seperate each of the 5 circles in order to compare them against the control letters.

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 1:41 am
by sanddbox
That captcha looks like a bitch. I doubt it's going to be easy to write a good image recognition program.

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 2:06 am
by adlez
It does have a few things that help.
Only one charset.
All circles are 40x40
Background is always the same.

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 11:13 am
by TheMindRapist
Is that the original image or the result of running your program? I'm guessing the latter. If so, can we see some example images of the originals please?

As far as splitting them up, if they are always spaced so evenly with little overlap you might just be able to cut the image into 5 pieces with 40px width, detecting where to start by looking for the first x value that has a black pixel somewhere along the x=value line.

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 2:25 pm
by adlez
Yes here is what the original image looks like.
Image

And thanks for that tip I will mess with it.

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 7:46 pm
by scoon1329
Or find the corresponding x value of the peak in y of each circle (as they don't overlap vertically) and cut at (x - 20) and (x + 20). Did that make sense, not sure it does when I read it back to myself...

Re: Captcha Breaking with PHP GD

PostPosted: Thu Aug 05, 2010 8:46 pm
by adlez
I think I sorta understand what you are saying. I just woke up so maybe it will be more clear shortly. And ah that does help. If I'm thinking this right, the first x,y it comes to should be the peak of the cicle, so I will mess around with it and see how that goes. Thanks for the help though.