sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #02364
Re: [Question #152605]: I am not able to match my pattern precisely
Question #152605 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/152605
Phi posted a new comment:
I can't get your results. Here is my test code and test results: http://img8.imageshack.us/i/toolbartestresult.png/
My sikuli project: http://dl.dropbox.com/u/344540/testToolbar.sikuli.zip
I am running the test on win7. I couldn't get it to run on os x 10.6.
My code:
[code]
fillEnableButtonImg = "fillButton.png"
fillEnableToolbarImg = "toolbarEnabled.png"
fillDisableToolbarImg = "toolbarDisabled.png"
def testMatch(fillToolbarImg, similarity):
fillButtonPattern = Pattern(fillEnableButtonImg).similar(similarity)
fillToolbarRegion = Region(find(Pattern(fillToolbarImg)))
fillMatch = fillToolbarRegion.exists(fillButtonPattern)
print similarity, " fillMatch ", fillMatch
print "enabled toolbar test"
testMatch(fillEnableToolbarImg, 1.0)
testMatch(fillEnableToolbarImg, 0.99)
testMatch(fillEnableToolbarImg, 0.97)
testMatch(fillEnableToolbarImg, 0.5)
print "disabled toolbar test"
testMatch(fillDisableToolbarImg, 1.0)
testMatch(fillDisableToolbarImg, 0.99)
testMatch(fillDisableToolbarImg, 0.97)
testMatch(fillDisableToolbarImg, 0.5)
[end code]
My results:
enabled toolbar test
1.0 fillMatch None
0.99 fillMatch Match[1163,518 31x17] score=1.00, target=center
0.97 fillMatch Match[1163,518 31x17] score=1.00, target=center
0.5 fillMatch Match[1163,518 31x17] score=1.00, target=center
disabled toolbar test
1.0 fillMatch None
0.99 fillMatch Match[1163,571 31x17] score=1.00, target=center
0.97 fillMatch Match[1163,571 31x17] score=1.00, target=center
0.5 fillMatch Match[1163,571 31x17] score=1.00, target=center
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.