forked from Smorodov/Multitarget-tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDNNDetector.h
More file actions
34 lines (26 loc) · 733 Bytes
/
Copy pathDNNDetector.h
File metadata and controls
34 lines (26 loc) · 733 Bytes
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
#pragma once
#include "BaseDetector.h"
#include <opencv2/dnn.hpp>
#include <opencv2/dnn/shape_utils.hpp>
///
/// \brief The DNNDetector class
///
class DNNDetector : public BaseDetector
{
public:
DNNDetector(bool collectPoints, cv::UMat& colorFrame);
~DNNDetector(void);
bool Init(const config_t& config);
void Detect(cv::UMat& colorFrame);
private:
cv::dnn::Net m_net;
void DetectInCrop(cv::Mat colorFrame, const cv::Rect& crop, regions_t& tmpRegions);
static const int InWidth = 300;
static const int InHeight = 300;
float m_WHRatio;
float m_inScaleFactor;
float m_meanVal;
float m_confidenceThreshold;
float m_maxCropRatio;
std::vector<std::string> m_classNames;
};