RaiMan / SikuliX1

SikuliX version 2.0.0+ (2019+)
https://sikulix.github.io
MIT License
2.78k stars 356 forks source link

auto-masked png gives false positives #114

Open thmsndk opened 5 years ago

thmsndk commented 5 years ago

Hi there, I just downloaded 1.1.4 to play around with it, wanting to make a fishing bot for a singleplayer game. I tried toying around with region.onAppear, but I was not getting the match I expected looking at the following link https://sikulix-2014.readthedocs.io/en/latest/tutorials/masking/masking.html i copy pasted some "debug" code

image

and as you can see, it finds the exclamation point a lot of places, I would kinda just expected this to work, am I doing something wrong? or does the image recognition get confused? Theese are the scores it finds found: 0.9670 found: 0.9656 found: 0.9561 found: 0.9532 found: 0.9529 <-- the actual exclamation point found: 5 matches score max/min: 0.9670 / 0.9529

image

RaiMan commented 5 years ago

Interesting ;-)

Your masked image should be optimised: there is too much missing from the darker brown edge. In the current shape the light brown inner part has the majority and hence fits on solid brown areas.

Another option is to try with the a not masked image, that has as little background as possible.