|
Fawkes API
Fawkes Development Version
|
Faces classifier. More...
#include <>>

Public Member Functions | |
| 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. | |
| virtual | ~FacesClassifier () |
| Destructor. | |
| virtual std::list< ROI > * | classify () |
| Classify image. | |
Public Member Functions inherited from firevision::Classifier | |
| Classifier (const char *name) | |
| Constructor. | |
| virtual | ~Classifier () |
| Destructor. | |
| virtual void | set_src_buffer (unsigned char *yuv422_planar, unsigned int width, unsigned int height) |
| Set source buffer. | |
| virtual const char * | name () const |
| Get name of classifier. | |
Additional Inherited Members | |
Protected Attributes inherited from firevision::Classifier | |
| unsigned char * | _src |
| Source buffer, encoded as YUV422_PLANAR. | |
| unsigned int | _width |
| Width in pixels of _src buffer. | |
| unsigned int | _height |
| Height in pixels of _src buffer. | |
Faces classifier.
This class provides a classifier that uses OpenCV to detect images in the given image. The faces are reported back as regions of interest. Each ROI is considered to contain a face.
This code is based on the OpenCV example provided and works with the Haar cascade files that come with OpenCV. The code is based on investigations by Stefan Schiffer.
| firevision::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.
| haarcascade_file | Haar cascade file to use |
| pixel_width | width of images that will be processed |
| pixel_height | height of images that will be processed |
| image | Optional image that is used by the classifier. If this image is NULL an internal IplImage is created and the buffer converted. If you need the buffer anyway pass a pointer to this image to do the conversion only once. In that case the classifier assume that the image has already been converted! |
| haar_scale_factor | Haar scale factor |
| min_neighbours | minimum neighbours |
| flags | flags, can only be CV_HAAR_DO_CANNY_PRUNING at the moment. |
|
virtual |
|
virtual |
Classify image.
The current buffer is processed and scanned for the features the classifier has been written and initialized for. It returns a list of disjunct regions of interest.
Implements firevision::Classifier.
Definition at line 107 of file faces.cpp.
References firevision::Classifier::_height, firevision::Classifier::_src, firevision::Classifier::_width, firevision::IplImageAdapter::convert_image_bgr(), and firevision::ROI::num_hint_points.