50 #include <opencv2/core/core.hpp>
54 #define CAMERA_GROUP ("camera")
55 #define CAMERA_NUM_CHANNELS_KEY ("num_channels")
56 #define CAMERA_CHANNEL_GROUP_PREFIX ("channel_")
57 #define CAMERA_CHANNEL_TYPE_KEY ("type")
59 #define CAMERA_CHANNEL_TYPE_HSV_KEY ("hsv")
60 #define CAMERA_CHANNEL_TYPE_QR_KEY ("qr")
76 const double &confidence,
const char *data = 0,
77 const size_t &dataLength = 0);
83 const double confidence()
const;
84 const char *data()
const;
85 const size_t dataLength()
const;
103 void setImage(
const cv::Mat &image);
107 virtual void update(
const cv::Mat &image) = 0;
119 virtual void setImage(
const cv::Mat &image) = 0;
120 virtual ChannelImpl *channelImpl(
const std::string &name) = 0;
129 virtual void setImage(
const cv::Mat &image);
130 virtual ChannelImpl *channelImpl(
const std::string &name);
133 std::map<std::string, ChannelImpl *> m_channelImpls;
151 void setConfig(
const Config &config);
158 mutable bool m_valid;
166 static std::string extension();
168 static void setBasePath(
const std::string &path);
169 static std::string path(
const std::string &name = std::string());
170 static std::string defaultPath();
171 static std::string defaultConfigPath();
172 static void setDefaultConfigPath(
const std::string &name);
175 static std::string s_path;
182 virtual bool open(
const int number) = 0;
183 virtual bool isOpen()
const = 0;
184 virtual void setWidth(
const unsigned width) = 0;
185 virtual void setHeight(
const unsigned height) = 0;
186 virtual bool next(cv::Mat &image) = 0;
187 virtual bool close() = 0;
196 virtual bool open(
const int number);
197 virtual bool isOpen()
const;
198 virtual void setWidth(
const unsigned width);
199 virtual void setHeight(
const unsigned height);
200 virtual bool next(cv::Mat &image);
201 virtual bool close();
204 cv::VideoCapture *m_capture;
213 bool open(
const int number = 0);
218 void setWidth(
const unsigned width);
219 void setHeight(
const unsigned height);
221 unsigned width()
const;
222 unsigned height()
const;
227 const cv::Mat &rawImage()
const;
229 void setConfig(
const Config &config);
230 const Config &config()
const;
235 const unsigned char *bgr()
const;
245 timeval m_lastUpdate;
247 mutable unsigned char *m_bgr;
248 mutable unsigned m_bgrSize;
Camera::Device * cDevice()
Definition: camera.hpp:207
std::vector< Object > ObjectVector
Definition: camera.hpp:95
Definition: camera.hpp:163
std::vector< Channel * > ChannelPtrVector
Definition: camera.hpp:161
Definition: camera.hpp:136
#define EXPORT_SYM
Definition: export.h:7
Definition: camera.hpp:97
Definition: camera.hpp:115
Definition: camera.hpp:71
Definition: camera.hpp:123