mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 09:50:51 +08:00
Moved topn value from command line argument to alprd config
This commit is contained in:
@@ -4,6 +4,9 @@
|
|||||||
|
|
||||||
country = us
|
country = us
|
||||||
|
|
||||||
|
; topn is the number of possible plate character variations to report
|
||||||
|
topn = 20
|
||||||
|
|
||||||
; Declare each stream on a separate line
|
; Declare each stream on a separate line
|
||||||
; each unique stream should be defined as stream = [url]
|
; each unique stream should be defined as stream = [url]
|
||||||
|
|
||||||
|
@@ -81,14 +81,12 @@ int main( int argc, const char** argv )
|
|||||||
bool noDaemon = false;
|
bool noDaemon = false;
|
||||||
bool clockOn = false;
|
bool clockOn = false;
|
||||||
std::string logFile;
|
std::string logFile;
|
||||||
int topn;
|
|
||||||
|
|
||||||
std::string configFile;
|
std::string configFile;
|
||||||
|
|
||||||
TCLAP::CmdLine cmd("OpenAlpr Daemon", ' ', Alpr::getVersion());
|
TCLAP::CmdLine cmd("OpenAlpr Daemon", ' ', Alpr::getVersion());
|
||||||
|
|
||||||
TCLAP::ValueArg<std::string> configFileArg("","config","Path to the openalpr.conf file.",false, "" ,"config_file");
|
TCLAP::ValueArg<std::string> configFileArg("","config","Path to the openalpr.conf file.",false, "" ,"config_file");
|
||||||
TCLAP::ValueArg<int> topNArg("n","topn","Max number of possible plate numbers to return. Default=25",false, 25 ,"topN");
|
|
||||||
TCLAP::ValueArg<std::string> logFileArg("l","log","Log file to write to. Default=" + DEFAULT_LOG_FILE_PATH,false, DEFAULT_LOG_FILE_PATH ,"topN");
|
TCLAP::ValueArg<std::string> logFileArg("l","log","Log file to write to. Default=" + DEFAULT_LOG_FILE_PATH,false, DEFAULT_LOG_FILE_PATH ,"topN");
|
||||||
|
|
||||||
TCLAP::SwitchArg daemonOffSwitch("f","foreground","Set this flag for debugging. Disables forking the process as a daemon and runs in the foreground. Default=off", cmd, false);
|
TCLAP::SwitchArg daemonOffSwitch("f","foreground","Set this flag for debugging. Disables forking the process as a daemon and runs in the foreground. Default=off", cmd, false);
|
||||||
@@ -97,7 +95,6 @@ int main( int argc, const char** argv )
|
|||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
|
||||||
cmd.add( topNArg );
|
|
||||||
cmd.add( configFileArg );
|
cmd.add( configFileArg );
|
||||||
cmd.add( logFileArg );
|
cmd.add( logFileArg );
|
||||||
|
|
||||||
@@ -110,7 +107,6 @@ int main( int argc, const char** argv )
|
|||||||
|
|
||||||
configFile = configFileArg.getValue();
|
configFile = configFileArg.getValue();
|
||||||
logFile = logFileArg.getValue();
|
logFile = logFileArg.getValue();
|
||||||
topn = topNArg.getValue();
|
|
||||||
noDaemon = daemonOffSwitch.getValue();
|
noDaemon = daemonOffSwitch.getValue();
|
||||||
clockOn = clockSwitch.getValue();
|
clockOn = clockSwitch.getValue();
|
||||||
}
|
}
|
||||||
@@ -177,6 +173,8 @@ int main( int argc, const char** argv )
|
|||||||
}
|
}
|
||||||
|
|
||||||
std::string country = ini.GetValue("daemon", "country", "us");
|
std::string country = ini.GetValue("daemon", "country", "us");
|
||||||
|
int topn = ini.GetLongValue("daemon", "topn", 20);
|
||||||
|
|
||||||
bool storePlates = ini.GetBoolValue("daemon", "store_plates", false);
|
bool storePlates = ini.GetBoolValue("daemon", "store_plates", false);
|
||||||
std::string imageFolder = ini.GetValue("daemon", "store_plates_location", "/tmp/");
|
std::string imageFolder = ini.GetValue("daemon", "store_plates_location", "/tmp/");
|
||||||
bool uploadData = ini.GetBoolValue("daemon", "upload_data", false);
|
bool uploadData = ini.GetBoolValue("daemon", "upload_data", false);
|
||||||
|
Reference in New Issue
Block a user