add charuco point detection method
This commit is contained in:
parent
38680f029c
commit
d4d7418cb2
8 changed files with 301 additions and 132 deletions
36
argpopt.h
36
argpopt.h
|
|
@ -27,10 +27,10 @@ struct Config
|
|||
std::string norm = "";
|
||||
std::string maps = "";
|
||||
std::string bg = "";
|
||||
int blockSize = 5;
|
||||
int apature = 5;
|
||||
float detectorParameter = 0.01;
|
||||
float minSize = 7;
|
||||
std::string charuco = "";
|
||||
bool harris = false;
|
||||
float minSize = 7;
|
||||
unsigned int size = 600;
|
||||
bool verbose = false;
|
||||
bool quiet = false;
|
||||
};
|
||||
|
|
@ -47,10 +47,10 @@ static struct argp_option options[] =
|
|||
{"map", 'm', "File Name", 0, "remap maps file" },
|
||||
{"bg", 'b', "File Name", 0, "background image file" },
|
||||
{"normalize", 'n', "File Name", 0, "image to use as a normalization source" },
|
||||
{"apature", 'a', "Value", 0, "Sobel size" },
|
||||
{"block-size", 't', "Value", 0, "Harris neighborhood size " },
|
||||
{"detector-arameter", 'd', "Value", 0, "Harris detector parameter" },
|
||||
{"min-size", 's', "Value", 0, "Smallest feature accepted as a corner" },
|
||||
{"create", 'c', "File Name", 0, "Create charuco board" },
|
||||
{"x-size", 'x', "Value", 0, "Output image width" },
|
||||
{"harris", 'r', 0, 0, "Use harris to detect points" },
|
||||
{ 0 }
|
||||
};
|
||||
|
||||
|
|
@ -75,22 +75,18 @@ error_t parse_opt (int key, char *arg, struct argp_state *state)
|
|||
case 'n':
|
||||
config->norm.assign(arg);
|
||||
break;
|
||||
case 'a':
|
||||
config->apature=atol(arg);
|
||||
if(config->apature % 2 == 0) ++config->apature;
|
||||
break;
|
||||
case 't':
|
||||
config->blockSize=atol(arg);
|
||||
if(config->blockSize % 2 == 0) ++config->blockSize;
|
||||
break;
|
||||
case 'd':
|
||||
config->detectorParameter=atol(arg);
|
||||
break;
|
||||
case 's':
|
||||
config->minSize=atol(arg);
|
||||
break;
|
||||
case ARGP_KEY_NO_ARGS:
|
||||
argp_usage(state);
|
||||
case 'r':
|
||||
config->harris = true;
|
||||
break;
|
||||
case 'c':
|
||||
config->charuco.assign(arg);
|
||||
break;
|
||||
case 'x':
|
||||
config->size=atol(arg);
|
||||
break;
|
||||
case ARGP_KEY_ARG:
|
||||
config->inFileNames = &state->argv[state->next-1];
|
||||
state->next = state->argc;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue