8 #ifndef YARP_OPENCV_GRABBER_DEVICE_OPENCVGRABBER_H
9 #define YARP_OPENCV_GRABBER_DEVICE_OPENCVGRABBER_H
23 #include <opencv2/highgui/highgui.hpp>
63 bool close()
override;
74 inline int width()
const override {
return m_w; }
opencv_grabber: An image frame grabber device using OpenCV to capture images from cameras and AVI fil...
yarp::os::Stamp getLastInputStamp() override
Implements the IPreciselyTimed interface.
int height() const override
Get the height of images a grabber produces.
OpenCVGrabber()
Create an OpenCV image grabber.
virtual ~OpenCVGrabber()
Destroy an OpenCV image grabber.
bool fromFile
Whether reading from file or camera.
int width() const override
Get the width of images a grabber produces.
yarp::os::Property m_config
Saved copy of the device configuration.
bool getImage(yarp::sig::ImageOf< yarp::sig::PixelRgb > &image) override
Read an image from the grabber.
bool close() override
Close a grabber.
cv::VideoCapture m_cap
OpenCV image capture object.
bool open(yarp::os::Searchable &config) override
Open the DeviceDriver.
yarp::os::Stamp m_laststamp
int m_w
Width of the images a grabber produces.
int m_h
Height of the images a grabber produces.
bool m_loop
Whether to loop or not.
Interface implemented by all device drivers.
A class for storing options and configuration information.
A base class for nested structures that can be searched.
An abstraction for a time stamp and/or sequence number.