Fawkes API  Fawkes Development Version
firevision::Classifier Class Referenceabstract

Classifier to extract regions of interest. More...

#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
 Classify image. More...
 

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

Constructor & Destructor Documentation

◆ Classifier()

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

Constructor.

Parameters
nameclassifier name

Definition at line 54 of file classifier.cpp.

References _height, _src, and _width.

◆ ~Classifier()

firevision::Classifier::~Classifier ( )
virtual

Destructor.

Definition at line 64 of file classifier.cpp.

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

◆ name()

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

Get name of classifier.

Returns
name of classifier.

Definition at line 91 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 78 of file classifier.cpp.

References _height, _src, and _width.

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

Member Data Documentation

◆ _height

◆ _src

◆ _width


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