Frapper
1.0a
Main Page
Namespaces
Classes
Files
File List
File Members
plugins
nodes
Tracking
FaceTracker
FaceTrackerNode.h
Go to the documentation of this file.
1
/*
2
-----------------------------------------------------------------------------
3
This source file is part of FRAPPER
4
research.animationsinstitut.de
5
sourceforge.net/projects/frapper
6
7
Copyright (c) 2008-2009 Filmakademie Baden-Wuerttemberg, Institute of Animation
8
9
This program is free software; you can redistribute it and/or modify it under
10
the terms of the GNU Lesser General Public License as published by the Free Software
11
Foundation; version 2.1 of the License.
12
13
This program is distributed in the hope that it will be useful, but WITHOUT
14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
15
FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
16
17
You should have received a copy of the GNU Lesser General Public License along with
18
this program; if not, write to the Free Software Foundation, Inc., 59 Temple
19
Place - Suite 330, Boston, MA 02111-1307, USA, or go to
20
http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html
21
-----------------------------------------------------------------------------
22
*/
23
33
34
#ifndef FACETRACKERNODE_H
35
#define FACETRACKERNODE_H
36
37
#include "opencvColorInput.h"
38
#include "
ParameterGroup.h
"
39
#include <QtCore/QVariant>
40
#include <QtCore/QTime>
41
#include <QtCore/QThread>
42
#include <QtCore/QMutex>
43
#include <QtCore/QTimer>
44
45
#include <vector>
46
47
#include "
Face.h
"
48
#include "
Helper.h
"
49
50
namespace
FaceTrackerNode {
51
using namespace
Frapper;
52
using namespace
cv;
53
58
class
FaceTrackerNode
:
public
opencvColorInput
//, public QThread
59
{
60
61
Q_OBJECT
62
63
public
:
64
70
FaceTrackerNode
( QString name,
ParameterGroup
*parameterRoot );
71
72
public
:
73
77
~
FaceTrackerNode
();
78
79
public
:
80
81
//virtual void run();
82
83
public
slots:
84
85
private
slots:
86
90
void
flipPicture();
91
95
void
probability();
96
100
void
switchTime();
101
105
void
switchTimeRand();
106
110
void
randomLook();
111
115
void
focusPointSpeed();
116
120
void
focusPointMoveLimit();
121
125
void
switchUserNow();
126
130
void
minSize();
131
135
void
maxSize();
136
140
void
drawDebugInformation();
141
145
virtual
void
processInputMatrix();
146
147
private
:
148
149
150
151
152
153
void
detectFaces(cv::Mat image);
154
160
void
drawDetectedFaces(cv::Mat image);
161
167
void
drawDebugInfo(cv::Mat image);
168
173
void
decreaseProbabilities();
174
179
void
processAttractors();
180
184
void
animateFocusPoint();
185
186
187
188
private
:
189
193
QMutex
m_mutex
;
194
198
QTimer
m_timer
;
199
203
QTime
m_timestamp
;
204
208
QTime
m_lastTimestamp
;
209
213
int
m_detectedObjectsCount
;
214
218
std::vector<Face *>
m_faces
;
219
223
std::vector<Attractor>
m_attractors
;
224
228
int
m_attractorIndex
;
229
233
int
m_attractorIndexOld
;
234
238
int
m_justSwitched
;
239
243
QTime
m_focusTimeLimit
;
244
248
QTime
m_smallFocusTimeLimit
;
249
253
vector<cv::Rect>
m_detectedObjects
;
254
258
cv::CascadeClassifier *
m_cascadeClassifier
;
259
263
ParameterGroup
*
m_configGroup
;
264
268
ParameterGroup
*
m_outputGroup
;
269
273
PointNDC
m_focusPoint
;
274
278
PointNDC
m_focusPointTarget
;
279
283
unsigned
int
delay
;
284
288
unsigned
int
attractorCount
;
289
293
double
m_probability
;
294
298
bool
m_drawDebugInformation
;
299
303
bool
m_flipHorizontal
;
304
308
int
m_switchTime
;
309
313
int
m_switchTimeRand
;
314
318
int
m_randomLook
;
319
323
double
m_focusPointSpeed
;
324
328
double
m_focusPointMoveLimit
;
329
333
bool
m_switchUserNow
;
334
338
double
m_minSize
;
339
343
double
m_maxSize
;
344
348
int
m_lastNumberofAttractos
;
349
350
};
351
352
}
// namespace FaceTrackerNode
353
354
#endif
Generated on Tue Sep 18 2012 11:43:02 for Frapper by
1.8.2