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
usb_cam::util::converters::v4l_control_name_to_param_name
std::string v4l_control_name_to_param_name(const char *name)
Definition: converters.cpp:237
types.h
usb_cam
Definition: camera_driver.h:35
usb_cam::util::converters::UYVY2RGB
bool UYVY2RGB(const char *YUV, char *&RGB, const int &NumPixels)
Definition: converters.cpp:215
usb_cam::util::converters::pixel_format_from_string
pixel_format_t pixel_format_from_string(const std::string &str)
Definition: converters.cpp:27
usb_cam::util::converters::YUYV2RGB
bool YUYV2RGB(const char *YUV, char *&RGB, const int &NumPixels)
Definition: converters.cpp:162
usb_cam::util::converters::io_method_from_string
io_method_t io_method_from_string(const std::string &str)
Definition: converters.cpp:15
usb_cam::util::converters::YUV2RGB
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::util::converters::v4l_pixel_format_from_pixel_format
unsigned int v4l_pixel_format_from_pixel_format(const pixel_format_t &pixelformat, bool &mono)
Definition: converters.cpp:90
usb_cam::color_format_t
color_format_t
Definition: types.h:98
usb_cam::util::converters::MONO102MONO8
bool MONO102MONO8(const char *RAW, char *&MONO, const int &NumPixels)
Definition: converters.cpp:151
usb_cam::util::converters::YUV4202RGB
bool YUV4202RGB(char *YUV, char *&RGB, const int &width, const int &height)
Definition: converters.cpp:192
usb_cam::util::converters::color_format_from_string
color_format_t color_format_from_string(const std::string &str)
Definition: converters.cpp:79
usb_cam::pixel_format_t
pixel_format_t
Definition: types.h:83
usb_cam::util::converters::COPY2RGB
bool COPY2RGB(const char *input, char *&output, const int &NumPixels)
Definition: converters.cpp:186
usb_cam::util::converters::pixel_format_to_string
std::string pixel_format_to_string(const uint32_t &pixelformat)
Definition: converters.cpp:51
usb_cam::io_method_t
io_method_t
Definition: types.h:74
usb_cam::util::converters::FCC2S
std::string FCC2S(const unsigned int &val)
Definition: converters.cpp:201


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