Moved min/max characters from global to country config

This commit is contained in:
Matt Hill
2015-09-23 22:46:14 -04:00
parent b3afab7c60
commit 09b7178322
7 changed files with 23 additions and 7 deletions

View File

@@ -56,10 +56,6 @@ postprocess_min_confidence = 65
; chance that the character is incorrect and will be skipped. Value is a confidence percent ; chance that the character is incorrect and will be skipped. Value is a confidence percent
postprocess_confidence_skip_level = 80 postprocess_confidence_skip_level = 80
; Results with fewer characters will be discarded
postprocess_min_characters = 4
postprocess_max_characters = 8
debug_general = 0 debug_general = 0
debug_timing = 0 debug_timing = 0

View File

@@ -29,6 +29,10 @@ plateline_sensitivity_horizontal = 50
min_plate_size_width_px = 85 min_plate_size_width_px = 85
min_plate_size_height_px = 28 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 ocr_language = lau
; Override for postprocess letters/numbers regex. ; Override for postprocess letters/numbers regex.

View File

@@ -30,6 +30,10 @@ plateline_sensitivity_horizontal = 55
min_plate_size_width_px = 100 min_plate_size_width_px = 100
min_plate_size_height_px = 20 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 ocr_language = lau
; Override for postprocess letters/numbers regex. ; Override for postprocess letters/numbers regex.

View File

@@ -31,6 +31,10 @@ plateline_sensitivity_horizontal = 55
min_plate_size_width_px = 65 min_plate_size_width_px = 65
min_plate_size_height_px = 18 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 ocr_language = leu
; Override for postprocess letters/numbers regex. ; Override for postprocess letters/numbers regex.

View File

@@ -30,6 +30,10 @@ plateline_sensitivity_horizontal = 55
min_plate_size_width_px = 100 min_plate_size_width_px = 100
min_plate_size_height_px = 20 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 ocr_language = lkr
; Override for postprocess letters/numbers regex. ; Override for postprocess letters/numbers regex.

View File

@@ -29,6 +29,10 @@ plateline_sensitivity_horizontal = 45
min_plate_size_width_px = 70 min_plate_size_width_px = 70
min_plate_size_height_px = 35 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 ocr_language = lus
; Override for postprocess letters/numbers regex. ; Override for postprocess letters/numbers regex.

View File

@@ -190,8 +190,6 @@ namespace alpr
postProcessMinConfidence = getFloat(ini, "", "postprocess_min_confidence", 100); postProcessMinConfidence = getFloat(ini, "", "postprocess_min_confidence", 100);
postProcessConfidenceSkipLevel = getFloat(ini, "", "postprocess_confidence_skip_level", 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); debugGeneral = getBoolean(ini, "", "debug_general", false);
debugTiming = getBoolean(ini, "", "debug_timing", false); debugTiming = getBoolean(ini, "", "debug_timing", false);
@@ -286,7 +284,9 @@ namespace alpr
ocrImageHeightPx = round(((float)templateHeightPx) * ocrImagePercent); ocrImageHeightPx = round(((float)templateHeightPx) * ocrImagePercent);
stateIdImageWidthPx = round(((float)templateWidthPx) * stateIdImagePercent); stateIdImageWidthPx = round(((float)templateWidthPx) * stateIdImagePercent);
stateIdimageHeightPx = round(((float)templateHeightPx) * 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) void Config::setDebug(bool value)