libcvd
Classes | Functions
CVD::ColourSpace Namespace Reference

Internal colourspace conversions. More...

Classes

struct  bayer_sample_bggr
 
struct  bayer_sample_gbrg
 
struct  bayer_sample_grbg
 
struct  bayer_sample_rggb
 
struct  read_host_byteorder
 
struct  read_net_byteorder
 
struct  read_net_byteorder< unsigned short >
 

Functions

void yuv411_to_rgb (const unsigned char *yuv411, int npix, unsigned char *out)
 Convert YUV 411 pixel data to RGB. More...
 
void yuv411_to_y (const unsigned char *yuv411, int npix, unsigned char *out)
 Convert YUV 411 pixel data to Y only. More...
 
void yuv411_to_rgb_y (const unsigned char *yuv411, int npix, unsigned char *outc, unsigned char *outy)
 Convert YUV 411 pixel data to Y and RGB. More...
 
void yuv422_to_rgb (const unsigned char *yuv, unsigned char *rgb, unsigned int width, unsigned int height)
 Convert yuv422 to rgb444. More...
 
void yuv422_to_grey (const unsigned char *yuv, unsigned char *grey, unsigned int width, unsigned int height)
 Convert yuv422 to grey. More...
 
void yuv420p_to_rgb (const unsigned char *y, const unsigned char *u, const unsigned char *v, unsigned char *rgb, unsigned int width, unsigned int rowpairs)
 Convert yuv420 planar to rgb444. More...
 
void yuv420p_to_grey (const unsigned char *y, const unsigned char *u, const unsigned char *v, unsigned char *grey, unsigned int width, unsigned int height)
 Convert yuv420 planar to grey. More...
 
void vuy422_to_rgb (const unsigned char *yuv, unsigned char *rgb, unsigned int width, unsigned int height)
 Convert vuy422 to rgb444. More...
 
void vuy422_to_grey (const unsigned char *yuv, unsigned char *grey, unsigned int width, unsigned int height)
 Convert yuv422 to grey. More...
 
template<typename T , class SAMPLER >
void bayer_to_rgb (const T *bggr, int bggr_stride, T *rgb, int rgb_stride, unsigned int width, unsigned int height)
 
template<class T >
cie (T *c)
 
template<class T , class SAMPLER >
void bayer_to_grey (const T *bggr, int bggr_stride, T *grey, int grey_stride, unsigned int width, unsigned int height)
 
template<class B , class P , template< class, class > class Sampler, template< class > class ByteOrder>
void convert_bayer_to_rgb (const BasicImage< B > &bayer, BasicImage< Rgb< P >> &out)
 
template<class B , class P , template< class, class > class Sampler, template< class > class ByteOrder>
void convert_bayer_to_grey (const BasicImage< B > &bayer, BasicImage< P > &out)
 

Detailed Description

Internal colourspace conversions.

Function Documentation

◆ vuy422_to_grey()

void CVD::ColourSpace::vuy422_to_grey ( const unsigned char *  yuv,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert yuv422 to grey.

Parameters
yuvThe vuy422 data: uyvyuyvy....
greyThe output data
widthThe width of the image
heightThe height of the image

◆ vuy422_to_rgb()

void CVD::ColourSpace::vuy422_to_rgb ( const unsigned char *  yuv,
unsigned char *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert vuy422 to rgb444.

Parameters
yuvThe vuy422 data: uyvyuyvy....
rgbThe output data
widthThe width of the image
heightThe height of the image

◆ yuv411_to_rgb()

void CVD::ColourSpace::yuv411_to_rgb ( const unsigned char *  yuv411,
int  npix,
unsigned char *  out 
)

Convert YUV 411 pixel data to RGB.

Parameters
yuv411The input data
npixThe number of pixels
outThe output data

◆ yuv411_to_rgb_y()

void CVD::ColourSpace::yuv411_to_rgb_y ( const unsigned char *  yuv411,
int  npix,
unsigned char *  outc,
unsigned char *  outy 
)

Convert YUV 411 pixel data to Y and RGB.

Parameters
yuv411The input data
npixThe number of pixels
outccolour output data
outyluma output data

◆ yuv411_to_y()

void CVD::ColourSpace::yuv411_to_y ( const unsigned char *  yuv411,
int  npix,
unsigned char *  out 
)

Convert YUV 411 pixel data to Y only.

Parameters
yuv411The input data
npixThe number of pixels
outThe output data

◆ yuv420p_to_grey()

void CVD::ColourSpace::yuv420p_to_grey ( const unsigned char *  y,
const unsigned char *  u,
const unsigned char *  v,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert yuv420 planar to grey.

Parameters
yThe y plane: one byte per pixel
uThe u plane: one byte per 2 pixel square
vThe v plane: one byte per 2 pixel square
greyThe output data
widthThe width of the image
heightThe height of the image

◆ yuv420p_to_rgb()

void CVD::ColourSpace::yuv420p_to_rgb ( const unsigned char *  y,
const unsigned char *  u,
const unsigned char *  v,
unsigned char *  rgb,
unsigned int  width,
unsigned int  rowpairs 
)

Convert yuv420 planar to rgb444.

Parameters
yThe y plane: one byte per pixel
uThe u plane: one byte per 2 pixel square
vThe v plane: one byte per 2 pixel square
rgbThe output data
widthThe width of the image
rowpairsThe number of rows pairs (i.e., height/2) in the image

◆ yuv422_to_grey()

void CVD::ColourSpace::yuv422_to_grey ( const unsigned char *  yuv,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert yuv422 to grey.

Parameters
yuvThe yuv422 data: yuyvyuyv....
greyThe output data
widthThe width of the image
heightThe height of the image

◆ yuv422_to_rgb()

void CVD::ColourSpace::yuv422_to_rgb ( const unsigned char *  yuv,
unsigned char *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert yuv422 to rgb444.

Parameters
yuvThe yuv422 data: yuyvyuyv....
rgbThe output data
widthThe width of the image
heightThe height of the image