pattern recognition - ocr

Started by
18 comments, last by eq 18 years, 3 months ago
Hi, I am trying to find an open source ocr library for c#. I am trying to find a way to take a screen shot of whatever is on the monitor and extract numbers, letters and playing card suits. Programming something like this is way over my head so a third party module is needed. Any info on where i can find something like this would be greatly appreciated. Thanks :)
Advertisement
Hmmm. Are you using this for a card game?

Are the cards always the same?
Are the numbers/letters always in the same font?
Are these pictures of actual cards or graphics?

From,
Nice coder
Hi,

This should work.
Thanks guys,

That link isn't really what i'm after. Preferably would like an sdk for c# or java.

And yes, the cards, fonts ect are always the same.

Cheers
I made a program that extracted the cards from the screen for PartyPoker.
When done I realized that PP saved every event in a log file and parsing the log file was far easier, it was also better since the PP window didn't need to be on top any more.

I wouldn't recommend you to go for the OCR route unless you really have to.
It's going to be almost impossible to get 100% correct results, if you can live with some errors then it might be an option.
I developed pokervitals which does just that (www.pokervitals.com). If i knew your intent I may be able to help you, but I had to write everything from scratch.
Ah you people are trying to scam poker sites? Well I am always amused by a good scam, so I'll just say: OCR is not necessary. The same deck of cards will be used every time, will it not? That means you can simply extract unique patterns from each card, and then do a simple memory search in the screenshot for the patters.
yeah OCR is way to much for such a 'simple' task, you should be fine with a 'simple' MSE (mean square error), MAD (mean absolute difference) or NCC(normalized cross correlation), it becomes much easier if you know the location of your cards, then just calulate for examble a MAD and if its smaller some val you specify you found your match...


T2k
Thanks all,

Just thought i'd point out that this isn't a scam or cheating, simply calculating statistics automatically which all online players can do in their own ways.

Secondly, not sure what you meant by searching for patterns in memory, is this not what ocr is anyway? Or pretty similar.

As far as i know, calculatem and winholdem programs use ocr. The reason for this is so it can be used for over 100 poker clients. If you just read a log file for each client, you would have to code heaps of stuff and logs change now and again so updating all those would be a pain. Also not sure about that MAD stuff either.

Anyway, just downloaded your software Paul, i'll try it out tonight when i get home. This is similar in what i am trying to do but it is for a comp sci project so my math wont be very useful for players. Am more interested in how you get the software to recognize the poker client and how to read the hole and community cards.

Any help with this would be greatly appreciated.

Thanks :)
Quote:Original post by one mind
Secondly, not sure what you meant by searching for patterns in memory, is this not what ocr is anyway? Or pretty similar.


No, OCR isn't really pattern matching. It's way more advanced than that - it's a branch of pattern recognition, which is a branch of AI.

This topic is closed to new replies.

Advertisement