Image recognition-VBForums
Results 1 to 3 of 3

Thread: Image recognition

  1. #1

    Thread Starter
    New Member
    Join Date
    Feb 2012
    Posts
    1

    Image recognition

    I'm working in a simple app for a card game.

    I would like to know the simplest way to find an image on the screen.
    Then compare screen with stored images...

    Examples of codes will help a lot.
    Thanks!

  2. #2
    VBaholic & Loving It LaVolpe's Avatar
    Join Date
    Oct 2007
    Location
    GetWindowRect()
    Posts
    12,362

    Re: Image recognition

    Welcome to the forums.

    It's not an easy topic at all. If the colors in your stored image are different than the ones on the screen; difficult. Generally one method is to reduce the two images to grayscale or even black & white, then a pixel by pixel comparison can be made with some sort of reliability factor since a perfect match may not be possible. This is still not fool proof. And even more prone to error if you have to scale one of the images for comparison as that can cause color changes in the scaled image

    Maybe you can give us more details and we can point you in a different (easier) direction. If it's a game you are making, why do you need to get image data from the screen? Or is this game some other application?
    Insomnia is just a byproduct of, "It can't be done"

    Newbie? Novice? Bored? Spend a few minutes browsing the FAQ section of the forum.
    Read the HitchHiker's Guide to Getting Help on the Forums.
    Here is the list of TAGs you can use to format your posts
    Here are VB6 Help Files online


    {Alpha Image Control} {Memory Leak FAQ} {GDI+ Classes/Samples} {Unicode Open/Save Dialog} {Icon Organizer/Extractor}
    {VBA Control Arrays} {XP/Vista Manifest Creator} {UserControl Button Template} {stdPicture Render Usage}

  3. #3
    Hyperactive Member Lenggries's Avatar
    Join Date
    Sep 2009
    Posts
    353

    Re: Image recognition

    I think it is pretty obvious that the OP is trying to build a program that reads a game in another application. Without considering whether or not the OP is attempting something legal or illegal, I'll just focus in generalities:

    Image recognition as a general problem is UNSOLVED. This is why things like CAPTCHA and RECHAPTCHA work. Thus, nobody on this planet can give you a general solution, algorithm, or source code to recognize two images. Short of completing Nobel Prize-caliber research, the best you can do is seek a solution for your specific problem. Thus, if you want us to be able to give you advice, you have to post all details of your problem, including the images themselves (screenshots would be helpful), as well as what type of program you are trying to capture the image from.

    Now then, given the grey area of your topic, if you choose to provide more detail, I strongly encourage you to explain in full why you are trying to perform this operation, because unless you have a very good reason, you will probably not get much help here.

Posting Permissions

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



Featured


Click Here to Expand Forum to Full Width

Survey posted by VBForums.