-
Notifications
You must be signed in to change notification settings - Fork 0
/
foneaccumulator.h
44 lines (32 loc) · 945 Bytes
/
foneaccumulator.h
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
#ifndef FONEACCUMULATOR_H
#define FONEACCUMULATOR_H
//#include <opencv2/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <stdlib.h>
#include <stdio.h>
class FoneAccumulator
{
public:
FoneAccumulator(size_t height, size_t width);
cv::Mat* meanAccumulator;
cv::Mat* dispAccumulator;
cv::Mat* n;
cv::Mat* tracked;
int width, height;
// amount of pixels out of fone at which we need to recalculate fone
float trackedPixelsThreshold;
static int dispThreshold;
static int maxN;
static int forceLearnDuration;
bool forceFoneAccumulating;
int forceLearnFrameCounter;
void enableForceAccumulating();
void disableForceAccumulating();
void accumulate(cv::Mat* nextFrame);
void tracking(cv::Mat* nextFrame);
void getForegroundMask(cv::Mat& thresholded);
void getBackgroundMask(cv::Mat& thresholded);
void accumulateAndTrack(cv::Mat *nextFrame);
~FoneAccumulator();
};
#endif // FONEACCUMULATOR_H