#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 listFilename;
  std::string folderData;


  std::string databaseFilename;
  std::string homographyFilename;
  std::string maskFilename;
  bool loadFeatures;
  bool display;
  float videoFPS;
  // int measurementPrecision;
  unsigned 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;
  float minFeatureEigThreshold;
  unsigned int minFeatureTime;
  float mmConnectionDistance;
  float mmSegmentationDistance;
  float maxDistance;
  float minVelocityCosine;
  float minNFeaturesPerGroup;
  // safety analysis
  float maxPredictedSpeed;
  float predictionTimeHorizon;
  float collisionDistance;
  bool crossingZones;
  std::string predictionMethod;
  int nPredictedTrajectories;
  float minAcceleration;
  float maxAcceleration;
  float maxSteering;
  bool useFeaturesForPrediction;

  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
