Skip to content

Instantly share code, notes, and snippets.

@berak
Last active August 29, 2015 14:26
Show Gist options
  • Select an option

  • Save berak/53d1c0f1c67074168789 to your computer and use it in GitHub Desktop.

Select an option

Save berak/53d1c0f1c67074168789 to your computer and use it in GitHub Desktop.
// If no image path was given, then supply some information on how this tool works
const char *keys =
"{ help h ? | | show this message }"
"{ images i | | folder_location }"
"{ annotations a |annotations.txt| ouput_file }"
;
CommandLineParser parser(argc, argv, keys);
String image_folder = parser.get<String>("images");
String annotations = parser.get<String>("annotations");
if (parser.has("help") || image_folder.empty())
{
parser.printMessage();
cerr << "Example: annotate -i=/data/testimages/ -a=/data/annotations.txt" << endl << endl;
return -1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment