Fawkes API
Fawkes Development Version
|
Color model interface. More...
#include <>>
Public Member Functions | |
virtual | ~ColorModel () |
Virtual empty destructor. More... | |
virtual color_t | determine (unsigned int y, unsigned int u, unsigned int v) const =0 |
Determine classification of YUV pixel. More... | |
virtual const char * | get_name ()=0 |
Get name of color model. More... | |
virtual void | uv_to_image (unsigned char *yuv422_planar_buffer, unsigned int y) |
Create image from color model. More... | |
Color model interface.
This interface defines the API for color models.
Definition at line 34 of file colormodel.h.
|
virtual |
Virtual empty destructor.
Definition at line 55 of file colormodel.cpp.
|
pure virtual |
Determine classification of YUV pixel.
Given a pixel in the YUV colorspace the colormodel determines the color classification based on some a-priori knowledge.
y | Y value |
u | U value |
v | V value |
Implemented in firevision::ColorModelThresholds, firevision::ColorModelLookupTable, firevision::ColorModelLuminance, firevision::ColorModelSimilarity, and firevision::ColorModelBlack.
Referenced by firevision::FilterColorSegmentation::apply(), firevision::FilterHSearch::apply(), firevision::FilterSegment::apply(), firevision::FilterScanlineSegmentation::apply(), firevision::FilterHVSearch::apply(), firevision::MultiColorClassifier::classify(), firevision::SimpleColorClassifier::classify(), firevision::MultiColorClassifier::get_mass_point_of_color(), firevision::SimpleColorClassifier::get_mass_point_of_color(), firevision::MultiColorClassifier::MultiColorClassifier(), firevision::SimpleColorClassifier::SimpleColorClassifier(), and uv_to_image().
|
pure virtual |
Get name of color model.
Implemented in firevision::ColorModelThresholds, firevision::ColorModelLuminance, firevision::ColorModelLookupTable, firevision::ColorModelSimilarity, and firevision::ColorModelBlack.
|
virtual |
Create image from color model.
Create image from color model, useful for debugging and analysing. This method produces a representation of the color model for the full U/V plane at the given value of Y for visual inspection of the colormap. The dimensions of the resulting image are 512x512 pixels. It uses strong colors as defined by ColorObjectMap. Color models may override this method, but they must produce a 512x512 YUV422_PLANAR image.
yuv422_planar_buffer | contains the image upon return, must be initialized with the appropriate memory size before calling, dimensions are 512x512 pixels. |
y | Brightness value of the color |
Definition at line 73 of file colormodel.cpp.
References determine(), firevision::ColorObjectMap::get_color(), firevision::YUV_t_struct::U, firevision::YUV_t_struct::V, and firevision::YUV_t_struct::Y.