Fawkes API  Fawkes Development Version
firevision::ColorModelBlack Class Reference

Detect configurable shades/hues of "black" as a cuboid in YUV space. More...

#include <>>

Inheritance diagram for firevision::ColorModelBlack:

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...
 
- Public Member Functions inherited from firevision::ColorModel
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...
 

Detailed Description

Detect configurable shades/hues of "black" as a cuboid in YUV space.

Definition at line 26 of file thresholds_black.h.

Constructor & Destructor Documentation

◆ ColorModelBlack()

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.

Parameters
y_threshmaximum brightness
u_threshmaximum difference from ref_u
v_threshmaximum difference from ref_v
ref_uU component of the "black" reference color (default 128)
ref_vV component of the "black" reference color (default 128)

Definition at line 39 of file thresholds_black.cpp.

Member Function Documentation

◆ determine()

color_t firevision::ColorModelBlack::determine ( unsigned int  y,
unsigned int  u,
unsigned int  v 
) const
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.

Parameters
yY value
uU value
vV value
Returns
color classification

Implements firevision::ColorModel.

Definition at line 48 of file thresholds_black.cpp.

◆ get_name()

const char * firevision::ColorModelBlack::get_name ( )
virtual

Get name of color model.

Returns
name of color model.
Author
Tim Niemueller

Implements firevision::ColorModel.

Definition at line 70 of file thresholds_black.cpp.


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