Am5os
 All Classes Functions Pages
cascade_haar_detector.h
1 //
2 // Projectname: amos-ss16-proj5
3 //
4 // Copyright (c) 2016 de.fau.cs.osr.amos2016.gruppe5
5 //
6 // This file is part of the AMOS Project 2016 @ FAU
7 // (Friedrich-Alexander University Erlangen-Nürnberg)
8 //
9 // This program is free software: you can redistribute it and/or modify
10 // it under the terms of the GNU Affero General Public License as
11 // published by the Free Software Foundation, either version 3 of the
12 // License, or (at your option) any later version.
13 //
14 // This program is distributed in the hope that it will be useful,
15 // but WITHOUT ANY WARRANTY; without even the implied warranty of
16 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 // GNU Affero General Public License for more details.
18 //
19 // You should have received a copy of the GNU Affero General Public
20 // License along with this program. If not, see
21 // <http://www.gnu.org/licenses/>.
22 //
23 
24 #ifndef CASCADE_HAAR_DETECTOR_H
25 #define CASCADE_HAAR_DETECTOR_H
26 
27 #include "detector.h"
28 
29 class CascadeHaarDetector : public Detector {
30 
31 public:
32 
36  CascadeHaarDetector(std::string classifier_file, double scale_factor = 1.1, int min_neighbors = 3, cv::Size min_size = cv::Size(20,20), cv::Size max_size = cv::Size(80,80));
37 
45  std::vector<cv::Rect> Detect(cv::Mat *frame);
46 
55  std::vector<cv::Rect> DetectInROI(cv::Mat *frame, std::vector<cv::Rect> *rois);
56 
57 private:
58 
59  cv::CascadeClassifier cascade_haar_classifier_;
60  double scale_factor_;
61  int min_neighbors_;
62  cv::Size min_size_;
63  cv::Size max_size_;
64 
65 };
66 
67 
68 #endif // CASCADE_HAAR_DETECTOR_H
CascadeHaarDetector(std::string classifier_file, double scale_factor=1.1, int min_neighbors=3, cv::Size min_size=cv::Size(20, 20), cv::Size max_size=cv::Size(80, 80))
Definition: cascade_haar_detector.cpp:26
Definition: detector.h:30
std::vector< cv::Rect > Detect(cv::Mat *frame)
Definition: cascade_haar_detector.cpp:45
Definition: cascade_haar_detector.h:29
std::vector< cv::Rect > DetectInROI(cv::Mat *frame, std::vector< cv::Rect > *rois)
Definition: cascade_haar_detector.cpp:53