← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #220076]: Best way to recognize an image

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
at 1)
a "good" image should contain as little background as possible and concentrate on the distinguishing parts of the image. It should be found with a similarity score >0.9

at 2)
when using exists() you always should have an else branch, that handles the not found situation - otherwise it makes no sense, to use it (since your script silently continues in case of not found).

at 3)
I do not recommend, to generally work with min similarities below 0.8 to 0.9 (see 1). If you have good images, then restricting the search region should only be necessary, to assure, you get the right match (because somewhere on the screen there might be other possible matches) and to speed up the workflow.

In your case you should analyze what the problem is. I had cases in the
past, where visual objects in different environments where rendered
differently (eg. added/left shadows, ...) caused by other skin/GUI
setups. This might not be obvious for the human watcher, but can be
evaluated on the pixel level using image viewers.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.