-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCascadeClassifier.cpp
34 lines (29 loc) · 1.08 KB
/
CascadeClassifier.cpp
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
// File: CascadeClassifier.cpp
// Author: Seongdo Kim
// Contact: [email protected]
//
// Copyright (c) 2017, Seongdo Kim <[email protected]>
// All rights reserved.
// The copyright to the computer program(s) herein is
// the property of Seongdo Kim. The program(s) may be
// used and/or copied only with the written permission
// of Seongdo Kim or in accordance with the terms and
// conditions stipulated in the agreement/contract under
// which the program(s) have been supplied.
//
// Written by Seongdo Kim <[email protected]>, June, 2017
//
#include <logging.h>
#include "CascadeClassifier.h"
namespace seevider {
CascadeClassifier::CascadeClassifier(std::string option_filename, std::shared_ptr<Settings> &settings) {
mClassifier.load(option_filename);
mSettings = settings;
}
CascadeClassifier::~CascadeClassifier() {
}
int CascadeClassifier::detect(const cv::Mat& image, std::vector<cv::Rect> &locs, int size) {
mClassifier.detectMultiScale(image, locs, 1.1, mSettings->ParkingParams.sensitivity, 0, cv::Size(image.cols / size, image.rows / size));
return locs.size();
}
}