tesserocr icon indicating copy to clipboard operation
tesserocr copied to clipboard

api.Recognize(timeout=1000) does not return after 1 second

Open Belval opened this issue 7 years ago • 0 comments

I came across @sirfz post in https://github.com/sirfz/tesserocr/issues/55 which mentionned that you could now pass a timeout parameter to Recognize.

Unfortunately it does not seem to work.

 with tesserocr.PyTessBaseAPI() as api:
       api.SetImage(image)
        if api.Recognize(timeout=1000):
            text = api.GetUTF8Text()
        else:
            raise Exception("OCR timeout exceeded")

Belval avatar Nov 20 '18 16:11 Belval