split into many files

add better outlier rejection
add normalization
add background removal
This commit is contained in:
2020-10-22 11:21:12 +02:00
parent a5440ed857
commit 6defcad11b
12 changed files with 904 additions and 446 deletions

View File

@ -24,7 +24,9 @@
struct Config
{
char** inFileNames = NULL;
std::string outputFileName = "out.png";
std::string norm = "";
std::string maps = "";
std::string bg = "";
bool verbose = false;
};
@ -36,7 +38,9 @@ static char args_doc[] = "";
static struct argp_option options[] =
{
{"verbose", 'v', 0, 0, "Enable verbose logging" },
{"output", 'o', "File Name", 0, "Output image file name" },
{"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" },
{ 0 }
};
@ -47,10 +51,16 @@ error_t parse_opt (int key, char *arg, struct argp_state *state)
switch (key)
{
case 'v':
config->verbose = false;
config->verbose = true;
break;
case 'o':
config->outputFileName.assign(arg);
case 'm':
config->maps.assign(arg);
break;
case 'b':
config->bg.assign(arg);
break;
case 'n':
config->norm.assign(arg);
break;
case ARGP_KEY_NO_ARGS:
argp_usage(state);
@ -66,3 +76,4 @@ error_t parse_opt (int key, char *arg, struct argp_state *state)
static struct argp argp = { options, parse_opt, args_doc, doc };