mirror of
https://github.com/kerberos-io/openalpr-base.git
synced 2025-10-07 01:12:47 +08:00
Have country as command line argument
This commit is contained in:
@@ -66,20 +66,22 @@ vector<char> showCharSelection(Mat image, vector<Rect> charRegions, string state
|
|||||||
|
|
||||||
int main( int argc, const char** argv )
|
int main( int argc, const char** argv )
|
||||||
{
|
{
|
||||||
|
string country;
|
||||||
string inDir;
|
string inDir;
|
||||||
string outDir;
|
string outDir;
|
||||||
Mat frame;
|
Mat frame;
|
||||||
|
|
||||||
//Check if user specify image to process
|
//Check if user specify image to process
|
||||||
if(argc == 3)
|
if(argc == 4)
|
||||||
{
|
{
|
||||||
inDir = argv[1];
|
country = argv[1];
|
||||||
outDir = argv[2];
|
inDir = argv[2];
|
||||||
|
outDir = argv[3];
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
printf("Use:\n\t%s indirectory outdirectory\n",argv[0]);
|
printf("Use:\n\t%s country indirectory outdirectory\n",argv[0]);
|
||||||
printf("Ex: \n\t%s ./pics/ ./out \n",argv[0]);
|
printf("Ex: \n\t%s eu ./pics/ ./out\n",argv[0]);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -102,7 +104,7 @@ int main( int argc, const char** argv )
|
|||||||
cout << "\t[0-9A-Z] -- Identify a character (saves the image)" << endl;
|
cout << "\t[0-9A-Z] -- Identify a character (saves the image)" << endl;
|
||||||
cout << "\tESC/Ent/Space -- Back to plate selection" << endl;
|
cout << "\tESC/Ent/Space -- Back to plate selection" << endl;
|
||||||
|
|
||||||
Config* config = new Config("eu");
|
Config* config = new Config(country);
|
||||||
OCR ocr(config);
|
OCR ocr(config);
|
||||||
|
|
||||||
if (DirectoryExists(inDir.c_str()))
|
if (DirectoryExists(inDir.c_str()))
|
||||||
|
Reference in New Issue
Block a user