18 #ifndef TESS_CAPI_INCLUDE_BASEAPI 19 # define TESS_CAPI_INCLUDE_BASEAPI 27 return TessBaseAPI::Version();
37 for (
char** pos = arr; *pos !=
nullptr; ++pos)
47 #ifndef DISABLED_LEGACY_ENGINE 50 TessBaseAPI::DeleteBlockList(block_list);
92 renderer->insert(next);
97 return renderer->next();
102 return renderer->BeginDocument(title);
107 return renderer->AddImage(api);
112 return renderer->EndDocument();
117 return renderer->file_extension();
122 return renderer->title();
127 return renderer->imagenum();
142 return handle->getOpenCLDevice(device);
147 handle->SetInputName(name);
152 return handle->GetInputName();
157 handle->SetInputImage(pix);
162 return handle->GetInputImage();
167 return handle->GetSourceYResolution();
172 return handle->GetDatapath();
177 handle->SetOutputName(name);
182 return handle->SetVariable(name, value) ?
TRUE :
FALSE;
187 return handle->SetVariable(name, value) ?
TRUE :
FALSE;
192 return handle->GetIntVariable(name, value) ?
TRUE :
FALSE;
198 if (handle->GetBoolVariable(name, &boolValue))
211 return handle->GetDoubleVariable(name, value) ?
TRUE :
FALSE;
216 return handle->GetStringVariable(name);
221 handle->PrintVariables(fp);
226 FILE* fp = fopen(filename,
"w");
229 handle->PrintVariables(fp);
238 return handle->GetVariableAsString(name, val) ?
TRUE :
FALSE;
243 char** vars_vec,
char** vars_values,
size_t vars_vec_size,
244 BOOL set_only_non_debug_params)
248 if (vars_vec !=
nullptr && vars_values !=
nullptr) {
249 for (
size_t i = 0; i < vars_vec_size; i++) {
255 return handle->Init(datapath, language, mode, configs, configs_size, &varNames, &varValues, set_only_non_debug_params);
260 char** configs,
int configs_size)
262 return handle->Init(datapath, language, oem, configs, configs_size,
nullptr,
nullptr,
false);
267 return handle->Init(datapath, language, oem);
272 return handle->Init(datapath, language);
277 return handle->GetInitLanguagesAsString();
283 handle->GetLoadedLanguagesAsVector(&languages);
284 char** arr =
new char*[languages.
size() + 1];
285 for (
int index = 0; index < languages.
size(); ++index)
286 arr[index] = languages[index].strdup();
287 arr[languages.
size()] =
nullptr;
294 handle->GetAvailableLanguagesAsVector(&languages);
295 char** arr =
new char*[languages.
size() + 1];
296 for (
int index = 0; index < languages.
size(); ++index)
297 arr[index] = languages[index].strdup();
298 arr[languages.
size()] =
nullptr;
302 #ifndef DISABLED_LEGACY_ENGINE 305 return handle->InitLangMod(datapath, language);
311 handle->InitForAnalysePage();
316 handle->ReadConfigFile(filename);
321 handle->ReadDebugConfigFile(filename);
326 handle->SetPageSegMode(mode);
331 return handle->GetPageSegMode();
335 int bytes_per_pixel,
int bytes_per_line,
336 int left,
int top,
int width,
int height)
338 return handle->TesseractRect(imagedata, bytes_per_pixel, bytes_per_line, left, top, width, height);
341 #ifndef DISABLED_LEGACY_ENGINE 344 handle->ClearAdaptiveClassifier();
349 int bytes_per_pixel,
int bytes_per_line)
351 handle->SetImage(imagedata, width, height, bytes_per_pixel, bytes_per_line);
356 return handle->SetImage(pix);
361 handle->SetSourceResolution(ppi);
366 handle->SetRectangle(left, top, width, height);
371 handle->SetThresholder(thresholder);
376 return handle->GetThresholdedImage();
381 return handle->GetRegions(pixa);
386 return handle->GetTextlines(pixa, blockids);
390 struct Pixa** pixa,
int** blockids,
int** paraids)
392 return handle->GetTextlines(raw_image, raw_padding, pixa, blockids, paraids);
397 return handle->GetStrips(pixa, blockids);
402 return handle->GetWords(pixa);
407 return handle->GetConnectedComponents(cc);
412 return handle->GetComponentImages(level, text_only !=
FALSE, pixa, blockids);
417 const BOOL raw_image,
const int raw_padding,
418 struct Pixa** pixa,
int** blockids,
int** paraids)
420 return handle->GetComponentImages(level, text_only !=
FALSE, raw_image, raw_padding, pixa, blockids, paraids);
425 return handle->GetThresholdedImageScaleFactor();
430 return handle->AnalyseLayout();
435 return handle->Recognize(monitor);
438 #ifndef DISABLED_LEGACY_ENGINE 441 return handle->RecognizeForChopTest(monitor);
448 if (handle->ProcessPages(filename, retry_config, timeout_millisec, renderer))
457 if (handle->ProcessPage(pix, page_index, filename, retry_config, timeout_millisec, renderer))
465 return handle->GetIterator();
470 return handle->GetMutableIterator();
475 return handle->GetUTF8Text();
480 return handle->GetHOCRText(
nullptr, page_number);
485 return handle->GetBoxText(page_number);
490 return handle->GetUNLVText();
495 return handle->MeanTextConf();
500 return handle->AllWordConfidences();
503 #ifndef DISABLED_LEGACY_ENGINE 506 return handle->AdaptToWordStr(mode, wordstr) ?
TRUE :
FALSE;
522 return handle->IsValidWord(word);
527 return handle->GetTextDirection(out_offset, out_slope) ?
TRUE :
FALSE;
532 handle->SetDictFunc(f);
537 handle->ClearPersistentCache();
542 handle->SetProbabilityInContextFunc(f);
545 #ifndef DISABLED_LEGACY_ENGINE 548 int* orient_deg,
float* orient_conf,
const char** script_name,
float* script_conf)
551 success = handle->DetectOrientationScript(orient_deg, orient_conf, script_name, script_conf);
552 return (
BOOL)success;
556 int* num_features,
int* FeatureOutlineIndex)
558 handle->GetFeaturesForBlob(blob, int_features, num_features, FeatureOutlineIndex);
563 return TessBaseAPI::FindRowForBox(blocks, left, top, right, bottom);
567 int* unichar_ids,
float* ratings,
int* num_matches_returned)
569 handle->RunAdaptiveClassifier(blob, num_max_matches, unichar_ids, ratings, num_matches_returned);
572 #endif // ndef DISABLED_LEGACY_ENGINE 576 return handle->GetUnichar(unichar_id);
581 return handle->GetDawg(i);
586 return handle->NumDawgs();
589 #ifndef DISABLED_LEGACY_ENGINE 592 return TessBaseAPI::MakeTessOCRRow(
baseline, xheight, descender, ascender);
597 return TessBaseAPI::MakeTBLOB(pix);
602 TessBaseAPI::NormalizeTBLOB(tblob, row, numeric_mode !=
FALSE);
604 #endif // ndef DISABLED_LEGACY_ENGINE 608 return handle->oem();
613 handle->InitTruthCallback(cb);
618 handle->set_min_orientation_margin(margin);
623 handle->GetBlockTextOrientations(block_orientation, vertical_writing);
626 #ifndef DISABLED_LEGACY_ENGINE 629 return handle->FindLinesCreateBlockList();
650 return handle->Next(level) ?
TRUE :
FALSE;
655 return handle->IsAtBeginningOf(level) ?
TRUE :
FALSE;
661 return handle->IsAtFinalElement(level, element) ?
TRUE :
FALSE;
665 int* left,
int* top,
int* right,
int* bottom)
667 return handle->BoundingBox(level, left, top, right, bottom) ?
TRUE :
FALSE;
672 return handle->BlockType();
677 return handle->GetBinaryImage(level);
681 struct Pix* original_image,
int* left,
int* top)
683 return handle->GetImage(level, padding, original_image, left, top);
687 int* x1,
int* y1,
int* x2,
int* y2)
689 return handle->Baseline(level, x1, y1, x2, y2) ?
TRUE :
FALSE;
696 handle->Orientation(orientation, writing_direction, textline_order, deskew_angle);
700 BOOL *is_list_item,
BOOL *is_crown,
int *first_line_indent)
702 bool bool_is_list_item, bool_is_crown;
703 handle->ParagraphInfo(justification, &bool_is_list_item, &bool_is_crown, first_line_indent);
705 *is_list_item = bool_is_list_item ?
TRUE :
FALSE;
707 *is_crown = bool_is_crown ?
TRUE :
FALSE;
738 return handle->Next(level);
743 return handle->GetUTF8Text(level);
748 return handle->Confidence(level);
753 return handle->WordRecognitionLanguage();
757 BOOL* is_underlined,
BOOL* is_monospace,
BOOL* is_serif,
758 BOOL* is_smallcaps,
int* pointsize,
int* font_id)
760 bool bool_is_bold, bool_is_italic, bool_is_underlined, bool_is_monospace, bool_is_serif, bool_is_smallcaps;
761 const char* ret = handle->WordFontAttributes(&bool_is_bold, &bool_is_italic, &bool_is_underlined, &bool_is_monospace, &bool_is_serif,
762 &bool_is_smallcaps, pointsize, font_id);
766 *is_italic = bool_is_italic ?
TRUE :
FALSE;
768 *is_underlined = bool_is_underlined ?
TRUE :
FALSE;
770 *is_monospace = bool_is_monospace ?
TRUE :
FALSE;
772 *is_serif = bool_is_serif ?
TRUE :
FALSE;
774 *is_smallcaps = bool_is_smallcaps ?
TRUE :
FALSE;
780 return handle->WordIsFromDictionary() ?
TRUE :
FALSE;
785 return handle->WordIsNumeric() ?
TRUE :
FALSE;
790 return handle->SymbolIsSuperscript() ?
TRUE :
FALSE;
795 return handle->SymbolIsSubscript() ?
TRUE :
FALSE;
800 return handle->SymbolIsDropcap() ?
TRUE :
FALSE;
810 return handle->Next();
815 return handle->GetUTF8Text();
820 return handle->Confidence();
835 monitor->
cancel = cancelFunc;
TESS_API struct Pix *TESS_CALL TessBaseAPIGetThresholdedImage(TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPISetInputName(TessBaseAPI *handle, const char *name)
struct TessChoiceIterator TessChoiceIterator
bool(* TessCancelFunc)(void *cancel_this, int words)
TESS_API int TESS_CALL TessBaseAPIIsValidWord(TessBaseAPI *handle, const char *word)
TESS_API TessPageIterator *TESS_CALL TessResultIteratorGetPageIterator(TessResultIterator *handle)
TESS_API void TESS_CALL TessChoiceIteratorDelete(TessChoiceIterator *handle)
TESS_API int TESS_CALL TessResultRendererImageNum(TessResultRenderer *renderer)
TESS_API void TESS_CALL TessBaseAPISetMinOrientationMargin(TessBaseAPI *handle, double margin)
TESS_API size_t TESS_CALL TessBaseAPIGetOpenCLDevice(TessBaseAPI *handle, void **device)
TESS_API void TESS_CALL TessBaseAPISetThresholder(TessBaseAPI *handle, TessImageThresholder *thresholder)
TESS_API void TESS_CALL TessPageIteratorBegin(TessPageIterator *handle)
TESS_API BOOL TESS_CALL TessBaseAPIDetectOrientationScript(TessBaseAPI *handle, int *orient_deg, float *orient_conf, const char **script_name, float *script_conf)
TESS_API char **TESS_CALL TessBaseAPIGetLoadedLanguagesAsVector(const TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIGetThresholdedImageScaleFactor(const TessBaseAPI *handle)
TESS_API void TESS_CALL TessDeleteText(char *text)
TESS_API BOOL TESS_CALL TessPageIteratorBaseline(const TessPageIterator *handle, TessPageIteratorLevel level, int *x1, int *y1, int *x2, int *y2)
TESS_API TessResultRenderer *TESS_CALL TessPDFRendererCreate(const char *outputbase, const char *datadir, BOOL textonly)
TessParagraphJustification
struct TessUnlvRenderer TessUnlvRenderer
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetRegions(TessBaseAPI *handle, struct Pixa **pixa)
TESS_API const char *TESS_CALL TessBaseAPIGetUnichar(TessBaseAPI *handle, int unichar_id)
struct TessPDFRenderer TessPDFRenderer
TESS_API void TESS_CALL TessBaseAPIClearPersistentCache(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIPrintVariablesToFile(const TessBaseAPI *handle, const char *filename)
TESS_API const char *TESS_CALL TessResultIteratorWordFontAttributes(const TessResultIterator *handle, BOOL *is_bold, BOOL *is_italic, BOOL *is_underlined, BOOL *is_monospace, BOOL *is_serif, BOOL *is_smallcaps, int *pointsize, int *font_id)
TESS_API void TESS_CALL TessBaseAPISetDictFunc(TessBaseAPI *handle, TessDictFunc f)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetComponentImages1(TessBaseAPI *handle, const TessPageIteratorLevel level, const BOOL text_only, const BOOL raw_image, const int raw_padding, struct Pixa **pixa, int **blockids, int **paraids)
void * cancel_this
monitor-aware progress callback
TESS_API int TESS_CALL TessMonitorGetProgress(ETEXT_DESC *monitor)
TESS_API void TESS_CALL TessMonitorDelete(ETEXT_DESC *monitor)
struct TessBaseAPI TessBaseAPI
TESS_API const char *TESS_CALL TessBaseAPIGetInputName(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetVariableAsString(TessBaseAPI *handle, const char *name, STRING *val)
TESS_API void TESS_CALL TessBaseAPIClear(TessBaseAPI *handle)
TESS_API char *TESS_CALL TessBaseAPIGetHOCRText(TessBaseAPI *handle, int page_number)
TESS_API BOOL TESS_CALL TessChoiceIteratorNext(TessChoiceIterator *handle)
struct TessTextRenderer TessTextRenderer
TESS_API void TESS_CALL TessMonitorSetDeadlineMSecs(ETEXT_DESC *monitor, int deadline)
TESS_API char *TESS_CALL TessBaseAPIGetUTF8Text(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetBoolVariable(const TessBaseAPI *handle, const char *name, BOOL *value)
TESS_API void TESS_CALL TessBaseAPISetSourceResolution(TessBaseAPI *handle, int ppi)
TESS_API const char *TESS_CALL TessChoiceIteratorGetUTF8Text(const TessChoiceIterator *handle)
TESS_API void TESS_CALL TessDeleteTextArray(char **arr)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetComponentImages(TessBaseAPI *handle, TessPageIteratorLevel level, BOOL text_only, struct Pixa **pixa, int **blockids)
TESS_API BOOL TESS_CALL TessPageIteratorIsAtFinalElement(const TessPageIterator *handle, TessPageIteratorLevel level, TessPageIteratorLevel element)
TESS_API void TESS_CALL TessBaseAPIRunAdaptiveClassifier(TessBaseAPI *handle, TBLOB *blob, int num_max_matches, int *unichar_ids, float *ratings, int *num_matches_returned)
TESS_API float TESS_CALL TessChoiceIteratorConfidence(const TessChoiceIterator *handle)
TESS_API const TessDawg *TESS_CALL TessBaseAPIGetDawg(const TessBaseAPI *handle, int i)
TESS_API BOOL TESS_CALL TessBaseAPIAdaptToWordStr(TessBaseAPI *handle, TessPageSegMode mode, const char *wordstr)
TESS_API void TESS_CALL TessBaseAPISetRectangle(TessBaseAPI *handle, int left, int top, int width, int height)
TESS_API char *TESS_CALL TessBaseAPIGetBoxText(TessBaseAPI *handle, int page_number)
TESS_API BOOL TESS_CALL TessBaseAPISetVariable(TessBaseAPI *handle, const char *name, const char *value)
TESS_API TessResultRenderer *TESS_CALL TessUnlvRendererCreate(const char *outputbase)
TESS_API BOOL TESS_CALL TessBaseAPISetDebugVariable(TessBaseAPI *handle, const char *name, const char *value)
TESS_API char *TESS_CALL TessResultIteratorGetUTF8Text(const TessResultIterator *handle, TessPageIteratorLevel level)
TESS_API TessPolyBlockType TESS_CALL TessPageIteratorBlockType(const TessPageIterator *handle)
bool(* TessProgressFunc)(ETEXT_DESC *ths, int left, int right, int top, int bottom)
TESS_API void TESS_CALL TessNormalizeTBLOB(TBLOB *tblob, ROW *row, BOOL numeric_mode)
TESS_API Pix *TESS_CALL TessBaseAPIGetInputImage(TessBaseAPI *handle)
TESS_API void TESS_CALL TessPageIteratorDelete(TessPageIterator *handle)
TESS_API TessResultRenderer *TESS_CALL TessBoxTextRendererCreate(const char *outputbase)
TESS_API TessResultRenderer *TESS_CALL TessTextRendererCreate(const char *outputbase)
TESS_API TessChoiceIterator *TESS_CALL TessResultIteratorGetChoiceIterator(const TessResultIterator *handle)
TESS_API void TESS_CALL TessBaseAPIInitForAnalysePage(TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIInit4(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode mode, char **configs, int configs_size, char **vars_vec, char **vars_values, size_t vars_vec_size, BOOL set_only_non_debug_params)
struct ETEXT_DESC ETEXT_DESC
TESS_API BOOL TESS_CALL TessPageIteratorIsAtBeginningOf(const TessPageIterator *handle, TessPageIteratorLevel level)
TESS_API void TESS_CALL TessBaseAPISetImage2(TessBaseAPI *handle, struct Pix *pix)
TESS_API int TESS_CALL TessBaseAPIInit3(TessBaseAPI *handle, const char *datapath, const char *language)
TESS_API void TESS_CALL TessBaseAPISetOutputName(TessBaseAPI *handle, const char *name)
TESS_API BOOL TESS_CALL TessPageIteratorBoundingBox(const TessPageIterator *handle, TessPageIteratorLevel level, int *left, int *top, int *right, int *bottom)
TESS_API TessOcrEngineMode TESS_CALL TessBaseAPIOem(const TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPIReadConfigFile(TessBaseAPI *handle, const char *filename)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetConnectedComponents(TessBaseAPI *handle, struct Pixa **cc)
TESS_API TBLOB *TESS_CALL TessMakeTBLOB(struct Pix *pix)
TESS_API struct Pix *TESS_CALL TessPageIteratorGetBinaryImage(const TessPageIterator *handle, TessPageIteratorLevel level)
TESS_API BOOL TESS_CALL TessResultRendererBeginDocument(TessResultRenderer *renderer, const char *title)
TESS_API void TESS_CALL TessBaseAPISetImage(TessBaseAPI *handle, const unsigned char *imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
struct TessHOcrRenderer TessHOcrRenderer
TESS_API void TESS_CALL TessBaseAPISetProbabilityInContextFunc(TessBaseAPI *handle, TessProbabilityInContextFunc f)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetWords(TessBaseAPI *handle, struct Pixa **pixa)
TESS_API TessResultRenderer *TESS_CALL TessResultRendererNext(TessResultRenderer *renderer)
TESS_API void TESS_CALL TessDeleteBlockList(BLOCK_LIST *block_list)
TESS_API const char *TESS_CALL TessResultIteratorWordRecognitionLanguage(const TessResultIterator *handle)
TESS_API int TESS_CALL TessBaseAPIGetSourceYResolution(TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPIEnd(TessBaseAPI *handle)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetTextlines1(TessBaseAPI *handle, const BOOL raw_image, const int raw_padding, struct Pixa **pixa, int **blockids, int **paraids)
TESS_API BOOL TESS_CALL TessBaseAPIGetIntVariable(const TessBaseAPI *handle, const char *name, int *value)
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsSuperscript(const TessResultIterator *handle)
TESS_API ETEXT_DESC *TESS_CALL TessMonitorCreate()
TESS_API int TESS_CALL TessBaseAPIInitLangMod(TessBaseAPI *handle, const char *datapath, const char *language)
TESS_API ROW *TESS_CALL TessFindRowForBox(BLOCK_LIST *blocks, int left, int top, int right, int bottom)
TESS_API BOOL TESS_CALL TessBaseAPIProcessPages(TessBaseAPI *handle, const char *filename, const char *retry_config, int timeout_millisec, TessResultRenderer *renderer)
TESS_API void TESS_CALL TessBaseAPIPrintVariables(const TessBaseAPI *handle, FILE *fp)
TESS_API const char *TESS_CALL TessBaseAPIGetDatapath(TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIInit2(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode oem)
TESS_API BOOL TESS_CALL TessResultRendererAddImage(TessResultRenderer *renderer, TessBaseAPI *api)
TESS_API void TESS_CALL TessBaseGetBlockTextOrientations(TessBaseAPI *handle, int **block_orientation, bool **vertical_writing)
TESS_API void TESS_CALL TessBaseAPIInitTruthCallback(TessBaseAPI *handle, TessTruthCallback *cb)
TESS_API void TESS_CALL TessPageIteratorParagraphInfo(TessPageIterator *handle, TessParagraphJustification *justification, BOOL *is_list_item, BOOL *is_crown, int *first_line_indent)
TESS_API BOOL TESS_CALL TessPageIteratorNext(TessPageIterator *handle, TessPageIteratorLevel level)
TESS_API int *TESS_CALL TessBaseAPIAllWordConfidences(TessBaseAPI *handle)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetStrips(TessBaseAPI *handle, struct Pixa **pixa, int **blockids)
TESS_API const char *TESS_CALL TessResultRendererTitle(TessResultRenderer *renderer)
TESS_API BOOL TESS_CALL TessResultRendererEndDocument(TessResultRenderer *renderer)
TESS_API void *TESS_CALL TessMonitorGetCancelThis(ETEXT_DESC *monitor)
TESS_API void TESS_CALL TessBaseAPISetPageSegMode(TessBaseAPI *handle, TessPageSegMode mode)
TESS_API char *TESS_CALL TessBaseAPIGetUNLVText(TessBaseAPI *handle)
TESS_API void TESS_CALL TessMonitorSetCancelFunc(ETEXT_DESC *monitor, TessCancelFunc cancelFunc)
TESS_API struct Pix *TESS_CALL TessPageIteratorGetImage(const TessPageIterator *handle, TessPageIteratorLevel level, int padding, struct Pix *original_image, int *left, int *top)
TESS_API TessResultIterator *TESS_CALL TessResultIteratorCopy(const TessResultIterator *handle)
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsSubscript(const TessResultIterator *handle)
TESS_API const TessPageIterator *TESS_CALL TessResultIteratorGetPageIteratorConst(const TessResultIterator *handle)
struct TessResultIterator TessResultIterator
TESS_API void TESS_CALL TessBaseAPIGetFeaturesForBlob(TessBaseAPI *handle, TBLOB *blob, INT_FEATURE_STRUCT *int_features, int *num_features, int *FeatureOutlineIndex)
TESS_API void TESS_CALL TessResultRendererInsert(TessResultRenderer *renderer, TessResultRenderer *next)
TESS_API ROW *TESS_CALL TessMakeTessOCRRow(float baseline, float xheight, float descender, float ascender)
TESS_API char *TESS_CALL TessBaseAPIRect(TessBaseAPI *handle, const unsigned char *imagedata, int bytes_per_pixel, int bytes_per_line, int left, int top, int width, int height)
TESS_API const char *TESS_CALL TessResultRendererExtention(TessResultRenderer *renderer)
TESS_API void TESS_CALL TessMonitorSetProgressFunc(ETEXT_DESC *monitor, TessProgressFunc progressFunc)
CANCEL_FUNC cancel
for errcode use
TESS_API const char *TESS_CALL TessVersion()
TESS_API TessResultRenderer *TESS_CALL TessHOcrRendererCreate(const char *outputbase)
struct TessResultRenderer TessResultRenderer
TESS_API TessMutableIterator *TESS_CALL TessBaseAPIGetMutableIterator(TessBaseAPI *handle)
PROGRESS_FUNC2 progress_callback2
called whenever progress increases
struct TessMutableIterator TessMutableIterator
TESS_API void TESS_CALL TessDeleteResultRenderer(TessResultRenderer *renderer)
TESS_API BOOL TESS_CALL TessBaseAPIProcessPage(TessBaseAPI *handle, struct Pix *pix, int page_index, const char *filename, const char *retry_config, int timeout_millisec, TessResultRenderer *renderer)
TESS_API void TESS_CALL TessBaseAPIDelete(TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPIReadDebugConfigFile(TessBaseAPI *handle, const char *filename)
TESS_API void TESS_CALL TessDeleteIntArray(int *arr)
TESS_API BOOL TESS_CALL TessResultIteratorWordIsFromDictionary(const TessResultIterator *handle)
TESS_API void TESS_CALL TessBaseAPISetInputImage(TessBaseAPI *handle, Pix *pix)
TESS_API TessPageIterator *TESS_CALL TessBaseAPIAnalyseLayout(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetTextDirection(TessBaseAPI *handle, int *out_offset, float *out_slope)
TESS_API int TESS_CALL TessBaseAPIInit1(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode oem, char **configs, int configs_size)
TESS_API float TESS_CALL TessResultIteratorConfidence(const TessResultIterator *handle, TessPageIteratorLevel level)
TESS_API const char *TESS_CALL TessBaseAPIGetInitLanguagesAsString(const TessBaseAPI *handle)
TESS_API TessPageIterator *TESS_CALL TessPageIteratorCopy(const TessPageIterator *handle)
TESS_API int TESS_CALL TessBaseAPINumDawgs(const TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIRecognize(TessBaseAPI *handle, ETEXT_DESC *monitor)
TESS_API BOOL TESS_CALL TessBaseAPIGetDoubleVariable(const TessBaseAPI *handle, const char *name, double *value)
TESS_API void TESS_CALL TessMonitorSetCancelThis(ETEXT_DESC *monitor, void *cancelThis)
int16_t progress
chars in this buffer(0)
void set_deadline_msecs(int32_t deadline_msecs)
TESS_API TessBaseAPI *TESS_CALL TessBaseAPICreate()
TESS_API BLOCK_LIST *TESS_CALL TessBaseAPIFindLinesCreateBlockList(TessBaseAPI *handle)
struct TessBoxTextRenderer TessBoxTextRenderer
TESS_API BOOL TESS_CALL TessResultIteratorWordIsNumeric(const TessResultIterator *handle)
TESS_API void TESS_CALL TessPageIteratorOrientation(TessPageIterator *handle, TessOrientation *orientation, TessWritingDirection *writing_direction, TessTextlineOrder *textline_order, float *deskew_angle)
TESS_API TessResultIterator *TESS_CALL TessBaseAPIGetIterator(TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIMeanTextConf(TessBaseAPI *handle)
struct TessPageIterator TessPageIterator
TESS_API TessResultRenderer *TESS_CALL TessHOcrRendererCreate2(const char *outputbase, BOOL font_info)
TESS_API TessPageSegMode TESS_CALL TessBaseAPIGetPageSegMode(const TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPIClearAdaptiveClassifier(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsDropcap(const TessResultIterator *handle)
TESS_API char **TESS_CALL TessBaseAPIGetAvailableLanguagesAsVector(const TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessResultIteratorNext(TessResultIterator *handle, TessPageIteratorLevel level)
TESS_API void TESS_CALL TessResultIteratorDelete(TessResultIterator *handle)
TESS_API const char *TESS_CALL TessBaseAPIGetStringVariable(const TessBaseAPI *handle, const char *name)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetTextlines(TessBaseAPI *handle, struct Pixa **pixa, int **blockids)
TESS_API int TESS_CALL TessBaseAPIRecognizeForChopTest(TessBaseAPI *handle, ETEXT_DESC *monitor)