PDA

View Full Version : Reading Data From the Screen

Big_Jim
10-07-2005, 04:41 PM
(x-posted in Software)

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

10-07-2005, 04:55 PM
I've programmed a bit but not well enough to know exactly how to do this. I'm thinking once you have a picture of the screen, since you know the (x,y) coordinates that each position's cards are at, you can just do a pixel by pixel comparison to figure out the index and suit. Would that be too inefficient? I think using OCR would be tricky.

Freakin
10-07-2005, 05:41 PM
all the information you need should be written out in the hand history file in realtime

10-07-2005, 05:45 PM
Heh, that's a bit easier! Good point.

Big_Jim
10-07-2005, 05:59 PM
Figured it out, thanks.

10-08-2005, 03:36 AM
[ QUOTE ]
I've programmed a bit but not well enough to know exactly how to do this. I'm thinking once you have a picture of the screen, since you know the (x,y) coordinates that each position's cards are at, you can just do a pixel by pixel comparison to figure out the index and suit. Would that be too inefficient? I think using OCR would be tricky.

[/ QUOTE ]
You, sir, are an idiot

MODS - Why aren't threads like this locked as soon as found?

MyMindIsGoing
10-08-2005, 04:03 AM
[ QUOTE ]
[ QUOTE ]
I've programmed a bit but not well enough to know exactly how to do this. I'm thinking once you have a picture of the screen, since you know the (x,y) coordinates that each position's cards are at, you can just do a pixel by pixel comparison to figure out the index and suit. Would that be too inefficient? I think using OCR would be tricky.

[/ QUOTE ]
You, sir, are an idiot

MODS - Why aren't threads like this locked as soon as found?

[/ QUOTE ]

WTF, I have not seen a single thread locked in this forum. This one is far from locking as far as I am concerned. Just let them have their little conversation...

TheTROLL
10-08-2005, 04:18 AM
You want every thread locked where someone says something stupid? Good luck with that....

10-08-2005, 05:12 AM
When they're discussing methods for writing programs to cheat at poker and/or violate the terms of service of various sites, yes.

Nothing to do with stupid content.

MyMindIsGoing
10-08-2005, 07:18 AM
[ QUOTE ]
When they're discussing methods for writing programs to cheat at poker and/or violate the terms of service of various sites, yes.

Nothing to do with stupid content.

[/ QUOTE ]

Lets put a stop to anything any person does not like in the world. What an utopia it would be!

The only post with stupid content is yours.

10-08-2005, 07:43 AM
[ QUOTE ]
Lets put a stop to anything any person does not like in the world. What an utopia it would be!

[/ QUOTE ]

So if someone wrote a post asking 'Where do I find a bot to play poker for me?' and someone posted a link and instructions to do so, you'd have no problem with that?

[ QUOTE ]
The only post with stupid content is yours.

[/ QUOTE ]
I never implied that any post had stupid content. Learn to read.

MyMindIsGoing
10-08-2005, 08:03 AM
"So if someone wrote a post asking 'Where do I find a bot to play poker for me?' and someone posted a link and instructions to do so, you'd have no problem with that?"

A question like that does not belong on this forum for starters, and no I would not have a problem with that. I am not afraid of those bots.

"I never implied that any post had stupid content. Learn to read."

I did not write that either. Learn to read. Now leave it to the OPs to continue what they started and piss off.

10-08-2005, 10:52 AM
[ QUOTE ]
Now leave it to the OPs to continue what they started and piss off.

[/ QUOTE ]
The OPs have finished what they started as far as I can tell. And I wasn't aware this was your forum. You were the one who replied (twice) to my reply to someone else

[ QUOTE ]
and no I would not have a problem with that. I am not afraid of those bots.

[/ QUOTE ]
Neither am I. That's completely beside the point.

MyMindIsGoing
10-08-2005, 11:24 AM
Am I not allowed to reply to you? Are you some kind of royalty?