facecam2d/src/args.cpp

38 lines
757 B
C++
Raw Normal View History

#include <args.hpp>
const char* argp_program_version =
"Facecam2D 0.1.0\n"
"License: GPLv3 <https://www.gnu.org/licenses/gpl-3.0.html>\n"
"If you did not receive a copy of the source code, it is\n"
"available at <https://gitlab.com/epicalert/facecam2d.git>.";
const struct argp_option options[] = {
//name, key, arg, flags, doc, group
{"haar-cascade", 0x00, 0, 0, "Use Haar Cascades for faster (but less accurate) face detection.", 0},
{0}
};
struct argp argp = {
options,
parseOptions,
0,
0
};
struct optData optData = {
false
};
error_t parseOptions(int key, char* arg, struct argp_state* state) {
switch (key) {
case 0x00: //--haar-cascade
optData.useHaar = true;
break;
default:
return ARGP_ERR_UNKNOWN;
}
return 0;
}