Two Plus Two Older Archives  

Go Back   Two Plus Two Older Archives > Internet Gambling > Software
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 10-07-2005, 04:41 PM
Big_Jim Big_Jim is offline
Member
 
Join Date: Jan 2005
Posts: 89
Default Reading In Data from the Screen

(x-posted in Computer Technical Help)

I am attempting to write a program to do various calculations based on a particular hand in real-time.

I am currently working with PartyPoker and clones.

I have been able to read from the chat box all the information about any bets/raises/calls/etc as well as the information about the community cards.

However, I would like to be able to read the cards themselves, primarily to figure out the player's hole cards, and opponents cards if/when they are shown.

I have found a decent Screen OCR library (Textract. Google for it), but I cannot figure out how to read in the cards.

I think that I may be able to do it by creating a font which matches the PartyPoker font, but I have thus far been unsuccessful.

Any suggestions?

If you have suggestions that you feel to be too technical for explanation here, PM me.

Edit: I'm using C++ with Visual Studio 2003
Reply With Quote
  #2  
Old 10-07-2005, 04:56 PM
OrcaDK OrcaDK is offline
Member
 
Join Date: Nov 2004
Posts: 42
Default Re: Reading In Data from the Screen

You're going about this the hardest (and most likely wrong way). All Party skins write the hands to a text file in real time, including the hole cards. It's much much easier to parse these files than it is to read from the screen.
Reply With Quote
  #3  
Old 10-07-2005, 05:14 PM
Big_Jim Big_Jim is offline
Member
 
Join Date: Jan 2005
Posts: 89
Default Re: Reading In Data from the Screen

I was fairly sure that the information about the hole cards is not written until the hand is over... although I should probably check this out again.
Reply With Quote
  #4  
Old 10-07-2005, 05:16 PM
callydrias callydrias is offline
Senior Member
 
Join Date: Jan 2005
Location: 325+ BB Downswing
Posts: 187
Default Re: Reading In Data from the Screen

[ QUOTE ]
Any suggestions?

[/ QUOTE ]

Yeah, YSSCKY. You should also publicly post more about blatantly breaking Party's T&Cs.
Reply With Quote
  #5  
Old 10-07-2005, 05:19 PM
Big_Jim Big_Jim is offline
Member
 
Join Date: Jan 2005
Posts: 89
Default Re: Reading In Data from the Screen

[ QUOTE ]
You should also publicly post more about blatantly breaking Party's T&Cs.

[/ QUOTE ]

I don't know how to be any more blatant. I suppose I could change the subject.
Reply With Quote
  #6  
Old 10-07-2005, 05:20 PM
Big_Jim Big_Jim is offline
Member
 
Join Date: Jan 2005
Posts: 89
Default Re: Reading In Data from the Screen

Looks like you're right. Thanks.
Reply With Quote
  #7  
Old 10-07-2005, 05:30 PM
Jeff W Jeff W is offline
Member
 
Join Date: May 2004
Posts: 85
Default Re: Reading In Data from the Screen

[ QUOTE ]
I am attempting to write a bot.

[/ QUOTE ]
Reply With Quote
  #8  
Old 10-07-2005, 05:39 PM
Big_Jim Big_Jim is offline
Member
 
Join Date: Jan 2005
Posts: 89
Default Re: Reading In Data from the Screen

That would be good too, if that's what I was doing.

I could also just keep bumping this thread.
Reply With Quote
  #9  
Old 10-08-2005, 02:08 AM
Sniper Sniper is offline
Senior Member
 
Join Date: Jun 2005
Posts: 704
Default Re: Reading In Data from the Screen

Aside from the advice you've already received about using the HH, if you truly want to read the cards, you should note that the card graphics are all stored locally (all you have to do is match them up).

Its also probably worth noting that there are already a few programs that probably do what you are trying to create!
Reply With Quote
  #10  
Old 10-08-2005, 10:49 AM
Guest
 
Posts: n/a
Default Re: Reading In Data from the Screen

There are multiple multiple ways to go about this. Personally I would just take a shot of the screen, cut the coordinates from the screen where the cards are, and then md5 that rectangle for a unique fingerprint. THEN whatever that card was, equals THAT particular fingerprint.

I.e. if you take a shot of the King of Hearts, you grab the coordinates for that card, get the pixels, save that rectangle as King-of-Hearts.bmp and then md5(King-of-Hearts.bmp) to get the unique fingerprint.

Now, when you want to read a screen, your program fetches those same coordinates and checks the md5. If the md5 equals any of the md5's of the cards, then you can work out what card it is.

e.g.

# grab pixels from screen
x=blah.grab(coords)
y=save(x,'KoH.bmp')

x=md5(x)
y=md5(y)

if x==y:
# grabbed pixels are the same as a card in our md5 db
print "x==y, therefore x is the king of hearts"


Hopefully that made sense. I'm still on my first coffee.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 02:40 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.