Image detection overlay

Ideas for new features & functions

Moderators: Dorian (MJT support), JRL

Post Reply
rnoecker
Junior Coder
Posts: 25
Joined: Fri Jun 07, 2013 4:44 pm

Image detection overlay

Post by rnoecker » Fri Jul 19, 2013 4:49 pm

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.

User avatar
Marcus Tettmar
Site Admin
Posts: 7378
Joined: Thu Sep 19, 2002 3:00 pm
Location: Dorset, UK
Contact:

Post by Marcus Tettmar » Mon Jul 22, 2013 3:02 pm

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?

rnoecker
Junior Coder
Posts: 25
Joined: Fri Jun 07, 2013 4:44 pm

Post by rnoecker » Mon Jul 22, 2013 3:24 pm

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

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts