Working at the university, I am experiencing the problem of not being able to change config files like "digits" in the tessdata as I do not have admin rights. So I want to run everything from my home, creating patterns, configs and training data files there. Starting my detection like this works fine with the expected output:
tesseract ../pics/hi.png out --tessdata-dir ./tessdata digits
I.e. by setting the path from where I run tesseract. But how can I include this path (best as an absolute one) in the line where pytesser calls tesseract? It looks as follows
args = [tesseract_exe_name, input_filename, output_filename,'nobatch', '/prog/tessdata/configs/digits']
which doesn't work. Using just digits as a path draws the digits file from the common program and file archive which I do not want.
What's the way to include an absolute path here to tell tesseract where to draw the config files from? Or is that not possible? Any hints would be much appreciated!
So I think I found the answer here: https://docs.python.org/2/library/subprocess.html#subprocess.Popen
does the job, just need to be seperated strings.