← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #258430]: Pattern detection failing on certain patterns

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
I made the following test with your images.
all three images are visible in the region r.

In all cases only the right one is found (see log)


images = ("SystemHover.png", "SystemOff.png", "SystemOn.png")

r = Region(215,138,139,513)

for img in images:
  r.highlight(2)
  found = list(r.findAll(Pattern(img).exact()))
  print img
  for m in found:
    m.highlight(1)
    print m

for img in images:
  r.highlight(2)
  m = r.exists(Pattern(img).exact())
  if m:
    print img
    m.highlight(1)
    print m

--- message area
SystemHover.png
M[255,371 51x15]@S(S(0)[0,0 1440x900]) S:1.00 C:280,378 [0/0 msec]

SystemOff.png
M[259,215 49x14]@S(S(0)[0,0 1440x900]) S:0.99 C:283,222 [0/0 msec]

SystemOn.png
M[256,535 50x15]@S(S(0)[0,0 1440x900]) S:1.00 C:281,542 [0/0 msec]

SystemHover.png
M[255,371 51x15]@S(S(0)[0,0 1440x900]) S:1.00 C:280,378 [5/5 msec]

SystemOff.png
M[259,215 49x14]@S(S(0)[0,0 1440x900]) S:1.00 C:283,222 [4/4 msec]

SystemOn.png
M[256,535 50x15]@S(S(0)[0,0 1440x900]) S:1.00 C:281,542 [4/4 msec]

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.