1 #ifndef _KIPR_CAMERA_CAMERA_HPP_
2 #define _KIPR_CAMERA_CAMERA_HPP_
19 #define CAMERA_GROUP ("camera")
20 #define CAMERA_NUM_CHANNELS_KEY ("num_channels")
21 #define CAMERA_CHANNEL_GROUP_PREFIX ("channel_")
22 #define CAMERA_CHANNEL_TYPE_KEY ("type")
24 #define CAMERA_CHANNEL_TYPE_HSV_KEY ("hsv")
25 #define CAMERA_CHANNEL_TYPE_QR_KEY ("qr")
26 #define CAMERA_CHANNEL_TYPE_ARUCO_KEY ("aruco")
47 static std::string
path(
const std::string &name = std::string());
53 static std::string s_path;
74 const std::vector<Channel *> &
channels()
const;
81 const unsigned char *
bgr()
const;
87 bool initCapDevice(
const unsigned width,
const unsigned height);
89 int xioctl(
int fh,
int request,
void *arg);
96 struct buffer *buffers;
97 unsigned int nBuffers;
101 std::vector<Channel *> m_channels;
102 std::unique_ptr<DeviceImpl> m_impl;
104 mutable unsigned char *m_bgr;
105 mutable unsigned m_bgrSize;
108 static const char *device_name;
109 cv::VideoCapture *m_cap;
115 unsigned int SelectTimeoutSec;
116 unsigned int SelectTimeoutuSec;
Model
Definition: camera.h:93
@ WHITE_2016
Definition: camera.h:94
Resolution
Definition: camera.h:84
@ LOW_RES
Definition: camera.h:85
Definition: channel.hpp:15
Definition: camera.hpp:42
static void setDefaultConfigPath(const std::string &name)
static std::string defaultPath()
static std::string path(const std::string &name=std::string())
static void setBasePath(const std::string &path)
static std::string defaultConfigPath()
static std::string extension()
Definition: camera.hpp:57
bool open(const int number=0, Resolution resolution=LOW_RES, Model model=WHITE_2016)
static unsigned int resolutionToWidth(Resolution res)
const unsigned char * bgr() const
void setConfig(const config::Config &config)
static unsigned int resolutionToHeight(Resolution res)
const config::Config & config() const
const std::vector< Channel * > & channels() const
Definition: config.hpp:14
Definition: camera.hpp:29