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 struct CvHaarClassifierCascade;
30 struct CvMemStorage;
31 typedef struct _IplImage IplImage;
32 
33 namespace firevision {
34 
36 {
37 public:
38  FacesClassifier(const char * haarcascade_file,
39  unsigned int pixel_width,
40  unsigned int pixel_height,
41  IplImage * image = 0,
42  float haar_scale_factor = 1.1,
43  int min_neighbours = 3,
44  int flags = 0);
45 
46  virtual ~FacesClassifier();
47 
48  virtual std::list<ROI> *classify();
49 
50 private:
51  CvHaarClassifierCascade *cascade_;
52  CvMemStorage * storage_;
53  IplImage * image_;
54  float haar_scale_factor_;
55  int min_neighbours_;
56  int flags_;
57  bool own_image_;
58 };
59 
60 } // end namespace firevision
61 
62 #endif
firevision::Classifier
Classifier to extract regions of interest.
Definition: classifier.h:36
firevision::FacesClassifier::FacesClassifier
FacesClassifier(const char *haarcascade_file, unsigned int pixel_width, unsigned int pixel_height, IplImage *image=0, float haar_scale_factor=1.1, int min_neighbours=3, int flags=0)
Constructor.
Definition: faces.cpp:60
firevision::FacesClassifier
Faces classifier.
Definition: faces.h:36
firevision::FacesClassifier::classify
virtual std::list< ROI > * classify()
Classify image.
Definition: faces.cpp:104
firevision::FacesClassifier::~FacesClassifier
virtual ~FacesClassifier()
Destructor.
Definition: faces.cpp:94