← Back to team overview

sikuli-driver team mailing list archive

[Bug 583085] Re: findAll on a region returns duplicate matches

 

** Changed in: sikuli
       Status: Fix Committed => Fix Released

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

Title:
  findAll on a region returns duplicate matches

Status in Sikuli:
  Fix Released

Bug description:
  Finding all matches of an image inside another match sometimes returns
  duplicate matches (same coordinates, size and score):

  for m in find(img1).findAll(img2):
      print m

  could result in

  Match[498,329 15x15] score=0.96, target=center
  Match[498,246 15x15] score=0.99, target=center
  Match[498,345 15x15] score=0.96, target=center
  Match[498,246 15x15] score=0.99, target=center

  The fourth match is a duplicate of the second one. The problem only
  occurs for certain images, but consistently. I have not seen this
  problem when calling findAll on SCREEN or as a function. The same
  problem occurs when I use hasNext() and next() to iterate over
  matches.

  To reproduce, use the attached Sikuli script:
  1. Open the base image in an image viewer so that Sikuli can see it.
  2. Run the script.
  3. Check the console output in Sikuli. Duplicate matches are prefixed with '*'.
  4. Optionally set the variable i to one of the other images and repeat.

  Result: i2 and i5 return a duplicate match, while i1, i3 and i4 don't.

  Expected result: There should be no duplicate matches.

  Sikuli version: 0.10.0
  OS: Windows XP SP3