← Back to team overview

sikuli-driver team mailing list archive

[Bug 1198108] Re: [1.0] find and findAll don't return the same score

 

Hi

I think that the bug is in the TemplateFinder::find_all(Mat target, double min_similarity) function
I 'm not sure where the problem is, but take a look at all the lines with "data.useGray" and more specifically at the line with "data.useGray(false);"

In the equivalent function for find (TemplateFinder::find), the variable is set at False only if you are looking for the exact match (similarity > 0.99).
But in the TemplateFinder::find_all function, you set the variable to false at the end of the method. 
If I understand correctly, you don't use the thresholding method, so the colors would be considered by openCV.

Am I correct ?

Regards.

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

Title:
  [1.0] find and findAll don't return the same score

Status in Sikuli:
  In Progress

Bug description:
  My point is that the score return by these function are not the same.
  This means that the function "find" and "exists" are able to find an image that the function "findAll" will not find.

  ---------------------------------------------------------------------------------------------------------------------
  For example, the code :

  cs = "img.png"

  e = exists(cs)
  print "exists:", e

  f = find(cs)
  print "find:", f

  lfa = findAll(cs)
  for fa in lfa:
      print "findAll:", fa

  return the following log:
  exists: M[834,767 65x10]@S(0)[0,0 1920x1200] S:0,79 Center:866,772
  find: M[834,767 65x10]@S(0)[0,0 1920x1200] S:0,79 Center:866,772
  [error] script [ test_Skl ] stopped with error in line 9
  [error] FindFailed ( can not find img.png on the screen. )
  ---------------------------------------------------------------------------------------------------------------------
  To explain the above example :
  I search three times the same image in the same background.
  The functions exists are all found the same result with a score of 0.79.
  But the "findAll" function has found no images with a similarity score higher than 0.7.

  I use the release 1.0.0 of Sikuli on Windows XP (32).

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


References