Color space conversions and related functions. More...
#include "vidl_pixel_format.h"
#include <vcl_cstring.h>
#include <vcl_typeinfo.h>
#include <vcl_cassert.h>
Go to the source code of this file.
Classes | |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_MONO, VIDL_PIXEL_COLOR_MONO > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGB, VIDL_PIXEL_COLOR_RGB > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGBA, VIDL_PIXEL_COLOR_RGBA > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGBA, VIDL_PIXEL_COLOR_RGB > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGB, VIDL_PIXEL_COLOR_RGBA > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_YUV, VIDL_PIXEL_COLOR_YUV > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGB, VIDL_PIXEL_COLOR_YUV > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGBA, VIDL_PIXEL_COLOR_YUV > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_YUV, VIDL_PIXEL_COLOR_RGB > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_YUV, VIDL_PIXEL_COLOR_RGBA > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_YUV, VIDL_PIXEL_COLOR_MONO > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_MONO, VIDL_PIXEL_COLOR_YUV > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGB, VIDL_PIXEL_COLOR_MONO > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_RGBA, VIDL_PIXEL_COLOR_MONO > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_MONO, VIDL_PIXEL_COLOR_RGB > |
struct | vidl_color_converter< VIDL_PIXEL_COLOR_MONO, VIDL_PIXEL_COLOR_RGBA > |
struct | vidl_color_component< FMT > |
Component color encoding. More... | |
struct | vidl_color_component< VIDL_PIXEL_FORMAT_BGR_24 > |
struct | vidl_color_component< VIDL_PIXEL_FORMAT_RGB_555 > |
struct | vidl_color_component< VIDL_PIXEL_FORMAT_RGB_565 > |
struct | vidl_color_component< VIDL_PIXEL_FORMAT_UYV_444 > |
Typedefs | |
typedef void(* | vidl_color_conv_fptr )(const vxl_byte *in, vxl_byte *out) |
Define the function pointer for pixel format conversion functions. | |
Functions | |
void | vidl_type_convert (const vxl_byte &in, bool &out) |
void | vidl_type_convert (const vxl_uint_16 &in, bool &out) |
void | vidl_type_convert (const bool &in, vxl_byte &out) |
void | vidl_type_convert (const bool &in, vxl_uint_16 &out) |
void | vidl_type_convert (const vxl_byte &in, vxl_uint_16 &out) |
void | vidl_type_convert (const vxl_uint_16 &in, vxl_byte &out) |
void | vidl_type_convert (const vxl_byte &in, vxl_ieee_32 &out) |
void | vidl_type_convert (const vxl_uint_16 &in, vxl_ieee_32 &out) |
void | vidl_type_convert (const bool &in, vxl_ieee_32 &out) |
void | vidl_type_convert (const vxl_ieee_32 &in, vxl_byte &out) |
void | vidl_type_convert (const vxl_ieee_32 &in, vxl_uint_16 &out) |
void | vidl_type_convert (const vxl_ieee_32 &in, bool &out) |
void | vidl_type_convert (const vxl_byte &in, vxl_ieee_64 &out) |
void | vidl_type_convert (const vxl_uint_16 &in, vxl_ieee_64 &out) |
void | vidl_type_convert (const bool &in, vxl_ieee_64 &out) |
void | vidl_type_convert (const vxl_ieee_64 &in, vxl_byte &out) |
void | vidl_type_convert (const vxl_ieee_64 &in, vxl_uint_16 &out) |
void | vidl_type_convert (const vxl_ieee_64 &in, bool &out) |
template<class inT , class outT > | |
void | vidl_type_convert (const inT &in, outT &out) |
template<class outT > | |
void | vidl_color_convert_yuv2rgb (double y, double u, double v, double &r, double &g, double &b) |
void | vidl_color_convert_yuv2rgb (vxl_byte y, vxl_byte u, vxl_byte v, double &r, double &g, double &b) |
void | vidl_color_convert_yuv2rgb (vxl_byte y, vxl_byte u, vxl_byte v, vxl_byte &r, vxl_byte &g, vxl_byte &b) |
faster integer-based conversion from YUV to RGB. | |
void | vidl_color_convert_rgb2yuv (double r, double g, double b, double &y, double &u, double &v) |
void | vidl_color_convert_rgb2yuv (double r, double g, double b, vxl_byte &y, vxl_byte &u, vxl_byte &v) |
void | vidl_color_convert_rgb2yuv (vxl_byte r, vxl_byte g, vxl_byte b, vxl_byte &y, vxl_byte &u, vxl_byte &v) |
faster integer-based conversion from RGB to YUV. | |
vidl_color_conv_fptr | vidl_color_converter_func (vidl_pixel_color in_C, const vcl_type_info &in_type, vidl_pixel_color out_C, const vcl_type_info &out_type) |
Returns a color conversion function based on runtime values. |
typedef void(* vidl_color_conv_fptr)(const vxl_byte *in, vxl_byte *out) |
Define the function pointer for pixel format conversion functions.
Definition at line 215 of file vidl_color.h.
void vidl_color_convert_rgb2yuv | ( | double | r, |
double | g, | ||
double | b, | ||
double & | y, | ||
double & | u, | ||
double & | v | ||
) | [inline] |
Definition at line 171 of file vidl_color.h.
void vidl_color_convert_rgb2yuv | ( | double | r, |
double | g, | ||
double | b, | ||
vxl_byte & | y, | ||
vxl_byte & | u, | ||
vxl_byte & | v | ||
) | [inline] |
Definition at line 181 of file vidl_color.h.
void vidl_color_convert_rgb2yuv | ( | vxl_byte | r, |
vxl_byte | g, | ||
vxl_byte | b, | ||
vxl_byte & | y, | ||
vxl_byte & | u, | ||
vxl_byte & | v | ||
) | [inline] |
faster integer-based conversion from RGB to YUV.
Based on conversion used in libdc1394
Definition at line 195 of file vidl_color.h.
void vidl_color_convert_yuv2rgb | ( | double | y, |
double | u, | ||
double | v, | ||
double & | r, | ||
double & | g, | ||
double & | b | ||
) | [inline] |
Definition at line 130 of file vidl_color.h.
void vidl_color_convert_yuv2rgb | ( | vxl_byte | y, |
vxl_byte | u, | ||
vxl_byte | v, | ||
double & | r, | ||
double & | g, | ||
double & | b | ||
) | [inline] |
Definition at line 140 of file vidl_color.h.
void vidl_color_convert_yuv2rgb | ( | vxl_byte | y, |
vxl_byte | u, | ||
vxl_byte | v, | ||
vxl_byte & | r, | ||
vxl_byte & | g, | ||
vxl_byte & | b | ||
) | [inline] |
faster integer-based conversion from YUV to RGB.
Based on conversion used in libdc1394
Definition at line 154 of file vidl_color.h.
vidl_color_conv_fptr vidl_color_converter_func | ( | vidl_pixel_color | in_C, |
const vcl_type_info & | in_type, | ||
vidl_pixel_color | out_C, | ||
const vcl_type_info & | out_type | ||
) |
Returns a color conversion function based on runtime values.
The function returned is always a vidl_color_conv_fptr which converts const vxl_byte* to vxl_byte*. Some of these function may actually reinterpret the data as other types (i.e. bool* or vxl_uint_16*) via reinterpret_cast
Definition at line 184 of file vidl_color.cxx.
void vidl_type_convert | ( | const vxl_byte & | in, |
bool & | out | ||
) | [inline] |
Definition at line 26 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_uint_16 & | in, |
bool & | out | ||
) | [inline] |
Definition at line 31 of file vidl_color.h.
void vidl_type_convert | ( | const bool & | in, |
vxl_byte & | out | ||
) | [inline] |
Definition at line 36 of file vidl_color.h.
void vidl_type_convert | ( | const bool & | in, |
vxl_uint_16 & | out | ||
) | [inline] |
Definition at line 41 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_byte & | in, |
vxl_uint_16 & | out | ||
) | [inline] |
Definition at line 46 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_uint_16 & | in, |
vxl_byte & | out | ||
) | [inline] |
Definition at line 51 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_byte & | in, |
vxl_ieee_32 & | out | ||
) | [inline] |
Definition at line 56 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_uint_16 & | in, |
vxl_ieee_32 & | out | ||
) | [inline] |
Definition at line 61 of file vidl_color.h.
void vidl_type_convert | ( | const bool & | in, |
vxl_ieee_32 & | out | ||
) | [inline] |
Definition at line 66 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_ieee_32 & | in, |
vxl_byte & | out | ||
) | [inline] |
Definition at line 71 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_ieee_32 & | in, |
vxl_uint_16 & | out | ||
) | [inline] |
Definition at line 76 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_ieee_32 & | in, |
bool & | out | ||
) | [inline] |
Definition at line 81 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_byte & | in, |
vxl_ieee_64 & | out | ||
) | [inline] |
Definition at line 86 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_uint_16 & | in, |
vxl_ieee_64 & | out | ||
) | [inline] |
Definition at line 91 of file vidl_color.h.
void vidl_type_convert | ( | const bool & | in, |
vxl_ieee_64 & | out | ||
) | [inline] |
Definition at line 96 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_ieee_64 & | in, |
vxl_byte & | out | ||
) | [inline] |
Definition at line 101 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_ieee_64 & | in, |
vxl_uint_16 & | out | ||
) | [inline] |
Definition at line 106 of file vidl_color.h.
void vidl_type_convert | ( | const vxl_ieee_64 & | in, |
bool & | out | ||
) | [inline] |
Definition at line 111 of file vidl_color.h.
void vidl_type_convert | ( | const inT & | in, |
outT & | out | ||
) | [inline] |
Definition at line 117 of file vidl_color.h.