Captcha Breaking with PHP GD

For the discussion of Perl, Python, Ruby, and PHP and other interpreted languages.

Captcha Breaking with PHP GD

Post by adlez on Wed Aug 04, 2010 5:46 pm
([msg=43266]see Captcha Breaking with PHP GD[/msg])

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.
adlez
New User
New User
 
Posts: 9
Joined: Wed Aug 04, 2010 5:43 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by tgoe on Wed Aug 04, 2010 11:08 pm
([msg=43278]see Re: Captcha Breaking with PHP GD[/msg])

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 :?
User avatar
tgoe
Contributor
Contributor
 
Posts: 718
Joined: Sun Sep 28, 2008 2:33 pm
Location: q3dm7
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by Assassian360 on Thu Aug 05, 2010 12:00 am
([msg=43284]see Re: Captcha Breaking with PHP GD[/msg])

Could you perhaps show some example images?
That may help to give a clearer view of what you have got it to.
Assassian360
Poster
Poster
 
Posts: 135
Joined: Sat Jun 26, 2010 1:37 am
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by adlez on Thu Aug 05, 2010 1:33 am
([msg=43293]see Re: Captcha Breaking with PHP GD[/msg])

Image

I'm trying to figure out how to seperate each of the 5 circles in order to compare them against the control letters.
adlez
New User
New User
 
Posts: 9
Joined: Wed Aug 04, 2010 5:43 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by sanddbox on Thu Aug 05, 2010 1:41 am
([msg=43294]see Re: Captcha Breaking with PHP GD[/msg])

That captcha looks like a bitch. I doubt it's going to be easy to write a good image recognition program.
Image

HTS User Composition:
95% Male
4.98% Female
.01% Monica
.01% Goat
User avatar
sanddbox
Expert
Expert
 
Posts: 2344
Joined: Sat Jul 04, 2009 5:20 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by adlez on Thu Aug 05, 2010 2:06 am
([msg=43296]see Re: Captcha Breaking with PHP GD[/msg])

It does have a few things that help.
Only one charset.
All circles are 40x40
Background is always the same.
adlez
New User
New User
 
Posts: 9
Joined: Wed Aug 04, 2010 5:43 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by TheMindRapist on Thu Aug 05, 2010 11:13 am
([msg=43309]see Re: Captcha Breaking with PHP GD[/msg])

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.
Image
User avatar
TheMindRapist
Contributor
Contributor
 
Posts: 585
Joined: Mon Apr 14, 2008 4:57 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by adlez on Thu Aug 05, 2010 2:25 pm
([msg=43316]see Re: Captcha Breaking with PHP GD[/msg])

Yes here is what the original image looks like.
Image

And thanks for that tip I will mess with it.
adlez
New User
New User
 
Posts: 9
Joined: Wed Aug 04, 2010 5:43 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by scoon1329 on Thu Aug 05, 2010 7:46 pm
([msg=43318]see Re: Captcha Breaking with PHP GD[/msg])

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...
scoon1329
New User
New User
 
Posts: 12
Joined: Mon Jun 14, 2010 12:03 pm
Blog: View Blog (0)


Re: Captcha Breaking with PHP GD

Post by adlez on Thu Aug 05, 2010 8:46 pm
([msg=43319]see Re: Captcha Breaking with PHP GD[/msg])

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.
adlez
New User
New User
 
Posts: 9
Joined: Wed Aug 04, 2010 5:43 pm
Blog: View Blog (0)


Next

Return to Interpreted Languages

Who is online

Users browsing this forum: No registered users and 0 guests