Skip to content

Commit

Permalink
Calls TessHOcrTsvRenderer if tessedit_create_hocrtsv is true.
Browse files Browse the repository at this point in the history
  • Loading branch information
sundarcf authored and tfmorris committed Mar 1, 2016
1 parent 4d13892 commit 59d593d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
10 changes: 10 additions & 0 deletions api/tesseractmain.cpp
Expand Up @@ -299,6 +299,14 @@ void PreloadRenderers(tesseract::TessBaseAPI* api,
new tesseract::TessHOcrRenderer(outputbase, font_info));
}

api->GetBoolVariable("tessedit_create_hocrtsv", &b);
if (b) {
bool font_info;
api->GetBoolVariable("hocr_font_info", &font_info);
renderers->push_back(
new tesseract::TessHOcrTsvRenderer(outputbase, font_info));
}

api->GetBoolVariable("tessedit_create_pdf", &b);
if (b) {
renderers->push_back(new tesseract::TessPDFRenderer(outputbase,
Expand Down Expand Up @@ -422,6 +430,8 @@ int main(int argc, char **argv) {

tesseract::PointerVector<tesseract::TessResultRenderer> renderers;



if (in_training_mode) {
renderers.push_back(NULL);
} else {
Expand Down
2 changes: 2 additions & 0 deletions tessdata/configs/hocrtsv
@@ -0,0 +1,2 @@
tessedit_create_hocr 1
tessedit_pageseg_mode 1

0 comments on commit 59d593d

Please sign in to comment.