Jump to content

pixel search/image match?


Recommended Posts

Hello, i have decided i am gonna try to make a pokerscript that displays lot of info about the table that i am playing at onto a gui

Now, the biggest matter on my mind is how i will get the information about what cards i have been dealth and what cards come on the board.

I am 1 month young in this program so bare with me.

I have been thinking that the "normal" (for me) solution is to take a pixel that is different on every number and make a pixel search/check on it and from that define wich card is where. BUT

I can imagine such searches on every hand is abit slow(?) so i was wondering if i have a sampleimage of the card, is there any way for me to search an area and check if thesame picture/image is beeing displayed.

My worst case scenario is that i have to read of the text what cards are coming, but i would like to avoid that if possible.

any pointers?

Link to comment
Share on other sites

If I where you I'd define all cards in an array and also set which card is dealt where.

$cards[1][0] = <picture of card> ; contains the picture or the picture location or something

$cards[1][1] = 10 ; Points worth of card, or name of card

$cards[1][2] = "player1" ; who has the card

$cards[2][2] = "deck"

$cards[3][2] = "player2"

$cards[52][2] = "player1"

and so on.

Ofcourse player1, stack and such can be replaced by vars or something.

My active project(s): A-maze-ing generator (generates a maze)

My archived project(s): Pong3 (Multi-pinger)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...