gramods
Loading...
Searching...
No Matches
OpenCvVideoCapture.hh
1
2#ifndef GRAMODS_TRACK_OPENCVVIDEOCAPTURE
3#define GRAMODS_TRACK_OPENCVVIDEOCAPTURE
4
5#include <gmTrack/config.hh>
6
7#ifdef gramods_ENABLE_OpenCV
8
9#include <gmCore/VideoSource.hh>
10
11#include <gmCore/OFactory.hh>
12#include <gmCore/Updateable.hh>
13
14BEGIN_NAMESPACE_GMTRACK;
15
25 : public gmCore::Object,
26 public gmCore::VideoSource,
27 public gmCore::Updateable {
28
29public:
30
32
38 void setVideoFile(std::filesystem::path file);
39
45 void setCameraId(int id);
46
54 void setCameraWidth(int W);
55
63 void setCameraHeight(int W);
64
74 void setCameraFramerate(int R);
75
85 void setCameraFourCC(std::string cc);
86
126 void setBackend(std::string b);
127
131 void update(gmCore::Updateable::clock::time_point, size_t);
132
140 bool retrieve(cv::Mat &image) override;
141
145 std::string getDefaultKey() override { return "videoSource"; }
146
147 GM_OFI_DECLARE;
148
149private:
150
151 struct Impl;
152 std::unique_ptr<Impl> _impl;
153};
154
155END_NAMESPACE_GMTRACK;
156
157#endif
158#endif
Base type for objects in the Gramods package for standardized handling of construction,...
Definition Object.hh:42
The Updateable class defines an interface for objects that may be updated, for example each execution...
Definition Updateable.hh:18
The OpenCvVideoCapture uses OpenCVs VideoCapture to read off video image data.
Definition OpenCvVideoCapture.hh:27
std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition OpenCvVideoCapture.hh:145