OCR problems: grayed out text, special characters, text with spaces
I tried Sikuli 2.0.4 with ocr for few of my testcases but the results were inconsistent as we have seen from Bug #1852613
I tried tesseract.js with good ability to read most of the texts from images.
So, is there a way to use tesseract.js with sikuli?
The mentioned bug is no longer relevant.
With 2.0.4: Did you already try the available options?
What system? What Java? I am generally interested in samples, where you think it is not optimal.
Integration of tesseract.js with SikuliX is not possible, since SikuliX is based on Java and tesseract.js works on node.js - different worlds. There might be bridges, but that is outside of my experiences.
The mentioned bug is no longer relevant.
With 2.0.4: Did you already try the available options?
What system? What Java? I am generally interested in samples, where you think it is not optimal.
Integration of tesseract.js with SikuliX is not possible, since SikuliX is based on Java and tesseract.js works on node.js - different worlds. There might be bridges, but that is outside of my experiences.
Pre-reqs: Java version "1.8.0_281" windows 10 Enterprise/Sikuli 2.0.4 python/Chrome 88
Yes, I did try with Sikuli 2.0.4. Below is my sample code.
Settings.OcrTextRead = True
Settings.OcrTextSearch = True
#define region
r.highlight(2)
r.findText("Open").highlight(2) #fails
r.findText("Open").click() #fails
Result:
If text I want to click is like below, it fails to identify and click. We encounter same issue in few textfields which have help text before type-in as shown below.
Fail:
-
Grayed out labels:

-
Input textfields: Like username/password etc.,

-
Text with special characters

-
Labels with space

Pass: I see it working only for labels which are not grayed-out.
Whereas, tesseract.js is able to read text from all of the above samples (I tested), so I thought if there is a way to incorporate tesseract.js with SikuliX. But I also agree with your comment on different platforms.
Are above initializations ok to enable ocr in sikulix python?