← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #665345]: Ocr settings to get correct text from a region

 

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

    Status: Open => Answered

RaiMan proposed the following answer:
There are 2 classes, where text recognition based on Tesseract is
handled:

org.sikuli.script.TextRecognizer:
how to use it, can be seen in the method Region.text()
There is this faq 2709 telling how to switch language (be aware: the standard language is eng (english))

org.sikuli.natives.Vision
which implements the features based on the native Tesseract library and JNI (C++)
Nothing to do here except, that you can try to add Tesseract specific settings to the environment using
setParameter(String param, float val)
setSParameter(String param, String val)

About possible parameters and their values you have to consult the
Tesseract docs (Tesseract 3 is used).

Working on this level, you might find a way to optimize your results,
but be aware: it might be necessary, to implement your own text-read
code based on the above 2 classes and their implementation.

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