36 std::string wordstr_box_str;
37 int left = 0, top = 0, right = 0, bottom = 0;
39 bool first_line =
true;
50 wordstr_box_str +=
"\n\t " + std::to_string(right + 1);
51 wordstr_box_str +=
" " + std::to_string(
image_height_ - bottom);
52 wordstr_box_str +=
" " + std::to_string(right + 5);
54 wordstr_box_str +=
" " + std::to_string(page_number);
55 wordstr_box_str +=
"\n";
61 wordstr_box_str +=
"WordStr " + std::to_string(left);
62 wordstr_box_str +=
" " + std::to_string(
image_height_ - bottom);
63 wordstr_box_str +=
" " + std::to_string(right);
65 wordstr_box_str +=
" " + std::to_string(page_number);
66 wordstr_box_str +=
" #";
70 wordstr_box_str +=
" ";
75 if (left != 0 && top != 0 && right != 0 && bottom != 0) {
76 wordstr_box_str +=
"\n\t " + std::to_string(right + 1);
77 wordstr_box_str +=
" " + std::to_string(
image_height_ - bottom);
78 wordstr_box_str +=
" " + std::to_string(right + 5);
80 wordstr_box_str +=
" " + std::to_string(page_number);
81 wordstr_box_str +=
"\n";
83 char *ret =
new char[wordstr_box_str.length() + 1];
84 strcpy(ret, wordstr_box_str.c_str());
97 if (wordstrbox ==
nullptr) {
int Recognize(ETEXT_DESC *monitor)
PAGE_RES * page_res_
The page-level data.
Tesseract * tesseract_
The underlying data object.
char * GetWordStrBoxText(int page_number)
LTRResultIterator * GetLTRIterator()
char * GetUTF8Text(PageIteratorLevel level) const
virtual bool Next(PageIteratorLevel level)
virtual bool IsAtBeginningOf(PageIteratorLevel level) const
bool Empty(PageIteratorLevel level) const
bool BoundingBox(PageIteratorLevel level, int *left, int *top, int *right, int *bottom) const
void AppendString(const char *s)
bool AddImageHandler(TessBaseAPI *api) override
TessWordStrBoxRenderer(const char *outputbase)