Definition at line 27 of file applybox_test.cc.
◆ ApplyBoxTest()
tesseract::ApplyBoxTest::ApplyBoxTest |
( |
| ) |
|
|
inlineprotected |
◆ ~ApplyBoxTest()
tesseract::ApplyBoxTest::~ApplyBoxTest |
( |
| ) |
|
|
inlineoverrideprotected |
◆ SetImage()
bool tesseract::ApplyBoxTest::SetImage |
( |
const char * |
filename | ) |
|
|
inlineprotected |
Definition at line 43 of file applybox_test.cc.
@ PSM_SINGLE_BLOCK
Assume a single uniform block of text. (Default.)
void SetPageSegMode(PageSegMode mode)
bool SetVariable(const char *name, const char *value)
void SetInputName(const char *name)
int Init(const char *datapath, const char *language, OcrEngineMode mode, char **configs, int configs_size, const std::vector< std::string > *vars_vec, const std::vector< std::string > *vars_values, bool set_only_non_debug_params)
void SetImage(const unsigned char *imagedata, int width, int height, int bytes_per_pixel, int bytes_per_line)
std::string TestDataNameToPath(const std::string &name)
tesseract::TessBaseAPI api_
std::string TessdataPath()
◆ TessdataPath()
std::string tesseract::ApplyBoxTest::TessdataPath |
( |
| ) |
|
|
inlineprotected |
◆ TestDataNameToPath()
std::string tesseract::ApplyBoxTest::TestDataNameToPath |
( |
const std::string & |
name | ) |
|
|
inlineprotected |
Definition at line 29 of file applybox_test.cc.
static std::string JoinPath(const std::string &s1, const std::string &s2)
◆ VerifyBoxesAndText()
void tesseract::ApplyBoxTest::VerifyBoxesAndText |
( |
const char * |
imagefile, |
|
|
const char * |
truth_str, |
|
|
const char * |
target_box_file, |
|
|
bool |
line_mode |
|
) |
| |
|
inlineprotected |
Definition at line 62 of file applybox_test.cc.
76 EXPECT_STREQ(truth_str, ocr_text);
82 ASSERT_TRUE(box_file !=
nullptr);
86 int left, top, right, bottom;
88 TBOX ocr_box(ICOORD(left, height - bottom), ICOORD(right, height - top));
92 EXPECT_TRUE(
ReadNextBox(0, &line_number, box_file, box_text, &truth_box));
95 EXPECT_TRUE(ocr_box.major_overlap(truth_box));
98 EXPECT_STREQ(box_text.c_str(), symbol_text);
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)
◆ api_
◆ ocr_text_
std::string tesseract::ApplyBoxTest::ocr_text_ |
|
protected |
◆ src_pix_
Image tesseract::ApplyBoxTest::src_pix_ |
|
protected |
The documentation for this class was generated from the following file: