← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #688961]: about onChange() function

 

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

RaiMan proposed the following answer:
you say:
for example, if  Settings.ObserveScanRate =1, it means one second will scan one as my understand,  when start one scan, if will capture one screenshot for current region, after 1s, it will make one screenshot, and then make the compare, to get the differnt pixel for these two screenshot

my answer: yes, correct.

about minChangedSize: 
looking into the implementation, I have to admit, that a minChangedSize given with onChange() is simpy ignored deep down in the code.
In fact the fixed area of changed pixels is taken as 5x5 (hence 25 pixels).
The 2 images are compared after turned to grayscale. A pixel is taken as changed, if its gray value (0 .. 255) differs by 3.

The OpenCV based implementation can be found in
Finder.Finder2.findChanges().

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