Tesseract variable user_defined_dpi Sikulix Default value=300 --- should be ignored/not used

Asked by matteoa

hello,
this is my configuration:
2.0.4-2020-03-14_08:01/Windows10.0/Java8(64)1.8.0_251-b08
I'm working on an OCr application so I'm exploring the various OCr optimizations.
The output of this line:
print str(OCR.globalOptions())
Is this one:
OCR.Options:
data = C:\Users\Myself\AppData\Roaming\Sikulix\SikulixTesseract\tessdata
language(eng) oem(3) psm(3) height(15,1) factor(1,99) dpi(96)
variables: user_defined_dpi:300

I did not set intentionally the user_defined_dpi so I thought it was one of experimental stuff I did to set it as default, so I did this:OCR.globalOptions().variable("user_defined_dpi", "0") to reverse the change to the "natural" default, and the output was accordingly "variables: user_defined_dpi:0".
Then I commented out the setting of 0 for user_defined_dpi and the initial value of 300 was back!

So my question is: the default value for user_defined_dpi in sikulix is 300?
if not, why, if I'm not setting it intentionally, the value it is set this way?
Maybe is there some config file I should edit/remove to bring tesseract stuff back to the default?
Which is the default value in Sikulix for user_defined_dpi?
Thanks for support

Last thing: sometimes in the printout of OCR.globalOptions() i see that the data parameter is set to "none", this seems not to have effects on the Ocr operation, so is possibly only a printout problem, or may it be something I should take care of?

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:
Revision history for this message
Best RaiMan (raimund-hocke) said :
#1

simply ignore
user_defined_dpi:300

... and do not play around with it. It is not used anyways.

The reason behind:
Tess4J/Tesseract produce a warning if this variable is not set or is not between 70 ... 2400

It should not be listed when using OCR.status() until it really has meaning (on the list).

Revision history for this message
matteoa (matteoa) said :
#2

Thanks RaiMan, that solved my question.