Virtual Region or Compare Stored Images

Asked by Nanni Sunil

Consider a scenario.

1. Two images are stored in file system.
2. Check if second image is contained in first image.

One of the possible ways I could do was,
1. Load the first image onto browser or Launch it using Preview(Mac).
2. Create a region.
r = Region(10, 10, 350, 400)
3. use r.exists(image2)

It would be nice if loading / launching the first image could be avoided.

Is it possible ?

I studied http://sikuli.org/docx/region.html, and noted that Region uses SCREEN co-ordinates. Is there a way to create a Region for an image stored in file system.

Question information

Language:
English Edit question
Status:
Solved
For:
SikuliX Edit question
Assignee:
No assignee Edit question
Solved by:
RaiMan
Solved:
Last query:
Last reply:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

Class Finder does exactly, what you are looking for.
http://sikuli.org/docx/finder.html#finder

Revision history for this message
Nanni Sunil (sunil-jayaprakash) said :
#2

Thanks RaiMan, that solved my question.