Open Gurey opened 6 years ago
Does it work if you remove the "config_vars"?
The relevant code is here:
I wonder if tesseract is writing to a file extension that OpenOCR isn't expecting.. looks like OpenOCR looks for .txt
or .hocr
Hi! thank you for getting back to me.
these 2 requests works fine:
{
"img_url": "http://bit.ly/ocrimage",
"engine": "tesseract",
"engine_args": {
"config_vars": {
"tessedit_create_hocr": "1",
"tessedit_pageseg_mode": "1"
}
},
"psm": 3
}
{
"img_url": "http://bit.ly/ocrimage",
"engine": "tesseract",
"engine_args": {
"config_vars": {}
},
"psm": 3
}
I just tried to run tesseract in my terminal with the command tesseract pic.jpg out tsv
and that gives me a file named out.tsv
Ok I think the fix is pretty easy, it just needs to look for files with .tsv
extension. Are you able to submit a PR?
Trying to create a TSV gives me an error.
endpoint:
localhost:9292/ocr
with payload:
Gives me:
Error processing image url: . Error: Could not find outfile. Basename: /tmp/785ad93e-2721-4fd1-7892-b78ffc442ae0 Extensions: [txt hocr]
tesseract official TSV config: https://github.com/tesseract-ocr/tesseract/blob/master/tessdata/configs/tsv