← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #226699]: Documentation on Native APIs for sikuli script

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Just looking into the native modules with an editor might make you
crazy, it is a hell.

So at least use a capable C++ IDE (I am using NetBeans 7.3), to have a
chance to find the definitions of structures and functions, which are
scattered over 4 to 5 modules. Mixing in the text finder feature did not
make it better.

-- Sikuli's current matching (very rough description):

- at the base matchTemplate() is used with CV_TM_CCOEFF_NORMED 
- there is some special handling for one-color-targets
- minMaxLoc() is used to get the top left of the best match

1. search step: 
- target and shot are resized, so the target size is near but greater than 12x12  pixel
(this can be set using Vision.setParameter("MinTargetSize", n) )
(this is currently the one level pyramid - CV's pyrDown() is not used)
- if the score is minimum greater 0.9: return match

otherwise 2. search step: (if minSimilarity < 0.99)
- search target in shot grayscale 
- if the score is minimum greater 0.9: return match

otherwise 3. search step:
- search target in shot (both the original RGB color images)
- return the match information

findAll() works somewhat different - but similar ;-)

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