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"
164 #ifdef VISP_HAVE_FFMPEG
167 #elif VISP_HAVE_OPENCV_VERSION >= 0x020100
168 cv::VideoCapture capture;
199 vpVideoFormatType formatType;
202 char fileName[FILENAME_MAX];
213 bool firstFrameIndexIsSet;
214 bool lastFrameIndexIsSet;
248 if (frameCount > lastFrame )
254 double getFramerate();
288 void setFileName(
const char *filename);
289 void setFileName(
const std::string &filename);
299 this->firstFrameIndexIsSet =
true;
300 this->firstFrame = first_frame;
310 this->lastFrameIndexIsSet =
true;
311 this->lastFrame = last_frame;
315 vpVideoFormatType getFormat(
const char *filename);
316 static std::string getExtension(
const std::string &filename);
317 void findFirstFrameIndex();
318 void findLastFrameIndex();
319 bool isImageExtensionSupported();
320 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