0

I'm using tesseract for the OCR part , but I've run into a small setback with defining the output. Could anyone help me out in resolving this issue

details = pytesseract.image_to_data(threshold_img, output_type=Output.DICT, config=custom_config, lang='eng')

It caused an error

NameError                                 Traceback (most recent call last)
<ipython-input-12-0b2393b8b9e3> in <module>
----> 1 details = pytesseract.image_to_data(threshold_img, output_type=Output.DICT, config=custom_config, lang='eng')

NameError: name 'Output' is not defined
Kris
  • 8,680
  • 4
  • 39
  • 67
  • try this post from livezingy [Define Output](https://stackoverflow.com/questions/60009533/drawing-bounding-boxes-with-pytesseract-opencv) . Seems like the Output in your code is not defined. Pls, share the complete code so we can take a further look. – simpleApp Dec 30 '21 at 13:35
  • Have you imported the `Output` in your code ? like `from pytesseract import Output ` ? – Kris Dec 30 '21 at 13:46
  • Yes @Kris , I did import the output from pytesseract. Thanks for getting back to me. – stagwanderer25 Dec 30 '21 at 13:51
  • Sure @simpleApp I'll have a look at it. Thanks for your time to review and get back. – stagwanderer25 Dec 30 '21 at 13:53

0 Answers0