mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-06 03:46:59 +08:00
Added variable to control plate detection size increase.
Adjusting it to a smaller value means slower detection but higher probability that the plate will be found (and vice versa)
This commit is contained in:
@@ -6,6 +6,8 @@ state_id_img_size_percent = 2.0
|
|||||||
max_plate_width_percent = 100
|
max_plate_width_percent = 100
|
||||||
max_plate_height_percent = 100
|
max_plate_height_percent = 100
|
||||||
|
|
||||||
|
detection_iteration_increase = 1.1
|
||||||
|
|
||||||
opencl_enabled = 0
|
opencl_enabled = 0
|
||||||
|
|
||||||
ocr_min_font_point = 6
|
ocr_min_font_point = 6
|
||||||
@@ -25,7 +27,7 @@ postprocess_min_characters = 4
|
|||||||
postprocess_max_characters = 8
|
postprocess_max_characters = 8
|
||||||
|
|
||||||
[debug]
|
[debug]
|
||||||
general = 0
|
general = 1
|
||||||
timing = 0
|
timing = 0
|
||||||
state_id = 0
|
state_id = 0
|
||||||
plate_lines = 0
|
plate_lines = 0
|
||||||
@@ -36,7 +38,7 @@ char_analysis = 0
|
|||||||
color_filter = 0
|
color_filter = 0
|
||||||
ocr = 0
|
ocr = 0
|
||||||
postprocess = 0
|
postprocess = 0
|
||||||
show_images = 0
|
show_images = 1
|
||||||
|
|
||||||
;;; Country Specific variables ;;;;
|
;;; Country Specific variables ;;;;
|
||||||
|
|
||||||
|
@@ -71,6 +71,9 @@ void Config::loadValues(string country)
|
|||||||
{
|
{
|
||||||
|
|
||||||
opencl_enabled = getBoolean("common", "opencl_enabled", false);
|
opencl_enabled = getBoolean("common", "opencl_enabled", false);
|
||||||
|
|
||||||
|
detection_iteration_increase = getFloat("common", "detection_iteration_increase", 1.1);
|
||||||
|
|
||||||
maxPlateWidthPercent = getFloat("common", "max_plate_width_percent", 100);
|
maxPlateWidthPercent = getFloat("common", "max_plate_width_percent", 100);
|
||||||
maxPlateHeightPercent = getFloat("common", "max_plate_height_percent", 100);
|
maxPlateHeightPercent = getFloat("common", "max_plate_height_percent", 100);
|
||||||
|
|
||||||
|
@@ -45,6 +45,8 @@ class Config
|
|||||||
|
|
||||||
bool opencl_enabled;
|
bool opencl_enabled;
|
||||||
|
|
||||||
|
float detection_iteration_increase;
|
||||||
|
|
||||||
float maxPlateWidthPercent;
|
float maxPlateWidthPercent;
|
||||||
float maxPlateHeightPercent;
|
float maxPlateHeightPercent;
|
||||||
|
|
||||||
|
@@ -90,12 +90,12 @@ vector<Rect> RegionDetector::doCascade(Mat frame)
|
|||||||
if (config->opencl_enabled)
|
if (config->opencl_enabled)
|
||||||
{
|
{
|
||||||
ocl::oclMat openclFrame(frame);
|
ocl::oclMat openclFrame(frame);
|
||||||
((ocl::OclCascadeClassifier*) plate_cascade)->detectMultiScale(openclFrame, plates, 1.1, 3, 0, minSize, maxSize);
|
((ocl::OclCascadeClassifier*) plate_cascade)->detectMultiScale(openclFrame, plates, config->detection_iteration_increase, 3, 0, minSize, maxSize);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
plate_cascade->detectMultiScale( frame, plates, 1.1, 3,
|
plate_cascade->detectMultiScale( frame, plates, config->detection_iteration_increase, 3,
|
||||||
0,
|
0,
|
||||||
//0|CV_HAAR_SCALE_IMAGE,
|
//0|CV_HAAR_SCALE_IMAGE,
|
||||||
minSize, maxSize );
|
minSize, maxSize );
|
||||||
|
Reference in New Issue
Block a user