← Back to team overview

sikuli-driver team mailing list archive

[Question #272460]: detecting colors

 

New question #272460 on Sikuli:
https://answers.launchpad.net/sikuli/+question/272460

I need to determine whether a region has one (background) color or another -- an active button vs. a disabled button.  I can narrow the search to the button's general region, so there aren't any other possible buttons to find.  If I set the similarity too low, Sikuli finds both types of button.  If I set it too high, it doesn't find either… and the line between the two doesn't seem to be stable.  Sometimes it will work, sometimes not.  

I see the below two questions, in which you suggest doing a second check just for the color of the found region/image.  Is this still the best thing to do?  If so, is it possible in Python?  I don't see much in the API in the way of color.

There are other similar, but more complex, cases in which I need to determine the color of some (foreground) text -- that would be good enough even if I can't (currently) OCR it (it's also quite small).  Sikuli also seems to have trouble matching images of the colored text -- again, it can't tell the colors apart.  It seems like maybe the background color is dominating the comparison.

(… which makes me wonder if it's possible to use transparent colors to tell Sikuli to ignore those pixels / parts of the image?)

Tangentially, is it possible in Python or Java to get direct access to the OpenCV that Sikuli is using?


https://answers.launchpad.net/sikuli/+question/145806
https://answers.launchpad.net/sikuli/+question/176332


-- 
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.