Permalink
Browse files

stereo_corr: Make local-homography a command line option

  • Loading branch information...
oleg-alexandrov committed Mar 27, 2013
1 parent de87b51 commit 25eae98182681c7a1452db4cb44ddfd9502c1ba8
Showing with 5 additions and 4 deletions.
  1. +3 −1 src/asp/Core/StereoSettings.cc
  2. +1 −0 src/asp/Core/StereoSettings.h
  3. +1 −3 src/asp/Tools/stereo_corr.cc
@@ -98,7 +98,9 @@ namespace asp {
("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-accuracy", po::value(&global.disparity_estimation_dem_accuracy),
- "Accuracy (in meters) of the disparity estimation DEM.");
+ "Accuracy (in meters) of the disparity estimation DEM.")
+ ("use-local-homography", po::bool_switch(&global.use_local_homography)->default_value(false)->implicit_value(true),
+ "Apply a local homography in each tile.");
po::options_description backwards_compat_options("Aliased backwards compatibility options");
backwards_compat_options.add_options()
@@ -115,6 +115,7 @@ namespace asp {
bool compute_low_res_disparity_only; // Skip the full-resolution disparity computation
std::string disparity_estimation_dem; // DEM to use in estimating the low-resolution disparity
double disparity_estimation_dem_accuracy; // Accuracy (in meters) of the disparity estimation DEM
+ bool use_local_homography; // Apply a local homography in each tile
// Subpixel Options
vw::uint16 subpixel_mode; // 0 = parabola fitting
@@ -357,9 +357,7 @@ class SeededCorrelatorView : public ImageViewBase<SeededCorrelatorView<Image1T,
inline prerasterize_type prerasterize_helper(BBox2i const& bbox) const {
- char * ptr = getenv("LOCAL");
- bool use_local_homography = ptr && atoi(ptr);
- if (use_local_homography) vw_out() << "\t Using local homography." << std::endl;
+ bool use_local_homography = stereo_settings().use_local_homography;
Matrix<double> lowres_hom = math::identity_matrix<3>();
Matrix<double> fullres_hom = math::identity_matrix<3>();

0 comments on commit 25eae98

Please sign in to comment.