Merge branch 'develop' of https://github.com/Silex/openalpr into develop

Conflicts:
	src/openalpr/regiondetector.cpp
This commit is contained in:
Matt Hill
2014-03-24 20:45:13 -05:00
47 changed files with 31 additions and 335 deletions

View File

@@ -30,7 +30,6 @@ Config::Config(const std::string country, const std::string runtimeBaseDir)
if (runtimeBaseDir.compare("") != 0)
{
// User has supplied a runtime directory. Use that.
}
else if (envRuntimeDir!=NULL)
{
@@ -62,6 +61,7 @@ Config::Config(const std::string country, const std::string runtimeBaseDir)
loadValues(country);
}
Config::~Config()
{
delete ini;
@@ -69,7 +69,6 @@ Config::~Config()
void Config::loadValues(string country)
{
opencl_enabled = getBoolean("common", "opencl_enabled", false);
detection_iteration_increase = getFloat("common", "detection_iteration_increase", 1.1);
@@ -132,7 +131,6 @@ void Config::loadValues(string country)
debugOcr = getBoolean("debug", "ocr", false);
debugPostProcess = getBoolean("debug", "postprocess", false);
debugShowImages = getBoolean("debug", "show_images", false);
}
void Config::debugOff()
@@ -154,14 +152,17 @@ string Config::getCascadeRuntimeDir()
{
return this->runtimeBaseDir + CASCADE_DIR;
}
string Config::getKeypointsRuntimeDir()
{
return this->runtimeBaseDir + KEYPOINTS_DIR;
}
string Config::getPostProcessRuntimeDir()
{
return this->runtimeBaseDir + POSTPROCESS_DIR;
}
string Config::getTessdataPrefix()
{
return "TESSDATA_PREFIX=" + this->runtimeBaseDir + "/ocr/";
@@ -179,6 +180,7 @@ float Config::getFloat(string section, string key, float defaultValue)
float val = atof(pszValue);
return val;
}
int Config::getInt(string section, string key, int defaultValue)
{
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
@@ -191,6 +193,7 @@ int Config::getInt(string section, string key, int defaultValue)
int val = atoi(pszValue);
return val;
}
bool Config::getBoolean(string section, string key, bool defaultValue)
{
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);
@@ -203,6 +206,7 @@ bool Config::getBoolean(string section, string key, bool defaultValue)
int val = atoi(pszValue);
return val != 0;
}
string Config::getString(string section, string key, string defaultValue)
{
const char * pszValue = ini->GetValue(section.c_str(), key.c_str(), NULL /*default*/);