Merge pull request #358 from StefRe/tsv-fix

Fix TSV bounding box width/hight calculation
This commit is contained in:
zdenop 2016-06-27 09:09:12 +02:00 committed by GitHub
commit 828f8528a8
2 changed files with 3 additions and 3 deletions

View File

@ -1431,8 +1431,8 @@ static void AddBoxToTSV(const PageIterator *it,
it->BoundingBox(level, &left, &top, &right, &bottom);
hocr_str->add_str_int("\t", left);
hocr_str->add_str_int("\t", top);
hocr_str->add_str_int("\t", right - left + 1);
hocr_str->add_str_int("\t", bottom - top + 1);
hocr_str->add_str_int("\t", right - left);
hocr_str->add_str_int("\t", bottom - top);
}

View File

@ -196,7 +196,7 @@ bool TessHOcrRenderer::AddImageHandler(TessBaseAPI* api) {
}
/**********************************************************************
* HOcr Text Renderer interface implementation
* TSV Text Renderer interface implementation
**********************************************************************/
TessTsvRenderer::TessTsvRenderer(const char *outputbase)
: TessResultRenderer(outputbase, "tsv") {