ext/kintinuous/kfusion/include/kfusion/Options.hpp
Go to the documentation of this file.
1 /* Copyright (C) 2011 Uni Osnabrück
2  * This file is part of the LAS VEGAS Reconstruction Toolkit,
3  *
4  * LAS VEGAS is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation; either version 2 of the License, or
7  * (at your option) any later version.
8  *
9  * LAS VEGAS is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
17  */
18 
19 
20  /*
21  * Options.hpp
22  *
23  * Created on: Sep 17, 2015
24  * Author: Thomas Wiemann
25  * Author: Tristan Igelbrink
26  */
27 
28 #ifndef OPTIONS_H_
29 #define OPTIONS_H_
30 
31 #include <iostream>
32 #include <string>
33 #include <vector>
34 #include <boost/program_options.hpp>
35 
36 using std::ostream;
37 using std::cout;
38 using std::endl;
39 using std::string;
40 using std::vector;
41 
42 
43 namespace kfusion{
44 
45 using namespace boost::program_options;
46 
51 class Options {
52 public:
53 
58  Options(int argc, char** argv);
59  virtual ~Options();
60 
64  int getNumThreads() const;
65 
69  bool printUsage() const;
70 
74  bool colorRegions() const;
75 
79  bool optimizePlanes() const;
80 
81  bool textures() const;
82 
83  bool noVizualisation() const;
84 
85  bool noReconstruction() const;
86 
87  bool verbose() const;
88 
92  bool clusterPlanes() const;
93 
97  string getInputDevice() const;
98 
99  string getOutput() const;
100 
104  string getClassifier() const;
105 
109  int getPlaneIterations() const;
110 
114  float getNormalThreshold() const;
115 
120  int getSmallRegionThreshold() const;
121 
125  int getMinPlaneSize() const;
126 
130  int getCleanContourIterations() const;
131 
136  int getDanglingArtifacts() const;
137 
141  int getFillHoles() const;
142 
143  float getShiftingDistance() const;
144 
145  float getCameraOffset() const;
146 
150  int getDepth() const;
151 
155  float getLineFusionThreshold() const;
156 
157 
158 private:
159 
160  string m_device ;
161  string m_mesh_name;
164  bool m_no_viz;
169 
171  variables_map m_variables;
172 
174  options_description m_descr;
175 
177  positional_options_description m_pdescr;
178 
181 
184 
187 
190 
192  int m_rda;
193 
196 
199 
201  int m_depth;
202 
204 
207 
209  string m_classifier;
210 
211 };
212 
213 
215 inline ostream& operator<<(ostream& os, const Options &o)
216 {
217  cout << "##### Program options: " << endl;
218 
219  cout << "##### Number of threads \t\t: " << o.getNumThreads() << endl;
220 
221 
222  cout << "##### Using Device \t\t\t: " << o.getInputDevice() << endl;
223  cout << "##### Saving mesh to \t\t\t: " << o.getOutput() << endl;
224  cout << "##### Using shifting distance \t\t: " << o.getShiftingDistance() << endl;
225  cout << "##### Using camera offset \t\t: " << o.getCameraOffset() << endl;
226 
227  if(o.noVizualisation())
228  {
229  cout << "##### Live visualization \t\t: NO" << endl;
230  }
231  else
232  cout << "##### Live visualization \t\t: YES" << endl;
233 
234  if(o.noReconstruction())
235  {
236  cout << "##### Online reconstruction \t\t: NO" << endl;
237  }
238  else
239  cout << "##### Online reconstruction \t\t: YES" << endl;
240 
241  if(o.getFillHoles())
242  {
243  cout << "##### Fill holes \t\t\t: " << o.getFillHoles() << endl;
244  }
245  else
246  {
247  cout << "##### Fill holes \t\t\t: NO" << endl;
248  }
249 
250  if(o.getDanglingArtifacts())
251  {
252  cout << "##### Remove DAs \t\t\t: " << o.getDanglingArtifacts() << endl;
253  }
254  else
255  {
256  cout << "##### Remove DAs \t\t\t: NO" << endl;
257  }
258 
259  if(o.optimizePlanes())
260  {
261  cout << "##### Optimize Planes \t\t\t: YES" << endl;
262  cout << "##### Plane iterations \t\t\t: " << o.getPlaneIterations() << endl;
263  cout << "##### Normal threshold \t\t\t: " << o.getNormalThreshold() << endl;
264  cout << "##### Region threshold \t\t\t: " << o.getSmallRegionThreshold() << endl;
265  }
266  if(o.textures())
267  cout << "##### Live texturing \t\t\t: YES" << endl;
268  else
269  cout << "##### Live texturing \t\t\t: NO" << endl;
270  if(o.getDepth())
271  {
272  cout << "##### Recursion depth \t\t\t: " << o.getDepth() << endl;
273  }
274  if(o.verbose())
275  {
276  cout << "##### Verbose output \t\t\t: YES" << endl;
277  }
278  return os;
279 }
280 
281 } // namespace reconstruct
282 
283 
284 #endif /* OPTIONS_H_ */
kfusion::Options::m_descr
options_description m_descr
The internally used option description.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:174
kfusion::Options::noVizualisation
bool noVizualisation() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:149
kfusion::Options::optimizePlanes
bool optimizePlanes() const
Returns true if cluster optimization is enabled.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:138
kfusion::Options::m_planeIterations
int m_planeIterations
Number of iterations for plane optimzation.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:183
kfusion::Options::m_cam_offset
float m_cam_offset
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:165
kfusion::Options::m_depth
int m_depth
Maximum recursion depth for region growing.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:201
kfusion::Options::m_no_reconstruct
bool m_no_reconstruct
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:162
kfusion::Options::getFillHoles
int getFillHoles() const
Returns the region threshold for hole filling.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:115
kfusion::Options::getDanglingArtifacts
int getDanglingArtifacts() const
Returns the number of dangling artifacts to remove from a created mesh.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:100
kfusion::Options::noReconstruction
bool noReconstruction() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:155
kfusion::Options::getDepth
int getDepth() const
Returns the maximum recursion depth for region growing.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:192
kfusion::Options::getShiftingDistance
float getShiftingDistance() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:105
kfusion::Options::getInputDevice
string getInputDevice() const
Returns the output file name.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:85
kfusion::Options::getSmallRegionThreshold
int getSmallRegionThreshold() const
Returns the threshold for the size of small region deletion after plane optimization.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:181
kfusion::Options::m_planeNormalThreshold
float m_planeNormalThreshold
Threshold for plane optimization.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:186
kfusion::Options::m_device
string m_device
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:160
kfusion::Options::m_rda
int m_rda
Number of dangling artifacts to remove.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:192
kfusion::Options::m_numberOfDefaults
int m_numberOfDefaults
The number of used default values.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:180
kfusion::Options::textures
bool textures() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:143
kfusion::Options::m_mesh_name
string m_mesh_name
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:161
kfusion
Utility.
Definition: capture.hpp:8
kfusion::Options::m_classifier
string m_classifier
Name of the classifier object to color the mesh.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:209
kfusion::Options::verbose
bool verbose() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:160
kfusion::Options::m_variables
variables_map m_variables
The internally used variable map.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:171
kfusion::operator<<
ostream & operator<<(ostream &os, const Options &o)
Overlaoeded outpur operator.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:215
kfusion::Options::getCameraOffset
float getCameraOffset() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:110
kfusion::Options::m_smallRegionThreshold
int m_smallRegionThreshold
Threshold for small ragions.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:189
argc
int argc
Definition: tests_high_five_parallel.cpp:27
kfusion::Options::getNumThreads
int getNumThreads() const
Returns the number of used threads.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:74
kfusion::Options::m_numThreads
int m_numThreads
The number of uesed threads.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:168
kfusion::Options::getNormalThreshold
float getNormalThreshold() const
Returns the normal threshold for plane optimization.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:176
kfusion::Options::getPlaneIterations
int getPlaneIterations() const
Returns to number plane optimization iterations.
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:80
kfusion::Options::m_pdescr
positional_options_description m_pdescr
The internally used positional option desription.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:177
kfusion::Options::m_cleanContourIterations
int m_cleanContourIterations
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:203
kfusion::Options::m_optimize
bool m_optimize
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:163
kfusion::Options::m_lineFusionThreshold
float m_lineFusionThreshold
Threshold for line fusing when tesselating.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:206
kfusion::Options
A class to parse the program options for the reconstruction executable.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:51
kfusion::Options::m_shifting_distance
float m_shifting_distance
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:166
kfusion::Options::m_minPlaneSize
int m_minPlaneSize
Threshold for plane optimization.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:198
kfusion::Options::m_no_viz
bool m_no_viz
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:164
argv
char ** argv
Definition: tests_high_five_parallel.cpp:28
kfusion::Options::getOutput
string getOutput() const
Definition: ext/kintinuous/kfusion/src/app/Options.cpp:90
kfusion::Options::m_fillHoles
int m_fillHoles
Threshold for hole filling.
Definition: ext/kintinuous/kfusion/include/kfusion/Options.hpp:195


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:24