← Back to team overview

sikuli-driver team mailing list archive

[Bug 880861] Re: [request] findAll() should only return the most probable matches

 

Thanks for your feedback. To further facilitate improving findAll() I added my testcase:
1. apply-grid.gif
2. run code below (slightly modified code attachment):

setROI(Screen(0))
applies = findAll("Annly.png")
for i, apply in enumerate(applies):
    print i, apply.getTarget(), apply.getScore()

3. enclosed the result on my box. What I'd expect are 13 matches with score 1.0. When using "Matching Preview" I can see matches which are completely unrelated (no border, no text, different color). Looks to me like the non-matching scores  are much too high. I am especially irritated that borders without text match better than identical patterns with only different color (none of the yellow or green buttons match). I'd expect the match to contain at least some text. Enclosed as well matching preview screenshot.
"0 (219,354) 1.0
1 (219,678) 1.0
2 (219,696) 1.0
3 (219,732) 1.0
4 (219,750) 1.0
5 (219,822) 1.0
6 (219,372) 1.0
7 (219,390) 1.0
8 (219,408) 1.0
9 (219,426) 1.0
10 (219,804) 0.999999821186
11 (219,606) 0.999999821186
12 (219,588) 0.999999582767
13 (198,228) 0.953331410885
14 (302,134) 0.833787679672
15 (302,210) 0.830605745316
16 (857,362) 0.81985527277
17 (121,58) 0.814565420151
18 (105,362) 0.795119285583
19 (73,362) 0.795119285583
20 (46,362) 0.795119285583
21 (223,877) 0.793206393719
22 (192,877) 0.792263448238
23 (38,451) 0.791314184666
24 (96,58) 0.788552463055
25 (610,299) 0.788552105427
26 (586,299) 0.788552105427
27 (881,223) 0.786840677261
28 (828,603) 0.775286316872
29 (852,603) 0.775285959244
30 (145,58) 0.775285601616
31 (68,590) 0.768583893776
32 (44,590) 0.768583893776
33 (640,71) 0.761338293552
34 (665,71) 0.758514881134
35 (326,134) 0.748186349869
36 (908,603) 0.741286456585
37 (556,603) 0.741286456585
38 (532,603) 0.741286456585
39 (883,603) 0.7412860989

57
40 (610,1005) 0.737122774124
41 (562,1005) 0.737122774124
42 (112,286) 0.727324426174
43 (634,299) 0.727323651314
44 (618,590) 0.723185300827
45 (507,58) 0.713712573051
46 (799,147) 0.713135540485
47 (912,223) 0.710099637508
48 (917,514) 0.709267377853
49 (468,603) 0.705952942371
50 (799,514) 0.705952942371"

** Attachment added: "Apply-Grid.gif"
   https://bugs.launchpad.net/sikuli/+bug/880861/+attachment/2573616/+files/Apply-Grid.gif

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/880861

Title:
  [request] findAll() should only return the most probable matches

Status in Sikuli:
  New

Bug description:
  --- request (based on the primary bug situation)

  findAll(): "most probable" means, that only those matches are
  returned, whose score differ only slightly from that of the best match
  (e.g. max 0.5 or even less). This surely is the expectation of most
  people, when using findAll().

  Additionally it might make sense, to implement a findAny(), that
  returns ALL matches having a score above the given similarity, because
  this might be the expected result in some situations, when using
  findAll() in its current shape.

  -------------------------------------------------

  1. Sikuli 1.0 rc3
  2. Windows XP SP3 32-bit
  3. Enclosed code loops over all "Apply" boxes. Once apply has been clicked it wait for a confirmation box to appear, confirms, waits for the confirmation box to disappear. The final match does not point to the bitmap.
  4. Required bitmaps attached.

  # setFindFailedResponse(PROMPT)
  setROI(Screen(0))

  applies = findAll("Apply.png")

  for apply in applies:
      click(apply)
      confirm="Doyoureallyw-1.png"
      wait(confirm)
      click(Pattern("YesNo.png").targetOffset(-31,-1))
      waitVanish(confirm)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/880861/+subscriptions


References