Fawkes API  Fawkes Development Version
faces.h
1 
2 /***************************************************************************
3  * faces.h - Faces classifier based on OpenCV
4  *
5  * Created: Mon Dec 10 15:46:06 2007
6  * Copyright 2005-2007 Tim Niemueller [www.niemueller.de]
7  *
8  ****************************************************************************/
9 
10 /* This program is free software; you can redistribute it and/or modify
11  * it under the terms of the GNU General Public License as published by
12  * the Free Software Foundation; either version 2 of the License, or
13  * (at your option) any later version. A runtime exception applies to
14  * this software (see LICENSE.GPL_WRE file mentioned below for details).
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU Library General Public License for more details.
20  *
21  * Read the full text in the LICENSE.GPL_WRE file in the doc directory.
22  */
23 
24 #ifndef _FIREVISION_CLASSIFIERS_FACES_H_
25 #define _FIREVISION_CLASSIFIERS_FACES_H_
26 
27 #include <fvclassifiers/classifier.h>
28 
29 #include <opencv2/objdetect.hpp>
30 
31 namespace firevision {
32 
34 {
35 public:
36  FacesClassifier(const char * haarcascade_file,
37  unsigned int pixel_width,
38  unsigned int pixel_height,
39  cv::Mat & image,
40  float haar_scale_factor = 1.1,
41  int min_neighbours = 3,
42  int flags = 0);
43 
44  virtual ~FacesClassifier();
45 
46  virtual std::list<ROI> *classify();
47 
48 private:
49  cv::CascadeClassifier cascade_;
50  cv::Mat image_;
51  float haar_scale_factor_;
52  int min_neighbours_;
53  int flags_;
54  bool own_image_;
55 };
56 
57 } // end namespace firevision
58 
59 #endif
Classifier to extract regions of interest.
Definition: classifier.h:36
Faces classifier.
Definition: faces.h:34
FacesClassifier(const char *haarcascade_file, unsigned int pixel_width, unsigned int pixel_height, cv::Mat &image, float haar_scale_factor=1.1, int min_neighbours=3, int flags=0)
Constructor.
Definition: faces.cpp:59
virtual std::list< ROI > * classify()
Classify image.
Definition: faces.cpp:92
virtual ~FacesClassifier()
Destructor.
Definition: faces.cpp:86