20 #ifndef TESSERACT_CCMAIN_OSDETECT_H_ 21 #define TESSERACT_CCMAIN_OSDETECT_H_ 27 class BLOB_CHOICE_LIST;
41 OSBestResult() : orientation_id(0), script_id(0), sconfidence(0.0),
51 for (
int i = 0; i < 4; ++i) {
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];
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);
103 static const char* korean_script_;
104 static const char* japanese_script_;
105 static const char* fraktur_script_;
122 int os_detect(TO_BLOCK_LIST* port_blocks,
127 BLOBNBOX_CLIST* blob_list,
140 #endif // TESSERACT_CCMAIN_OSDETECT_H_
bool os_detect_blob(BLOBNBOX *bbox, OrientationDetector *o, ScriptDetector *s, OSResults *, tesseract::Tesseract *tess)
const int kMaxNumberOfScripts
int os_detect(TO_BLOCK_LIST *port_blocks, OSResults *osr, tesseract::Tesseract *tess)
int orientation_and_script_detection(STRING &filename, OSResults *, tesseract::Tesseract *)
int os_detect_blobs(const GenericVector< int > *allowed_scripts, BLOBNBOX_CLIST *blob_list, OSResults *osr, tesseract::Tesseract *tess)
TESS_API int OrientationIdToValue(const int &id)