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;
bool Empty(PageIteratorLevel level) const
bool AddImageHandler(TessBaseAPI *api) override
void AppendString(const char *s)
bool BoundingBox(PageIteratorLevel level, int *left, int *top, int *right, int *bottom) const
Tesseract * tesseract_
The underlying data object.
const char * string() const
virtual bool Next(PageIteratorLevel level)
TessLSTMBoxRenderer(const char *outputbase)
void add_str_int(const char *str, int number)
PAGE_RES * page_res_
The page-level data.
char * GetLSTMBoxText(int page_number)
virtual bool IsAtBeginningOf(PageIteratorLevel level) const
int Recognize(ETEXT_DESC *monitor)
char * GetUTF8Text(PageIteratorLevel level) const
TESS_LOCAL LTRResultIterator * GetLTRIterator()