view include/Parameters.hpp @ 190:36968a63efe1

Got the connected_components to finally work using a vecS for the vertex list in the adjacency list. In this case, the component map is simply a vector of ints (which is the type of UndirectedGraph::vextex_descriptor (=graph_traits<FeatureGraph>::vertex_descriptor) and probably UndirectedGraph::vertices_size_type). To use listS, I was told on the Boost mailing list: >> If you truly need listS, you will need to create a vertex index >> map, fill it in before you create the property map, and pass it to the >> vector_property_map constructor (and as a type argument to that class). It may be feasible with a component map like shared_array_property_map< graph_traits<FeatureGraph>::vertex_descriptor, property_map<FeatureGraph, vertex_index_t>::const_type > components(num_vertices(g), get(vertex_index, g));
author Nicolas Saunier <nicolas.saunier@polymtl.ca>
date Wed, 07 Dec 2011 18:51:32 -0500
parents 76610dcf3b8d
children 0e60a306d324
line wrap: on
line source

#ifndef PARAMETERS_HPP
#define PARAMETERS_HPP

/// \todo Class for parameters, with utilities to save and load from configuration files

#include <string>

namespace boost{
  namespace program_options {
    class options_description;
    class variables_map;
  }
}

struct KLTFeatureTrackingParameters {
  bool trackFeatures;
  bool groupFeatures;

  std::string videoFilename;
  std::string databaseFilename;
  std::string homographyFilename;
  std::string maskFilename;
  bool loadFeatures;
  bool display;
  float videoFPS;
  // int measurementPrecision;
  int frame1;
  int nFrames;
  // feature tracking
  int maxNFeatures;
  float featureQuality;
  float minFeatureDistanceKLT;
  int windowSize;
  bool useHarrisDetector;
  float k;
  int pyramidLevel;
  unsigned int nDisplacements;
  float minFeatureDisplacement;
  float accelerationBound;
  float deviationBound;
  int nFramesSmoothing;
  //int nFramesVelocity;
  int maxNumberTrackingIterations;
  float minTrackingError;
  unsigned int minFeatureTime;
  float mmConnectionDistance;
  float mmSegmentationDistance;
  float maxDistance;
  float minVelocityCosine;
  int minNFeaturesPerGroup;

  std::string parameterDescription;

  KLTFeatureTrackingParameters(const int argc, char* argv[]);

  //KLTFeatureTrackingParameters(bool loadFeatures, std::string videoFilename, int videoFPS, int measurementPrecision, int frame1, int nFrames, int maxNFeatures, float featureQuality, float minFeatureDistanceKLT, int windowSize, int pyramidLevel, int nDisplacements, float minFeatureDisplacement, float accelerationBound, float deviationBound, int nFramesSmoothing, int nFramesVelocity, int maxNumberTrackingIterations, float minTrackingError, int minFeatureTime, float mmConnectionDistance, float mmSegmentationDistance, float maxDistance, float minVelocityCosine, int minNFeaturesPerGroup);

  std::string getParameterDescription(boost::program_options::options_description& options, const boost::program_options::variables_map& vm, const std::string& separator = " ") const;
};

#endif