00001 /* -*- c++ -*- (for Emacs) 00002 * 00003 * stlrecogniser.h 00004 * Digest 00005 * 00006 * Created by Aidan Lane on Tue Jan 17 2006. 00007 * Copyright (c) 2005-2006 Optimisation and Constraint Solving Group, 00008 * Monash University. All rights reserved. 00009 * 00010 * This program is free software; you can redistribute it and/or modify 00011 * it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation; either version 2 of the License, or 00013 * (at your option) any later version. 00014 * 00015 * This program is distributed in the hope that it will be useful, 00016 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00017 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00018 * GNU General Public License for more details. 00019 * 00020 * You should have received a copy of the GNU General Public License 00021 * along with this program; if not, write to the Free Software 00022 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00023 */ 00024 00025 #ifndef STLRECOGNISER_H 00026 #define STLRECOGNISER_H 00027 00028 00029 #include "stlrecogniserinterface.h" 00030 00031 using namespace std; 00032 00033 00034 class StlRecogniser : public StlRecogniserInterface { 00035 00036 public: 00037 StlRecogniser(); 00038 ~StlRecogniser(); 00039 00040 DECLARE_STL_RECOGNISER_KEY( "stlrecogniser" ); 00041 DECLARE_STL_RECOGNISER_TITLE( "STL C++ Recogniser" ); 00042 DECLARE_STL_RECOGNISER_DESCRIPTION( "This is not a real recogniser, " 00043 "just a \"skeleton\" example of one."); 00044 00045 const map<string, string>& defaultParams() const; 00046 00047 bool initTraining( const list<string>& featureKeys, 00048 const map<string, string>& params ); 00049 bool examineSample( const StlFeatureVec& featureVec, 00050 const set<int>& classes ); 00051 bool finaliseTraining(); 00052 00053 bool writeModelFile( const string& fileName ); 00054 bool readModelFile( const string& fileName ); 00055 00056 StlStroke flatten( const StlStrokeList& strokes ); 00057 StlClassProbabilities classify( const StlFeatureVec& featureVec ); 00058 }; 00059 00060 00061 #endif // ! STLRECOGNISER_H
1.5.2