2#ifndef GRAMODS_TRACK_OPENCVVIDEOCAPTURE
3#define GRAMODS_TRACK_OPENCVVIDEOCAPTURE
5#include <gmTrack/config.hh>
7#ifdef gramods_ENABLE_OpenCV
9#include <gmCore/VideoSource.hh>
11#include <gmCore/OFactory.hh>
12#include <gmCore/Updateable.hh>
14BEGIN_NAMESPACE_GMTRACK;
24class OpenCvVideoCapture
26 public gmCore::VideoSource,
131 void update(gmCore::Updateable::clock::time_point,
size_t);
140 bool retrieve(cv::Mat &image)
override;
152 std::unique_ptr<Impl> _impl;
155END_NAMESPACE_GMTRACK;
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
bool retrieve(cv::Mat &image) override
Retrieve the latest read image captured.
Definition OpenCvVideoCapture.cpp:209
void setCameraFramerate(int R)
Sets the framerate to request from the camera.
Definition OpenCvVideoCapture.cpp:73
void setVideoFile(std::filesystem::path file)
Sets the video file to read from.
Definition OpenCvVideoCapture.cpp:52
void setCameraId(int id)
Sets the camera id to capture data from.
Definition OpenCvVideoCapture.cpp:59
void setCameraFourCC(std::string cc)
Specifies the FourCC for the camera stream.
Definition OpenCvVideoCapture.cpp:102
void setCameraHeight(int W)
Sets the height of the resolution to request from the camera.
Definition OpenCvVideoCapture.cpp:65
std::string getDefaultKey() override
Returns the default key, in Configuration, for the Object.
Definition OpenCvVideoCapture.hh:145
void update(gmCore::Updateable::clock::time_point, size_t)
Updates the video capture to read off the next frame.
Definition OpenCvVideoCapture.cpp:192
void setBackend(std::string b)
Specifies backend to use for reading camera or video stream.
Definition OpenCvVideoCapture.cpp:106
void setCameraWidth(int W)
Sets the width of the resolution to request from the camera.
Definition OpenCvVideoCapture.cpp:69