firevision::Classifier Class Reference

Classifier to extract regions of interest. More...

#include <classifiers/classifier.h>

Inheritance diagram for firevision::Classifier:

[legend]
List of all members.

Public Member Functions

 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.
virtual ROIListclassify ()=0
 Classify image.

Protected Attributes

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.

Detailed Description

Classifier to extract regions of interest.

The classifier finds regions of interest (ROI) by some a priori knowledge like known colors or shapes. The list of ROIs returned by classify() _must_ be disjunct, meaning that no ROIs overlap each other. Do appropriate merging or shrinking of the ROIs. See the ReallySimpleClassifier for an example.

Author:
Tim Niemueller

Definition at line 37 of file classifier.h.


Constructor & Destructor Documentation

firevision::Classifier::Classifier ( const char *  name  ) 

Constructor.

Parameters:
name classifier name

Definition at line 54 of file classifier.cpp.

References _height, _src, and _width.

firevision::Classifier::~Classifier (  )  [virtual]

Destructor.

Definition at line 64 of file classifier.cpp.


Member Function Documentation

std::list< ROI > * firevision::Classifier::classify (  )  [pure 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.

Returns:
disjunct list of extracted regions of interest

Implemented in firevision::FacesClassifier, firevision::GradientClassifier, firevision::SiftClassifier, firevision::SiftppClassifier, firevision::SimpleColorClassifier, and firevision::SurfClassifier.

const char * firevision::Classifier::name (  )  const [virtual]

Get name of classifier.

Returns:
name of classifier.

Definition at line 91 of file classifier.cpp.

void firevision::Classifier::set_src_buffer ( unsigned char *  yuv422_planar,
unsigned int  width,
unsigned int  height 
) [virtual]

Set source buffer.

Parameters:
yuv422_planar a YUV422 planar buffer with the source image to classify. The classifier may NOT modify the image in any way. If that is required the classifier shall make a copy of the image.
width width of buffer in pixels
height height of buffer in pixels

Reimplemented in firevision::GradientClassifier.

Definition at line 78 of file classifier.cpp.

References _height, _src, and _width.

Referenced by firevision::GradientClassifier::set_src_buffer().


Member Data Documentation

unsigned int firevision::Classifier::_height [protected]

Height in pixels of _src buffer.

Definition at line 56 of file classifier.h.

Referenced by Classifier(), firevision::SurfClassifier::classify(), firevision::SimpleColorClassifier::classify(), firevision::SiftppClassifier::classify(), firevision::SiftClassifier::classify(), firevision::FacesClassifier::classify(), and set_src_buffer().

unsigned char* firevision::Classifier::_src [protected]

Source buffer, encoded as YUV422_PLANAR.

Definition at line 52 of file classifier.h.

Referenced by Classifier(), firevision::SurfClassifier::classify(), firevision::SimpleColorClassifier::classify(), firevision::SiftppClassifier::classify(), firevision::SiftClassifier::classify(), firevision::FacesClassifier::classify(), firevision::SimpleColorClassifier::get_mass_point_of_ball(), and set_src_buffer().

unsigned int firevision::Classifier::_width [protected]

Width in pixels of _src buffer.

Definition at line 54 of file classifier.h.

Referenced by Classifier(), firevision::SurfClassifier::classify(), firevision::SimpleColorClassifier::classify(), firevision::SiftppClassifier::classify(), firevision::SiftClassifier::classify(), firevision::FacesClassifier::classify(), and set_src_buffer().


The documentation for this class was generated from the following files:
Generated on Tue Feb 22 13:32:58 2011 for Fawkes API by  doxygen 1.4.7