converters.h
Go to the documentation of this file.
1 #ifndef USB_CAM_CONVERTERS_H
2 #define USB_CAM_CONVERTERS_H
3 
4 #include "usb_cam/types.h"
5 
6 namespace usb_cam
7 {
8 
9 namespace util
10 {
11 
12 namespace converters
13 {
14 /* Helper functions and table converters */
15 io_method_t io_method_from_string(const std::string & str);
16 pixel_format_t pixel_format_from_string(const std::string & str);
17 std::string pixel_format_to_string(const uint32_t & pixelformat);
18 color_format_t color_format_from_string(const std::string & str);
19 unsigned int v4l_pixel_format_from_pixel_format(const pixel_format_t& pixelformat, bool& mono);
20 std::string v4l_control_name_to_param_name(const char *name);
21 
22 /* Standalone format converters */
44 bool YUV2RGB(const unsigned char & y,
45  const unsigned char & u,
46  const unsigned char & v,
47  unsigned char * r,
48  unsigned char * g,
49  unsigned char * b);
50 bool MONO102MONO8(const char * RAW,
51  char * & MONO,
52  const int & NumPixels);
53 bool YUYV2RGB(const char * YUV,
54  char * & RGB,
55  const int & NumPixels);
56 bool COPY2RGB(const char * input,
57  char * & output,
58  const int & NumPixels);
59 bool YUV4202RGB(char * YUV,
60  char * & RGB,
61  const int & width,
62  const int & height);
63 std::string FCC2S(const unsigned int & val);
64 bool UYVY2RGB(const char * YUV,
65  char * & RGB,
66  const int & NumPixels);
67 
68 }
69 
70 }
71 
72 }
73 
74 #endif // USB_CAM_CONVERTERS_H
bool YUV4202RGB(char *YUV, char *&RGB, const int &width, const int &height)
Definition: converters.cpp:192
color_format_t color_format_from_string(const std::string &str)
Definition: converters.cpp:79
std::string FCC2S(const unsigned int &val)
Definition: converters.cpp:201
bool MONO102MONO8(const char *RAW, char *&MONO, const int &NumPixels)
Definition: converters.cpp:151
std::string pixel_format_to_string(const uint32_t &pixelformat)
Definition: converters.cpp:51
io_method_t io_method_from_string(const std::string &str)
Definition: converters.cpp:15
pixel_format_t
Definition: types.h:83
io_method_t
Definition: types.h:74
std::string v4l_control_name_to_param_name(const char *name)
Definition: converters.cpp:237
bool UYVY2RGB(const char *YUV, char *&RGB, const int &NumPixels)
Definition: converters.cpp:215
color_format_t
Definition: types.h:98
pixel_format_t pixel_format_from_string(const std::string &str)
Definition: converters.cpp:27
bool COPY2RGB(const char *input, char *&output, const int &NumPixels)
Definition: converters.cpp:186
bool YUYV2RGB(const char *YUV, char *&RGB, const int &NumPixels)
Definition: converters.cpp:162
unsigned int v4l_pixel_format_from_pixel_format(const pixel_format_t &pixelformat, bool &mono)
Definition: converters.cpp:90
bool YUV2RGB(const unsigned char &y, const unsigned char &u, const unsigned char &v, unsigned char *r, unsigned char *g, unsigned char *b)
Definition: converters.cpp:120


usb_cam
Author(s): Benjamin Pitzer
autogenerated on Sat May 27 2023 02:53:04