source: level2/competencies/FaceClassifier/src/App.h @ 234

Revision 233, 1.4 KB checked in by dave, 10 years ago (diff)

added yarp interface

RevLine 
[94]1// Copyright (C) 2009 foam
2//
3// This program is free software; you can redistribute it and/or modify
4// it under the terms of the GNU General Public License as published by
5// the Free Software Foundation; either version 2 of the License, or
6// (at your option) any later version.
7//
8// This program is distributed in the hope that it will be useful,
9// but WITHOUT ANY WARRANTY; without even the implied warranty of
10// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11// GNU General Public License for more details.
12//
13// You should have received a copy of the GNU General Public License
14// along with this program; if not, write to the Free Software
15// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
17#include "cv.h"
18#include "highgui.h"
19#include <yarp/os/all.h>
20#include <string>
21
[113]22#include "FaceFinder.h"
[94]23#include "FaceBank.h"
24#include "SceneState.h"
25
26using namespace yarp::os;
27using namespace std;
28
29class App
30{
31public:
32        App(const string &filename);
33        ~App();
34       
[96]35        void Run();
36        void Update(Image &camera);
[94]37       
38private:
[111]39        void Benchmark(const string &test);
[94]40       
41        CvCapture* m_Capture;
42       
[113]43        FaceFinder m_FaceFinder;
[94]44        Classifier *m_Classifier;
45        FaceBank *m_FaceBank;
46        SceneState m_SceneState;
47        BufferedPort<Bottle> m_CtrlPort;
48       
49        int m_FaceNum;
50        bool m_Learn;
[233]51        bool m_Idle;
[94]52        CvFont m_Font;
[111]53        CvFont m_LargeFont;
[94]54       
55        IplImage *frame;
56        IplImage *frame_copy;
[95]57       
[96]58        map<int,string> m_DebugNames;
59       
[95]60        int m_FrameNum;
[94]61};
Note: See TracBrowser for help on using the repository browser.