Fawkes API  Fawkes Development Version
firevision::ColorModel Class Referenceabstract

#include <>>

Inheritance diagram for firevision::ColorModel:

Public Member Functions

virtual ~ColorModel ()
 Virtual empty destructor. More...
 
virtual color_t determine (unsigned int y, unsigned int u, unsigned int v) const =0
 
virtual const char * get_name ()=0
 
virtual void uv_to_image (unsigned char *yuv422_planar_buffer, unsigned int y)
 Create image from color model. More...
 

Detailed Description

Color model interface. This interface defines the API for color models.

Definition at line 35 of file colormodel.h.

Constructor & Destructor Documentation

◆ ~ColorModel()

firevision::ColorModel::~ColorModel ( )
virtual

Virtual empty destructor.

Definition at line 56 of file colormodel.cpp.

Member Function Documentation

◆ determine()

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

Parameters
yY value
uU value
vV value
Returns
color classification

Implemented in firevision::ColorModelThresholds, firevision::ColorModelSimilarity, firevision::ColorModelLookupTable, firevision::ColorModelLuminance, and firevision::ColorModelBlack.

Referenced by firevision::FilterScanlineSegmentation::apply().

◆ get_name()

const char * firevision::ColorModel::get_name ( )
pure virtual

Get name of color model.

Returns
name of color model.
Author
Tim Niemueller

Implemented in firevision::ColorModelThresholds, firevision::ColorModelSimilarity, firevision::ColorModelLookupTable, firevision::ColorModelLuminance, and firevision::ColorModelBlack.

◆ uv_to_image()

void firevision::ColorModel::uv_to_image ( unsigned char *  yuv422_planar_buffer,
unsigned int  y 
)
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.

Parameters
yuv422_planar_buffercontains the image upon return, must be initialized with the appropriate memory size before calling, dimensions are 512x512 pixels.
yBrightness value of the color

Definition at line 73 of file colormodel.cpp.


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