Merge pull request #3571 from MerlijnWajer/hocr-write-scan-res

hocrrenderer: write scan_res property to the ocr_page
This commit is contained in:
Amit D 2021-09-22 09:22:26 +03:00 committed by GitHub
commit 6998c0ed71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -173,8 +173,11 @@ char *TessBaseAPI::GetHOCRText(ETEXT_DESC *monitor, int page_number) {
} else {
hocr_str << "unknown";
}
hocr_str << "\"; bbox " << rect_left_ << " " << rect_top_ << " " << rect_width_ << " "
<< rect_height_ << "; ppageno " << page_number << "'>\n";
<< rect_height_ << "; ppageno " << page_number
<< "; scan_res " << GetSourceYResolution() << " "
<< GetSourceYResolution() << "'>\n";
std::unique_ptr<ResultIterator> res_it(GetIterator());
while (!res_it->Empty(RIL_BLOCK)) {