[request] need different match scores for different brightness of same (nearly gray scale) image (enabled / disabled)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
SikuliX |
In Progress
|
Wishlist
|
RaiMan |
Bug Description
A button in a toolbar might be enabled or disabled. It seems, that if the button image is nearly gray scale (nearly no colored pixels), the image is found with score 1.0 in all cases (enabled/disabled button on enabled/disabled toolbar).
The testcase (available at https:/
This bug is based on the related question, where more information can be found.
Here the script and the results from the above mentioned testcase:
[code]
fillButtonEnabled = "fillButtonEnab
fillButtonDisabled = "fillButtonDisa
def myFind(btn, tb):
m = toolbars[
m.highlight(1)
print "Found %s on %s as %s"%(btn, tb, str(m))
toolbarEnabled = "toolbarEnabled
toolbarDisabled = "toolbarDisable
dir = getBundlePath()
import os
toolbars = {}
# find both buttons on both toolbars
for tb in (toolbarEnabled, toolbarDisabled):
os.popen('open "'+os.path.
wait(2)
toolbars[tb] = selectRegion(
for btn in (fillButtonEnabled, fillButtonDisab
myFind(btn, tb)
[end code]
My results:
[log] highlight Match[114,197 32x13] score=1,00, target=center for 1.0 secs
Found fillButtonEnabl
[log] highlight Match[115,197 32x13] score=1,00, target=center for 1.0 secs
Found fillButtonDisab
[log] highlight Match[105,223 32x13] score=1,00, target=center for 1.0 secs
Found fillButtonEnabl
[log] highlight Match[106,223 32x13] score=1,00, target=center for 1.0 secs
Found fillButtonDisab
Changed in sikuli: | |
importance: | Undecided → Wishlist |
Changed in sikuli: | |
status: | New → In Progress |
assignee: | nobody → RaiMan (raimund-hocke) |
tags: | added: ide |
Changed in sikuli: | |
importance: | Wishlist → Medium |
milestone: | none → x1.1 |
Changed in sikuli: | |
milestone: | 1.1.0 → 1.2.0 |
Changed in sikuli: | |
importance: | Medium → Wishlist |
milestone: | 2.0.0 → 2.1.0 |