-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathobjectcounter.h
More file actions
56 lines (48 loc) · 1.3 KB
/
objectcounter.h
File metadata and controls
56 lines (48 loc) · 1.3 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
56
#ifndef OBJECTCOUNTER_H
#define OBJECTCOUNTER_H
#include <QImage>
#include <QDebug>
#include <QTime>
#include "opencv2/video/background_segm.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/xfeatures2d/nonfree.hpp"
#include "opencv2/objdetect/objdetect.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/video/tracking.hpp"
#include "opencv2/core/core.hpp"
#include "opencv2/imgcodecs.hpp"
#include "opencv2/tracking.hpp"
#include "opencv2/core/ocl.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <opencv2/opencv.hpp>
#include "opencv2/core.hpp"
#include "highgui.h"
#include "cv.h"
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <time.h>
using namespace std;
using namespace cv;
using namespace cv::xfeatures2d;
class ObjectCounter
{
public:
ObjectCounter();
void imgShow(QImage img);
void movemontDetection(const Mat &img);
void init();
private:
Mat frameOriginal,frame1, knn;
Mat grayImage1,grayImage2;
Mat differenceImage, thresholdImage;
Ptr<BackgroundSubtractor> pKNN;
bool isDebugmod, isCountmod, isDrawingmod, isSettingmod;
};
#endif // OBJECTCOUNTER_H