Fawkes API
Fawkes Development Version
|
Detect configurable shades/hues of "black" as a cuboid in YUV space. More...
#include <>>
Public Member Functions | |
ColorModelBlack (unsigned int y_thresh=30, unsigned int u_thresh=30, unsigned int v_thresh=30, unsigned int ref_u=128, unsigned int ref_v=128) | |
Initialize black colormodel. More... | |
color_t | determine (unsigned int y, unsigned int u, unsigned int v) const |
Determine classification of YUV pixel. More... | |
const char * | get_name () |
Get name of color model. 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... | |
Detect configurable shades/hues of "black" as a cuboid in YUV space.
Definition at line 26 of file thresholds_black.h.
firevision::ColorModelBlack::ColorModelBlack | ( | unsigned int | y_thresh = 30 , |
unsigned int | u_thresh = 30 , |
||
unsigned int | v_thresh = 30 , |
||
unsigned int | ref_u = 128 , |
||
unsigned int | ref_v = 128 |
||
) |
Initialize black colormodel.
The Y reference component is always 0, i.e. the accepted cuboid extends from Y=0 to Y=y_thresh, by u_thresh around ref_u, and by v_thresh around ref_v.
y_thresh | maximum brightness |
u_thresh | maximum difference from ref_u |
v_thresh | maximum difference from ref_v |
ref_u | U component of the "black" reference color (default 128) |
ref_v | V component of the "black" reference color (default 128) |
Definition at line 39 of file thresholds_black.cpp.
|
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 |
Implements firevision::ColorModel.
Definition at line 48 of file thresholds_black.cpp.
|
virtual |
Get name of color model.
Implements firevision::ColorModel.
Definition at line 70 of file thresholds_black.cpp.