00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025 #ifndef LINEARRECOGNISER_H
00026 #define LINEARRECOGNISER_H
00027
00028
00029 #include "abstractrecogniser.h"
00030
00031
00032 #include <QHash>
00033 #include <QVector>
00034
00035 class AbstractFeature;
00036
00037
00038 class LinearRecogniser : public AbstractRecogniser {
00039
00040 typedef double WeightT;
00041
00042 public:
00043 LinearRecogniser( JavaVM* jvm );
00044
00045 DECLARE_CLASS_KEY( "linear" );
00046 DECLARE_CLASS_TITLE( "Linear Recogniser" );
00047 DECLARE_CLASS_DESCRIPTION( "<B>Simple Linear Recogniser</B><BR><BR>"
00048 "Although it requires 2 or more features to work, "
00049 "there are no restrictions on which features can or "
00050 "cannot be used." );
00051
00052
00053 protected:
00054 bool readModelFile( const QString& fileName );
00055
00056 ClassProbabilities classifyGestureImp( const DGestureRecord& gesture,
00057 const QVector<FeatureResultT>& featureVec );
00058
00059
00060 private:
00061 QHash< int, QVector<WeightT> > m_classWeights;
00062 };
00063
00064
00065 #endif // ! LINEARRECOGNISER_H