src/tools/lvr2_image_normals/Main.cpp
Go to the documentation of this file.
1 
28 // Program options for this tool
29 
30 
31 #include "lvr2/io/ModelFactory.hpp"
34 #include "Options.hpp"
35 using namespace lvr2;
36 
37 
41 int main(int argc, char** argv)
42 {
43  image_normals::Options opt(argc, argv);
44  cout << opt << endl;
45 
47 
48  // Determine coordinate system
50 
51  if(opt.coordinateSystem() == "SLAM6D")
52  {
53  system = ModelToImage::SLAM6D;
54  }
55  else if(opt.coordinateSystem() == "UOS")
56  {
57  system = ModelToImage::UOS;
58  }
59 
60  ModelToImage mti(
61  model->m_pointCloud,
63  opt.imageWidth(), opt.imageHeight(),
64  opt.minZ(), opt.maxZ(),
65  opt.minH(), opt.maxH(),
66  opt.minV(), opt.maxV(),
67  opt.optimize(), system);
68 
69  mti.writePGM(opt.imageFile(), 3000);
70 
71  PanoramaNormals normals(&mti);
72  PointBufferPtr buffer = normals.computeNormals(opt.regionWidth(), opt.regionHeight(), false);
73 
74  ModelPtr out_model(new Model(buffer));
75 
76  ModelFactory::saveModel(out_model, "normals.ply");
77 }
78 
PointBufferPtr computeNormals(int with, int height, bool interpolate)
A class to parse the program options for the reconstruction executable.
The PanoramaNormals class computes normals for a given panorama.
The ModelToImage class provides methods to re-project 3D laser scans to image planes.
static ModelPtr readModel(std::string filename)
std::shared_ptr< PointBuffer > PointBufferPtr
void writePGM(string filename, float cutoff)
Writes the scan panaroma to an pgm file.
std::shared_ptr< Model > ModelPtr
Definition: Model.hpp:80
int main(int argc, char **argv)
Main entry point for the LSSR surface executable.
static void saveModel(ModelPtr m, std::string file)
char ** argv


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 Mon Feb 28 2022 22:46:08