29 #ifndef GRT_MOVEMENT_TRAJECTORY_FEATURES_HEADER 30 #define GRT_MOVEMENT_TRAJECTORY_FEATURES_HEADER 32 #include "../../CoreModules/FeatureExtraction.h" 33 #include "../../Util/Util.h" 49 enum FeatureModes{CENTROID_VALUE=0,NORMALIZED_CENTROID_VALUE,CENTROID_DERIVATIVE,CENTROID_ANGLE_2D};
54 MovementTrajectoryFeatures(
const UINT trajectoryLength=100,
const UINT numCentroids=10,
const UINT featureMode=CENTROID_VALUE,
const UINT numHistogramBins=10,
const UINT numDimensions = 1,
const bool useTrajStartAndEndValues =
false,
const bool useWeightedMagnitudeValues =
true);
94 virtual bool computeFeatures(
const VectorFloat &inputVector);
103 virtual bool reset();
112 virtual bool save( std::fstream &file )
const;
121 virtual bool load( std::fstream &file );
126 bool init(
const UINT trajectoryLength,
const UINT numCentroids,
const UINT featureMode,
const UINT numHistogramBins,
const UINT numDimensions,
const bool useTrajStartAndEndValues,
const bool useWeightedMagnitudeValues);
165 UINT getFeatureMode()
const;
180 static std::string getId();
184 UINT trajectoryLength;
187 UINT numHistogramBins;
188 bool useTrajStartAndEndValues;
189 bool useWeightedMagnitudeValues;
195 static std::string id;
200 #endif //GRT_MOVEMENT_TRAJECTORY_FEATURES_HEADER virtual bool predict(VectorFloat inputVector)
virtual bool predict_(VectorFloat &inputVector)
virtual bool train(ClassificationData trainingData)
virtual bool save(const std::string &filename) const
virtual bool train_(ClassificationData &trainingData)
virtual bool load(const std::string &filename)