30 static void AddBoxToLSTM(
int right,
int bottom,
int top,
int image_height,
31 int page_num,
STRING* text) {
43 bool first_word =
true;
44 int left = 0, top = 0, right = 0, bottom = 0;
78 AddBoxToLSTM(right, bottom, top,
image_height_, page_number, &lstm_box_str);
83 AddBoxToLSTM(right, bottom, top,
image_height_, page_number, &lstm_box_str);
86 char* ret =
new char[lstm_box_str.
length() + 1];
87 strcpy(ret, lstm_box_str.
string());
100 if (lstmbox ==
nullptr)
return false;
virtual bool Next(PageIteratorLevel level)
void add_str_int(const char *str, int number)
TESS_LOCAL LTRResultIterator * GetLTRIterator()
bool BoundingBox(PageIteratorLevel level, int *left, int *top, int *right, int *bottom) const
char * GetLSTMBoxText(int page_number)
void AppendString(const char *s)
TessLSTMBoxRenderer(const char *outputbase)
virtual bool IsAtBeginningOf(PageIteratorLevel level) const
const char * string() const
bool Empty(PageIteratorLevel level) const
PAGE_RES * page_res_
The page-level data.
char * GetUTF8Text(PageIteratorLevel level) const
bool AddImageHandler(TessBaseAPI *api) override
Tesseract * tesseract_
The underlying data object.
int Recognize(ETEXT_DESC *monitor)