← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #232900]: [1.0] [HowTo] turn on text recognition --- solution

 

Question #232900 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/232900

Description changed to:
--- solution

TextSearch and OCR find("some text") and Region.text() are currently
switched off in the default with respect to the many issues.

The related Settings options to be used (set to true) with Sikuli API
(or outside the IDE):

Settings.OcrTextRead = true; // to switch on the Region.text() function

Settings.OcrTextSearch = true; // to switch on finding text with
find("some text")

Running scripts from inside the IDE alternatively the respective options
in the Preferences -> …more options can be selected.

Improvements for the text features are planned with version 1.1

-------------------------------------------------------------------

I just started with sikuli,

I am using java  + sikuli api,
I am trying to get text from a region.

but what I am getting is

[error] Region.text: text recognition is currently switched off
--- no text ---

the code I am using is

Region r_TCA0_full = r_TCA0_head.below(532);
String txt =  r_TCA0_full.text();
System.out.println(txt);


How to turn on the text recognition?

pacakges I already installed:
libtesseract-dev         3.02.01-2
libtesseract3               3.02.01-2
tesseract-ocr              3.02.01-2
tesseract-ocr-eng      3.02.01-2
tesseract-ocr-osd       3.02.01-2

I am on linux, (ubuntu 12.04), using Sikuli-API-1.0.0-Lnx32.zip

*Actually I need to get the list of items in a list box

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.