Fawkes API  Fawkes Development Version
firevision::MultiColorClassifier Class Reference

Simple multi-color classifier. More...

#include <>>

Inheritance diagram for firevision::MultiColorClassifier:

Public Member Functions

 MultiColorClassifier (ScanlineModel *scanline_model, ColorModel *color_model, unsigned int min_num_points=6, unsigned int box_extent=50, bool upward=false, unsigned int neighbourhood_min_match=8, unsigned int grow_by=10)
 Constructor. More...
 
virtual std::list< ROI > * classify ()
 Classify image. More...
 
virtual void get_mass_point_of_color (ROI *roi, fawkes::upoint_t *massPoint)
 Get mass point of primary color. More...
 
- Public Member Functions inherited from firevision::Classifier
 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...
 

Additional Inherited Members

- Protected Attributes inherited from firevision::Classifier
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

Simple multi-color classifier.

Author
Tim Niemueller

Definition at line 38 of file multi_color.h.

Constructor & Destructor Documentation

◆ MultiColorClassifier()

firevision::MultiColorClassifier::MultiColorClassifier ( ScanlineModel scanline_model,
ColorModel color_model,
unsigned int  min_num_points = 6,
unsigned int  box_extent = 50,
bool  upward = false,
unsigned int  neighbourhood_min_match = 8,
unsigned int  grow_by = 10 
)

Constructor.

Parameters
scanline_modelscanline model
color_modelcolor model
min_num_pointsminimum number of points in ROI to be considered
box_extentbasic extent of a new ROI
upwardset to true if you have an upward scanline model, this means that points are traversed from the bottom to the top. In this case the ROIs are initially extended towards the top instead of the bottom.
neighbourhood_min_matchminimum number of object pixels to grow neighbourhood
grow_bygrow region by that many pixels

Definition at line 58 of file multi_color.cpp.

References firevision::Classifier::_height, firevision::Classifier::_src, firevision::Classifier::_width, and firevision::ColorModel::determine().

Member Function Documentation

◆ classify()

std::list< ROI > * firevision::MultiColorClassifier::classify ( )
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

Implements firevision::Classifier.

Definition at line 133 of file multi_color.cpp.

References firevision::Classifier::_height, firevision::Classifier::_src, firevision::Classifier::_width, firevision::ROI::color, firevision::ColorModel::determine(), firevision::ROI::height, firevision::ROI::hint, firevision::ROI::image_height, firevision::ROI::image_width, firevision::ROI::line_step, firevision::ROI::pixel_step, firevision::ROI::start, firevision::ROI::width, fawkes::upoint_t::x, and fawkes::upoint_t::y.

◆ get_mass_point_of_color()

void firevision::MultiColorClassifier::get_mass_point_of_color ( ROI roi,
fawkes::upoint_t massPoint 
)
virtual

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