Ocr not always working
Hello,
since I have to use Sikulix on a 32bit pc I'm stuck with version 1.1.3.
I have a bar in a web app where I have to read with ocr two items, so the font, the background the size etc are the same.
What I do in the script is to select the two regions and then do the OCr one after the other(but changing the order doesn't affect the (bad) results.
The bar I' working on is something like (the "yes" is actually what I have to Ocr):
-------
Everything is ok? Yes
-------
The OCR of the left phrase works perfectly, while in the right part it read nothing (instead of "Yes").
I tried with this single line script(question 674899):
print selectRegion(
And the results are consistent, the ocr on the right of the bar is always found with no problem, while in the left part found nothing.
The real images are available, if needed.
I tried also the advises in question 271593 but I do not manage to make it run in Sikulix IDE, with these lines:
img = capture(rValAV) # get the image from the screen (in memory)
img1 = Image.create(img) # create an with the new Image class (still in memory)
imgGrey = img1.convertIma
imgGreyResized = imgGrey.resize(3) # resize the image to about 300dpi (usually 3 as factor is sufficient) (still in memory)
text = imgGreyResized.
print text
the error given is:
...
line 113, in <module> imgGreyResized = imgGrey.resize(3) # resize the image to about 300dpi (usually 3 as factor is sufficient) (still in memory) AttributeError: 'java.awt.
...
Since in the right part the Tesseract works perfectly I suppose there is something wrong with what I do.
I'm sorry if I did some beginner mistake...
Thanks for any help
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- RaiMan
- Solved:
- Last query:
- Last reply: