-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathTrackerParameter.cpp
More file actions
55 lines (41 loc) · 1.17 KB
/
TrackerParameter.cpp
File metadata and controls
55 lines (41 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#include "TrackerParameter.h"
#include "../Controller/ControllerTrackingAlgorithm.h"
TrackerParameter::TrackerParameter(QObject *parent) :
IModel(parent)
{
_cfg = static_cast<ControllerTrackingAlgorithm*>(parent)->getConfig();
_BinarizationThreshold = _cfg->BinarizationThreshold;
_SizeErode = _cfg->SizeErode;
_SizeDilate = _cfg->SizeDilate;
_MinBlobSize = _cfg->MinBlobSize;
_MaxBlobSize = _cfg->MaxBlobSize;
_mog2History = _cfg->Mog2History;
_mog2VarThresh = _cfg->Mog2VarThresh;
_mog2BackgroundRatio = _cfg->Mog2BackgroundRatio;
_doNetwork = _cfg->DoNetwork;
_networkPort = _cfg->NetworkPort;
_Threshold = 12345;
_doBackground = true;
_sendImage = 0; //Send no image
_resetBackground = false;
Q_EMIT notifyView();
}
void TrackerParameter::setThreshold(int x)
{
_Threshold = x;
Q_EMIT notifyView();
}
int TrackerParameter::getThreshold()
{
return _Threshold;
}
void TrackerParameter::setBinarizationThreshold(int x)
{
_BinarizationThreshold = x;
_cfg->BinarizationThreshold = x;
Q_EMIT notifyView();
}
int TrackerParameter::getBinarizationThreshold()
{
return _BinarizationThreshold;
}