Question #240729 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/240729
Status: Open => Answered
RaiMan proposed the following answer:
For this find on the whole region is not appropriate, since you cannot
control, that it steps to the right with the next find() on the same
region.
so you either have to step through the region text yourself and check
every bar or try with a findAll().
One more thing:
I do not want to discourage you, but this will never be efficient:
- depending on the font used, there might not be a one-colored gap between
characters (look at a magnified version of the text above "Can you help with
this problem?") - the gaps vary and some are not put white.
- a simple calculation:
-- to search a gap takes 5 msecs
-- to compare a character takes 10 msecs
-- lowercase and uppercase characters plus digits and some special characters
sum up to about 70
-- so the average character identification takes 35 compares - about 400 msec
minimum (including the gap search per character)
-- so to read a 5 character word will be minimum 2 seconds (plus pre and post
processing)
I do not think this makes sense.
A possible approach though might be, to have an image of all possible
characters, numbers and signs and a description (list, map, ...), that holds
the information, which character is where in the row.
If you manage to isolate a character image in your text region (the one to do
OCR on), you might use the capture of this character and search it in the
prepared alphabet-image.
This should cut down the time spent per character to the half or even some less.
But still not efficient.
I think, if you really want to do OCR with Sikuli, you should use the
builtin Tesseract features, which are rather well for the bundled
english tessdata set with version 1.0.1. For other languages feel free
to install the appropriate set. And finally, you always might use the
Tesseract utilities to make it "learn" more fonts.
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.
_______________________________________________
Mailing list: https://launchpad.net/~sikuli-driver
Post to : [email protected]
Unsubscribe : https://launchpad.net/~sikuli-driver
More help : https://help.launchpad.net/ListHelp