Results 1 to 4 of 4
  1. #1
    Member
    kyborek is offline

    Posts
    57

    Find image on screen with deviation

    Hello, i want to make a simple bot for arkanoid game. I can find ball with exact match, but the problem is that when the ball is moving there is white glow on it and behind it, therefore it is impossible to find it with exact match finding.

    I want to ask, if anyone knows good algorithm for finding stuff on screen. For obvious reason i need fast algorithm, something better than brute force finding everywhere.

    Thanks to anyone who helps
    Hello, i am Kyborek, Programmer and owner of The Captain.
    My skype name is kyborek and my email is admin@hanzlsoft.eu
    If you need anything feel free to ask me.

  2. #2
    Senior Member
    Pain is offline

    Posts
    1,564
    Quote Originally Posted by kyborek View Post
    Hello, i want to make a simple bot for arkanoid game. I can find ball with exact match, but the problem is that when the ball is moving there is white glow on it and behind it, therefore it is impossible to find it with exact match finding.

    I want to ask, if anyone knows good algorithm for finding stuff on screen. For obvious reason i need fast algorithm, something better than brute force finding everywhere.

    Thanks to anyone who helps
    How big is the ball? You could try finding the pixel of the ball (the centre of it obviously). if that's not good enough then try something like a 2x2 pixel image of it.
    Tips on trading on Bot-Supply: Click Me

  3. #3
    Member
    kyborek is offline

    Posts
    57
    The ball's solid center is 6x6 pixels large, but finding that in 400*360 game area is still quite slow... i guess i am taking it the wrong way.
    Hello, i am Kyborek, Programmer and owner of The Captain.
    My skype name is kyborek and my email is admin@hanzlsoft.eu
    If you need anything feel free to ask me.

  4. #4
    Junior Member
    Alkor is offline

    Posts
    3
    I had something similar and used cv2 for python. Its called template search or something (looking for a template image in a larger image). It has a c++ version as well, i think, and is probably the fastest thing you will find.

    Oh, crap, didnt realize how old these posts were. Sorry for gravedigging.

Posting Permissions

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