mirror of
https://github.com/tesseract-ocr/tesseract.git
synced 2025-06-07 09:52:40 +08:00
Fix to baselinedetect from issue 1205
This commit is contained in:
parent
cd2653c167
commit
9c58701471
@ -108,7 +108,7 @@ double BaselineRow::BaselineAngle() const {
|
||||
double BaselineRow::SpaceBetween(const BaselineRow& other) const {
|
||||
// Find the x-centre of overlap of the lines.
|
||||
float x = (MAX(bounding_box_.left(), other.bounding_box_.left()) +
|
||||
MIN(bounding_box_.right(), other.bounding_box_.right())) / 2;
|
||||
MIN(bounding_box_.right(), other.bounding_box_.right())) / 2.0f;
|
||||
// Find the vertical centre between them.
|
||||
float y = (StraightYAtX(x) + other.StraightYAtX(x)) / 2.0f;
|
||||
// Find the perpendicular distance of (x,y) from each line.
|
||||
|
Loading…
Reference in New Issue
Block a user