#ifndef FEATURE_HPP
#define FEATURE_HPP

#include "src/Trajectory.h"

#include <boost/shared_ptr.hpp>

/** Class for feature data
    positions, velocities and other statistics to evaluate their quality
    before saving. */
class FeatureTrajectory {
public:
  FeatureTrajectory(const int& frameNum, const cv::Point2f& p);

  void addPoint(const int& frameNum, const cv::Point2f& p);

#ifdef USE_OPENCV
  void draw(cv::Mat& img, const cv::Scalar& color) const;
#endif

protected:
  Trajectory<cv::Point2f> positions;
  Trajectory<cv::Point2f> velocities;
  
  std::vector<float> displacementDistances;

  void computeMotionData(const int& frameNum);

};

typedef boost::shared_ptr<FeatureTrajectory> FeatureTrajectoryPtr;

#endif
