glitchassassin/lackey

Region.exists() cannot work with Pattern(np.array())

Opened this issue · 5 comments

gzll commented

needle = cv2.imread(pattern.path)

Does this work in Sikuli?

In SikuliX a Pattern in the 1st place has to be created based on an image file name (as I guess it is implemented here).
Other options like from a ScreenImage object or a Java BufferedImage are SikuliX specific and not intended to be part of the official API.

The question is: what is np.array()?

RaiMan from SikuliX

In Lackey, screen captured images are stored internally in a numpy array (probably the equivalent of the Java BufferedImage).

So I guess, she/he wants to create a Pattern from a captured image.

So you have to decide, wether you allow that or you say: save the internal image to a temp file and then use it with the Pattern feature.

Fix in develop for testing.