text recognition (OCR) is switched off in Sikuli when using java

Christopher Lawless picture Christopher Lawless · Nov 14, 2013 · Viewed 21k times · Source

Has anyone got the OCR function Region.text() working in Sikuli with java?

I keep getting this as output

Region.text: text recognition is currently switched off

and I can't find anyway to turn this feature on in java.

Answer

ivan25 picture ivan25 · Apr 3, 2014

Sikuli has Settings class (org.sikuli.basics.Settings) that has options:

Settings.OcrTextSearch

Settings.OcrTextRead

Put them true and it should work :)

P.S. Actually I don"t know why are they by default false...