44 #ifndef vpVideoReader_H
45 #define vpVideoReader_H
49 #include <visp3/io/vpDiskGrabber.h>
50 #include <visp3/io/vpFFMPEG.h>
52 #if VISP_HAVE_OPENCV_VERSION >= 0x020200
53 #include "opencv2/highgui/highgui.hpp"
54 #elif VISP_HAVE_OPENCV_VERSION >= 0x020000
55 #include "opencv/highgui.h"
175 #ifdef VISP_HAVE_FFMPEG
178 #elif VISP_HAVE_OPENCV_VERSION >= 0x020100
179 cv::VideoCapture capture;
210 vpVideoFormatType formatType;
213 char fileName[FILENAME_MAX];
224 bool firstFrameIndexIsSet;
225 bool lastFrameIndexIsSet;
259 if (frameCount > lastFrame )
265 double getFramerate();
302 void setFileName(
const char *filename);
303 void setFileName(
const std::string &filename);
313 this->firstFrameIndexIsSet =
true;
314 this->firstFrame = first_frame;
324 this->lastFrameIndexIsSet =
true;
325 this->lastFrame = last_frame;
329 vpVideoFormatType getFormat(
const char *filename);
330 static std::string getExtension(
const std::string &filename);
331 void findFirstFrameIndex();
332 void findLastFrameIndex();
333 bool isImageExtensionSupported();
334 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