diff --git a/config/openalpr.conf.in b/config/openalpr.conf.in index cf3ee2a..fd8a97e 100644 --- a/config/openalpr.conf.in +++ b/config/openalpr.conf.in @@ -56,10 +56,6 @@ postprocess_min_confidence = 65 ; chance that the character is incorrect and will be skipped. Value is a confidence percent postprocess_confidence_skip_level = 80 -; Results with fewer characters will be discarded -postprocess_min_characters = 4 -postprocess_max_characters = 8 - debug_general = 0 debug_timing = 0 diff --git a/runtime_data/config/au.conf b/runtime_data/config/au.conf index d2b779c..6022e86 100644 --- a/runtime_data/config/au.conf +++ b/runtime_data/config/au.conf @@ -29,6 +29,10 @@ plateline_sensitivity_horizontal = 50 min_plate_size_width_px = 85 min_plate_size_height_px = 28 +; Results with fewer or more characters will be discarded +postprocess_min_characters = 4 +postprocess_max_characters = 8 + ocr_language = lau ; Override for postprocess letters/numbers regex. diff --git a/runtime_data/config/auwide.conf b/runtime_data/config/auwide.conf index ef01854..9ac9774 100644 --- a/runtime_data/config/auwide.conf +++ b/runtime_data/config/auwide.conf @@ -30,6 +30,10 @@ plateline_sensitivity_horizontal = 55 min_plate_size_width_px = 100 min_plate_size_height_px = 20 +; Results with fewer or more characters will be discarded +postprocess_min_characters = 4 +postprocess_max_characters = 8 + ocr_language = lau ; Override for postprocess letters/numbers regex. diff --git a/runtime_data/config/eu.conf b/runtime_data/config/eu.conf index d78be26..7365404 100644 --- a/runtime_data/config/eu.conf +++ b/runtime_data/config/eu.conf @@ -31,6 +31,10 @@ plateline_sensitivity_horizontal = 55 min_plate_size_width_px = 65 min_plate_size_height_px = 18 +; Results with fewer or more characters will be discarded +postprocess_min_characters = 5 +postprocess_max_characters = 8 + ocr_language = leu ; Override for postprocess letters/numbers regex. diff --git a/runtime_data/config/kr.conf b/runtime_data/config/kr.conf index b9075d5..e1dd8ff 100644 --- a/runtime_data/config/kr.conf +++ b/runtime_data/config/kr.conf @@ -30,6 +30,10 @@ plateline_sensitivity_horizontal = 55 min_plate_size_width_px = 100 min_plate_size_height_px = 20 +; Results with fewer or more characters will be discarded +postprocess_min_characters = 5 +postprocess_max_characters = 10 + ocr_language = lkr ; Override for postprocess letters/numbers regex. diff --git a/runtime_data/config/us.conf b/runtime_data/config/us.conf index 0c6a27d..1c63944 100644 --- a/runtime_data/config/us.conf +++ b/runtime_data/config/us.conf @@ -29,6 +29,10 @@ plateline_sensitivity_horizontal = 45 min_plate_size_width_px = 70 min_plate_size_height_px = 35 +; Results with fewer or more characters will be discarded +postprocess_min_characters = 4 +postprocess_max_characters = 8 + ocr_language = lus ; Override for postprocess letters/numbers regex. diff --git a/src/openalpr/config.cpp b/src/openalpr/config.cpp index 7186f46..f4794b0 100644 --- a/src/openalpr/config.cpp +++ b/src/openalpr/config.cpp @@ -190,8 +190,6 @@ namespace alpr postProcessMinConfidence = getFloat(ini, "", "postprocess_min_confidence", 100); postProcessConfidenceSkipLevel = getFloat(ini, "", "postprocess_confidence_skip_level", 100); - postProcessMinCharacters = getInt(ini, "", "postprocess_min_characters", 100); - postProcessMaxCharacters = getInt(ini, "", "postprocess_max_characters", 100); debugGeneral = getBoolean(ini, "", "debug_general", false); debugTiming = getBoolean(ini, "", "debug_timing", false); @@ -286,7 +284,9 @@ namespace alpr ocrImageHeightPx = round(((float)templateHeightPx) * ocrImagePercent); stateIdImageWidthPx = round(((float)templateWidthPx) * stateIdImagePercent); stateIdimageHeightPx = round(((float)templateHeightPx) * stateIdImagePercent); - + + postProcessMinCharacters = getInt(ini, "", "postprocess_min_characters", 4); + postProcessMaxCharacters = getInt(ini, "", "postprocess_max_characters", 8); } void Config::setDebug(bool value)