20 #ifndef TESSERACT_CCMAIN_OSDETECT_H_ 21 #define TESSERACT_CCMAIN_OSDETECT_H_ 27 class BLOB_CHOICE_LIST;
38 const int kMaxNumberOfScripts = 116 + 1 + 2 + 1;
41 OSBestResult() : orientation_id(0), script_id(0), sconfidence(0.0),
51 for (
int i = 0; i < 4; ++i) {
52 for (
int j = 0; j < kMaxNumberOfScripts; ++j)
57 void update_best_orientation();
59 void set_best_orientation(
int orientation_id);
62 void update_best_script(
int orientation_id);
64 TESS_API
int get_best_script(
int orientation_id)
const;
69 void print_scores(
void)
const;
70 void print_scores(
int orientation_id)
const;
76 float orientations[4];
78 float scripts_na[4][kMaxNumberOfScripts];
88 bool detect_blob(BLOB_CHOICE_LIST* scores);
89 int get_orientation();
99 void detect_blob(BLOB_CHOICE_LIST* scores);
100 bool must_stop(
int orientation);
118 int orientation_and_script_detection(
STRING& filename,
122 int os_detect(TO_BLOCK_LIST* port_blocks,
127 BLOBNBOX_CLIST* blob_list,
138 TESS_API
int OrientationIdToValue(
const int&
id);
140 #endif // TESSERACT_CCMAIN_OSDETECT_H_ OSResults * osr_
Definition: osdetect.h:102
OSBestResult best_result
Definition: osdetect.h:81
static const char * korean_script_
Definition: osdetect.h:103
int script_id
Definition: osdetect.h:44
tesseract::Tesseract * tess_
Definition: osdetect.h:114
Definition: unicharset.h:146
Definition: osdetect.h:49
int han_id_
Definition: osdetect.h:110
Definition: baseapi.cpp:94
static const char * fraktur_script_
Definition: osdetect.h:105
UNICHARSET * unicharset
Definition: osdetect.h:80
int japanese_id_
Definition: osdetect.h:107
int fraktur_id_
Definition: osdetect.h:113
OSResults * osr_
Definition: osdetect.h:91
Definition: blobbox.h:144
Definition: osdetect.h:95
OSBestResult()
Definition: osdetect.h:41
const GenericVector< int > * allowed_scripts_
Definition: osdetect.h:92
Definition: osdetect.h:84
const GenericVector< int > * allowed_scripts_
Definition: osdetect.h:115
int katakana_id_
Definition: osdetect.h:108
int hangul_id_
Definition: osdetect.h:111
OSResults()
Definition: osdetect.h:50
Definition: osdetect.h:40
Definition: tesseractclass.h:173
int hiragana_id_
Definition: osdetect.h:109
float sconfidence
Definition: osdetect.h:45
int korean_id_
Definition: osdetect.h:106
float oconfidence
Definition: osdetect.h:46
int orientation_id
Definition: osdetect.h:43
int latin_id_
Definition: osdetect.h:112
static const char * japanese_script_
Definition: osdetect.h:104