root / trunk / tbeta / Windows / addons / ofxNCore / Copy of src / Tracking / tracking.h @ 139

View | Annotate | Download (920 Bytes)

1
/*
2
 *  tracking.h
3
 *
4
 *  Created by Ramsin Khoshabeh on 5/4/08.
5
 *  Copyright 2008 risenparadigm. All rights reserved.
6
 *
7
 * Changelog:
8
 * 08/15/08 -- Fixed a major bug in the track algorithm
9
 */
10
11
#ifndef __TRACKING
12
#define __TRACKING
13
14
#include <list>
15
#include <map>
16
17
#include "ContourFinder.h"
18
19
#include "../Events/TouchMessenger.h"
20
21
#include "../Calibration/calibrationB.h"
22
23
class BlobTracker : public TouchListener
24
{
25
26
public:
27
28
        BlobTracker();
29
30
        calibrationB* calibrate;
31
32
        bool isCalibrating;
33
34
        int MIN_MOVEMENT_THRESHOLD;
35
36
        void passInCalibration(calibrationB* calibrate);
37
38
        std::vector<Blob> getTrackedBlobs();
39
40
41
        //assigns IDs to each blob in the contourFinder
42
        void track(ContourFinder* newBlobs);
43
        int trackKnn(ContourFinder *newBlobs, Blob *track, int k, double thresh);
44
45
private:
46
47
        int                                                IDCounter;          //counter of last blob
48
        int                                                fightMongrel;
49
        std::vector<Blob>        trackedBlobs; //tracked blobs
50
};
51
52
#endif