Fawkes API
Fawkes Development Version
|
#include <>>
Public Member Functions | |
virtual | ~Colormap () |
Virtual empty destructor. More... | |
virtual color_t | determine (unsigned int y, unsigned int u, unsigned int v) const =0 |
virtual void | set (unsigned int y, unsigned int u, unsigned int v, color_t c)=0 |
virtual void | reset ()=0 |
virtual void | set (unsigned char *buffer)=0 |
virtual size_t | size ()=0 |
virtual void | to_image (unsigned char *yuv422_planar_buffer, unsigned int level=0) |
Create image from LUT. More... | |
virtual unsigned int | image_height () const |
Height of conversion image. More... | |
virtual unsigned int | image_width () const |
Width of conversion image. More... | |
virtual unsigned char * | get_buffer () const =0 |
virtual Colormap & | operator+= (const Colormap &cmlt)=0 |
virtual Colormap & | operator+= (const char *filename)=0 |
virtual unsigned int | width () const =0 |
virtual unsigned int | height () const =0 |
virtual unsigned int | depth () const =0 |
virtual unsigned int | deepness () const =0 |
virtual std::list< ColormapFileBlock * > | get_blocks ()=0 |
Colormap interface. This C++ pure virtual class describes the interface to a generic colormap. It is currently tailored to the YUV colorspace.
Definition at line 40 of file colormap.h.
|
virtual |
Virtual empty destructor.
Definition at line 112 of file colormap.cpp.
References image_height(), and image_width().
|
pure virtual |
Get deepness of colormap. The deepness is the maximum value of depth().
Implemented in firevision::YuvColormap.
Referenced by ColormapViewerWidget::set_colormap().
|
pure virtual |
Get depth of colormap.
Implemented in firevision::YuvColormap.
Referenced by ColorTrainWidget::load_colormap(), and FireVisionNetworkTool::set_colormap().
|
pure virtual |
Determine color class for given YUV value.
y | Y value from YUV colorspace |
u | U value from YUV colorspace |
v | V value from YUV colorspace |
Implemented in firevision::YuvColormap.
|
pure virtual |
Get file blocks for this colormap.
Implemented in firevision::YuvColormap.
|
pure virtual |
Get the raw buffer of this colormap.
Implemented in firevision::YuvColormap.
Referenced by FireVisionNetworkTool::set_colormap().
|
pure virtual |
Get height of colormap.
Implemented in firevision::YuvColormap.
Referenced by ColorTrainWidget::load_colormap(), and FireVisionNetworkTool::set_colormap().
|
virtual |
Height of conversion image.
The buffer passed into to_image() must have the returned width.
Definition at line 187 of file colormap.cpp.
Referenced by ~Colormap().
|
virtual |
Width of conversion image.
The buffer passed into to_image() must have the returned width.
Definition at line 177 of file colormap.cpp.
Referenced by ~Colormap().
|
pure virtual |
Convenience method for the method above. This adds the colormap as in the above method but instead of an instantiated colormap it takes the path to a colormap file which is loaded and added.
filename | file name of colormap to add |
Implemented in firevision::YuvColormap.
Adds the given colormap to this colormap. This operator takes the given colormap and compares it to this colormap. If this colormap has C_OTHER or C_BACKGROUND the value is compied from the other LUT, otherwise the value is kept as is.
cmlt | other colormap to add |
Implemented in firevision::YuvColormap.
|
pure virtual |
Reset colormap. Resets all values to return C_UNKNOWN for every query with determine().
Implemented in firevision::YuvColormap.
|
pure virtual |
Set to the given raw buffer.
buffer | buffer to copy data from |
Implemented in firevision::YuvColormap.
|
pure virtual |
Set color class for given YUV value.
y | Y value from YUV colorspace |
u | U value from YUV colorspace |
v | V value from YUV colorspace |
c | class for the given YUV color |
Implemented in firevision::YuvColormap.
|
pure virtual |
Size in bytes of buffer returned by get_buffer().
Implemented in firevision::YuvColormap.
|
virtual |
Create image from LUT.
Create image from LUT, useful for debugging and analysing. This method produces a representation of the given level (Y range with 0 <= level < depth) for visual inspection of the colormap. The dimensions of the resulting image are 512x512 pixels. It uses standard strong colors for the different standard color classes. C_UNKNOWN is grey, C_BACKGROUND is black (like C_BLACK). If the standard method does not suit your needs you can override this method.
yuv422_planar_buffer | contains the image upon return, must be initialized with the appropriate memory size before calling, dimensions are 512x512 pixels. |
level | the level to draw, it's a range in the Y direction and is in the range 0 <= level < depth. |
Definition at line 130 of file colormap.cpp.
|
pure virtual |
Get width of colormap.
Implemented in firevision::YuvColormap.
Referenced by ColorTrainWidget::load_colormap(), and FireVisionNetworkTool::set_colormap().