← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #244712]: Support for mutiple displays

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
SikuliX contains a ScreenUnion class, that combines all active monitors into one big screen area, where the individual monitor areas are positioned according to their relative coordinates to the primaries monitor top left corner (0,0). 
The coordinates and the relative position to the primary depend on the graphics configuration, that Java evaluates from the collected information returned by the underlying system.
In the current version, this feature is only used by the IDE's preview and principally works.

The problem: needed memory resources:
a captured image internally is an integer or byte array, depending on the type of image:
- only colour info per pixel: 3 bytes per pixel
- color + transparency: 4-Byte integer per pixel

SikuliX internally switches as soon as possible to the 3-bytes-per-pixel
version.

Taking a typical monitor size of about 1900 x 1200:
- about 2.3 M pixels
- giving a byte array of length 6.9 M

including intermediate storage (conversion to final OpenCV Mat),
capturing such one monitor might result in a max memory consumption of
about 10 - 20 Mbytes.

the maximum array size limited by the max integer value (about 2000
million) is not the problem here, but simply the memory available to the
application.

In the end, it is simply a case of testing. I do not have experiences
with more than 2 monitors, but I know that people are using Sikuli in
environments with 4+ monitors and I never heard about capturing
problems.

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