From 7a1a9a671f7a97a7cf0a75ad9db5dd977bd6501d Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 14 Mar 2016 22:23:47 -0400 Subject: [PATCH] Added detection_mask_image to config --- config/openalpr.conf.in | 5 +++++ src/openalpr/config.cpp | 2 ++ src/openalpr/config.h | 2 ++ 3 files changed, 9 insertions(+) diff --git a/config/openalpr.conf.in b/config/openalpr.conf.in index fd7b64d..3762447 100644 --- a/config/openalpr.conf.in +++ b/config/openalpr.conf.in @@ -49,6 +49,11 @@ must_match_pattern = 0 ; Bypasses plate detection. If this is set to 1, the library assumes that each region provided is a likely plate area. skip_detection = 0 +; Specifies the full path to an image file that constrains the detection area. Only the plate regions allowed through the mask +; will be analyzed. The mask image must match the resolution of your image to be analyzed. The mask is black and white. +; Black areas will be ignored, white areas will be searched. An empty value means no mask (scan the entire image) +detection_mask_image = + ; OpenALPR can scan the same image multiple times with different randomization. Setting this to a value larger than ; 1 may increase accuracy, but will increase processing time linearly (e.g., analysis_count = 3 is 3x slower) analysis_count = 1 diff --git a/src/openalpr/config.cpp b/src/openalpr/config.cpp index 612d293..ca274ee 100644 --- a/src/openalpr/config.cpp +++ b/src/openalpr/config.cpp @@ -189,6 +189,8 @@ namespace alpr skipDetection = getBoolean(ini, "", "skip_detection", false); + detection_mask_image = getString(ini, "", "detection_mask_image", ""); + analysis_count = getInt(ini, "", "analysis_count", 1); prewarp = getString(ini, "", "prewarp", ""); diff --git a/src/openalpr/config.h b/src/openalpr/config.h index 5faf926..53748b2 100644 --- a/src/openalpr/config.h +++ b/src/openalpr/config.h @@ -60,6 +60,8 @@ namespace alpr float contrastDetectionThreshold; bool skipDetection; + + std::string detection_mask_image; int analysis_count;