tesseract
5.0.0-alpha-619-ge9db
|
Go to the documentation of this file.
19 #include "config_auto.h"
34 const char* extension)
35 : file_extension_(extension),
36 title_(
""), imagenum_(-1),
40 if (strcmp(outputbase,
"-") && strcmp(outputbase,
"stdout")) {
42 fout_ = fopen(outfile.
c_str(),
"wb");
43 if (fout_ ==
nullptr) {
50 if (fout_ !=
nullptr) {
60 if (
next ==
nullptr)
return;
65 while (
next->next_ !=
nullptr) {
68 next->next_ = remainder;
73 if (!happy_)
return false;
84 if (!happy_)
return false;
94 if (!happy_)
return false;
128 const std::unique_ptr<const char[]> utf8(api->
GetUTF8Text());
129 if (utf8 ==
nullptr) {
136 if (pageSeparator !=
nullptr && *pageSeparator !=
'\0') {
153 font_info_ = font_info;
159 "level\tpage_num\tblock_num\tpar_num\tline_num\tword_"
160 "num\tleft\ttop\twidth\theight\tconf\ttext\n");
168 if (tsv ==
nullptr)
return false;
183 const std::unique_ptr<const char[]> unlv(api->
GetUNLVText());
184 if (unlv ==
nullptr)
return false;
200 if (text ==
nullptr)
return false;
207 #ifndef DISABLED_LEGACY_ENGINE
217 if (osd ==
nullptr)
return false;
225 #endif // ndef DISABLED_LEGACY_ENGINE
bool AddImageHandler(TessBaseAPI *api) override
TessTsvRenderer(const char *outputbase, bool font_info)
TessResultRenderer * next()
bool AddImageHandler(TessBaseAPI *api) override
virtual bool AddImageHandler(TessBaseAPI *api)=0
const char * GetStringVariable(const char *name) const
void AppendString(const char *s)
TessOsdRenderer(const char *outputbase)
bool AddImage(TessBaseAPI *api)
const char * c_str() const
bool AddImageHandler(TessBaseAPI *api) override
TessResultRenderer(const char *outputbase, const char *extension)
bool AddImageHandler(TessBaseAPI *api) override
char * GetBoxText(int page_number)
TessUnlvRenderer(const char *outputbase)
char * GetTSVText(int page_number)
const char * title() const
bool BeginDocument(const char *title)
virtual bool BeginDocumentHandler()
bool AddImageHandler(TessBaseAPI *api) override
virtual bool EndDocumentHandler()
bool EndDocumentHandler() override
TessTextRenderer(const char *outputbase)
TessBoxTextRenderer(const char *outputbase)
bool Serialize(FILE *fp, const char *data, size_t n=1)
void insert(TessResultRenderer *next)
bool BeginDocumentHandler() override
char * GetOsdText(int page_number)
void AppendData(const char *s, int len)
virtual ~TessResultRenderer()