25 #ifndef INCLUDED_ImageSource_h_GUID_C1B68116_0322_4DBD_2360_EF4E6A81D5F4 26 #define INCLUDED_ImageSource_h_GUID_C1B68116_0322_4DBD_2360_EF4E6A81D5F4 32 #include <opencv2/core/core.hpp> 47 virtual bool ok()
const = 0;
55 virtual bool grab() = 0;
58 virtual void retrieve(cv::Mat &color, cv::Mat &gray);
69 ImageSource() =
default;
72 using ImageSourcePtr = std::unique_ptr<ImageSource>;
75 #endif // INCLUDED_ImageSource_h_GUID_C1B68116_0322_4DBD_2360_EF4E6A81D5F4 virtual bool ok() const =0
The main namespace for all C++ elements of the framework, internal and external.
Definition: namespace_osvr.dox:3
virtual bool grab()=0
Trigger camera capture.
virtual ~ImageSource()
Destructor.
Definition: ImageSource.cpp:36
virtual void retrieve(cv::Mat &color, cv::Mat &gray, osvr::util::time::TimeValue ×tamp)
Call after grab() to get the actual image data.
Definition: ImageSource.cpp:37
virtual void retrieveColor(cv::Mat &color, osvr::util::time::TimeValue ×tamp)=0
For those devices that naturally read a non-corrupt color image, overriding just this method will let...
virtual cv::Size resolution() const =0
Get resolution of the images from this source.