CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Feb 2010
    Posts
    4

    Recognize a picture and make a command

    Hi there professional guys,

    Im sitting here and Im facinated by C++ and Im eager to learn more about this wonderful program.
    So, I have a couple of friends that also want to learn about this and we have been given eachother different taskt so we learn about different things to teach eachother.

    My task is to make a small program that recognize different parts on the screen and depending on the picture of screen to make a click on a specified place on the screen or make a command that does the same thing (im not sure how that works)


    Why this task:

    A friend of a friend of me created a small game, and this task is going to be a kind of bot to play the game by itself.


    So is there any possibility to make such a bot with C++?
    If not, can you give me a suggestion to a program that allow me to make it?

    Thanks in advance!
    Flashbolt

  2. #2
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Recognize a picture and make a command

    So is there any possibility to make such a bot with C++?
    Sure... you can make anything you want with C++

    My task is to make a small program that recognize different parts on the screen
    This is not always a easy task. Google for image recognition techniques, and you will see that there are a lot of possibilities. It's more important to understand the problem than building it.

  3. #3
    Join Date
    Feb 2010
    Posts
    4

    Re: Recognize a picture and make a command

    Quote Originally Posted by Skizmo View Post


    Google for image recognition techniques, and you will see that there are a lot of possibilities. It's more important to understand the problem than building it.

    Well, thanks for two uplifting answers, but as you might understand, I am a newbie in C++, and I have only tried it a little stuff.

    Is there anyway we can talk, on skype, msn etc or if you could help me through teamviewer because Im totally in for this project but I dont have the skills to do it by myself, hehe

    Flashbolt

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: Recognize a picture and make a command

    You're putting the cart before the horse. Work through a tutorial and get the basics down first. Image recognition isn't a task for beginners.

  5. #5
    Join Date
    Feb 2010
    Posts
    4

    Re: Recognize a picture and make a command

    Im watching some of tutorials now, and i dont expect to get a pro the first day, but I have plenty of time to work this task out but Im doing what I can to get the best start.

  6. #6
    Join Date
    Sep 2004
    Location
    Holland (land of the dope)
    Posts
    4,123

    Re: Recognize a picture and make a command

    Quote Originally Posted by Flashbolt View Post
    Im watching some of tutorials now, and i dont expect to get a pro the first day, but I have plenty of time to work this task out but Im doing what I can to get the best start.
    I can't really help with the problem, but I'm a bit curious... what are you trying to recognize ?

  7. #7
    Join Date
    Feb 2010
    Posts
    4

    Re: Recognize a picture and make a command

    Its a small cardgame (player vs player) so that a card (as a normal playing card) should come up for each, and you can choose to keep the card, take a new one or bet you have a higher card than the opponent.

    The scores will be saved and I want the bot to recognize each card and decide by itself to keep it, take a new one or bet.

    So my goal is to make one. Dont blame me for beeing a noob that is trying to learn something difficult, but Im in for this, even if it will take a long time to make.

  8. #8
    Join Date
    Apr 1999
    Posts
    27,449

    Re: Recognize a picture and make a command

    Quote Originally Posted by Flashbolt View Post
    So my goal is to make one. Dont blame me for beeing a noob that is trying to learn something difficult, but Im in for this, even if it will take a long time to make.
    To add what GCDEF states:

    To write such a thing that you're trying to write requires many goals to be accomplished, and writing many programs that may have absolutely nothing to do with card games and face recognition. Learning C++ programming doesn't work that way, where you focus on one application and everything is geared to this one "ultimate goal".

    A person who could write the program that you described would be able to write any C++ program. As long as that person knows the field of study he or she is in, C++ is just a tool to get something accomplished.

    Regards,

    Paul McKenzie

  9. #9
    Lindley is offline Elite Member Power Poster
    Join Date
    Oct 2007
    Location
    Seattle, WA
    Posts
    10,895

    Re: Recognize a picture and make a command

    As I see it, there are three steps here:

    1) Acquire a screengrab from a program other than the one running. Probably possible, but I don't know the details on how you'd do it.
    2) Search the screengrab for a particular image. Depending on how precisely you know the scale and contents of this sub-image, there are several possible approaches. If you know it precisely, an MSE search over an image pyramid would probably do it. This would be a fairly straightforward task....for someone who knows the theory of image pyramids and is familiar with C++. For a newbie, it's likely to be a major hurtle.
    3) If the image is detected, send some kind of message to the window where it was found. Again, probably doable but not my area of expertise.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured