20 #ifndef TESSERACT_CCMAIN_OSDETECT_H_ 21 #define TESSERACT_CCMAIN_OSDETECT_H_ 28 class BLOB_CHOICE_LIST;
39 OSBestResult() : orientation_id(0), script_id(0), sconfidence(0.0),
49 for (
int i = 0; i < 4; ++i) {
55 void update_best_orientation();
57 void set_best_orientation(
int orientation_id);
60 void update_best_script(
int orientation_id);
62 TESS_API int get_best_script(
int orientation_id)
const;
67 void print_scores(
void)
const;
68 void print_scores(
int orientation_id)
const;
74 float orientations[4];
86 bool detect_blob(BLOB_CHOICE_LIST* scores);
87 int get_orientation();
97 void detect_blob(BLOB_CHOICE_LIST* scores);
98 bool must_stop(
int orientation);
101 static const char* korean_script_;
102 static const char* japanese_script_;
103 static const char* fraktur_script_;
120 int os_detect(TO_BLOCK_LIST* port_blocks,
125 BLOBNBOX_CLIST* blob_list,
138 #endif // TESSERACT_CCMAIN_OSDETECT_H_
int os_detect_blobs(const GenericVector< int > *allowed_scripts, BLOBNBOX_CLIST *blob_list, OSResults *osr, tesseract::Tesseract *tess)
int os_detect(TO_BLOCK_LIST *port_blocks, OSResults *osr, tesseract::Tesseract *tess)
TESS_API int OrientationIdToValue(const int &id)
int orientation_and_script_detection(STRING &filename, OSResults *, tesseract::Tesseract *)
bool os_detect_blob(BLOBNBOX *bbox, OrientationDetector *o, ScriptDetector *s, OSResults *, tesseract::Tesseract *tess)
const int kMaxNumberOfScripts