mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 21:12:47 +08:00
Got rid of expanding the region before doing text analysis
This commit is contained in:
@@ -44,10 +44,8 @@ void LicensePlateCandidate::recognize()
|
|||||||
pipeline_data->plate_area_confidence = 0;
|
pipeline_data->plate_area_confidence = 0;
|
||||||
pipeline_data->isMultiline = config->multiline;
|
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);
|
Rect expandedRegion = this->pipeline_data->regionOfInterest;
|
||||||
// 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) ;
|
|
||||||
|
|
||||||
pipeline_data->crop_gray = Mat(this->pipeline_data->grayImg, expandedRegion);
|
pipeline_data->crop_gray = Mat(this->pipeline_data->grayImg, expandedRegion);
|
||||||
resize(pipeline_data->crop_gray, pipeline_data->crop_gray, Size(config->templateWidthPx, config->templateHeightPx));
|
resize(pipeline_data->crop_gray, pipeline_data->crop_gray, Size(config->templateWidthPx, config->templateHeightPx));
|
||||||
|
Reference in New Issue
Block a user