![]() |
#1
|
|||
|
|||
![]()
Hello,
I was wondering how programs like Calculatem Pro, Poker Indicator, ... are able to read the table (pocket cards, flop/turn/river cards, which players are still in the hand, pot size, etc.). I can image two options: - analysis of network packets: this seems very difficult, since the connection is encrypted; - screen capturing/analysis: this seems also very difficult to do. Do you guys have an idea? Is there a library somewhere which is able to read the table? Thanks a lot all. PS: I'm a software developer, so I don't mind tech talk [img]/images/graemlins/smile.gif[/img] |
#2
|
|||
|
|||
![]()
Most of them use screen capturing. It's actually quite simple using an euclidean distance algorithm along with a threshold for doing a pixel by pixel comparison of two images. If the images are >96% the same then its a match.
You can detect flop, hole cards, turn, river, betting, pot size etc.. The hardest part is reading the text. For this you need to have some type of OCR algorithm to get the screen names, stack sizes, bet amounts etc... OR you can do what I did and read this type of information from the textbox that tells you what is happening, or by poking through the poker softwares memory. So basically I have combined hand history text scraping with screen scraping to create a holdem odds calc among other things. Oh and I used a combination of c++ and c# to code all my stuff. I have a c++ app that does the memory reading stuff and then sends the info cross-process to my c# app for processing. Cheers |
#3
|
|||
|
|||
![]()
Man you definately did that the hard way.
|
#4
|
|||
|
|||
![]()
[ QUOTE ]
- analysis of network packets: this seems very difficult, since the connection is encrypted; [/ QUOTE ] This is alot easier than it seems. The fact that it is encrypted doesnt really mean a great deal. The application still has to decrypt it somewhere internally and if you can get in right after the call to SSL_read() you can (in theory) get the plaintext too. [ QUOTE ] - screen capturing/analysis: this seems also very difficult to do. [/ QUOTE ] This is very easy too. As the other poster mentioned, simple template matching code using some kind of distance metric (ie: nearest neighbour classification) will work very well (even for the strings, as they all use the same font - no need for OCR). The resizeed tables will not cause problems either, as the scale factor can be deduced from the new window dimensions and a reduced size template used. If the sites were to start moving stuff around then you would need to use convolution based methods and if they were to change the images and/or font you may have to use a more advanced classifier than a basic nearest neighbour classifier. Juk [img]/images/graemlins/smile.gif[/img] |
#5
|
|||
|
|||
![]()
Ah... good point about using the image comparison routine to grab the text. For whatever reason I didn't even think of that.
Hey btw, Juk are you a coder by day? I am and I find myself so bored with the stuff I have to do at work that I make projects for myself on my spare times such as holdem odds calcs, bots, etc... cheers buddy |
#6
|
|||
|
|||
![]()
is it possible to do screen scrapping using autohotkey?
|
#7
|
|||
|
|||
![]()
[ QUOTE ]
is it possible to do screen scrapping using autohotkey? [/ QUOTE ] check recent messages ... I believe there was a thread about that a few days ago [img]/images/graemlins/crazy.gif[/img] |
#8
|
|||
|
|||
![]()
Yes but it's not perfect. It depends on what you're trying to scan.
I got image recognition working for blackjack on Planetluck. But I also tried with Starluck and it won't work. On Starluck the cards are too small. A red six gets recognized as a red eight. You can fiddle with it but the changes usually just cause more problems with other cards. |
#9
|
|||
|
|||
![]()
I am a programmer, but I don't have any experience with screen capturing. If someone wanted to work together to make some sort of program i'd really be interested. Let me know
|
#10
|
|||
|
|||
![]()
It depends on the language your using.
For AutoHotKey, play around with the ImageSearch function. AutoHotKey works great for a lot of poker applications buts it's usefulness as a full blown programming language quickly become apparent. For Java, I believe you should look into the Robots class. You can do sectional screen captures, convert to RGB values and compare. For other languages, I couldn't tell you. I'm too lazy to spend my time learning. |
![]() |
|
|