48 #ifndef vpVideoReader_H
49 #define vpVideoReader_H
53 #include <visp/vpDiskGrabber.h>
54 #include <visp/vpFFMPEG.h>
56 #if VISP_HAVE_OPENCV_VERSION >= 0x020200
57 #include "opencv2/highgui/highgui.hpp"
58 #elif VISP_HAVE_OPENCV_VERSION >= 0x020000
59 #include "opencv/highgui.h"
168 #ifdef VISP_HAVE_FFMPEG
171 #elif VISP_HAVE_OPENCV_VERSION >= 0x020100
172 cv::VideoCapture capture;
203 vpVideoFormatType formatType;
206 char fileName[FILENAME_MAX];
217 bool firstFrameIndexIsSet;
218 bool lastFrameIndexIsSet;
232 if (frameCount > lastFrame )
238 double getFramerate();
272 void setFileName(
const char *filename);
273 void setFileName(
const std::string &filename);
283 this->firstFrameIndexIsSet =
true;
284 this->firstFrame = first_frame;
294 this->lastFrameIndexIsSet =
true;
295 this->lastFrame = last_frame;
299 vpVideoFormatType getFormat(
const char *filename);
300 static std::string getExtension(
const std::string &filename);
301 void findFirstFrameIndex();
302 void findLastFrameIndex();
303 bool isImageExtensionSupported();
304 bool isVideoExtensionSupported();
long getFrameIndex() const
long getFirstFrameIndex() const
long getLastFrameIndex() const
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
virtual void open(vpImage< unsigned char > &I)=0
This class interfaces the FFmpeg library to enable video stream reading or writing.
Class to grab (ie. read) images from the disk.
Base class for all video devices. It is designed to provide a front end to video sources.
void setLastFrameIndex(const long last_frame)
void setFirstFrameIndex(const long first_frame)
virtual void acquire(vpImage< unsigned char > &I)=0