63 {
65
66 GTEST_SKIP();
67 return;
68 }
69 if (line_mode) {
71 } else {
73 }
76 EXPECT_STREQ(truth_str, ocr_text);
77 delete[] ocr_text;
78
79
82 ASSERT_TRUE(box_file != nullptr);
85 do {
86 int left, top, right, bottom;
88 TBOX ocr_box(ICOORD(left, height - bottom), ICOORD(right, height - top));
89 int line_number = 0;
91 std::string box_text;
92 EXPECT_TRUE(
ReadNextBox(0, &line_number, box_file, box_text, &truth_box));
93
94
95 EXPECT_TRUE(ocr_box.major_overlap(truth_box));
96
98 EXPECT_STREQ(box_text.c_str(), symbol_text);
99 delete[] symbol_text;
101 delete it;
102 }
FILE * OpenBoxFile(const char *fname)
bool ReadNextBox(int *line_number, FILE *box_file, std::string &utf8_str, TBOX *bounding_box)
int Recognize(ETEXT_DESC *monitor)
ResultIterator * GetIterator()
bool SetImage(const char *filename)