svo
Semi-Direct Visual Odometry
|
00001 // This file is part of SVO - Semi-direct Visual Odometry. 00002 // 00003 // Copyright (C) 2014 Christian Forster <forster at ifi dot uzh dot ch> 00004 // (Robotics and Perception Group, University of Zurich, Switzerland). 00005 // 00006 // SVO is free software: you can redistribute it and/or modify it under the 00007 // terms of the GNU General Public License as published by the Free Software 00008 // Foundation, either version 3 of the License, or any later version. 00009 // 00010 // SVO is distributed in the hope that it will be useful, but WITHOUT ANY 00011 // WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 00012 // FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. 00013 // 00014 // You should have received a copy of the GNU General Public License 00015 // along with this program. If not, see <http://www.gnu.org/licenses/>. 00016 00017 #ifndef SVO_CONFIG_H_ 00018 #define SVO_CONFIG_H_ 00019 00020 #include <string> 00021 #include <stdint.h> 00022 #include <stdio.h> 00023 00024 namespace svo { 00025 00026 using std::string; 00027 00031 class Config 00032 { 00033 public: 00034 static Config& getInstance(); 00035 00037 static string& traceName() { return getInstance().trace_name; } 00038 00040 static string& traceDir() { return getInstance().trace_dir; } 00041 00043 static size_t& nPyrLevels() { return getInstance().n_pyr_levels; } 00044 00046 static bool& useImu() { return getInstance().use_imu; } 00047 00049 static size_t& coreNKfs() { return getInstance().core_n_kfs; } 00050 00052 static double& mapScale() { return getInstance().map_scale; } 00053 00055 static size_t& gridSize() { return getInstance().grid_size; } 00056 00058 static double& initMinDisparity() { return getInstance().init_min_disparity; } 00059 00061 static size_t& initMinTracked() { return getInstance().init_min_tracked; } 00062 00064 static size_t& initMinInliers() { return getInstance().init_min_inliers; } 00065 00067 static size_t& kltMaxLevel() { return getInstance().klt_max_level; } 00068 00070 static size_t& kltMinLevel() { return getInstance().klt_min_level; } 00071 00073 static double& reprojThresh() { return getInstance().reproj_thresh; } 00074 00076 static double& poseOptimThresh() { return getInstance().poseoptim_thresh; } 00077 00079 static size_t& poseOptimNumIter() { return getInstance().poseoptim_num_iter; } 00080 00082 static size_t& structureOptimMaxPts() { return getInstance().structureoptim_max_pts; } 00083 00085 static size_t& structureOptimNumIter() { return getInstance().structureoptim_num_iter; } 00086 00088 static double& lobaThresh() { return getInstance().loba_thresh; } 00089 00091 static double& lobaRobustHuberWidth() { return getInstance().loba_robust_huber_width; } 00092 00094 static size_t& lobaNumIter() { return getInstance().loba_num_iter; } 00095 00097 static double& kfSelectMinDist() { return getInstance().kfselect_mindist; } 00098 00100 static double& triangMinCornerScore() { return getInstance().triang_min_corner_score; } 00101 00103 static size_t& subpixNIter() { return getInstance().subpix_n_iter; } 00104 00108 static size_t& maxNKfs() { return getInstance().max_n_kfs; } 00109 00111 static double& imgImuDelay() { return getInstance().img_imu_delay; } 00112 00114 static size_t& maxFts() { return getInstance().max_fts; } 00115 00117 static size_t& qualityMinFts() { return getInstance().quality_min_fts; } 00118 00120 static int& qualityMaxFtsDrop() { return getInstance().quality_max_drop_fts; } 00121 00122 private: 00123 Config(); 00124 Config(Config const&); 00125 void operator=(Config const&); 00126 string trace_name; 00127 string trace_dir; 00128 size_t n_pyr_levels; 00129 bool use_imu; 00130 size_t core_n_kfs; 00131 double map_scale; 00132 size_t grid_size; 00133 double init_min_disparity; 00134 size_t init_min_tracked; 00135 size_t init_min_inliers; 00136 size_t klt_max_level; 00137 size_t klt_min_level; 00138 double reproj_thresh; 00139 double poseoptim_thresh; 00140 size_t poseoptim_num_iter; 00141 size_t structureoptim_max_pts; 00142 size_t structureoptim_num_iter; 00143 double loba_thresh; 00144 double loba_robust_huber_width; 00145 size_t loba_num_iter; 00146 double kfselect_mindist; 00147 double triang_min_corner_score; 00148 size_t triang_half_patch_size; 00149 size_t subpix_n_iter; 00150 size_t max_n_kfs; 00151 double img_imu_delay; 00152 size_t max_fts; 00153 size_t quality_min_fts; 00154 int quality_max_drop_fts; 00155 }; 00156 00157 } // namespace svo 00158 00159 #endif // SVO_CONFIG_H_