Skip to content

Commit

Permalink
Code modularization
Browse files Browse the repository at this point in the history
Incremental refactoring for mutiview

more Incremental refactoring for mutiview

More incremental work

More incremental work

Save work

Save work

Save work

Save work

Save work

Save work
  • Loading branch information
oleg-alexandrov committed Aug 8, 2024
1 parent f4ac5ce commit d0cbee1
Show file tree
Hide file tree
Showing 3 changed files with 163 additions and 141 deletions.
9 changes: 7 additions & 2 deletions src/asp/Core/Common.cc
Original file line number Diff line number Diff line change
Expand Up @@ -645,11 +645,16 @@ asp::check_command_line(int argc, char *argv[], vw::GdalWriteOptions& opt,
all_options.add(all_public_options).add(positional_options);

if (allow_unregistered) {
po::parsed_options parsed = po::command_line_parser(argc, argv).options(all_options).allow_unregistered().style(po::command_line_style::unix_style).run();
po::parsed_options parsed =
po::command_line_parser(argc, argv).options(all_options).allow_unregistered()
.style(po::command_line_style::unix_style).run();
unregistered = collect_unrecognized(parsed.options, po::include_positional);
po::store(parsed, vm);
} else {
po::store(po::command_line_parser(argc, argv).options(all_options).positional(positional_desc).style(po::command_line_style::unix_style).run(), vm);
po::parsed_options parsed =
po::command_line_parser(argc, argv).options(all_options).positional(positional_desc)
.style(po::command_line_style::unix_style).run();
po::store(parsed, vm);
}

po::notify(vm);
Expand Down
14 changes: 8 additions & 6 deletions src/asp/Core/StereoSettings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,9 @@ namespace asp {
"Skip the low-resolution disparity computation. This option is invoked from parallel_stereo.")
("compute-low-res-disparity-only", po::bool_switch(&global.compute_low_res_disparity_only)->default_value(false)->implicit_value(true),
"Compute only the low-resolution disparity, skip the full-resolution disparity computation.")
("disparity-estimation-dem", po::value(&global.disparity_estimation_dem)->default_value(""),
"DEM to use in estimating the low-resolution disparity (when corr-seed-mode is 2).")
("disparity-estimation-dem",
po::value(&global.disparity_estimation_dem)->default_value(""),
"DEM to use in estimating the low-resolution disparity (when corr-seed-mode is 2).")
("disparity-estimation-dem-error", po::value(&global.disparity_estimation_dem_error)->default_value(0.0),
"Error (in meters) of the disparity estimation DEM.")
("corr-timeout", po::value(&global.corr_timeout)->default_value(global.default_corr_timeout),
Expand Down Expand Up @@ -721,12 +722,13 @@ namespace asp {
}

// Parser return char strings
po::parsed_options result(&desc);
po::parsed_options parsed(&desc);
std::copy(asp_config_file_iterator(is, allowed_options, allow_unregistered),
asp_config_file_iterator(),
std::back_inserter(result.options));
// Convert char strings into desired type.
return po::basic_parsed_options<char>(result);
std::back_inserter(parsed.options));

// Convert char strings into desired type
return po::basic_parsed_options<char>(parsed);
}

// Parse the ASP stereo config file, such as stereo.default.
Expand Down
Loading

0 comments on commit d0cbee1

Please sign in to comment.