45 #ifndef vpVideoReader_H 46 #define vpVideoReader_H 50 #include <visp3/io/vpDiskGrabber.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" 176 #if VISP_HAVE_OPENCV_VERSION >= 0x020100 177 cv::VideoCapture capture;
207 vpVideoFormatType formatType;
210 char fileName[FILENAME_MAX];
221 bool firstFrameIndexIsSet;
222 bool lastFrameIndexIsSet;
261 if (frameCount + frameStep > lastFrame)
263 }
else if (frameStep < 0) {
264 if (frameCount + frameStep < firstFrame)
340 void setFileName(
const char *filename);
341 void setFileName(
const std::string &filename);
352 this->firstFrameIndexIsSet =
true;
353 this->firstFrame = first_frame;
364 this->lastFrameIndexIsSet =
true;
365 this->lastFrame = last_frame;
376 inline void setFrameStep(
const long frame_step) { this->frameStep = frame_step; }
379 vpVideoFormatType getFormat(
const char *filename);
380 static std::string getExtension(
const std::string &filename);
381 void findFirstFrameIndex();
382 void findLastFrameIndex();
383 bool isImageExtensionSupported();
384 bool isVideoExtensionSupported();
385 long extractImageIndex(
const std::string &imageName,
const std::string &format);
386 bool checkImageNameFormat(
const std::string &format);
387 void getProperties();
Class that enables to manipulate easily a video file or a sequence of images. As it inherits from the...
long getFirstFrameIndex()
virtual void open(vpImage< unsigned char > &I)=0
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.
long getFrameIndex() const
void setLastFrameIndex(const long last_frame)
long getFrameStep() const
void setFrameStep(const long frame_step)
void setFirstFrameIndex(const long first_frame)
virtual void acquire(vpImage< unsigned char > &I)=0