← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #686982]: Save image match data to metadata file

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
Currently I do not have any feature for you ready, besides the
FindFailed callback, where you could implement your auto-recapture.

The match-history is an intersting idea, but you have to implement it
yourself currently.

An option of course is to switch on Debug logging at level 3
(Debug.on(3)) and let the log be written to alogfile (setLogFile()).

Then for each successful find-op you will get something like this:
[debug] Region: find: waiting 0 secs for image.png to appear in R[0,0 1920x1200]@S(0)
[debug] Finder2: makeMat: INT_RGB (1920x1200)
[debug] Finder2: makeMat: 3BYTE_BGR (111x64)
[debug] Finder2: doFind: start (stdDev: 201,8497 mean: 655,846143)
[debug] Finder2: doFind: in original: %100,0000 (?70) 258 msec 
[debug] Finder2: doFind: end 258 msec
[debug] Region: find: image.png appeared (M[319,757 111x64]@S(0) S:1,00 C:374,789 [369 msec])

The last line tells you what you need.

On rerun, you just have to look for those lines in case.

The example is done with the latest 2.0.1 SikuliX version.

BTW: the dev version 2.1.0 (nightly builds available) has an experimental recorder feature in an early stage.
If you have a chance to try it and feedback - very welcome.

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