← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #205371]: One image, multiple sizes?

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
--- at 1:
the basic function used by Sikuli is OpenCV's matchTemplate() feature.
This makes a pixel by pixel compare of one image in another at even sized or larger image.
The image to search might be a plain color area (in most cases works with the latest Sikuli version).
The images are internally converted to the RGB color model ignoring alpha channel.
There is some range of similarity (between 0.0 and 1.0), meaning, that some differences in pixel intensity/color are compensated, but below 0.8-0.9 might lead to false positives.

--- at 2:
Not a feature of Sikuli currently: the probe image is only found in the searched area (e.g. the screen), if it has the same (exact) dimension in pixel (width x height).
Normally, you use a screenshot tool (e.g. Sikuli IDE), to set up the image probes (may be same image in different sizes/resolutions). In some cases it is also needed to have different image sets for different platforms, because currently Sikuli is not neutral against rendering differences for the same image on different platforms.
Generally, there are many possible approaches to solve the scaling issue starting with e.g. Java built in image processing, adding support by OpenCV or simply use an external tool like ImageMagick's convert (which is by far the easiest approach) from within your Sikuli scripts/programs.

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.