diff --git a/src/openalpr/textdetection/textline.cpp b/src/openalpr/textdetection/textline.cpp index 46405e4..b0c57af 100644 --- a/src/openalpr/textdetection/textline.cpp +++ b/src/openalpr/textdetection/textline.cpp @@ -73,6 +73,9 @@ void TextLine::initialize(std::vector textArea, std::vectorlineHeight = distanceBetweenPoints(midpoint, acrossFromMidpoint); + // Subtract a pixel since the height is a little overestimated by the bounding box + this->lineHeight = this->lineHeight - 1; + this->angle = (topLine.angle + bottomLine.angle) / 2; }