forked from Smorodov/Multitarget-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Detector.h
35 lines (27 loc) · 820 Bytes
/
Detector.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
#pragma once
#include "BackgroundSubtract.h"
#include <iostream>
#include <vector>
#include "defines.h"
// ---------------------------------------------------------------------------
//
// ---------------------------------------------------------------------------
class CDetector
{
private:
void DetectContour();
std::unique_ptr<BackgroundSubtract> m_backgroundSubst;
regions_t m_regions;
std::vector<Point_t> m_centers;
cv::Mat m_fg;
cv::Size m_minObjectSize;
bool m_collectPoints;
cv::Mat m_motionMap;
public:
CDetector(BackgroundSubtract::BGFG_ALGS algType, bool collectPoints, cv::Mat& gray);
const std::vector<Point_t>& Detect(cv::Mat& gray);
~CDetector(void);
void SetMinObjectSize(cv::Size minObjectSize);
const regions_t& GetDetects() const;
void CalcMotionMap(cv::Mat frame);
};