← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #184410]: Multi-Part Pattern: Sikuli + Regex = Sikex (searching simultanouesly for more than one image)

 

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

RaiMan posted a new comment:
Thanks for the clarification (file name convention vs. information
stored in png file).

I personally like your ideas and there surely will be the one or the other, who wants to use it.
That's, why I made it a feature request bug.

But still I doubt, that it is the preferred way to implement this as a
general solution for Sikuli (see my concerns above).

*** encoding processing information in image filename - I think it is
possible rather easy

--- grouping/sequencing (and/or)
This is what you already have (I would not use any special characters besides hyphen and underscore).

-- screen position of an image in the group
Thinking from the resulting final region you have 2 alternatives:
-1: relative right, left, above, below to another image in the sequence (rN, lN, aN, bN)
N is the number of the reference element, you can have as many of these attributes as needed (e.g. for image 3: r1a1b2 = right-above of image 1 and below image 2)
-2: absolute: max once per group: top-left,  top-right, bottom-left,  bottom-right (tl, tr, bl, br)
more than once: top-middle, left-middle, right-middle, bottom-middle (tm, lm, rm, bm) 
the search direction for the middle elements depend on the previous corner element 

A group can either use -1 (scattered pattern) or -2 (frame-like pattern)

-- resulting filenames

relative:
resourceName__01-01.png
resourceName__01-01__a1.png
resourceName__01-03__r1a1b2.png

absolute:
resourceName__01-01__tl.png
resourceName__01-02__tm.png
resourceName__01-03__tm.png
resourceName__01-04__br.png

I think that these images should be searched generally with a min
similarity of 0.9 or even 0.95, so there is no need to encode this with
the images.

The resulting region is the smallest region, that contains all match
regions of the group elements. It should remember the matches it is
based on and the MultiPattern.

I would wrap this in a class MultiPattern() with a basic usage of p =
MultiPattern(resourceName), which could be used in find operations just
like the existing Pattern class.

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