Is there any way to find only borders of Image

Asked by Prabhakaran on 2018-07-06

Hi RaiMan,

To find images on screen I am using below mentioned anyone.
s.find(new Pattern("ImageName").exact() );
s.find(new Pattern("ImageName").similar((float)0.99) );
s.find(new Pattern("ImageName").similar((float)0.25) );
s.find(new Pattern("ImageName").similar((float)0.50) );
s.find(new Pattern("ImageName").similar((float)0.75) );

1) How is SikuliX working against similarity?
2) May I use similarity as 0, 10, 20 etc. ?
3) how to find borders after that want to check parts finally actual image?

Question information

English Edit question
Sikuli Edit question
No assignee Edit question
Last query:
Last reply:
RaiMan (raimund-hocke) said : #1

No, not possible.

Similarity does not help, since it is related to all pixels.

What you need is to ignore parts of an image (inside the borders).
This kind of "transparency" is not yet supported.

Currently the only chance is to find parts of the border as images and then calculate your image region.

first I want to identify On screen available shapes
Then I want to identify the parts of the shapes (like Corners 2-2px, lines )
based on matched images I want to do action on that matched Regions.

RaiMan (raimund-hocke) said : #3

--- first I want to identify On screen available shapes
Not really a job for SikuliX, because you need to know in advance, what you are looking for (captured images).

I think, you have to dive into OpenCV 3.x using the Java interface implementation.
If you decide to do so, you might have a look into SikuliX version 2, that uses the OpenCV Java API (class com.sikulix.core.Finder).
This has implementations for matchTemplate with transparency and a basic implementation for edge detection.

Hi RaiMan,

Its great, but as I am being as a beginner, I am not able to merge SikuliX2 project code with my old project(used sikuliX1.1.x).
Kindly help me the steps to test SikuliX2
also is there any the ways to add as Jar like sikuliX1.1.x.

Really I don't know how to start SikuliX2 like SikuliX1.

RaiMan (raimund-hocke) said : #5

Ok, then I cannot help you currently, sorry.

Can you help with this problem?

Provide an answer of your own, or ask Prabhakaran for more information if necessary.

To post a message you must log in.