CVD 0.8
Functions
CVD::ColourSpace Namespace Reference

Internal colourspace conversions. More...

Functions

void yuv411_to_rgb (const unsigned char *yuv411, int npix, unsigned char *out)
void yuv411_to_y (const unsigned char *yuv411, int npix, unsigned char *out)
void yuv411_to_rgb_y (const unsigned char *yuv411, int npix, unsigned char *outc, unsigned char *outy)
void bayer_to_grey_bggr (const unsigned char *bggr, unsigned char *grey, unsigned int width, unsigned int height)
void bayer_to_grey_gbrg (const unsigned char *gbrg, unsigned char *grey, unsigned int width, unsigned int height)
void bayer_to_grey_grbg (const unsigned char *grbg, unsigned char *grey, unsigned int width, unsigned int height)
void bayer_to_grey_rggb (const unsigned char *rggb, unsigned char *grey, unsigned int width, unsigned int height)
void bayer_to_rgb_bggr (const unsigned char *bggr, unsigned char *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_gbrg (const unsigned char *gbrg, unsigned char *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_grbg (const unsigned char *grbg, unsigned char *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_rggb (const unsigned char *rggb, unsigned char *rgb, unsigned int width, unsigned int height)
void bayer_to_grey_bggr (const unsigned short *bggr, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_grey_gbrg (const unsigned short *gbrg, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_grey_grbg (const unsigned short *grbg, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_grey_rggb (const unsigned short *rggb, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_rgb_bggr (const unsigned short *bggr, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_gbrg (const unsigned short *gbrg, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_grbg (const unsigned short *grbg, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_rggb (const unsigned short *rggb, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_grey_bggr_be (const unsigned short *bggr, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_grey_gbrg_be (const unsigned short *gbrg, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_grey_grbg_be (const unsigned short *grbg, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_grey_rggb_be (const unsigned short *rggb, unsigned short *grey, unsigned int width, unsigned int height)
void bayer_to_rgb_bggr_be (const unsigned short *bggr, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_gbrg_be (const unsigned short *gbrg, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_grbg_be (const unsigned short *grbg, unsigned short *rgb, unsigned int width, unsigned int height)
void bayer_to_rgb_rggb_be (const unsigned short *rggb, unsigned short *rgb, unsigned int width, unsigned int height)
void yuv422_to_rgb (const unsigned char *yuv, unsigned char *rgb, unsigned int width, unsigned int height)
void yuv422_to_grey (const unsigned char *yuv, unsigned char *grey, unsigned int width, unsigned int height)
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)
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)
void vuy422_to_rgb (const unsigned char *yuv, unsigned char *rgb, unsigned int width, unsigned int height)
void vuy422_to_grey (const unsigned char *yuv, unsigned char *grey, unsigned int width, unsigned int height)
void yuv422_to_rgb_c (const unsigned char *yuv, unsigned char *rgb, unsigned int n)
void yuv422_to_grey_c (const unsigned char *yuv, unsigned char *grey, unsigned int n)

Detailed Description

Internal colourspace conversions.


Function Documentation

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
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
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
void CVD::ColourSpace::bayer_to_grey_bggr ( const unsigned char *  bggr,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form bggr to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_gbrg ( const unsigned char *  gbrg,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form gbrg to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_grbg ( const unsigned char *  grbg,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form grbg to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_rggb ( const unsigned char *  rggb,
unsigned char *  grey,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form rggb to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_bggr ( const unsigned char *  bggr,
unsigned char *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form bggr to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_gbrg ( const unsigned char *  gbrg,
unsigned char *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form gbrg to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_grbg ( const unsigned char *  grbg,
unsigned char *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form grbg to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_rggb ( const unsigned char *  rggb,
unsigned char *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert Bayer pattern of the form rggb to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_bggr ( const unsigned short *  bggr,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form bggr to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_gbrg ( const unsigned short *  gbrg,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form gbrg to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_grbg ( const unsigned short *  grbg,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form grbg to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_rggb ( const unsigned short *  rggb,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form rggb to greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_bggr ( const unsigned short *  bggr,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form bggr to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_gbrg ( const unsigned short *  gbrg,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form gbrg to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_grbg ( const unsigned short *  grbg,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form grbg to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_rggb ( const unsigned short *  rggb,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit Bayer pattern of the form rggb to rgb444 data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_bggr_be ( const unsigned short *  bggr,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form bggr to host endian greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_gbrg_be ( const unsigned short *  gbrg,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form gbrg to host endian greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_grbg_be ( const unsigned short *  grbg,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form grbg to host endian greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_grey_rggb_be ( const unsigned short *  rggb,
unsigned short *  grey,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form rggb to host endian greyscale data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_bggr_be ( const unsigned short *  bggr,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form bggr to host endian rgb data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_gbrg_be ( const unsigned short *  gbrg,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form gbrg to host endian rgb data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_grbg_be ( const unsigned short *  grbg,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form grbg to host endian rgb data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
void CVD::ColourSpace::bayer_to_rgb_rggb_be ( const unsigned short *  rggb,
unsigned short *  rgb,
unsigned int  width,
unsigned int  height 
)

Convert 16bit big endian Bayer pattern of the form rggb to host endian rgb data.

Parameters:
bggrThe input data
greyThe output data
widthThe width of the image
heightThe height of the image
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
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
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
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
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
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