Definition at line 64 of file baseapi_thread_test.cc.
◆ SetUpTestCase()
static void tesseract::BaseapiThreadTest::SetUpTestCase |
( |
| ) |
|
|
inlinestaticprotected |
Definition at line 66 of file baseapi_thread_test.cc.
67 CHECK(FLAGS_test_tesseract || FLAGS_test_cube)
68 <<
"Need to test at least one of Tesseract/Cube!";
70 std::vector<std::string> image_files;
71 if (FLAGS_test_tesseract) {
73 while (kTessLangs[i] && kTessTruthText[i] && kTessImages[i]) {
74 langs_.emplace_back(kTessLangs[i]);
75 gt_text_.emplace_back(kTessTruthText[i]);
76 image_files.emplace_back(kTessImages[i]);
79 LOG(
INFO) <<
"Testing Tesseract on " << i <<
" languages.";
81 if (FLAGS_test_cube) {
83 while (kCubeLangs[i] && kCubeTruthText[i] && kCubeImages[i]) {
84 langs_.emplace_back(kCubeLangs[i]);
85 gt_text_.emplace_back(kCubeTruthText[i]);
86 image_files.emplace_back(kCubeImages[i]);
89 LOG(
INFO) <<
"Testing Cube on " << i <<
" languages.";
98 for (
int i = 0; i < n; ++i) {
99 std::string path = TESTING_DIR
"/" + image_files[i %
num_langs_];
100 Image new_pix = pixRead(path.c_str());
101 QCHECK(new_pix !=
nullptr) <<
"Could not read " << path;
102 pix_.push_back(new_pix);
105 #ifdef INCLUDE_TENSORFLOW
106 pool_size_ = (FLAGS_max_concurrent_instances < 1) ?
num_langs_ * FLAGS_reps
107 : FLAGS_max_concurrent_instances;
static std::vector< std::string > langs_
static std::vector< Image > pix_
static std::vector< std::string > gt_text_
◆ TearDownTestCase()
static void tesseract::BaseapiThreadTest::TearDownTestCase |
( |
| ) |
|
|
inlinestaticprotected |
◆ gt_text_
std::vector< std::string > tesseract::BaseapiThreadTest::gt_text_ |
|
staticprotected |
◆ langs_
std::vector< std::string > tesseract::BaseapiThreadTest::langs_ |
|
staticprotected |
◆ num_langs_
int tesseract::BaseapiThreadTest::num_langs_ |
|
staticprotected |
◆ pix_
std::vector< Image > tesseract::BaseapiThreadTest::pix_ |
|
staticprotected |
The documentation for this class was generated from the following file: