diff --git a/include/tesseract/osdetect.h b/include/tesseract/osdetect.h index 01855b242..40b0ac185 100644 --- a/include/tesseract/osdetect.h +++ b/include/tesseract/osdetect.h @@ -20,7 +20,8 @@ #ifndef TESSERACT_CCMAIN_OSDETECT_H_ #define TESSERACT_CCMAIN_OSDETECT_H_ -#include "platform.h" // for TESS_API +#include "platform.h" // for TESS_API +#include // for std::vector namespace tesseract { @@ -29,8 +30,6 @@ class BLOBNBOX_CLIST; class BLOB_CHOICE_LIST; class TO_BLOCK_LIST; class UNICHARSET; -template -class GenericVector; class Tesseract; @@ -82,19 +81,19 @@ struct OSResults { class OrientationDetector { public: - OrientationDetector(const GenericVector* allowed_scripts, + OrientationDetector(const std::vector* allowed_scripts, OSResults* results); bool detect_blob(BLOB_CHOICE_LIST* scores); int get_orientation(); private: OSResults* osr_; - const GenericVector* allowed_scripts_; + const std::vector* allowed_scripts_; }; class ScriptDetector { public: - ScriptDetector(const GenericVector* allowed_scripts, OSResults* osr, + ScriptDetector(const std::vector* allowed_scripts, OSResults* osr, tesseract::Tesseract* tess); void detect_blob(BLOB_CHOICE_LIST* scores); bool must_stop(int orientation); @@ -113,7 +112,7 @@ class ScriptDetector { int latin_id_; int fraktur_id_; tesseract::Tesseract* tess_; - const GenericVector* allowed_scripts_; + const std::vector* allowed_scripts_; }; int orientation_and_script_detection(const char* filename, OSResults*, @@ -122,7 +121,7 @@ int orientation_and_script_detection(const char* filename, OSResults*, int os_detect(TO_BLOCK_LIST* port_blocks, OSResults* osr, tesseract::Tesseract* tess); -int os_detect_blobs(const GenericVector* allowed_scripts, +int os_detect_blobs(const std::vector* allowed_scripts, BLOBNBOX_CLIST* blob_list, OSResults* osr, tesseract::Tesseract* tess); diff --git a/src/ccmain/osdetect.cpp b/src/ccmain/osdetect.cpp index b4b90cd8c..2c53bf730 100644 --- a/src/ccmain/osdetect.cpp +++ b/src/ccmain/osdetect.cpp @@ -278,7 +278,7 @@ int os_detect(TO_BLOCK_LIST* port_blocks, OSResults* osr, // If allowed_scripts is non-null and non-empty, it is a list of scripts that // constrains both orientation and script detection to consider only scripts // from the list. -int os_detect_blobs(const GenericVector* allowed_scripts, +int os_detect_blobs(const std::vector* allowed_scripts, BLOBNBOX_CLIST* blob_list, OSResults* osr, tesseract::Tesseract* tess) { OSResults osr_; @@ -375,7 +375,7 @@ bool os_detect_blob(BLOBNBOX* bbox, OrientationDetector* o, OrientationDetector::OrientationDetector( - const GenericVector* allowed_scripts, OSResults* osr) { + const std::vector* allowed_scripts, OSResults* osr) { osr_ = osr; allowed_scripts_ = allowed_scripts; } @@ -453,7 +453,7 @@ int OrientationDetector::get_orientation() { } -ScriptDetector::ScriptDetector(const GenericVector* allowed_scripts, +ScriptDetector::ScriptDetector(const std::vector* allowed_scripts, OSResults* osr, tesseract::Tesseract* tess) { osr_ = osr; tess_ = tess;