It would be nice to have more information about what image detection is finding. For instance, between WaitScreenImage and FindImagePos only the latter provides coordinates of the image, and you would have to do something with them such as moving the mouse there to see what the match is.
A problem I am having right now is that a particular WaitScreenImage is returning without a timeout although I'm pretty sure it shouldn't be matching anything. In fact, it is followed by a FindImagePos call that uses the same image and parameters and that call returns 0 matches.
My idea would be to have an overlay on the screen to highlight (if this is even possible) the region of all matches that shows briefly during debugging. This would be nice for debugging and it could either be turned on in the program, happen automatically when debugging, or enabled using a parameter of the methods.
Image detection overlay
Moderators: Dorian (MJT support), JRL
- Marcus Tettmar
- Site Admin
- Posts: 7378
- Joined: Thu Sep 19, 2002 3:00 pm
- Location: Dorset, UK
- Contact:
WaitScreenImage is actually a wrapper for FindImagePos (internally to Macro Scheduler all WaitScreenImage does is call FindImagePos in a loop). Therefore there cannot be any difference in outcome *unless* of course you have not specified the same tolerance/engine parameters, and assuming compared against the exact same screen with no changes.
Marcus Tettmar
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
http://mjtnet.com/blog/ | http://twitter.com/marcustettmar
Did you know we are now offering affordable monthly subscriptions for Macro Scheduler Standard?
Ok, the example is bad, and it is most likely due to a problem with the program (numfound = -1) which I've reported in another post. I still think the idea is useful for debugging false positives.
http://www.mjtnet.com/forum/viewtopic.php?p=34938#34938
http://www.mjtnet.com/forum/viewtopic.php?p=34938#34938