Classifier Class Reference

Classifier to extract regions of interest. More...

#include <classifiers/classifier.h>

Inheritance diagram for Classifier:

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 ROIList * classify ()=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 32 of file classifier.h.


Constructor & Destructor Documentation

Classifier::Classifier ( const char *  name  ) 

Constructor.

Parameters:
name classifier name

Definition at line 49 of file classifier.cpp.

References _height, _src, and _width.

Classifier::~Classifier (  )  [virtual]

Destructor.

Definition at line 59 of file classifier.cpp.


Member Function Documentation

std::list< ROI > * 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 FacesClassifier, GradientClassifier, SiftClassifier, SiftppClassifier, SimpleColorClassifier, and SurfClassifier.

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

Get name of classifier.

Returns:
name of classifier.

Definition at line 86 of file classifier.cpp.

void 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 GradientClassifier.

Definition at line 73 of file classifier.cpp.

References _height, _src, and _width.


Member Data Documentation


The documentation for this class was generated from the following files: