Is it possible to detect shapes in sikuliX ?

Asked by ONG YI CHONG on 2018-12-21

Is it possible to detect shapes on the screen and carry out some tasks based on what the shapes detected are ? For example if rectangle do this, if not rectangle do that etc. Since sikuliX uses openCV would it be possible for sikuliX to also detect shapes ?

Question information

Language:
English Edit question
Status:
Answered
For:
Sikuli Edit question
Assignee:
No assignee Edit question
Last query:
2018-12-21
Last reply:
2018-12-21
RaiMan (raimund-hocke) said : #1

Currently not a feature of SikuliX in this sense.

But with the transparency feature you can implement a good "workaround":
Make an image of your shape with a transparent background and use it to search for.

see: https://sikulix-2014.readthedocs.io/en/latest/news.html#using-images-with-transparent-parts-masked-images

ONG YI CHONG (calveeen) said : #2

are we able to import opencv library for our own useage ? for example use openCV to run a shape detection algorithm in sikuliX

RaiMan (raimund-hocke) said : #3

--- are we able to import opencv library for our own useage ?

yes you can.

The native API wrapping Java classes are in
org.opencv. ...

The native library with all features is bundled with SikuliX (for Windows and Mac).

The rest you have to find out yourself. All the best.

Can you help with this problem?

Provide an answer of your own, or ask ONG YI CHONG for more information if necessary.

To post a message you must log in.