Image Component Library (ICL)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Types | Public Member Functions | Private Attributes
icl::io::ColorFormatDecoder Class Reference

The ColorFormatDecoder allows for easy conversion of special color formats to RGB. More...

#include <ColorFormatDecoder.h>

List of all members.

Public Types

typedef void(* decoder_func )(const icl8u *, const utils::Size &, core::ImgBase **, std::vector< icl8u > *)

Public Member Functions

 ColorFormatDecoder ()
 create a new instance
 ~ColorFormatDecoder ()
 Destructor.
bool supports (FourCC fourcc)
 return whether a given core::format is supported
void decode (FourCC fourcc, const icl8u *data, const utils::Size &size, core::ImgBase **dst)
 decodes a given data range to RGB
const core::ImgBasedecode (FourCC fourcc, const icl8u *data, const utils::Size &size)
 decode, but use the internal buffer as output

Private Attributes

std::vector< icl8um_buffer
 internal buffer
std::map< icl32u, decoder_funcm_functions
 internal lookup for conversion functions
core::ImgBasem_dstBuf
 optionally used output buffer

Detailed Description

The ColorFormatDecoder allows for easy conversion of special color formats to RGB.

If a capturing device does not support to provide RGB image directly, this Decoder is usually used to convert the compressed image data into a simple planar RGB image (core::Img8u). However, also other output core::depth value are supported.
The decoding routine, is chosen by analyising the source data based on its fourcc color code (see: http://en.wikipedia.org/wiki/FourCC and http://v4l2spec.bytesex.org/spec/c2030.htm for more details)

Example

For supporting the Myrmex Tactile Device, we added an extra FourCC code called "MYRM".

See also:
FourCC

Member Typedef Documentation

typedef void(* icl::io::ColorFormatDecoder::decoder_func)(const icl8u *, const utils::Size &, core::ImgBase **, std::vector< icl8u > *)

Constructor & Destructor Documentation

create a new instance

Destructor.


Member Function Documentation

void icl::io::ColorFormatDecoder::decode ( FourCC  fourcc,
const icl8u data,
const utils::Size size,
core::ImgBase **  dst 
)

decodes a given data range to RGB

const core::ImgBase* icl::io::ColorFormatDecoder::decode ( FourCC  fourcc,
const icl8u data,
const utils::Size size 
) [inline]

decode, but use the internal buffer as output

bool icl::io::ColorFormatDecoder::supports ( FourCC  fourcc) [inline]

return whether a given core::format is supported


Member Data Documentation

internal buffer

optionally used output buffer

internal lookup for conversion functions


The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines