sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #52670
Re: [Question #684964]: textOCR.setPSM crashing
Question #684964 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/684964
Status: Open => Answered
RaiMan proposed the following answer:
We have removed the OSD support (not relevant in the SikuliX context)
hence the PSM's 0, 1, 12 throw this error now.
On the other hand, it does not make sense, to loop through the PSM's.
You should select what is suitable in your situation or just work with the default 3.
/**
* Page segmentation modes:
* 0 Orientation and script detection (OSD) only.
* 1 Automatic page segmentation with OSD.
* 2 Automatic page segmentation, but no OSD, or OCR.
* 3 Fully automatic page segmentation, but no OSD. (Default)
* 4 Assume a single column of text of variable sizes.
* 5 Assume a single uniform block of vertically aligned text.
* 6 Assume a single uniform block of text.
* 7 Treat the image as a single text line.
* 8 Treat the image as a single word.
* 9 Treat the image as a single word in a circle.
* 10 Treat the image as a single character.
* 11 Sparse text. Find as much text as possible in no particular order.
* 12 Sparse text with OSD.
* 13 Raw line. Treat the image as a single text line, bypassing hacks that are Tesseract-specific.
*/
Sorry, but the docs are a bit behind.
We use Tess4J 4.4.x with Tesseract 4.1.x
--
You received this question notification because your team Sikuli Drivers
is an answer contact for Sikuli.