21 #if defined(TESSERACT_API_BASEAPI_H_) && !defined(TESS_CAPI_INCLUDE_BASEAPI) 22 # define TESS_CAPI_INCLUDE_BASEAPI 25 #ifdef TESS_CAPI_INCLUDE_BASEAPI 43 # define TESS_CALL __cdecl 55 #ifdef TESS_CAPI_INCLUDE_BASEAPI 177 #ifdef TESS_CAPI_INCLUDE_BASEAPI 183 const STRING* vars_vec,
size_t vars_vec_size,
184 const STRING* vars_values,
size_t vars_values_size,
BOOL set_only_init_params);
186 #endif // def TESS_CAPI_INCLUDE_BASEAPI 189 char** configs,
int configs_size);
194 char** configs,
int configs_size,
195 char** vars_vec,
char** vars_values,
size_t vars_vec_size,
196 BOOL set_only_non_debug_params);
216 int bytes_per_pixel,
int bytes_per_line,
217 int left,
int top,
int width,
int height);
222 int bytes_per_pixel,
int bytes_per_line);
229 #ifdef TESS_CAPI_INCLUDE_BASEAPI 241 struct Pixa** pixa,
int** blockids,
int** paraids);
250 struct Pixa** pixa,
int** blockids);
253 const BOOL raw_image,
const int raw_padding,
254 struct Pixa** pixa,
int** blockids,
int** paraids);
263 #ifndef DISABLED_LEGACY_ENGINE 287 #ifndef DISABLED_LEGACY_ENGINE 289 #endif // ndef DISABLED_LEGACY_ENGINE 298 #ifdef TESS_CAPI_INCLUDE_BASEAPI 308 int* orient_deg,
float* orient_conf,
const char **script_name,
float* script_conf);
310 #endif // def TESS_CAPI_INCLUDE_BASEAPI 317 #ifdef TESS_CAPI_INCLUDE_BASEAPI 350 int* left,
int* top,
int* right,
int* bottom);
360 struct Pix* original_image,
int* left,
int* top);
363 int* x1,
int* y1,
int* x2,
int* y2);
367 float* deskew_angle);
370 BOOL *is_list_item,
BOOL *is_crown,
int *first_line_indent);
391 BOOL* is_underlined,
BOOL* is_monospace,
BOOL* is_serif,
392 BOOL* is_smallcaps,
int* pointsize,
int* font_id);
417 #ifndef DISABLED_LEGACY_ENGINE 419 #ifdef TESS_CAPI_INCLUDE_BASEAPI 423 int* num_features,
int* FeatureOutlineIndex);
428 int* unichar_ids,
float* ratings,
int* num_matches_returned);
442 #endif // def TESS_CAPI_INCLUDE_BASEAPI 444 #endif // ndef DISABLED_LEGACY_ENGINE 451 #endif // API_CAPI_H_
struct TessChoiceIterator TessChoiceIterator
TESS_API char *TESS_CALL TessBaseAPIGetUTF8Text(TessBaseAPI *handle)
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)
bool(* TessCancelFunc)(void *cancel_this, int words)
TESS_API TessResultRenderer *TESS_CALL TessPDFRendererCreate(const char *outputbase, const char *datadir, BOOL textonly)
TESS_API int TESS_CALL TessBaseAPIRecognizeForChopTest(TessBaseAPI *handle, ETEXT_DESC *monitor)
TESS_API void TESS_CALL TessResultIteratorDelete(TessResultIterator *handle)
TESS_API BOOL TESS_CALL TessBaseAPISetVariable(TessBaseAPI *handle, const char *name, const char *value)
TESS_API void TESS_CALL TessBaseAPISetThresholder(TessBaseAPI *handle, TessImageThresholder *thresholder)
TESS_API BOOL TESS_CALL TessBaseAPIDetectOrientationScript(TessBaseAPI *handle, int *orient_deg, float *orient_conf, const char **script_name, float *script_conf)
TESS_API TessPageIterator *TESS_CALL TessResultIteratorGetPageIterator(TessResultIterator *handle)
TESS_API BOOL TESS_CALL TessBaseAPISetDebugVariable(TessBaseAPI *handle, const char *name, const char *value)
TessParagraphJustification
struct TessUnlvRenderer TessUnlvRenderer
TESS_API void TESS_CALL TessBaseAPISetMinOrientationMargin(TessBaseAPI *handle, double margin)
TESS_API TessResultRenderer *TESS_CALL TessTextRendererCreate(const char *outputbase)
TESS_API const char *TESS_CALL TessBaseAPIGetInitLanguagesAsString(const TessBaseAPI *handle)
TESS_API TessPageSegMode TESS_CALL TessBaseAPIGetPageSegMode(const TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPISetSourceResolution(TessBaseAPI *handle, int ppi)
struct TessPDFRenderer TessPDFRenderer
TESS_API void TESS_CALL TessBaseAPISetOutputName(TessBaseAPI *handle, const char *name)
TESS_API void TESS_CALL TessBaseAPIClearPersistentCache(TessBaseAPI *handle)
TESS_API int TESS_CALL TessMonitorGetProgress(ETEXT_DESC *monitor)
TESS_API int TESS_CALL TessBaseAPIGetThresholdedImageScaleFactor(const TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessPageIteratorBoundingBox(const TessPageIterator *handle, TessPageIteratorLevel level, int *left, int *top, int *right, int *bottom)
TESS_API int TESS_CALL TessBaseAPIRecognize(TessBaseAPI *handle, ETEXT_DESC *monitor)
TESS_API void TESS_CALL TessBaseAPISetDictFunc(TessBaseAPI *handle, TessDictFunc f)
TESS_API BOOL TESS_CALL TessResultIteratorWordIsNumeric(const TessResultIterator *handle)
void * cancel_this
monitor-aware progress callback
TESS_API TessPolyBlockType TESS_CALL TessPageIteratorBlockType(const TessPageIterator *handle)
TESS_API void TESS_CALL TessMonitorSetDeadlineMSecs(ETEXT_DESC *monitor, int deadline)
TESS_API void TESS_CALL TessPageIteratorOrientation(TessPageIterator *handle, TessOrientation *orientation, TessWritingDirection *writing_direction, TessTextlineOrder *textline_order, float *deskew_angle)
struct TessBaseAPI TessBaseAPI
TESS_API void TESS_CALL TessPageIteratorDelete(TessPageIterator *handle)
TESS_API void TESS_CALL TessPageIteratorBegin(TessPageIterator *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetVariableAsString(TessBaseAPI *handle, const char *name, STRING *val)
TESS_API void TESS_CALL TessDeleteText(char *text)
TESS_API void TESS_CALL TessBaseAPISetImage2(TessBaseAPI *handle, struct Pix *pix)
TESS_API char **TESS_CALL TessBaseAPIGetAvailableLanguagesAsVector(const TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessResultIteratorNext(TessResultIterator *handle, TessPageIteratorLevel level)
struct TessTextRenderer TessTextRenderer
TESS_API char *TESS_CALL TessBaseAPIGetBoxText(TessBaseAPI *handle, int page_number)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetComponentImages(TessBaseAPI *handle, const TessPageIteratorLevel level, const BOOL text_only, struct Pixa **pixa, int **blockids)
TESS_API void TESS_CALL TessBaseAPISetImage(TessBaseAPI *handle, const unsigned char *imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
TESS_API char *TESS_CALL TessResultIteratorGetUTF8Text(const TessResultIterator *handle, TessPageIteratorLevel level)
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 const TessDawg *TESS_CALL TessBaseAPIGetDawg(const TessBaseAPI *handle, int i)
TESS_API const char *TESS_CALL TessResultIteratorWordRecognitionLanguage(const TessResultIterator *handle)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetConnectedComponents(TessBaseAPI *handle, struct Pixa **cc)
TESS_API const char *TESS_CALL TessChoiceIteratorGetUTF8Text(const TessChoiceIterator *handle)
TESS_API char **TESS_CALL TessBaseAPIGetLoadedLanguagesAsVector(const TessBaseAPI *handle)
bool(* TessProgressFunc)(ETEXT_DESC *ths, int left, int right, int top, int bottom)
TESS_API BOOL TESS_CALL TessPageIteratorBaseline(const TessPageIterator *handle, TessPageIteratorLevel level, int *x1, int *y1, int *x2, int *y2)
TESS_API void TESS_CALL TessDeleteTextArray(char **arr)
TESS_API struct Pix *TESS_CALL TessBaseAPIGetInputImage(TessBaseAPI *handle)
TESS_API void TESS_CALL TessNormalizeTBLOB(TBLOB *tblob, ROW *row, BOOL numeric_mode)
TESS_API BOOL TESS_CALL TessPageIteratorIsAtFinalElement(const TessPageIterator *handle, TessPageIteratorLevel level, TessPageIteratorLevel element)
TESS_API const char *TESS_CALL TessBaseAPIGetInputName(TessBaseAPI *handle)
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 const char *TESS_CALL TessBaseAPIGetUnichar(TessBaseAPI *handle, int unichar_id)
TESS_API TessResultRenderer *TESS_CALL TessUnlvRendererCreate(const char *outputbase)
TESS_API const char *TESS_CALL TessBaseAPIGetDatapath(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIPrintVariablesToFile(const TessBaseAPI *handle, const char *filename)
TESS_API BOOL TESS_CALL TessResultRendererAddImage(TessResultRenderer *renderer, TessBaseAPI *api)
int(Dict::* DictFunc)(void *void_dawg_args, const UNICHARSET &unicharset, UNICHAR_ID unichar_id, bool word_end) const
TESS_API void TESS_CALL TessBaseAPIInitForAnalysePage(TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIGetSourceYResolution(TessBaseAPI *handle)
TESS_API TessOcrEngineMode TESS_CALL TessBaseAPIOem(const TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetBoolVariable(const TessBaseAPI *handle, const char *name, BOOL *value)
TESS_API struct Pix *TESS_CALL TessPageIteratorGetBinaryImage(const TessPageIterator *handle, TessPageIteratorLevel level)
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)
TESS_API ETEXT_DESC *TESS_CALL TessMonitorCreate()
TESS_API int TESS_CALL TessBaseAPIInit3(TessBaseAPI *handle, const char *datapath, const char *language)
TESS_API int TESS_CALL TessBaseAPIInitLangMod(TessBaseAPI *handle, const char *datapath, const char *language)
TESS_API void TESS_CALL TessBaseAPIReadConfigFile(TessBaseAPI *handle, const char *filename)
TESS_API BOOL TESS_CALL TessResultRendererBeginDocument(TessResultRenderer *renderer, const char *title)
TESS_API TBLOB *TESS_CALL TessMakeTBLOB(struct Pix *pix)
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)
TESS_API TessResultRenderer *TESS_CALL TessBoxTextRendererCreate(const char *outputbase)
TESS_API BOOL TESS_CALL TessPageIteratorIsAtBeginningOf(const TessPageIterator *handle, TessPageIteratorLevel level)
struct TessHOcrRenderer TessHOcrRenderer
TESS_API void TESS_CALL TessBaseAPISetProbabilityInContextFunc(TessBaseAPI *handle, TessProbabilityInContextFunc f)
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsSuperscript(const TessResultIterator *handle)
TESS_API void TESS_CALL TessDeleteBlockList(BLOCK_LIST *block_list)
TESS_API float TESS_CALL TessChoiceIteratorConfidence(const TessChoiceIterator *handle)
TESS_API void TESS_CALL TessBaseAPIPrintVariables(const TessBaseAPI *handle, FILE *fp)
TESS_API TessResultRenderer *TESS_CALL TessResultRendererNext(TessResultRenderer *renderer)
TESS_API void TESS_CALL TessMonitorSetCancelFunc(ETEXT_DESC *monitor, TessCancelFunc cancelFunc)
TESS_API TessMutableIterator *TESS_CALL TessBaseAPIGetMutableIterator(TessBaseAPI *handle)
TESS_API ROW *TESS_CALL TessFindRowForBox(BLOCK_LIST *blocks, int left, int top, int right, int bottom)
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 void TESS_CALL TessDeleteResultRenderer(TessResultRenderer *renderer)
TESS_API TessChoiceIterator *TESS_CALL TessResultIteratorGetChoiceIterator(const TessResultIterator *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetIntVariable(const TessBaseAPI *handle, const char *name, int *value)
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 char *TESS_CALL TessBaseAPIGetUNLVText(TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPISetPageSegMode(TessBaseAPI *handle, TessPageSegMode mode)
TESS_API int TESS_CALL TessBaseAPIInit2(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode oem)
TESS_API void TESS_CALL TessBaseAPIDelete(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsSubscript(const TessResultIterator *handle)
TESS_API TessBaseAPI *TESS_CALL TessBaseAPICreate()
TESS_API void TESS_CALL TessResultRendererInsert(TessResultRenderer *renderer, TessResultRenderer *next)
TESS_API BOOL TESS_CALL TessResultIteratorWordIsFromDictionary(const TessResultIterator *handle)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetStrips(TessBaseAPI *handle, struct Pixa **pixa, int **blockids)
TESS_API void TESS_CALL TessMonitorSetProgressFunc(ETEXT_DESC *monitor, TessProgressFunc progressFunc)
TESS_API TessResultRenderer *TESS_CALL TessHOcrRendererCreate2(const char *outputbase, BOOL font_info)
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 struct Boxa *TESS_CALL TessBaseAPIGetWords(TessBaseAPI *handle, struct Pixa **pixa)
TESS_API void TESS_CALL TessBaseAPIClearAdaptiveClassifier(TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessResultIteratorSymbolIsDropcap(const TessResultIterator *handle)
TESS_API TessResultIterator *TESS_CALL TessResultIteratorCopy(const TessResultIterator *handle)
TESS_API ROW *TESS_CALL TessMakeTessOCRRow(float baseline, float xheight, float descender, float ascender)
TESS_API void TESS_CALL TessBaseAPIEnd(TessBaseAPI *handle)
TESS_API void TESS_CALL TessMonitorSetCancelThis(ETEXT_DESC *monitor, void *cancelThis)
TESS_API int *TESS_CALL TessBaseAPIAllWordConfidences(TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPIIsValidWord(TessBaseAPI *handle, const char *word)
TESS_API void TESS_CALL TessChoiceIteratorDelete(TessChoiceIterator *handle)
TESS_API const char *TESS_CALL TessResultRendererTitle(TessResultRenderer *renderer)
struct TessResultRenderer TessResultRenderer
TESS_API int TESS_CALL TessResultRendererImageNum(TessResultRenderer *renderer)
struct TessMutableIterator TessMutableIterator
TESS_API BOOL TESS_CALL TessResultRendererEndDocument(TessResultRenderer *renderer)
TESS_API void *TESS_CALL TessMonitorGetCancelThis(ETEXT_DESC *monitor)
double(Dict::* ProbabilityInContextFunc)(const char *lang, const char *context, int context_bytes, const char *character, int character_bytes)
TESS_API BOOL TESS_CALL TessBaseAPIProcessPages(TessBaseAPI *handle, const char *filename, const char *retry_config, int timeout_millisec, TessResultRenderer *renderer)
TESS_API const char *TESS_CALL TessVersion()
TESS_API int TESS_CALL TessBaseAPIMeanTextConf(TessBaseAPI *handle)
TESS_API TessResultRenderer *TESS_CALL TessHOcrRendererCreate(const char *outputbase)
TESS_API struct Pix *TESS_CALL TessPageIteratorGetImage(const TessPageIterator *handle, TessPageIteratorLevel level, int padding, struct Pix *original_image, int *left, int *top)
TESS_API TessPageIterator *TESS_CALL TessPageIteratorCopy(const TessPageIterator *handle)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetRegions(TessBaseAPI *handle, struct Pixa **pixa)
TESS_API struct Boxa *TESS_CALL TessBaseAPIGetTextlines(TessBaseAPI *handle, struct Pixa **pixa, int **blockids)
TESS_API const TessPageIterator *TESS_CALL TessResultIteratorGetPageIteratorConst(const TessResultIterator *handle)
TESS_API struct Pix *TESS_CALL TessBaseAPIGetThresholdedImage(TessBaseAPI *handle)
TESS_API void TESS_CALL TessBaseAPISetInputName(TessBaseAPI *handle, const char *name)
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 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 void TESS_CALL TessBaseAPIReadDebugConfigFile(TessBaseAPI *handle, const char *filename)
TESS_API TessPageIterator *TESS_CALL TessBaseAPIAnalyseLayout(TessBaseAPI *handle)
TESS_API int TESS_CALL TessBaseAPINumDawgs(const TessBaseAPI *handle)
TESS_API BOOL TESS_CALL TessBaseAPIGetTextDirection(TessBaseAPI *handle, int *out_offset, float *out_slope)
TESS_API const char *TESS_CALL TessResultRendererExtention(TessResultRenderer *renderer)
TESS_API TessResultIterator *TESS_CALL TessBaseAPIGetIterator(TessBaseAPI *handle)
TESS_API BLOCK_LIST *TESS_CALL TessBaseAPIFindLinesCreateBlockList(TessBaseAPI *handle)
TESS_API float TESS_CALL TessResultIteratorConfidence(const TessResultIterator *handle, TessPageIteratorLevel level)
struct TessBoxTextRenderer TessBoxTextRenderer
TESS_API void TESS_CALL TessMonitorDelete(ETEXT_DESC *monitor)
TESS_API const char *TESS_CALL TessBaseAPIGetStringVariable(const TessBaseAPI *handle, const char *name)
TESS_API BOOL TESS_CALL TessBaseAPIGetDoubleVariable(const TessBaseAPI *handle, const char *name, double *value)
void(Wordrec::* FillLatticeFunc)(const MATRIX &ratings, const WERD_CHOICE_LIST &best_choices, const UNICHARSET &unicharset, BlamerBundle *blamer_bundle)
struct TessPageIterator TessPageIterator
TESS_API void TESS_CALL TessDeleteIntArray(int *arr)
TESS_API void TESS_CALL TessBaseAPISetInputImage(TessBaseAPI *handle, struct Pix *pix)
TESS_API size_t TESS_CALL TessBaseAPIGetOpenCLDevice(TessBaseAPI *handle, void **device)
TESS_API int TESS_CALL TessBaseAPIInit1(TessBaseAPI *handle, const char *datapath, const char *language, TessOcrEngineMode oem, char **configs, int configs_size)
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 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)