← Back to team overview

sikuli-driver team mailing list archive

[Bug 1241367] [NEW] [1.0.1] Finder() shows lower similarity score than same image combination on screen

 

Public bug reported:

**** the finding

I checked your example with version 1.0.1 and indeed found a strange behavior:
Everything works as expected, but using Finder() directly with the captured image reports a similarity score of 0.57, whereas having the image displayed on the screen with a viewer and using normal screen find op Sikuli reports a similarity score of 0.88.

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

I am using the latest 64-bit Sikuli IDE on 64-bit Win7.  It seems that
Finder always uses exact find, ignoring my similarity setting in
Finder.find().  To demonstrate this, I have my captured.png file
displayed 1x1 on the screen and run the following simple script:

finder = Finder( "captured.png" )
finder.find( "captured.png", 0.7 )
if not finder.hasNext():
    print( 'Can not find the orginal image itself by Finder' )
finder.find( "target.png", 0.7 )
if not finder.hasNext():
    print( 'Can not find the target image by Finder' )
if not exists( "target.png" ):
    print( 'Can not find the target image on screen' )

The result is:

Can not find the target image by Finder

In another word, the target.png can be found on screen, but not in the
capture.png.  The capture.png can find itself.

What have I done wrong?

** Affects: sikuli
     Importance: High
     Assignee: RaiMan (raimund-hocke)
         Status: In Progress

** Summary changed:

- [1.0.1] Finder() shows lower similarity score as same image combination on screen
+ [1.0.1] Finder() shows lower similarity score than same image combination on screen

** Changed in: sikuli
       Status: New => In Progress

** Changed in: sikuli
   Importance: Undecided => High

** Changed in: sikuli
     Assignee: (unassigned) => RaiMan (raimund-hocke)

** Changed in: sikuli
    Milestone: None => 1.1.0

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

Title:
  [1.0.1] Finder() shows lower similarity score than same image
  combination on screen

Status in Sikuli:
  In Progress

Bug description:
  **** the finding

  I checked your example with version 1.0.1 and indeed found a strange behavior:
  Everything works as expected, but using Finder() directly with the captured image reports a similarity score of 0.57, whereas having the image displayed on the screen with a viewer and using normal screen find op Sikuli reports a similarity score of 0.88.

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

  I am using the latest 64-bit Sikuli IDE on 64-bit Win7.  It seems that
  Finder always uses exact find, ignoring my similarity setting in
  Finder.find().  To demonstrate this, I have my captured.png file
  displayed 1x1 on the screen and run the following simple script:

  finder = Finder( "captured.png" )
  finder.find( "captured.png", 0.7 )
  if not finder.hasNext():
      print( 'Can not find the orginal image itself by Finder' )
  finder.find( "target.png", 0.7 )
  if not finder.hasNext():
      print( 'Can not find the target image by Finder' )
  if not exists( "target.png" ):
      print( 'Can not find the target image on screen' )

  The result is:

  Can not find the target image by Finder

  In another word, the target.png can be found on screen, but not in the
  capture.png.  The capture.png can find itself.

  What have I done wrong?

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


Follow ups

References