Fawkes API
Fawkes Development Version
|
#include <>>
Classes | |
struct | color_class_t |
Parameters that define a certain color. More... | |
Public Types | |
typedef struct firevision::ColorModelSimilarity::color_class_t | color_class_t |
Parameters that define a certain color. More... | |
Public Member Functions | |
virtual color_t | determine (unsigned int y, unsigned int u, unsigned int v) const |
Determine the color class of a given YUV value. More... | |
virtual const char * | get_name () |
void | add_color (color_class_t *color_class) |
Add a color to be recognized by this colormodel. More... | |
void | add_colors (std::vector< color_class_t * > color_classes) |
Add multiple colors to this colormodel. More... | |
void | delete_colors () |
Remove all colors from this colormodel. More... | |
![]() | |
virtual | ~ColorModel () |
Virtual empty destructor. More... | |
virtual void | uv_to_image (unsigned char *yuv422_planar_buffer, unsigned int y) |
Create image from color model. More... | |
Matches colors that are similar to given reference colors.
Definition at line 50 of file similarity.h.
typedef struct firevision::ColorModelSimilarity::color_class_t firevision::ColorModelSimilarity::color_class_t |
Parameters that define a certain color.
void firevision::ColorModelSimilarity::add_color | ( | color_class_t * | color_class | ) |
Add a color to be recognized by this colormodel.
color_class | The ColorModelSimilarity::color_class_t that will be returned by ColorModelSimilarity::determine on a match ColorModelSimilarity::color_class_t |
Definition at line 111 of file similarity.cpp.
void firevision::ColorModelSimilarity::add_colors | ( | std::vector< color_class_t * > | color_classes | ) |
Add multiple colors to this colormodel.
color_classes | A list of |
Definition at line 120 of file similarity.cpp.
void firevision::ColorModelSimilarity::delete_colors | ( | ) |
Remove all colors from this colormodel.
Definition at line 128 of file similarity.cpp.
|
virtual |
Determine the color class of a given YUV value.
Color classes have to be defined beforehand with ColorModelSimilarity::add_color. If multiple color classes have been defined, they are tried in reverse order, i.e. the class that has been added last is tried first. We return on the first match, so think of the color classes as a priority list.
y | Luminance (ignored) |
u | Chroma U |
v | Chroma V |
Implements firevision::ColorModel.
Definition at line 73 of file similarity.cpp.
|
virtual |
Get name of color model.
Implements firevision::ColorModel.
Definition at line 57 of file similarity.cpp.