RaiMan / SikuliX-2014

SikuliX version 1.1.2 (until February 2018)
http://sikulix.com
806 stars 235 forks source link

OCR doesn't recognize text in graphic mode #259

Closed kenorb closed 7 years ago

kenorb commented 7 years ago

I've tested in Chrome, and it seems finding by text works in web browser (plain text on the website), although not in graphic mode of the app.

For example I've run BlueStacks Android emulator and tried to find some text on the screen, but it failed.

My code:

app = App("BlueStacks")
app.focus()
region = Region(App.focusedWindow())
region.find("Search")

The application get focused, but there is this error:

[log] App.focus: [28084:BlueStacks]
[error] script [ MyScript ] stopped with error in line 4
[error] FindFailed ( Search as text )

The same with region.click("Search").

I've also tested some some text in the games, but it failed as well.

Screenshot of the app:

screen shot 2017-05-30 at 18 14 04

How to fix, improve or debug this problem?

Tested on macOS Sierra in Sikulix IDE 1.1.1

RaiMan commented 7 years ago

Sorry, but the text feature is unchanged since 5 years and is very weak. No chance to do anything. ... take it or leave it ;-)

kenorb commented 7 years ago

Is it going to be improved in SikuliX2, or it's basically the same thing? Alternatively can you replace/upgrade the used library or report this issue to OpenCV or whatever it's used for OCR? Where is the right place to address this issue directly?

RaiMan commented 7 years ago

Version 2 will be based on Tess4J which wraps Tesseract 3 as a Java API. All possibilities as with the Tesseract command usage will be available for OCR. But I will touch that area only later this year.

All this has nothing to do with OpenCV. And no one else, than the developer(s) of Sikuli(X) can be addressed about this "issue", since it is how the Tesseract feature usage is implemented deep down in the Sikuli C++ djungle (I will never touch that ;-).