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 m_capture;
180 bool m_lastframe_unknown;
209 vpVideoFormatType m_formatType;
212 std::string m_videoName;
213 std::string m_frameName;
224 bool m_firstFrameIndexIsSet;
225 bool m_lastFrameIndexIsSet;
263 if (m_frameStep > 0) {
264 if (m_frameCount + m_frameStep > m_lastFrame)
266 }
else if (m_frameStep < 0) {
267 if (m_frameCount + m_frameStep < m_firstFrame)
334 bool isVideoFormat()
const;
350 void setFileName(
const std::string &filename);
361 m_firstFrameIndexIsSet =
true;
362 m_firstFrame = first_frame;
373 this->m_lastFrameIndexIsSet =
true;
374 m_lastFrame = last_frame;
385 inline void setFrameStep(
const long frame_step) { m_frameStep = frame_step; }
388 vpVideoFormatType getFormat(
const std::string &filename)
const;
389 static std::string getExtension(
const std::string &filename);
390 void findFirstFrameIndex();
391 void findLastFrameIndex();
392 bool isImageExtensionSupported()
const;
393 bool isVideoExtensionSupported()
const;
394 bool checkImageNameFormat(
const std::string &format)
const;
395 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
std::string getFrameName() const
void setFrameStep(const long frame_step)
void setFirstFrameIndex(const long first_frame)
virtual void acquire(vpImage< unsigned char > &I)=0