31 #ifndef __MOFILTERMANAGER_H
32 #define __MOFILTERMANAGER_H
44 #define MO_TRACKER_TRACKED 0
45 #define MO_TRACKER_NOT_FOUND -1
46 #define MO_TRACKER_SMALL_DET -2
47 #define MO_TRACKER_MAX_ITERATIONS -3
48 #define MO_TRACKER_OOB -4
49 #define MO_TRACKER_LARGE_RESIDUE -5
58 #include <TUIO/TuioObject.h>
59 #include <TUIO/TuioCursor.h>
76 virtual ~moTUIOSystemData();
78 virtual moVideoFormat& GetVideoFormat() {
return m_VideoFormat; }
81 virtual int GetCursorCount() {
return m_Cursors.Count(); }
82 virtual int GetObjectCount() {
return m_Objects.Count(); }
84 virtual TuioCursor* GetCursor(
int i) {
return m_Cursors[i]; }
85 virtual moTuioCursorArray& GetCursors() {
return m_Cursors; }
87 virtual TuioObject* GetObject(
int i) {
return m_Objects[i]; }
88 virtual moTuioObjectArray& GetObjects() {
return m_Objects; }
100 TuioCursor* addTuioCursor(
float xp,
float yp);
109 void updateTuioCursor(TuioCursor *tcur,
float xp,
float yp);
117 void removeTuioCursor(TuioCursor *tcur);
124 void addExternalTuioCursor(TuioCursor *tcur);
131 void updateExternalTuioCursor(TuioCursor *tcur);
139 void removeExternalTuioCursor(TuioCursor *tcur);
156 virtual TuioObject* addTuioObject(
int sym,
float xp,
float yp,
float a);
166 virtual void updateTuioObject(TuioObject *tobj,
float xp,
float yp,
float a);
174 virtual void removeTuioObject(TuioObject *tobj);
183 void addExternalTuioObject(TuioObject *tobj);
190 void updateExternalTuioObject(TuioObject *tobj);
198 void removeExternalTuioObject(TuioObject *tobj);
207 virtual void initFrame(TuioTime ttime);
213 virtual void commitFrame();
226 virtual long getSessionID();
232 virtual long getFrameID();
238 virtual TuioTime getFrameTime();
245 std::list<TuioObject*> getUntouchedObjects();
252 std::list<TuioCursor*> getUntouchedCursors();
257 void stopUntouchedMovingObjects();
262 void stopUntouchedMovingCursors();
267 void removeUntouchedStoppedObjects();
272 void removeUntouchedStoppedCursors();
279 std::list<TuioObject*> getTuioObjects();
287 std::list<TuioCursor*> getTuioCursors();
295 TuioObject* getTuioObject(
long s_id);
303 TuioCursor* getTuioCursor(
long s_id);
311 TuioObject* getClosestTuioObject(
float xp,
float yp);
319 TuioCursor* getClosestTuioCursor(
float xp,
float yp);
326 moTuioCursorArray m_Cursors;
327 moTuioObjectArray m_Objects;
328 std::list<TuioObject*> objectList;
329 std::list<TuioCursor*> cursorList;
334 std::list<TuioCursor*> freeCursorList;
335 std::list<TuioCursor*> freeCursorBuffer;
339 bool periodic_update;
342 TuioTime currentFrameTime;
343 bool updateObject, updateCursor;
344 long lastCursorUpdate, lastObjectUpdate;
407 int updatePos(
float kltConvergeThreshold,
float kltSSDthresh,
int kltborder,
float delta,
float res,
float d1,
float d2,
float w,
float h);
488 void StartRecording(
long maxtime = 60000,
long granularity = 30 );
492 void PauseRecording();
493 void ContinueRecording();
494 void StopRecording();
497 bool SaveToFile(
moText filename );
498 bool SaveToXML(
moText filename );
531 virtual int GetFeaturesCount();
536 virtual int GetValidFeatures();
537 virtual int GetDeltaValidFeatures();
552 virtual moVector2f GetBarycenterAcceleration();
576 virtual void SetMax(
float x,
float y );
577 virtual void SetMin(
float x,
float y );
581 virtual moTrackerFeatureArray& GetFeatures();
594 virtual void SetValidFeatures(
int validfeatures) { m_ActualRecord.m_ValidFeatures = validfeatures; }
595 virtual void SetDeltaValidFeatures(
int deltavalidfeatures) { m_ActualRecord.m_DeltaValidFeatures = deltavalidfeatures; }
603 virtual int PositionToZone(
float x,
float y );
606 virtual moVector2f ZoneToPosition(
int zone );
610 virtual int PositionToZoneC(
float x,
float y );
613 virtual moVector2f ZoneToPositionC(
int zone );
615 virtual void SetPositionMatrix(
float x,
float y,
int nfeatures );
616 virtual void SetPositionMatrix(
moVector2f pos,
int nfeatures );
617 virtual int GetPositionMatrix(
float x,
float y );
618 virtual int GetPositionMatrix(
moVector2f pos );
620 virtual void SetMotionMatrix(
float x,
float y,
int nfeatures );
621 virtual void SetMotionMatrix(
moVector2f pos,
int nfeatures );
622 virtual int GetMotionMatrix(
float x,
float y );
623 virtual int GetMotionMatrix(
moVector2f pos );
625 virtual void SetAccelerationMatrix(
float x,
float y,
int nfeatures );
626 virtual void SetAccelerationMatrix(
moVector2f pos,
int nfeatures );
627 virtual int GetAccelerationMatrix(
float x,
float y );
628 virtual int GetAccelerationMatrix(
moVector2f pos );
630 virtual void SetPositionMatrixC(
float x,
float y,
int nfeatures );
631 virtual int GetPositionMatrixC(
float x,
float y );
632 virtual int GetPositionMatrixC(
moVector2f pos );
633 virtual int GetPositionMatrixC(
int zone );
635 virtual void SetMotionMatrixC(
float x,
float y,
int nfeatures );
636 virtual int GetMotionMatrixC(
float x,
float y );
637 virtual int GetMotionMatrixC(
moVector2f pos );
638 virtual int GetMotionMatrixC(
int zone );
640 virtual void ResetMatrix();
641 virtual void DrawFeatures(
float w,
float h,
float offsetx,
float offsety );
643 virtual void SetMaxFeatures(
int p_nFeatures ) { m_ActualRecord.m_nFeatures = p_nFeatures; }
moVector2f m_BarycenterMotion
moVideoFormat m_VideoFormat
virtual void SetBarycenterMotion(float b_x, float b_y)
long m_Tick
operador de copia, y seteo de timers
virtual void SetValidFeatures(int validfeatures)
moVector2fpArray track
list of feature positions in the past frames. Forms the feature tracks in video.
virtual void SetAccelerationVariance(float v_x, float v_y)
double m_AbsoluteAccelerationAverage
cantidad de movimiento
Recurso ( objeto para cargar y manipular objetos físicos de datos de imágenes, audio, video, 3d, 2d, fuentes, shaders y de cualquier otro tipo extendible por un plugin )
moVector4< MOfloat > moVector4f
virtual ~moTrackerInstanceRecord()
int val
Other states for valid feature point.
float v_y
Speed in the actual frame.
virtual void SetDeltaValidFeatures(int deltavalidfeatures)
virtual void SetBoundingRectangle(float r_x, float r_y, float s_x, float s_y)
moDeclareExportedDynamicArray(moTrackerFeature *, moTrackerFeatureArray)
virtual moVideoFormat & GetVideoFormat()
long uframe
once recognized
moVector4f m_BoundingRectangle
int m_ValidFeatures
0 nada, 1 todo...
float ap_y
Acceleration in the previous frame.
virtual void SetBarycenterAcceleration(float b_x, float b_y)
virtual void SetBarycenter(float b_x, float b_y)
virtual void SetAbsoluteSpeedAverage(float speedaverage)
float vp_y
Speed in the previous frame.
Clase base abstracta de donde deben derivar los objetos [virtual pura].
moVector2< MOfloat > moVector2f
bool is_object
once recognized
float tr_y
Feature position in the previous frame.
moTrackerInstanceRecord m_ActualRecord
clase de para manejar textos
virtual void SetAbsoluteTorqueAverage(float toraverage)
bool is_cursor
once recognized
long utime
once recognized
virtual int GetMaxFeatures()
int * m_MotionMatrix
4 x 4 zones
long sframe
once recognized
long stime
once recognized
Sistema de características.
int * m_CircularMotionMatrix
12 semitones, 3 levels
virtual void SetSpeedVariance(float v_x, float v_y)
virtual void SetVariance(float v_x, float v_y)
moTrackerInstanceRecords m_History
virtual void SetAbsoluteAccelerationAverage(float accaverage)
bool is_parent
once recognized
bool valid
True for a valid feature point.
moTrackerFeatureArray FeaturesCaptured
virtual void SetMaxFeatures(int p_nFeatures)
moTrackerFeature * Parent
double m_SurfaceCovered
separa formas de fondo
float t_y
Torque in the actual frame.
moTrackerSystemHistory m_History
moVector2f m_SpeedVariance
int * m_AccelerationMatrix
4 x 4 zones
double m_BoundingRectangleAngle
cantidad de fuerzas
Clase para el control de un temporizador (relativo) con identificación
moMatrix3 & operator=(const moMatrix3 &rkM)
moVector2f m_AccelerationVariance
double m_AbsoluteTorqueAverage
cantidad de cambios de velocidad
float normy
Normalized Feature Coordinates [ 0 - 1 ].
Característica de seguimiento ( sensado )
moTrackerFeatureArray m_Features
double m_AbsoluteSpeedAverage
Matrix de características.
moVector2f m_BarycenterAcceleration
moTrackerSystemHistory & GetHistory()
int * m_CircularPositionMatrix
4 x 4 zones
float a_y
Acceleration in the actual frame.