← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #665568]: Possible OCR improvement through screen capture change?

 

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

RaiMan proposed the following answer:
Tesseract:
When using the tesseract command from commandline, then as a guideline from Tesseract you have to take care, that the given image has a resolution of at least 200 dpi better 300 dpi. Another guideline is to turn it to greyscale or even black/white for Tesseract processing.

This means, an image captured with SikuliX usually has a resolution of 72 - 96 dpi (depending on the screen's definition).
This means, a normal screen capture has to be enlarged with factor 3 - 4 before giving it into Tesseract (one might use ImageMagick for that).

In the SikuliX implementation internally the image is enlarged and
turned to greyscale before giving it to Tesseract.

The current weaknesses of Region.text() in SikuliX are caused by the fact, that the implementation is from 2011 (unchanged since then written in C++) and based on the Tesseract 2 features. Only a few standard fonts shown on a clean monochrome background with high contrast can be read with higher reliability. There are big problems with variable spacing and special characters.
Tesseract 3 has tons of options, that can be used, to optimise the results including the learning features. All this cannot be used in a simple way in the current implementation (see faq 2709).

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