mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-11 04:33:20 +08:00
Fixed issue 1304
This commit is contained in:
parent
bfd2cb83d5
commit
26235d69e8
@ -926,6 +926,7 @@ TabVector* TabVector::VerticalTextlinePartner() {
|
|||||||
total_widths += box.width();
|
total_widths += box.width();
|
||||||
prev_bbox = bbox;
|
prev_bbox = bbox;
|
||||||
}
|
}
|
||||||
|
if (num_unmatched + num_matched == 0) return NULL;
|
||||||
double avg_width = total_widths * 1.0 / (num_unmatched + num_matched);
|
double avg_width = total_widths * 1.0 / (num_unmatched + num_matched);
|
||||||
double max_gap = textord_tabvector_vertical_gap_fraction * avg_width;
|
double max_gap = textord_tabvector_vertical_gap_fraction * avg_width;
|
||||||
int min_box_match = static_cast<int>((num_matched + num_unmatched) *
|
int min_box_match = static_cast<int>((num_matched + num_unmatched) *
|
||||||
|
Loading…
Reference in New Issue
Block a user