Fawkes API
Fawkes Development Version
|
Simple multi-color classifier. More...
#include <>>
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. | |
virtual std::list< ROI > * | classify () |
Classify image. | |
virtual void | get_mass_point_of_color (ROI *roi, fawkes::point_t *massPoint) |
Get mass point of primary color. |
Simple multi-color classifier.
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.
scanline_model | scanline model |
color_model | color model |
min_num_points | minimum number of points in ROI to be considered |
box_extent | basic extent of a new ROI |
upward | set 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_match | minimum number of object pixels to grow neighbourhood |
grow_by | grow region by that many pixels |
Definition at line 58 of file multi_color.cpp.
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.
Implements firevision::Classifier.
Definition at line 133 of file multi_color.cpp.
References firevision::Classifier::_src, firevision::ScanlineModel::reset(), firevision::ScanlineModel::finished(), firevision::Classifier::_width, firevision::Classifier::_height, firevision::ColorModel::determine(), firevision::ScanlineModel::get_margin(), firevision::ROI::start, fawkes::point_t::x, fawkes::point_t::y, firevision::ROI::width, firevision::ROI::height, firevision::ROI::hint, firevision::ROI::color, firevision::ROI::line_step, firevision::ROI::pixel_step, firevision::ROI::image_width, and firevision::ROI::image_height.
void firevision::MultiColorClassifier::get_mass_point_of_color | ( | ROI * | roi, |
fawkes::point_t * | massPoint | ||
) | [virtual] |
Get mass point of primary color.
roi | ROI to consider |
massPoint | contains mass point upon return |
Definition at line 299 of file multi_color.cpp.
References fawkes::point_t::x, fawkes::point_t::y, firevision::Classifier::_src, firevision::ROI::start, firevision::ROI::line_step, firevision::ROI::pixel_step, firevision::ROI::image_width, firevision::ROI::image_height, firevision::ROI::height, firevision::ROI::width, firevision::ColorModel::determine(), and firevision::ROI::color.