39 #ifndef VP_VIDEO_WRITER_H
40 #define VP_VIDEO_WRITER_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>
166 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_VIDEOIO)
167 cv::VideoWriter m_writer;
186 vpVideoFormatType m_formatType;
189 std::string m_videoName;
190 std::string m_frameName;
205 unsigned int m_width;
206 unsigned int m_height;
239 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_VIDEOIO)
240 inline void setCodec(
const int fourcc_codec) { m_fourcc = fourcc_codec; }
243 void setFileName(
const std::string &filename);
244 void setFirstFrameIndex(
int first_frame);
255 #if defined(VISP_HAVE_OPENCV) && defined(HAVE_OPENCV_HIGHGUI) && defined(HAVE_OPENCV_VIDEOIO)
256 inline void setFramerate(
const double framerate) { m_framerate = framerate; }
258 inline void setFramerate(
const double dummy) { (void)dummy; }
264 inline void setFrameStep(
const int frame_step) { m_frameStep = frame_step; }
267 vpVideoFormatType getFormat(
const std::string &filename);
268 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