diff --git a/runtime_data/openalpr.conf b/runtime_data/openalpr.conf index b204592..382ef3d 100644 --- a/runtime_data/openalpr.conf +++ b/runtime_data/openalpr.conf @@ -6,6 +6,8 @@ state_id_img_size_percent = 2.0 max_plate_width_percent = 100 max_plate_height_percent = 100 +detection_iteration_increase = 1.1 + opencl_enabled = 0 ocr_min_font_point = 6 @@ -25,7 +27,7 @@ postprocess_min_characters = 4 postprocess_max_characters = 8 [debug] -general = 0 +general = 1 timing = 0 state_id = 0 plate_lines = 0 @@ -36,7 +38,7 @@ char_analysis = 0 color_filter = 0 ocr = 0 postprocess = 0 -show_images = 0 +show_images = 1 ;;; Country Specific variables ;;;; diff --git a/src/openalpr/config.cpp b/src/openalpr/config.cpp index f57c42f..3ebf922 100644 --- a/src/openalpr/config.cpp +++ b/src/openalpr/config.cpp @@ -71,6 +71,9 @@ void Config::loadValues(string country) { 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); maxPlateHeightPercent = getFloat("common", "max_plate_height_percent", 100); diff --git a/src/openalpr/config.h b/src/openalpr/config.h index 78e6b7e..7328576 100644 --- a/src/openalpr/config.h +++ b/src/openalpr/config.h @@ -45,6 +45,8 @@ class Config bool opencl_enabled; + float detection_iteration_increase; + float maxPlateWidthPercent; float maxPlateHeightPercent; diff --git a/src/openalpr/regiondetector.cpp b/src/openalpr/regiondetector.cpp index 3f8f061..d2a7023 100644 --- a/src/openalpr/regiondetector.cpp +++ b/src/openalpr/regiondetector.cpp @@ -90,12 +90,12 @@ vector RegionDetector::doCascade(Mat frame) if (config->opencl_enabled) { 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 { - plate_cascade->detectMultiScale( frame, plates, 1.1, 3, + plate_cascade->detectMultiScale( frame, plates, config->detection_iteration_increase, 3, 0, //0|CV_HAAR_SCALE_IMAGE, minSize, maxSize );