mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 03:46:59 +08:00
Added config attribute for multi-line plates
This commit is contained in:
@@ -139,6 +139,8 @@ void Config::loadValues(string country)
|
||||
minPlateSizeWidthPx = getInt(country, "min_plate_size_width_px", 100);
|
||||
minPlateSizeHeightPx = getInt(country, "min_plate_size_height_px", 100);
|
||||
|
||||
multiline = getBoolean(country, "multiline", false);
|
||||
|
||||
plateWidthMM = getFloat(country, "plate_width_mm", 100);
|
||||
plateHeightMM = getFloat(country, "plate_height_mm", 100);
|
||||
|
||||
|
@@ -57,6 +57,8 @@ class Config
|
||||
float minPlateSizeWidthPx;
|
||||
float minPlateSizeHeightPx;
|
||||
|
||||
bool multiline;
|
||||
|
||||
float plateWidthMM;
|
||||
float plateHeightMM;
|
||||
|
||||
|
@@ -40,6 +40,7 @@ void LicensePlateCandidate::recognize()
|
||||
charSegmenter = NULL;
|
||||
|
||||
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);
|
||||
|
@@ -23,6 +23,8 @@ class PipelineData
|
||||
cv::Mat grayImg;
|
||||
cv::Rect regionOfInterest;
|
||||
|
||||
bool isMultiline;
|
||||
|
||||
cv::Mat crop_gray;
|
||||
|
||||
bool hasPlateBorder;
|
||||
|
@@ -27,7 +27,6 @@ CharacterAnalysis::CharacterAnalysis(PipelineData* pipeline_data)
|
||||
this->pipeline_data = pipeline_data;
|
||||
this->config = pipeline_data->config;
|
||||
|
||||
this->isTwoLine = true;
|
||||
|
||||
if (this->config->debugCharAnalysis)
|
||||
cout << "Starting CharacterAnalysis identification" << endl;
|
||||
|
Reference in New Issue
Block a user