Classes | |
class | UsbCam |
class | UsbCamNode |
Functions | |
static unsigned char | CLIPVALUE (int val) |
static void | errno_exit (const char *s) |
static void | mono102mono8 (char *RAW, char *MONO, int NumPixels) |
void | rgb242rgb (char *YUV, char *RGB, int NumPixels) |
void | uyvy2rgb (char *YUV, char *RGB, int NumPixels) |
static int | xioctl (int fd, int request, void *arg) |
static void | YUV2RGB (const unsigned char y, const unsigned char u, const unsigned char v, unsigned char *r, unsigned char *g, unsigned char *b) |
static void | yuyv2rgb (char *YUV, char *RGB, int NumPixels) |
Variables | |
const int | clipping_table_offset = 128 |
const unsigned char | uchar_clipping_table [] |
static unsigned char usb_cam::CLIPVALUE | ( | int | val | ) | [static] |
Clip a value to the range 0<val<255. For speed this is done using an array, so can only cope with numbers in the range -128<val<383.
Definition at line 239 of file usb_cam.cpp.
static void usb_cam::errno_exit | ( | const char * | s | ) | [static] |
Definition at line 61 of file usb_cam.cpp.
static void usb_cam::mono102mono8 | ( | char * | RAW, |
char * | MONO, | ||
int | NumPixels | ||
) | [static] |
Definition at line 317 of file usb_cam.cpp.
void usb_cam::rgb242rgb | ( | char * | YUV, |
char * | RGB, | ||
int | NumPixels | ||
) |
Definition at line 350 of file usb_cam.cpp.
void usb_cam::uyvy2rgb | ( | char * | YUV, |
char * | RGB, | ||
int | NumPixels | ||
) |
Definition at line 295 of file usb_cam.cpp.
static int usb_cam::xioctl | ( | int | fd, |
int | request, | ||
void * | arg | ||
) | [static] |
Definition at line 67 of file usb_cam.cpp.
static void usb_cam::YUV2RGB | ( | const unsigned char | y, |
const unsigned char | u, | ||
const unsigned char | v, | ||
unsigned char * | r, | ||
unsigned char * | g, | ||
unsigned char * | b | ||
) | [static] |
Conversion from YUV to RGB. The normal conversion matrix is due to Julien (surname unknown):
[ R ] [ 1.0 0.0 1.403 ] [ Y ] [ G ] = [ 1.0 -0.344 -0.714 ] [ U ] [ B ] [ 1.0 1.770 0.0 ] [ V ]
and the firewire one is similar:
[ R ] [ 1.0 0.0 0.700 ] [ Y ] [ G ] = [ 1.0 -0.198 -0.291 ] [ U ] [ B ] [ 1.0 1.015 0.0 ] [ V ]
Corrected by BJT (coriander's transforms RGB->YUV and YUV->RGB do not get you back to the same RGB!) [ R ] [ 1.0 0.0 1.136 ] [ Y ] [ G ] = [ 1.0 -0.396 -0.578 ] [ U ] [ B ] [ 1.0 2.041 0.002 ] [ V ]
Definition at line 270 of file usb_cam.cpp.
static void usb_cam::yuyv2rgb | ( | char * | YUV, |
char * | RGB, | ||
int | NumPixels | ||
) | [static] |
Definition at line 327 of file usb_cam.cpp.
const int usb_cam::clipping_table_offset = 128 |
Definition at line 234 of file usb_cam.cpp.
const unsigned char usb_cam::uchar_clipping_table[] |
Definition at line 78 of file usb_cam.cpp.