Hi guys, I would like you to point me to the direction on which api's, functions, etc should I look for in order to recognize an image on the screen and retrieve its coordinates.
I hope that was clear enough hehe.
thanks in advance!
Hi guys, I would like you to point me to the direction on which api's, functions, etc should I look for in order to recognize an image on the screen and retrieve its coordinates.
I hope that was clear enough hehe.
thanks in advance!
Are you talking about having a program know what's on the screen, looking for a specific image, and know what it's location is on the screen? I've never done that before, but you probably want to first figure out how to get an image of the screen, then how to process that image. If a graphics library like SDL doesn't do screen capture (and I don't think it does) it'll be dependent on your OS/environment - but the technical term is screen capture - so try searching with that. What are you trying to accomplish, however? If you're wanting to know where on the screen part of your program is, there are much easier ways to pass info between processes.
Well your question was vague enough to warrant such an answer. One way of accomplishing what you want is called the Kohonnen Self-organizing Map:
Self-organizing map - Wikipedia, the free encyclopedia
If you want more specifics, be a little clearer in your message. This will help do image-recognition.
Ok I will be more specific: I plan on doing an auto-clicker program. So there will be parts of the screen I need to click on. I must find where these images are and then click on their position.
I'll check your link now jeff
Say, this wouldn't be about cheating in a game or writing a bot, now would it?
Well I read the forum guidelines and I don't beleive my intentions break any of the rules, but if you do think so...
It's about preventing me from getting a Carpal tunnel syndrome due to excessive clicking hhehehe
hmmm... anyone?
hmmm...WRT to API's and such this will be a platform specific project. You haven't mentioned your OS.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Os is windows
Okay, and by "image" you mean exactly what? Give us a very very specific, actual for real example here.
Do you mean like "icon on my desktop", or maybe "picture in my web browser" or maybe "an object in a larger image", such as an enemy vehicle in Far Cry?
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
Well imagine there's a little car in a flash game that has many other objects and i need to click on that car. So I would have to recognize where is the car and know it's position and then click on that position.
Well then it would seem like the following would work:
1. Offline, train the net (neural or other) to recognize the car. Then with good training data...
2. Programmatically isolate the window with the image
3. Based on image size, iterate through all possible positions in the window where the image might be.
4. If found, send the click event to the proper X/Y coords.
6. Profit!
Now if you are using this to cheat a fast-moving game this approach will NOT be sufficient. There is a better way to beat that but I think it would lie outside the purview of this forum...
I think that approach will be sufficient to keep most people busy for a few weeks anyway.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge
hum.... so maybe getting a print from the screen, then try placing the image I'm looking for against every "block" of pixels to see if they match?
Is that what you're saying?