X-1.0rc2: exact() information is lost in GUI on reopening --- workaround

Bug #780937 reported by anatoly techtonik
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SikuliX
Fix Released
Critical
RaiMan

Bug Description

**** workaround:
use similar(0.99) instead
----------------------------------------------

When a pattern is defined as exact match using 1.0 similarity in GUI, the image gets "1.0" marker and the .py file contains the following source:
  img = Pattern("img.png").exact()

However, if you save and reopen Sikuli, the "1.0" marker is lost, and click on image resets similarity slider to a value of 0.7. This creates big trouble when debugging, because engine still matches the picture as exact() match and if PS doesn't have exact similarity, Matching Preview will show that there is no match until you move slider.

Vista 32.

Tags: idestartup
Revision history for this message
RaiMan (raimund-hocke) wrote :

this is a known bug (but cannot find it right now :-(

Using similar(1.0) has some other oddities, so I use 0.99 instead in those cases.

summary: - X-1.0rc2: exact() information is lost in GUI on reopening
+ X-1.0rc2: exact() information is lost in GUI on reopening --- workaround
description: updated
Revision history for this message
anatoly techtonik (techtonik) wrote :

I actually thought that exact matching could speed up the process.

Revision history for this message
RaiMan (raimund-hocke) wrote :

No, specifying similar(some-value) only sets the value, that is taken internally to decide, wether something was found or not in comparison with the match's score.

So specifying similar(x) with x > 0.9 is always dangerous and only useable if you are sure, that the match's score will be greater than 0.9 in all cases.

specifying 0.99 or 1.0 even makes the search slower (about 25% longer), because internally an additional comparison step takes place.

Specifying similar(x) usually is only needed if you have to assure that a specific image should be found in cases, where otherwise another image with a lower score would be found first.

Revision history for this message
anatoly techtonik (techtonik) wrote :

Thanks for the explanation. That really helps to understand Sikuli better.

Changed in sikuli:
status: New → Fix Committed
milestone: none → x1.0-rc3
RaiMan (raimund-hocke)
Changed in sikuli:
assignee: nobody → RaiMan (raimund-hocke)
milestone: x1.0-rc3 → x1.0
importance: Undecided → Low
RaiMan (raimund-hocke)
tags: added: idererun
tags: added: idestartup
removed: idererun
RaiMan (raimund-hocke)
Changed in sikuli:
importance: Low → Critical
RaiMan (raimund-hocke)
Changed in sikuli:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.