Skip to content

Commit 4e9053b

Browse files
JKamlahstweil
authored andcommitted
Check for skewed lines on TextRegion level.
1 parent 65a40ec commit 4e9053b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/api/pagerenderer.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -843,7 +843,7 @@ char *TessBaseAPI::GetPAGEText(ETEXT_DESC *monitor, int page_number) {
843843
}
844844
page_str << "orientation {" << orientation_block << ";}\">\n";
845845
page_str << "\t\t\t";
846-
if (!POLYGONFLAG && LEVELFLAG == 0) {
846+
if ((!POLYGONFLAG || (orientation_block != 0 && orientation_block != 2)) && LEVELFLAG == 0) {
847847
AddBoxToPAGE(res_it, RIL_BLOCK, page_str);
848848
}
849849
}
@@ -871,6 +871,7 @@ char *TessBaseAPI::GetPAGEText(ETEXT_DESC *monitor, int page_number) {
871871
// for now using LinePts
872872
bool skewed_flag = (orientation_block != 0 && orientation_block != 2);
873873

874+
874875
if (res_it->IsAtBeginningOf(RIL_TEXTLINE)) {
875876
// writing_direction_before = writing_direction;
876877
line_conf = ((res_it->Confidence(RIL_TEXTLINE)) / 100.);

0 commit comments

Comments
 (0)