sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #25925
Re: [Question #248324]: sikuli-java: findAll() with a small image returns false matches
Question #248324 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/248324
Status: Answered => Open
Pathiyil is still having a problem:
Thanks for the detailed explanation.
The 'yes' and 'no' images were of dimension 24 X 15. Even when there was
one 'yes' and a few 'no' on the screen, it ended up matching the 'yes' and
'no' with similarity of 0.70.
Didn't realize that color did not make a difference to the search
algorithm. In case one wants to check the status of say a button which has
different colors under different conditions, is there a way to work around
this limitation ?
Thanks.
On 9 May 2014 16:56, "RaiMan" <question248324@xxxxxxxxxxxxxxxxxxxxx> wrote:
> Your question #248324 on Sikuli changed:
> https://answers.launchpad.net/sikuli/+question/248324
>
> RaiMan proposed the following answer:
> 1. if both images (yes and no) are visible on the screen and you take an
> image of yes to search, the match should select yes in any case (provided,
> that the image shot does not contain much background (even colored areas)
> towards the edges, which reduces the score and risks false positives).
> hence: as long as the distinguishing inner pixel area is nearly as large
> as the image shot, the match score should be >0.9.
> this should work down to images of about 10x10, below that it might get
> worse.
>
> … and all this is not a must, but only increasing risk for false
> positives, so there are many cases, where it might work as expected.
>
> 2. same case, but only <no> is visible. using <yes> as image and 0.7,
> you might get a match. The only way to avoid this: use a Pattern with a
> higher score (the score at which yes would be found (should be >0.9, see
> above))
>
> 3. as mentioned by Eugene: color does not add much difference to the score
> due to the used statistical match algorithm, but if the wanted image is
> visible on the screen, it should be found as the best match.
> Only in cases, where it is not visible, there is a risk for false
> positives, if the minSimilarity is not high enough.
>
> If you want to be sure:
> match = find(<yes>)
> if match.exists(Pattern(<yes>).exact()):
> print "it its yes"
> else:
> print "it is not yes, might be no"
>
> looks a bit crude, but this can be used for example to first find a
> button, and then check, wether it is activated or not (greyed out).
>
> --
> If this answers your question, please go to the following page to let us
> know that it is solved:
> https://answers.launchpad.net/sikuli/+question/248324/+confirm?answer_id=3
>
> If you still need help, you can reply to this email or go to the
> following page to enter your feedback:
> https://answers.launchpad.net/sikuli/+question/248324
>
> You received this question notification because you asked the question.
>
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.