← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #404156]: Sikuli image recognization will not work for non white background

 

Question #404156 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/404156

    Status: Open => Answered

masuo proposed the following answer:
Try similar(), it may solve this probrem.
http://sikulix-2014.readthedocs.io/en/latest/pattern.html?highlight=pattern

[example:]
similarity = 0.55 #adjust for your purpose
m = findAll(Pattern("iconimage.png").similar(similarity))
if m is not None:
   for i in m:
       i.highlight(5)

Document will help you to understant how SikuliX find image on the screen.
http://sikulix-2014.readthedocs.io/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen

-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.