mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-14 16:23:39 +08:00
Added parameter to control high-contrast detection sensitivity
This commit is contained in:
@@ -183,6 +183,8 @@ namespace alpr
|
||||
maxDetectionInputWidth = getInt(ini, "", "max_detection_input_width", 1280);
|
||||
maxDetectionInputHeight = getInt(ini, "", "max_detection_input_height", 768);
|
||||
|
||||
contrastDetectionThreshold = getFloat(ini, "", "contrast_detection_threshold", 0.3);
|
||||
|
||||
mustMatchPattern = getBoolean(ini, "", "must_match_pattern", false);
|
||||
|
||||
skipDetection = getBoolean(ini, "", "skip_detection", false);
|
||||
|
@@ -57,6 +57,8 @@ namespace alpr
|
||||
int maxDetectionInputWidth;
|
||||
int maxDetectionInputHeight;
|
||||
|
||||
float contrastDetectionThreshold;
|
||||
|
||||
bool skipDetection;
|
||||
|
||||
bool auto_invert;
|
||||
|
@@ -339,7 +339,7 @@ namespace alpr
|
||||
cout << "High Contrast Detection Time: " << diffclock(startTime, endTime) << "ms." << endl;
|
||||
}
|
||||
|
||||
return contrast > 0.3;
|
||||
return contrast > pipeline_data->config->contrastDetectionThreshold;
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user