From a9f7a3af72edce67d9613194f6454ba1914d0a83 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Sun, 26 Oct 2014 14:24:36 -0400 Subject: [PATCH] Tweaked the line height to be slightly smaller --- src/openalpr/textdetection/textline.cpp | 3 +++ 1 file changed, 3 insertions(+) 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; }