39 #ifndef _vpVideoWriter_h_
40 #define _vpVideoWriter_h_
44 #include <visp3/io/vpImageIo.h>
46 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_VIDEOIO) && defined(HAVE_OPENCV_HIGHGUI)
47 #include <opencv2/videoio/videoio.hpp>
48 #include <opencv2/highgui/highgui.hpp>
156 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_VIDEOIO)
157 cv::VideoWriter m_writer;
176 vpVideoFormatType m_formatType;
179 std::string m_videoName;
180 std::string m_frameName;
195 unsigned int m_width;
196 unsigned int m_height;
229 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_VIDEOIO)
230 inline void setCodec(
const int fourcc_codec) { m_fourcc = fourcc_codec; }
233 void setFileName(
const std::string &filename);
234 void setFirstFrameIndex(
int first_frame);
245 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_VIDEOIO)
246 inline void setFramerate(
const double framerate) { m_framerate = framerate; }
248 inline void setFramerate(
const double dummy) { (void)dummy; }
254 inline void setFrameStep(
const int frame_step) { m_frameStep = frame_step; }
257 vpVideoFormatType getFormat(
const std::string &filename);
258 static std::string getExtension(
const std::string &filename);
Class that enables to write easily a video file or a sequence of images.
void setFrameStep(const int frame_step)
void setFramerate(const double framerate)
void setCodec(const int fourcc_codec)
std::string getFrameName() const
unsigned int getCurrentFrameIndex() const