← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #233608]: Efficiency for Chess

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
at 4.
might be confusing, but not really ;-)

The path Sikuli 9 - 10 - X to SikuliX 1.0.1 (is the original Sikuli
based development on native C++ interfaces to OpenCV.

Sikuli Java API (http://code.google.com/p/sikuli-api/) is a newer
development of one of the original Sikuli developers (Tom Yeh), that is
implemented in pure Java using the Java implementation of OpenCV
(javacv). It is to some extent feature compatible to SikuliX, but not
API compatible. It has some nice features to show effects on the screen,
but is slightly slower in the search functions (reason: it uses JNA not
JNI).

at 3.
As already mentioned: the tool you need is OpenCV, that has many more detection and grabbing features.And as far as I knw, it can grab directly from the camera. When programming in Java then using javacv is the first choice, since you do not need any native C++ programming.

at 1 and 2:
I already laid out, how I would design my solution in comment #1.
The capture speed heavily depends on cpu and grafics capability of your system.
So just make your own timing probes to check that.

Since a chessboard is quadratic, on the mentioned screen it might be 1024 * 1024, which leads to one field being 128*128 pixels.
Since each find operation with Sikuli makes a screen grab, simple grab timing is not relevant.
On my MacBookAir (2012, 2GHz I7, 8GB, Intel HD Graphics 4000 512 MB) in a screen region having 1024x1024 pixels a find for an image of 128x128 took 150 msec average.
checking for the image in a region of 128x128 takes 30 msec average.

I think, that these timing parameters prove, that just dump pattern
matching with Sikuli is not the right approach for your life chess
challenge.

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