sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #47078
Re: [Question #668667]: Return the dimensions of an image that's just been found
Question #668667 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/668667
Status: Open => Answered
masuo proposed the following answer:
When an image is found you can get dimensions of an image.
m = exists("image01.png")
if m:
print m
print m.getX(), m.getY(), m.getW(), m.getH()
But I can't understand you want to capture a new image when an image is
found.
BTW:
SikuliX IDE have pattern setting feature.
Do you know this feature?
Click an image in editer pane of SikuliX IDE, pattern setting window open.
There are matching preview tab and target offset tab in pattern setting window.
You can adjust similarity manually by using matching preview feature of pattern setting window.
By using matching preview feature and target offset feature, pattern object is created like this.
exists(Pattern("image01.png").similar(0.80).targetOffset(10,0))
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.