From 995e385690addb2d4ea90a56ce8209703f1a33c1 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 20 Oct 2014 23:47:54 -0400 Subject: [PATCH] Got rid of expanding the region before doing text analysis --- src/openalpr/licenseplatecandidate.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/openalpr/licenseplatecandidate.cpp b/src/openalpr/licenseplatecandidate.cpp index bcee6f8..9adc533 100644 --- a/src/openalpr/licenseplatecandidate.cpp +++ b/src/openalpr/licenseplatecandidate.cpp @@ -44,11 +44,9 @@ void LicensePlateCandidate::recognize() pipeline_data->plate_area_confidence = 0; pipeline_data->isMultiline = config->multiline; - int expandX = round(this->pipeline_data->regionOfInterest.width * 0.20); - int expandY = round(this->pipeline_data->regionOfInterest.height * 0.15); - // expand box by 15% in all directions - Rect expandedRegion = expandRect( this->pipeline_data->regionOfInterest, expandX, expandY, this->pipeline_data->grayImg.cols, this->pipeline_data->grayImg.rows) ; + Rect expandedRegion = this->pipeline_data->regionOfInterest; + pipeline_data->crop_gray = Mat(this->pipeline_data->grayImg, expandedRegion); resize(pipeline_data->crop_gray, pipeline_data->crop_gray, Size(config->templateWidthPx, config->templateHeightPx));