tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
21 #if defined(TESSERACT_API_BASEAPI_H_) && !defined(TESS_CAPI_INCLUDE_BASEAPI)
22 # define TESS_CAPI_INCLUDE_BASEAPI
25 #ifdef TESS_CAPI_INCLUDE_BASEAPI
48 #ifdef TESS_CAPI_INCLUDE_BASEAPI
179 const char* outputbase);
220 const char* name,
int* value);
222 const char* name,
BOOL* value);
224 const char* name,
double* value);
230 const char* filename);
232 #ifdef TESS_CAPI_INCLUDE_BASEAPI
235 const char* name,
STRING* val);
239 char** configs,
int configs_size,
240 const STRING* vars_vec,
size_t vars_vec_size,
241 const STRING* vars_values,
size_t vars_values_size,
242 BOOL set_only_init_params);
244 #endif // def TESS_CAPI_INCLUDE_BASEAPI
248 char** configs,
int configs_size);
252 const char* language);
256 char** configs,
int configs_size,
char** vars_vec,
257 char** vars_values,
size_t vars_vec_size,
258 BOOL set_only_non_debug_params);
268 const char* language);
272 const char* filename);
274 const char* filename);
281 const unsigned char* imagedata,
282 int bytes_per_pixel,
int bytes_per_line,
283 int left,
int top,
int width,
int height);
288 const unsigned char* imagedata,
int width,
289 int height,
int bytes_per_pixel,
296 int width,
int height);
298 #ifdef TESS_CAPI_INCLUDE_BASEAPI
300 TessImageThresholder* thresholder);
310 BOOL raw_image,
int raw_padding,
312 int** blockids,
int** paraids);
314 struct Pixa** pixa,
int** blockids);
326 BOOL raw_image,
int raw_padding,
struct Pixa** pixa,
int** blockids,
336 #ifndef DISABLED_LEGACY_ENGINE
342 const char* retry_config,
343 int timeout_millisec,
346 int page_index,
const char* filename,
347 const char* retry_config,
348 int timeout_millisec,
371 #ifndef DISABLED_LEGACY_ENGINE
374 const char* wordstr);
375 #endif // ndef DISABLED_LEGACY_ENGINE
384 #ifdef TESS_CAPI_INCLUDE_BASEAPI
391 TessBaseAPI* handle, TessProbabilityInContextFunc f);
398 const char** script_name,
401 #endif // def TESS_CAPI_INCLUDE_BASEAPI
408 #ifdef TESS_CAPI_INCLUDE_BASEAPI
417 TessTruthCallback cb);
420 int** block_orientation,
421 bool** vertical_writing);
445 int* left,
int* top,
int* right,
457 struct Pix* original_image,
458 int* left,
int* top);
462 int* y1,
int* x2,
int* y2);
467 float* deskew_angle);
471 BOOL* is_list_item,
BOOL* is_crown,
int* first_line_indent);
495 BOOL* is_underlined,
BOOL* is_monospace,
BOOL* is_serif,
BOOL* is_smallcaps,
496 int* pointsize,
int* font_id);
527 #ifndef DISABLED_LEGACY_ENGINE
529 # ifdef TESS_CAPI_INCLUDE_BASEAPI
531 TessFillLatticeFunc f);
536 int* FeatureOutlineIndex);
539 int right,
int bottom);
543 int* unichar_ids,
float* ratings,
544 int* num_matches_returned);
557 # endif // def TESS_CAPI_INCLUDE_BASEAPI
559 #endif // ndef DISABLED_LEGACY_ENGINE
565 #endif // API_CAPI_H_
TESS_API TessResultRenderer * TessHOcrRendererCreate(const char *outputbase)
TESS_API void TessDeleteText(const char *text)
TESS_API TessResultRenderer * TessUnlvRendererCreate(const char *outputbase)
TESS_API char * TessBaseAPIGetHOCRText(TessBaseAPI *handle, int page_number)
TESS_API struct Boxa * TessBaseAPIGetWords(TessBaseAPI *handle, struct Pixa **pixa)
TESS_API int TessBaseAPIGetSourceYResolution(TessBaseAPI *handle)
TESS_API float TessChoiceIteratorConfidence(const TessChoiceIterator *handle)
int TessBaseAPINumDawgs(const TessBaseAPI *handle)
TESS_API BOOL TessBaseAPIGetDoubleVariable(const TessBaseAPI *handle, const char *name, double *value)
TESS_API void TessDeleteTextArray(char **arr)
TESS_API struct Pix * TessPageIteratorGetBinaryImage(const TessPageIterator *handle, TessPageIteratorLevel level)
TESS_API BOOL TessResultRendererAddImage(TessResultRenderer *renderer, TessBaseAPI *api)
struct TessChoiceIterator TessChoiceIterator
TESS_API void TessBaseAPIReadDebugConfigFile(TessBaseAPI *handle, const char *filename)
void TessBaseAPISetDictFunc(TessBaseAPI *handle, TessDictFunc f)
TESS_API void TessMonitorSetProgressFunc(ETEXT_DESC *monitor, TessProgressFunc progressFunc)
TESS_API TessResultRenderer * TessTextRendererCreate(const char *outputbase)
void TessBaseGetBlockTextOrientations(TessBaseAPI *handle, int **block_orientation, bool **vertical_writing)
TESS_API ETEXT_DESC * TessMonitorCreate()
TESS_API TessResultRenderer * TessTsvRendererCreate(const char *outputbase)
TESS_API float TessResultIteratorConfidence(const TessResultIterator *handle, TessPageIteratorLevel level)
TESS_API BOOL TessPageIteratorNext(TessPageIterator *handle, TessPageIteratorLevel level)
int(Dict::*)(void *, const UNICHARSET &, UNICHAR_ID, bool) const DictFunc
struct TessPageIterator TessPageIterator
TessOcrEngineMode TessBaseAPIOem(const TessBaseAPI *handle)
const TESS_API char * TessBaseAPIGetInitLanguagesAsString(const TessBaseAPI *handle)
TESS_API void TessPageIteratorOrientation(TessPageIterator *handle, TessOrientation *orientation, TessWritingDirection *writing_direction, TessTextlineOrder *textline_order, float *deskew_angle)
TESS_API struct Boxa * TessBaseAPIGetRegions(TessBaseAPI *handle, struct Pixa **pixa)
const TessDawg * TessBaseAPIGetDawg(const TessBaseAPI *handle, int i)
TESS_API void TessDeleteResultRenderer(TessResultRenderer *renderer)
TESS_API struct Boxa * TessBaseAPIGetComponentImages1(TessBaseAPI *handle, TessPageIteratorLevel level, BOOL text_only, BOOL raw_image, int raw_padding, struct Pixa **pixa, int **blockids, int **paraids)
TBLOB * TessMakeTBLOB(struct Pix *pix)
BOOL TessBaseAPIGetVariableAsString(TessBaseAPI *handle, const char *name, STRING *val)
TESS_API int * TessBaseAPIAllWordConfidences(TessBaseAPI *handle)
TESS_API BOOL TessResultIteratorSymbolIsDropcap(const TessResultIterator *handle)
TESS_API struct Boxa * TessBaseAPIGetTextlines(TessBaseAPI *handle, struct Pixa **pixa, int **blockids)
TESS_API int TessBaseAPIRecognize(TessBaseAPI *handle, ETEXT_DESC *monitor)
TESS_API TessResultRenderer * TessWordStrBoxRendererCreate(const char *outputbase)
TESS_API void TessMonitorSetDeadlineMSecs(ETEXT_DESC *monitor, int deadline)
TESS_API char ** TessBaseAPIGetAvailableLanguagesAsVector(const TessBaseAPI *handle)
TESS_API void TessChoiceIteratorDelete(TessChoiceIterator *handle)
TESS_API void TessBaseAPISetInputName(TessBaseAPI *handle, const char *name)
TESS_API TessResultRenderer * TessPDFRendererCreate(const char *outputbase, const char *datadir, BOOL textonly)
const TESS_API TessPageIterator * TessResultIteratorGetPageIteratorConst(const TessResultIterator *handle)
TESS_API struct Boxa * TessBaseAPIGetConnectedComponents(TessBaseAPI *handle, struct Pixa **cc)
double(Dict::*)(const char *, const char *, int, const char *, int) ProbabilityInContextFunc
TESS_API BOOL TessBaseAPISetDebugVariable(TessBaseAPI *handle, const char *name, const char *value)
TESS_API char * TessBaseAPIGetAltoText(TessBaseAPI *handle, int page_number)
struct TessMutableIterator TessMutableIterator
TESS_API TessResultRenderer * TessLSTMBoxRendererCreate(const char *outputbase)
TESS_API void TessBaseAPIReadConfigFile(TessBaseAPI *handle, const char *filename)
TESS_API int TessBaseAPIMeanTextConf(TessBaseAPI *handle)
TESS_API char ** TessBaseAPIGetLoadedLanguagesAsVector(const TessBaseAPI *handle)
TESS_API void TessBaseAPISetMinOrientationMargin(TessBaseAPI *handle, double margin)
TESS_API BOOL TessChoiceIteratorNext(TessChoiceIterator *handle)
TESS_API struct Boxa * TessBaseAPIGetStrips(TessBaseAPI *handle, struct Pixa **pixa, int **blockids)
TESS_API void TessBaseAPIClear(TessBaseAPI *handle)
TESS_API BOOL TessPageIteratorBaseline(const TessPageIterator *handle, TessPageIteratorLevel level, int *x1, int *y1, int *x2, int *y2)
TESS_API BOOL TessResultIteratorSymbolIsSuperscript(const TessResultIterator *handle)
TESS_API BOOL TessResultIteratorNext(TessResultIterator *handle, TessPageIteratorLevel level)
TESS_API char * TessBaseAPIGetWordStrBoxText(TessBaseAPI *handle, int page_number)
TESS_API void TessBaseAPISetInputImage(TessBaseAPI *handle, struct Pix *pix)
TESS_API BOOL TessPageIteratorBoundingBox(const TessPageIterator *handle, TessPageIteratorLevel level, int *left, int *top, int *right, int *bottom)
TESS_API void TessBaseAPIDelete(TessBaseAPI *handle)
TESS_API TessPolyBlockType TessPageIteratorBlockType(const TessPageIterator *handle)
TESS_API void TessBaseAPISetImage2(TessBaseAPI *handle, struct Pix *pix)
TESS_API void TessBaseAPIEnd(TessBaseAPI *handle)
TESS_API BOOL TessResultRendererEndDocument(TessResultRenderer *renderer)
void * cancel_this
monitor-aware progress callback
TESS_API BOOL TessResultRendererBeginDocument(TessResultRenderer *renderer, const char *title)
TESS_API void TessMonitorSetCancelFunc(ETEXT_DESC *monitor, TessCancelFunc cancelFunc)
TESS_API int TessResultRendererImageNum(TessResultRenderer *renderer)
TESS_API BOOL TessBaseAPIProcessPages(TessBaseAPI *handle, const char *filename, const char *retry_config, int timeout_millisec, TessResultRenderer *renderer)
ROW * TessMakeTessOCRRow(float baseline, float xheight, float descender, float ascender)
void TessBaseAPISetProbabilityInContextFunc(TessBaseAPI *handle, TessProbabilityInContextFunc f)
TESS_API int TessBaseAPIInitLangMod(TessBaseAPI *handle, const char *datapath, const char *language)
TESS_API struct Boxa * TessBaseAPIGetComponentImages(TessBaseAPI *handle, TessPageIteratorLevel level, BOOL text_only, struct Pixa **pixa, int **blockids)
TESS_API struct Pix * TessBaseAPIGetInputImage(TessBaseAPI *handle)
TESS_API int TessBaseAPIIsValidWord(TessBaseAPI *handle, const char *word)
TESS_API int TessMonitorGetProgress(ETEXT_DESC *monitor)
TESS_API void TessBaseAPIClearAdaptiveClassifier(TessBaseAPI *handle)
TESS_API BOOL TessResultIteratorWordIsNumeric(const TessResultIterator *handle)
TESS_API void TessBaseAPISetOutputName(TessBaseAPI *handle, const char *name)
ROW * TessFindRowForBox(BLOCK_LIST *blocks, int left, int top, int right, int bottom)
TESS_API TessResultRenderer * TessResultRendererNext(TessResultRenderer *renderer)
TESS_API void TessBaseAPISetPageSegMode(TessBaseAPI *handle, TessPageSegMode mode)
TESS_API void TessResultIteratorDelete(TessResultIterator *handle)
TESS_API TessPageIterator * TessBaseAPIAnalyseLayout(TessBaseAPI *handle)
TESS_API TessPageIterator * TessResultIteratorGetPageIterator(TessResultIterator *handle)
TESS_API BOOL TessPageIteratorIsAtFinalElement(const TessPageIterator *handle, TessPageIteratorLevel level, TessPageIteratorLevel element)
TESS_API char * TessResultIteratorGetUTF8Text(const TessResultIterator *handle, TessPageIteratorLevel level)
TESS_API void TessMonitorSetCancelThis(ETEXT_DESC *monitor, void *cancelThis)
TESS_API void TessBaseAPIPrintVariables(const TessBaseAPI *handle, FILE *fp)
TESS_API TessResultRenderer * TessAltoRendererCreate(const char *outputbase)
void TessBaseAPISetThresholder(TessBaseAPI *handle, TessImageThresholder *thresholder)
TESS_API size_t TessBaseAPIGetOpenCLDevice(TessBaseAPI *handle, void **device)
TESS_API int TessBaseAPIRecognizeForChopTest(TessBaseAPI *handle, ETEXT_DESC *monitor)
TessParagraphJustification
TESS_API BOOL TessBaseAPIProcessPage(TessBaseAPI *handle, struct Pix *pix, int page_index, const char *filename, const char *retry_config, int timeout_millisec, TessResultRenderer *renderer)
const TESS_API char * TessBaseAPIGetStringVariable(const TessBaseAPI *handle, const char *name)
struct TessResultIterator TessResultIterator
TESS_API char * TessBaseAPIGetLSTMBoxText(TessBaseAPI *handle, int page_number)
TESS_API char * TessBaseAPIGetUTF8Text(TessBaseAPI *handle)
TESS_API TessMutableIterator * TessBaseAPIGetMutableIterator(TessBaseAPI *handle)
TESS_API TessResultIterator * TessBaseAPIGetIterator(TessBaseAPI *handle)
TESS_API TessPageIterator * TessPageIteratorCopy(const TessPageIterator *handle)
TESS_API char * TessBaseAPIGetUNLVText(TessBaseAPI *handle)
TESS_API BOOL TessResultIteratorWordIsFromDictionary(const TessResultIterator *handle)
TESS_API BOOL TessPageIteratorIsAtBeginningOf(const TessPageIterator *handle, TessPageIteratorLevel level)
TESS_API int TessBaseAPIInit2(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode oem)
TESS_API TessChoiceIterator * TessResultIteratorGetChoiceIterator(const TessResultIterator *handle)
TESS_API int TessBaseAPIInit3(TessBaseAPI *handle, const char *datapath, const char *language)
TESS_API struct Pix * TessBaseAPIGetThresholdedImage(TessBaseAPI *handle)
TESS_API char * 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 void TessBaseAPISetRectangle(TessBaseAPI *handle, int left, int top, int width, int height)
TESS_API void TessBaseAPIInitForAnalysePage(TessBaseAPI *handle)
TESS_API void TessPageIteratorDelete(TessPageIterator *handle)
TESS_API BOOL TessBaseAPIGetBoolVariable(const TessBaseAPI *handle, const char *name, BOOL *value)
TESS_API void TessDeleteIntArray(const int *arr)
TESS_API TessResultRenderer * TessBoxTextRendererCreate(const char *outputbase)
const TESS_API char * TessVersion()
TESS_API int TessBaseAPIGetThresholdedImageScaleFactor(const TessBaseAPI *handle)
const TESS_API char * TessBaseAPIGetInputName(TessBaseAPI *handle)
TESS_API BOOL TessBaseAPIPrintVariablesToFile(const TessBaseAPI *handle, const char *filename)
TESS_API TessResultRenderer * TessHOcrRendererCreate2(const char *outputbase, BOOL font_info)
TESS_API BOOL TessBaseAPIGetIntVariable(const TessBaseAPI *handle, const char *name, int *value)
TESS_API void TessResultRendererInsert(TessResultRenderer *renderer, TessResultRenderer *next)
const TESS_API char * TessResultRendererExtention(TessResultRenderer *renderer)
TESS_API int 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)
TESS_API void TessBaseAPISetSourceResolution(TessBaseAPI *handle, int ppi)
void TessBaseAPIClearPersistentCache(TessBaseAPI *)
const TESS_API char * 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)
void TessBaseAPIGetFeaturesForBlob(TessBaseAPI *handle, TBLOB *blob, INT_FEATURE_STRUCT *int_features, int *num_features, int *FeatureOutlineIndex)
TESS_API BOOL TessBaseAPIGetTextDirection(TessBaseAPI *handle, int *out_offset, float *out_slope)
TESS_API TessResultIterator * TessResultIteratorCopy(const TessResultIterator *handle)
const TESS_API char * TessChoiceIteratorGetUTF8Text(const TessChoiceIterator *handle)
bool(* TessProgressFunc)(ETEXT_DESC *ths, int left, int right, int top, int bottom)
void TessNormalizeTBLOB(TBLOB *tblob, ROW *row, BOOL numeric_mode)
TESS_API char * TessBaseAPIGetTsvText(TessBaseAPI *handle, int page_number)
TESS_API char * TessBaseAPIGetBoxText(TessBaseAPI *handle, int page_number)
TESS_API int TessBaseAPIInit1(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode oem, char **configs, int configs_size)
const TESS_API char * TessBaseAPIGetDatapath(TessBaseAPI *handle)
void TessBaseAPIRunAdaptiveClassifier(TessBaseAPI *handle, TBLOB *blob, int num_max_matches, int *unichar_ids, float *ratings, int *num_matches_returned)
TESS_API void TessBaseAPISetImage(TessBaseAPI *handle, const unsigned char *imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
TESS_API void * TessMonitorGetCancelThis(ETEXT_DESC *monitor)
const TESS_API char * TessBaseAPIGetUnichar(TessBaseAPI *handle, int unichar_id)
struct TessBaseAPI TessBaseAPI
BLOCK_LIST * TessBaseAPIFindLinesCreateBlockList(TessBaseAPI *handle)
TESS_API TessBaseAPI * TessBaseAPICreate()
bool(* TessCancelFunc)(void *cancel_this, int words)
TESS_API TessPageSegMode TessBaseAPIGetPageSegMode(const TessBaseAPI *handle)
TESS_API void TessPageIteratorParagraphInfo(TessPageIterator *handle, TessParagraphJustification *justification, BOOL *is_list_item, BOOL *is_crown, int *first_line_indent)
void TessDeleteBlockList(BLOCK_LIST *block_list)
TESS_API BOOL TessBaseAPIAdaptToWordStr(TessBaseAPI *handle, TessPageSegMode mode, const char *wordstr)
std::function< void(const UNICHARSET &, int, PageIterator *, Pix *)> TruthCallback
TESS_API void TessMonitorDelete(ETEXT_DESC *monitor)
struct TessResultRenderer TessResultRenderer
TESS_API BOOL TessResultIteratorSymbolIsSubscript(const TessResultIterator *handle)
void(Wordrec::*)(const MATRIX &, const WERD_CHOICE_LIST &, const UNICHARSET &, BlamerBundle *) FillLatticeFunc
TESS_API struct Pix * TessPageIteratorGetImage(const TessPageIterator *handle, TessPageIteratorLevel level, int padding, struct Pix *original_image, int *left, int *top)
void TessBaseAPIInitTruthCallback(TessBaseAPI *handle, TessTruthCallback cb)
BOOL TessBaseAPIDetectOrientationScript(TessBaseAPI *handle, int *orient_deg, float *orient_conf, const char **script_name, float *script_conf)
const TESS_API char * TessResultIteratorWordRecognitionLanguage(const TessResultIterator *handle)
TESS_API BOOL TessBaseAPISetVariable(TessBaseAPI *handle, const char *name, const char *value)
TESS_API struct Boxa * TessBaseAPIGetTextlines1(TessBaseAPI *handle, BOOL raw_image, int raw_padding, struct Pixa **pixa, int **blockids, int **paraids)
const TESS_API char * TessResultRendererTitle(TessResultRenderer *renderer)
TESS_API void TessPageIteratorBegin(TessPageIterator *handle)