hi i want to run tesseract API python with bellow codes, but raised error:
import osimport ctypes lang = "eng" filename = "/usr/src/tesseract-ocr/phototest.tif" libname = "/usr/local/lib64/libtesseract.so.3"TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX')if not TESSDATA_PREFIX: TESSDATA_PREFIX = "../" tesseract = ctypes.cdll.LoadLibrary(libname) tesseract.TessVersion.restype = ctypes.c_char_p tesseract_version = tesseract.TessVersion() api = tesseract.TessBaseAPICreate() rc = tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang)if (rc): tesseract.TessBaseAPIDelete(api) print("Could not initialize tesseract.\n") exit(3) text_out = tesseract.TessBaseAPIProcessPages(api, filename, None, 0) result_text = ctypes.string_at(text_out) print 'Tesseract-ocr version', tesseract_versionprint result_text could anyone help me , how to resolve it ? thanks -- You received this message because you are subscribed to the Google Groups "tesseract-ocr" group. To unsubscribe from this group and stop receiving emails from it, send an email to tesseract-ocr+unsubscr...@googlegroups.com. To post to this group, send email to tesseract-ocr@googlegroups.com. Visit this group at https://groups.google.com/group/tesseract-ocr. To view this discussion on the web visit https://groups.google.com/d/msgid/tesseract-ocr/0f068058-4de3-409f-aa8b-9256622cdc2d%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.