Added config attribute for multi-line plates

This commit is contained in:
Matt Hill
2014-10-16 21:45:56 -04:00
parent 2e83a057c1
commit 1ce39c3f1f
5 changed files with 7 additions and 1 deletions

View File

@@ -139,6 +139,8 @@ void Config::loadValues(string country)
minPlateSizeWidthPx = getInt(country, "min_plate_size_width_px", 100); minPlateSizeWidthPx = getInt(country, "min_plate_size_width_px", 100);
minPlateSizeHeightPx = getInt(country, "min_plate_size_height_px", 100); minPlateSizeHeightPx = getInt(country, "min_plate_size_height_px", 100);
multiline = getBoolean(country, "multiline", false);
plateWidthMM = getFloat(country, "plate_width_mm", 100); plateWidthMM = getFloat(country, "plate_width_mm", 100);
plateHeightMM = getFloat(country, "plate_height_mm", 100); plateHeightMM = getFloat(country, "plate_height_mm", 100);

View File

@@ -57,6 +57,8 @@ class Config
float minPlateSizeWidthPx; float minPlateSizeWidthPx;
float minPlateSizeHeightPx; float minPlateSizeHeightPx;
bool multiline;
float plateWidthMM; float plateWidthMM;
float plateHeightMM; float plateHeightMM;

View File

@@ -40,6 +40,7 @@ void LicensePlateCandidate::recognize()
charSegmenter = NULL; charSegmenter = NULL;
pipeline_data->plate_area_confidence = 0; pipeline_data->plate_area_confidence = 0;
pipeline_data->isMultiline = config->multiline;
int expandX = round(this->pipeline_data->regionOfInterest.width * 0.20); int expandX = round(this->pipeline_data->regionOfInterest.width * 0.20);
int expandY = round(this->pipeline_data->regionOfInterest.height * 0.15); int expandY = round(this->pipeline_data->regionOfInterest.height * 0.15);

View File

@@ -23,6 +23,8 @@ class PipelineData
cv::Mat grayImg; cv::Mat grayImg;
cv::Rect regionOfInterest; cv::Rect regionOfInterest;
bool isMultiline;
cv::Mat crop_gray; cv::Mat crop_gray;
bool hasPlateBorder; bool hasPlateBorder;

View File

@@ -27,7 +27,6 @@ CharacterAnalysis::CharacterAnalysis(PipelineData* pipeline_data)
this->pipeline_data = pipeline_data; this->pipeline_data = pipeline_data;
this->config = pipeline_data->config; this->config = pipeline_data->config;
this->isTwoLine = true;
if (this->config->debugCharAnalysis) if (this->config->debugCharAnalysis)
cout << "Starting CharacterAnalysis identification" << endl; cout << "Starting CharacterAnalysis identification" << endl;