Skip to content

Commit

Permalink
Check for skewed lines on TextRegion level.
Browse files Browse the repository at this point in the history
  • Loading branch information
JKamlah committed Apr 12, 2024
1 parent 84a52ed commit acc435c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/api/pagerenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -843,7 +843,7 @@ char *TessBaseAPI::GetPAGEText(ETEXT_DESC *monitor, int page_number) {
}
page_str << "orientation {" << orientation_block << ";}\">\n";
page_str << "\t\t\t";
if (!POLYGONFLAG && LEVELFLAG == 0) {
if ((!POLYGONFLAG || (orientation_block != 0 && orientation_block != 2)) && LEVELFLAG == 0) {
AddBoxToPAGE(res_it, RIL_BLOCK, page_str);
}
}
Expand Down Expand Up @@ -871,6 +871,7 @@ char *TessBaseAPI::GetPAGEText(ETEXT_DESC *monitor, int page_number) {
// for now using LinePts
bool skewed_flag = (orientation_block != 0 && orientation_block != 2);


if (res_it->IsAtBeginningOf(RIL_TEXTLINE)) {
// writing_direction_before = writing_direction;
line_conf = ((res_it->Confidence(RIL_TEXTLINE)) / 100.);
Expand Down

0 comments on commit acc435c

Please sign in to comment.