tesseract  4.00.00dev
tesseract-c_api-demo Namespace Reference

Variables

string lang = "eng"
 
string filename = "../phototest.tif"
 
string libpath = "/usr/local/lib64/"
 
string libpath_w = "../vs2010/DLL_Release/"
 
 TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX')
 
string libname = libpath_w + "libtesseract302.dll"
 
string libname_alt = "libtesseract302.dll"
 
 tesseract = ctypes.cdll.LoadLibrary(libname)
 
 restype
 
 tesseract_version = tesseract.TessVersion()[:4]
 
 api = tesseract.TessBaseAPICreate()
 
 rc = tesseract.TessBaseAPIInit3(api, TESSDATA_PREFIX, lang);
 
 text_out = tesseract.TessBaseAPIProcessPages(api, filename, None , 0);
 
 result_text = ctypes.string_at(text_out)
 

Variable Documentation

◆ api

Definition at line 65 of file tesseract-c_api-demo.py.

◆ filename

string tesseract-c_api-demo.filename = "../phototest.tif"

Definition at line 29 of file tesseract-c_api-demo.py.

◆ lang

string tesseract-c_api-demo.lang = "eng"

Definition at line 28 of file tesseract-c_api-demo.py.

◆ libname

string tesseract-c_api-demo.libname = libpath_w + "libtesseract302.dll"

Definition at line 37 of file tesseract-c_api-demo.py.

◆ libname_alt

string tesseract-c_api-demo.libname_alt = "libtesseract302.dll"

Definition at line 38 of file tesseract-c_api-demo.py.

◆ libpath

string tesseract-c_api-demo.libpath = "/usr/local/lib64/"

Definition at line 30 of file tesseract-c_api-demo.py.

◆ libpath_w

string tesseract-c_api-demo.libpath_w = "../vs2010/DLL_Release/"

Definition at line 31 of file tesseract-c_api-demo.py.

◆ rc

Definition at line 66 of file tesseract-c_api-demo.py.

◆ restype

tesseract-c_api-demo.restype

Definition at line 55 of file tesseract-c_api-demo.py.

◆ result_text

tesseract-c_api-demo.result_text = ctypes.string_at(text_out)

Definition at line 73 of file tesseract-c_api-demo.py.

◆ TESSDATA_PREFIX

string tesseract-c_api-demo.TESSDATA_PREFIX = os.environ.get('TESSDATA_PREFIX')

Definition at line 32 of file tesseract-c_api-demo.py.

◆ tesseract

tesseract-c_api-demo.tesseract = ctypes.cdll.LoadLibrary(libname)

Definition at line 45 of file tesseract-c_api-demo.py.

◆ tesseract_version

tesseract-c_api-demo.tesseract_version = tesseract.TessVersion()[:4]

Definition at line 56 of file tesseract-c_api-demo.py.

◆ text_out

tesseract-c_api-demo.text_out = tesseract.TessBaseAPIProcessPages(api, filename, None , 0);

Definition at line 72 of file tesseract-c_api-demo.py.