cmd_line.h
Go to the documentation of this file.
1 #ifndef __CMD_LINE_H__
2 #define __CMD_LINE_H__
3 
4 #include <boost/program_options/cmdline.hpp>
5 #include <boost/program_options/variables_map.hpp>
6 #include <boost/program_options/options_description.hpp>
7 #include <boost/program_options/parsers.hpp>
8 #include <exception>
9 #include <string>
10 #include <visp3/core/vpConfig.h>
11 #include <visp3/core/vpPoint.h>
12 
13 namespace po = boost::program_options;
14 
15 class CmdLine
16 {
17 private:
18  boost::program_options::variables_map vm_;
19  bool verbose_;
20  bool show_fps_;
21  bool show_plot_;
22  bool log_pose_;
24  std::string video_channel_;
25  double inner_ratio_;
26  double outer_ratio_;
27  double var_limit_;
33  std::vector<double> hinkley_range_;
37  std::string data_dir_;
38  std::string pattern_name_;
39  std::string var_file_;
40  std::string single_image_name_;
41  std::vector<vpPoint> flashcode_points_3D_;
42  std::vector<vpPoint> inner_points_3D_,outer_points_3D_;
43 
44  po::options_description prog_args;
47  std::string config_file;
48  std::string code_message_; // Code message used to specify which target to track
49  int code_message_index_; // Index in the vector of code messages that were found
50  void loadConfig(std::string& config_file);
51  void common();
52 public:
55  };
58  };
59 
60  CmdLine();
61  CmdLine(int argc,char**argv);
62  CmdLine(std::string& config_file);
63  void init(std::string& config_file);
64  bool show_plot() const;
65 
66  bool using_hinkley() const;
67 
68  vpCameraParameters get_cam_calib_params() const;
69 
70  double get_hinkley_alpha() const;
71 
72  double get_hinkley_delta() const;
73 
74  bool dmtx_only() const;
75 
76  bool should_exit() const;
77 
78  std::string get_log_file_pattern() const;
79 
80  std::string get_input_file_pattern() const;
81 
82  std::string get_video_channel() const;
83 
84  bool show_fps() const;
85 
86  int get_mbt_convergence_steps() const;
87 
88  double get_mbt_dynamic_range() const;
89 
90  double get_adhoc_recovery_size() const;
91 
92  bool log_checkpoints() const;
93 
94  bool log_pose() const;
95 
97 
98  bool get_verbose() const;
99 
100  int get_dmx_timeout() const;
101 
102  double get_inner_ratio() const;
103 
104  double get_outer_ratio() const;
105 
106  bool using_data_dir() const;
107 
108  bool using_video_camera() const;
109 
110  std::string get_code_message() const;
111  size_t get_code_message_index() const;
112 
113  std::string get_data_dir() const;
114 
115  std::string get_pattern_name() const;
116 
117  std::string get_mbt_cad_file() const; // return wrl or cao file
118 
119  std::string get_xml_file() const;
120 
121  std::string get_init_file() const;
122 
123  std::string get_var_file() const;
124 
125  bool using_single_image() const;
126 
127  bool using_var_file() const;
128 
129  double get_var_limit() const;
130 
131  double get_adhoc_recovery_ratio() const;
132 
133  unsigned int get_adhoc_recovery_treshold() const;
134  bool get_adhoc_recovery_display() const;
135 
136  bool using_adhoc_recovery() const;
137 
138  bool using_var_limit() const;
139 
140  bool logging_video() const;
141 
142  std::string get_single_image_path() const;
143 
144  std::vector<vpPoint>& get_flashcode_points_3D();
145  std::vector<vpPoint>& get_inner_points_3D();
146  std::vector<vpPoint>& get_outer_points_3D();
147 
149 
151 
152  void set_code_message(const std::string &msg);
153  void set_code_message_index(const size_t &index);
154  void set_data_directory(std::string &dir);
155  void set_pattern_name(std::string &name);
156  void set_show_fps(bool show_fps);
157 };
158 #endif
bool show_fps_
Definition: cmd_line.h:20
std::vector< vpPoint > & get_flashcode_points_3D()
Definition: cmd_line.cpp:295
std::string get_code_message() const
Definition: cmd_line.cpp:340
std::string var_file_
Definition: cmd_line.h:39
std::string input_file_pattern_
Definition: cmd_line.h:46
bool log_pose() const
Definition: cmd_line.cpp:355
std::vector< vpPoint > inner_points_3D_
Definition: cmd_line.h:42
size_t get_code_message_index() const
Definition: cmd_line.cpp:343
bool using_var_file() const
Definition: cmd_line.cpp:214
std::string video_channel_
Definition: cmd_line.h:24
std::string get_pattern_name() const
Definition: cmd_line.cpp:266
int get_dmx_timeout() const
Definition: cmd_line.cpp:242
unsigned int adhoc_recovery_treshold_
Definition: cmd_line.h:31
std::string config_file
Definition: cmd_line.h:47
double var_limit_
Definition: cmd_line.h:27
bool adhoc_recovery_display_
Definition: cmd_line.h:29
int mbt_convergence_steps_
Definition: cmd_line.h:35
std::string single_image_name_
Definition: cmd_line.h:40
bool log_pose_
Definition: cmd_line.h:22
double get_var_limit() const
Definition: cmd_line.cpp:202
void common()
Definition: cmd_line.cpp:8
bool get_verbose() const
Definition: cmd_line.cpp:238
std::string get_input_file_pattern() const
Definition: cmd_line.cpp:166
std::string code_message_
Definition: cmd_line.h:48
unsigned int get_adhoc_recovery_treshold() const
Definition: cmd_line.cpp:332
std::vector< vpPoint > & get_inner_points_3D()
Definition: cmd_line.cpp:299
std::string get_xml_file() const
Definition: cmd_line.cpp:279
bool show_plot() const
Definition: cmd_line.cpp:170
void init(std::string &config_file)
Definition: cmd_line.cpp:135
double inner_ratio_
Definition: cmd_line.h:25
bool show_plot_
Definition: cmd_line.h:21
double adhoc_recovery_ratio_
Definition: cmd_line.h:30
int code_message_index_
Definition: cmd_line.h:49
bool using_adhoc_recovery() const
Definition: cmd_line.cpp:347
std::vector< double > outer_coordinates
Definition: cmd_line.h:45
double get_adhoc_recovery_ratio() const
Definition: cmd_line.cpp:328
bool using_data_dir() const
Definition: cmd_line.cpp:254
bool should_exit() const
Definition: cmd_line.cpp:226
po::options_description prog_args
Definition: cmd_line.h:44
std::vector< vpPoint > outer_points_3D_
Definition: cmd_line.h:42
bool adhoc_recovery_
Definition: cmd_line.h:28
bool logging_video() const
Definition: cmd_line.cpp:218
bool should_exit_
Definition: cmd_line.h:23
bool using_hinkley() const
Definition: cmd_line.cpp:174
double mbt_dynamic_range_
Definition: cmd_line.h:36
std::string pattern_name_
Definition: cmd_line.h:38
boost::program_options::variables_map vm_
Definition: cmd_line.h:18
bool using_mbt_dynamic_range()
Definition: cmd_line.cpp:198
std::string get_video_channel() const
Definition: cmd_line.cpp:230
DETECTOR_TYPE
Definition: cmd_line.h:53
bool log_checkpoints() const
Definition: cmd_line.cpp:351
bool get_adhoc_recovery_display() const
Definition: cmd_line.cpp:336
std::string log_file_pattern_
Definition: cmd_line.h:46
std::string get_single_image_path() const
Definition: cmd_line.cpp:291
void set_pattern_name(std::string &name)
Definition: cmd_line.cpp:363
double adhoc_recovery_size_
Definition: cmd_line.h:32
int dmx_timeout_
Definition: cmd_line.h:34
bool verbose_
Definition: cmd_line.h:19
std::string data_dir_
Definition: cmd_line.h:37
std::vector< vpPoint > flashcode_points_3D_
Definition: cmd_line.h:41
void set_code_message_index(const size_t &index)
Definition: cmd_line.cpp:374
double get_inner_ratio() const
Definition: cmd_line.cpp:246
int get_mbt_convergence_steps() const
Definition: cmd_line.cpp:190
void set_show_fps(bool show_fps)
Definition: cmd_line.cpp:366
double get_outer_ratio() const
Definition: cmd_line.cpp:250
bool dmtx_only() const
Definition: cmd_line.cpp:222
vpCameraParameters get_cam_calib_params() const
Definition: cmd_line.cpp:154
std::string get_init_file() const
Definition: cmd_line.cpp:283
void set_data_directory(std::string &dir)
Definition: cmd_line.cpp:359
bool using_var_limit() const
Definition: cmd_line.cpp:206
std::string get_data_dir() const
Definition: cmd_line.cpp:262
double get_hinkley_alpha() const
Definition: cmd_line.cpp:178
bool show_fps() const
Definition: cmd_line.cpp:234
std::vector< double > inner_coordinates
Definition: cmd_line.h:45
double get_mbt_dynamic_range() const
Definition: cmd_line.cpp:194
TRACKER_TYPE
Definition: cmd_line.h:56
std::vector< double > flashcode_coordinates
Definition: cmd_line.h:45
std::string get_log_file_pattern() const
Definition: cmd_line.cpp:162
TRACKER_TYPE get_tracker_type() const
Definition: cmd_line.cpp:314
double get_hinkley_delta() const
Definition: cmd_line.cpp:184
void loadConfig(std::string &config_file)
Definition: cmd_line.cpp:67
double outer_ratio_
Definition: cmd_line.h:26
double get_adhoc_recovery_size() const
Definition: cmd_line.cpp:324
bool using_video_camera() const
Definition: cmd_line.cpp:258
std::vector< double > hinkley_range_
Definition: cmd_line.h:33
std::string get_var_file() const
Definition: cmd_line.cpp:210
void set_code_message(const std::string &msg)
Definition: cmd_line.cpp:370
std::vector< vpPoint > & get_outer_points_3D()
Definition: cmd_line.cpp:303
DETECTOR_TYPE get_detector_type() const
Definition: cmd_line.cpp:307
bool using_single_image() const
Definition: cmd_line.cpp:287
std::string get_mbt_cad_file() const
Definition: cmd_line.cpp:270


visp_auto_tracker
Author(s): Filip Novotny
autogenerated on Sat Mar 13 2021 03:20:08