Fawkes API  Fawkes Development Version
firevision::Classifier Class Referenceabstract

#include <>>

Inheritance diagram for firevision::Classifier:

Public Member Functions

 Classifier (const char *name)
 Constructor. More...
 
virtual ~Classifier ()
 Destructor. More...
 
virtual void set_src_buffer (unsigned char *yuv422_planar, unsigned int width, unsigned int height)
 Set source buffer. More...
 
virtual const char * name () const
 Get name of classifier. More...
 
virtual ROIList * classify ()=0
 

Protected Attributes

unsigned char * _src
 Source buffer, encoded as YUV422_PLANAR. More...
 
unsigned int _width
 Width in pixels of _src buffer. More...
 
unsigned int _height
 Height in pixels of _src buffer. More...
 

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 41 of file classifier.h.

Constructor & Destructor Documentation

◆ Classifier()

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

Constructor.

Parameters
nameclassifier name

Definition at line 57 of file classifier.cpp.

◆ ~Classifier()

firevision::Classifier::~Classifier ( )
virtual

Destructor.

Definition at line 66 of file classifier.cpp.

References _height, _src, and _width.

Member Function Documentation

◆ classify()

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::SurfClassifier, firevision::SiftppClassifier, firevision::SiftClassifier, firevision::GradientClassifier, firevision::SimpleColorClassifier, firevision::MultiColorClassifier, and firevision::FacesClassifier.

◆ name()

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

Get name of classifier.

Returns
name of classifier.

Definition at line 90 of file classifier.cpp.

◆ set_src_buffer()

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

Set source buffer.

Parameters
yuv422_planara 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.
widthwidth of buffer in pixels
heightheight of buffer in pixels

Reimplemented in firevision::GradientClassifier.

Definition at line 79 of file classifier.cpp.

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

Member Data Documentation

◆ _height

unsigned int firevision::Classifier::_height
protected

◆ _src

unsigned char* firevision::Classifier::_src
protected

◆ _width

unsigned int firevision::Classifier::_width
protected

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