Functions
usb_cam::util::converters Namespace Reference

Functions

color_format_t color_format_from_string (const std::string &str)
 
bool COPY2RGB (const char *input, char *&output, const int &NumPixels)
 
std::string FCC2S (const unsigned int &val)
 
io_method_t io_method_from_string (const std::string &str)
 
bool MONO102MONO8 (const char *RAW, char *&MONO, const int &NumPixels)
 
pixel_format_t pixel_format_from_string (const std::string &str)
 
std::string pixel_format_to_string (const uint32_t &pixelformat)
 
bool UYVY2RGB (const char *YUV, char *&RGB, const int &NumPixels)
 
std::string v4l_control_name_to_param_name (const char *name)
 
unsigned int v4l_pixel_format_from_pixel_format (const pixel_format_t &pixelformat, bool &mono)
 
bool YUV2RGB (const unsigned char &y, const unsigned char &u, const unsigned char &v, unsigned char *r, unsigned char *g, unsigned char *b)
 
bool YUV4202RGB (char *YUV, char *&RGB, const int &width, const int &height)
 
bool YUYV2RGB (const char *YUV, char *&RGB, const int &NumPixels)
 

Function Documentation

◆ color_format_from_string()

color_format_t usb_cam::util::converters::color_format_from_string ( const std::string &  str)

Definition at line 79 of file converters.cpp.

◆ COPY2RGB()

bool usb_cam::util::converters::COPY2RGB ( const char *  input,
char *&  output,
const int &  NumPixels 
)

Definition at line 186 of file converters.cpp.

◆ FCC2S()

std::string usb_cam::util::converters::FCC2S ( const unsigned int &  val)

Definition at line 201 of file converters.cpp.

◆ io_method_from_string()

io_method_t usb_cam::util::converters::io_method_from_string ( const std::string &  str)

Definition at line 15 of file converters.cpp.

◆ MONO102MONO8()

bool usb_cam::util::converters::MONO102MONO8 ( const char *  RAW,
char *&  MONO,
const int &  NumPixels 
)

Definition at line 151 of file converters.cpp.

◆ pixel_format_from_string()

pixel_format_t usb_cam::util::converters::pixel_format_from_string ( const std::string &  str)

Definition at line 27 of file converters.cpp.

◆ pixel_format_to_string()

std::string usb_cam::util::converters::pixel_format_to_string ( const uint32_t &  pixelformat)

Definition at line 51 of file converters.cpp.

◆ UYVY2RGB()

bool usb_cam::util::converters::UYVY2RGB ( const char *  YUV,
char *&  RGB,
const int &  NumPixels 
)

Definition at line 215 of file converters.cpp.

◆ v4l_control_name_to_param_name()

std::string usb_cam::util::converters::v4l_control_name_to_param_name ( const char *  name)

Definition at line 237 of file converters.cpp.

◆ v4l_pixel_format_from_pixel_format()

unsigned int usb_cam::util::converters::v4l_pixel_format_from_pixel_format ( const pixel_format_t pixelformat,
bool &  mono 
)

Definition at line 90 of file converters.cpp.

◆ YUV2RGB()

bool usb_cam::util::converters::YUV2RGB ( const unsigned char &  y,
const unsigned char &  u,
const unsigned char &  v,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b 
)

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 120 of file converters.cpp.

◆ YUV4202RGB()

bool usb_cam::util::converters::YUV4202RGB ( char *  YUV,
char *&  RGB,
const int &  width,
const int &  height 
)

Definition at line 192 of file converters.cpp.

◆ YUYV2RGB()

bool usb_cam::util::converters::YUYV2RGB ( const char *  YUV,
char *&  RGB,
const int &  NumPixels 
)

Definition at line 162 of file converters.cpp.



usb_cam
Author(s): Benjamin Pitzer
autogenerated on Sun Sep 3 2023 02:44:54