← 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:
finding changes itself is rather fast (< some 10 msecs, the smaller the
image the faster).

with this you can make your own change-detector:

... might be a region
image1 = SCREEN.capture(...)
# do something or simply wait
image2 = SCREEN.capture(...)

finder = Finder(image1)
start = time.time()
changes = finder.findChanges(image2)
print "elapsed:", time.time() - start
for change in changes:
  #if (change.w > nnn): continue # do some filtering
  change.highlightOn()
  print change
wait(5)

you might even afterwards combine smaller regions to larger ones:
region1.union(region2)

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