← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #278852]: tree node image with expanded(-) and collapsed(+) are not identified seperately

 

Question #278852 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/278852

    Status: Answered => Open

zak_ubuntu is still having a problem:
Hello Raimond, Firstly, You may put this in your blog but better blurred image as I don't know where the problem will come.BTW, what is the link to your blog? In your reply to my query Quote "I have put a script into my mail answer, that has a function to check, wether a folder is closed or not, using this approach"Unquote Did you mean that you added some script in the mail. I could not find so. I had received a notification from mail server that it removed a file name zakariya.zip  If this is the file then please be kind enough to send it to this email Thanks and regards Zakariya  
      From: RaiMan <question278852@xxxxxxxxxxxxxxxxxxxxx>
 To: zakariyamp@xxxxxxxxx 
 Sent: Monday, 14 December 2015, 12:07
 Subject: Re: [Question #278852]: tree node image with expanded(-) and collapsed(+) are not identified seperately
   
Your question #278852 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/278852

    Status: Open => Answered

RaiMan proposed the following answer:
You sent me a mail, with the relevant shots, images and scripts.
My mail answer contains stuff, to understand the problem.
Additionally you should read and understand:
http://sikulix-2014.readthedocs.org/en/latest/basicinfo.html#sikulix-how-does-it-find-images-on-the-screen
... if you want to get happy with SikuliX

Your problem:
the 2 images with the + and the - box differ very little in their similarity, so the only chance is, to
- have very "clean" shots (see my shots)
- and check the similarity as base for the decision open/close

in my test with "good" shots I get this
- for the + situation:
closed 0.998786091805
opened 0.980106055737
- for the - situation:
closed 0.977048933506
opened 0.998902320862

so in your case with good shots, the usage of Pattern(img).exact()
instead of just the image should work, since in both cases the not-
matching image has a similarity less than 0.99.

But there are situations, where the differences are only in the range
above 0.99. Then only checking the evaluated similarity helps using
Match.getScore(), which shows you all decimals.

Another option always is, to divide the approach into 2 steps:
1. find the folder symbol with the text
2. look to the left about the + and/or - box

I have put a script into my mail answer, that has a function to check,
wether a folder is closed or not, using this approach.

I hope it is ok, that I put this as a showcase on my blog using your
images as an example (I will blur things in the images, that I think
should be secret).

-- 
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/278852/+confirm?answer_id=0

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/278852

You received this question notification because you asked the question.

You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.