WizardofEngland
WizardofEngland
Joined: Nov 2, 2010
  • Threads: 61
  • Posts: 638
May 9th, 2011 at 11:27:15 AM permalink
Oh and for you guys in the US, just in case you forgot. This is on-line poker ;-)
http://wizardofvegas.com/forum/off-topic/general/10042-woes-black-sheep-game-ii/#post151727
Dween
Dween
Joined: Jan 24, 2010
  • Threads: 66
  • Posts: 339
May 9th, 2011 at 12:33:30 PM permalink
Interesting... I didn't realize you were viewing a graphic screen. When you said OCR, my mind went to scanning a piece of paper, which is messy to say the least.

If the font is not going to change, and you know where the characters are going to fall, you may not need to scan the entire area.
Take, for example, a 7-segment LED displaying the digits 0-9.
#####   ....#   #####   #####   #...#   #####   #####   #####   #####   #####
#...# ....# ....# ....# #...# #.... #.... ....# #...# #...#
#...# ....# ##### ##### ##### ##### ##### ....# ##### #####
#...# ....# #.... ....# ....# ....# #...# ....# #...# ....#
##### ....# ##### ##### ....# ##### ##### ....# ##### #####

You have 15 pixels per digit in my example, however, I can determine a digit by polling just 6 pixels, and may even be able to improve. The idea is, you can take the alphanumeric characters --- you KNOW what they will look like --- and pick a dozen pixel-polling sites that could narrow down the possibilities to just one character.

Given 26 alpha and 10 numeric, or 36 characters, a perfect algorithm could give you an answer in 6 pixels. Not all fonts are going to be able to split things into halves with each pixel, so the actual number will increase.

However... since all of your characters are going to be known, it might be just as easy to scan an entire area, get its "value", and determine what character you have. I also imagine that your previous idea of "totaling" all vertical bit-sums would work for you. Like you said, there's a 1 in a million chance of a collision... though maybe it's more like ((1000000-1)/1000000)^36, which is still 99.99% chance of NOT colliding.

You may even want to look at a specific vertical column, to see if it has a unique value across all characters. That way, you only need to determine WHERE the character is, then scan its X'th column.

The specific pixel-polling I was talking about may however work for determining playing cards. If I remember correctly, I once used an online poker software that allowed me to change the look of the cards and chips. If that is possible, it would be super easy to change the cards (and chips if you need to) to have "barcodes" on them, for easy reading.
-Dween!
Ayecarumba
Ayecarumba
Joined: Nov 17, 2009
  • Threads: 236
  • Posts: 6763
May 9th, 2011 at 12:34:31 PM permalink
Quote: WizardofEngland

Oh and for you guys in the US, just in case you forgot. This is on-line poker ;-)




Ha! No one ever wins online.... WPT you say..., Oh... never mind....





Congrats on your WPT tournament run WoE, we all enjoyed your updates, and look forward to the next one.
Simplicity is the ultimate sophistication - Leonardo da Vinci
WizardofEngland
WizardofEngland
Joined: Nov 2, 2010
  • Threads: 61
  • Posts: 638
May 9th, 2011 at 1:04:27 PM permalink
@Dween

I tried that to begin with, but I had issues, some of the text is thinner than others, so if the value starts with a 1, the next digit will be nearer, or an 8 and it will further away. Also the text seems to center adjusted, so if the player had $1.40 instead of $144.74 the pixels will fall in very different places. Also the area is wider than the text, to be sure to grab everything within it. I actually spent best part of a week on just looking for unique pixels, but the combination of different sized digits made it nigh on impossible. Where as the OCR was almost up and running within a few hours. Its also very easy to teach it a new font, and I am pretty sure that if I stay with the method I have, that collisions are practically impossible without the character being the same anyway.

@Ayecarumba

Thanks, it was an amazing experience, had a good run, was one hour short of day three (money day) and outlasted all but one of the tv show pros in the event. I am hoping to repeat the experience again this year. But have recently been laid off from work, so funds are tight.
http://wizardofvegas.com/forum/off-topic/general/10042-woes-black-sheep-game-ii/#post151727

  • Jump to: