← Back to team overview

sikuli-driver team mailing list archive

[Question #680605]: Tesseract reads most numbers correctly but not all. how to improve ?

 

New question #680605 on Sikuli:
https://answers.launchpad.net/sikuli/+question/680605

So I tryed all the PSM setting of Tesseract but with all it still reads the "5" as an S, and the "30" as 3 O (so as letters instead of numbers).

NumberCheck: 5
[error] script [ app_part7 ] stopped with error at line --unknown--
[error] Error caused by: Traceback (most recent call last): File "X:\Sikulix projects\app_part7.sikuli\app_part7.py", line 23, in <module> if int(r.text()) == 0: ValueError: invalid literal for int() with base 10: 'S ' 

the weird part is , in the numbercheck (which I putted there as a check up) he reads the number correctly, but once I want to do a certain action with the read number, it is like he reads it again but then incorrect...

How can I change the config of Tesseract? I read the doc, but things like tr.setdpi(50) dont work...

so my questions:

1) I dont get the syntax how to change different parts of Tesseract 

2) what is the best (read easiest way for a beginner in programming) to read those 2 numbers correctly? The numbers are really small like dpi 50 - 70 something. I read I should scale it to 300? How do I do that? 

3) or is there another solution I am not seeing?


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