Got rid of expanding the region before doing text analysis

This commit is contained in:
Matt Hill
2014-10-20 23:47:54 -04:00
parent d48a41da49
commit 995e385690

View File

@@ -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));