39 #ifndef VP_VIDEO_WRITER_H
40 #define VP_VIDEO_WRITER_H
44 #include <visp3/io/vpImageIo.h>
46 #if ((VISP_HAVE_OPENCV_VERSION < 0x030000) && defined(HAVE_OPENCV_HIGHGUI)) || ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_VIDEOIO))
48 #if (VISP_HAVE_OPENCV_VERSION < 0x030000) && defined(HAVE_OPENCV_HIGHGUI)
49 #include <opencv2/highgui/highgui.hpp>
50 #elif (VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_VIDEOIO)
51 #include <opencv2/videoio/videoio.hpp>
171 #if ((VISP_HAVE_OPENCV_VERSION < 0x030000) && defined(HAVE_OPENCV_HIGHGUI)) || ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_VIDEOIO))
172 cv::VideoWriter m_writer;
191 vpVideoFormatType m_formatType;
194 std::string m_videoName;
195 std::string m_frameName;
210 unsigned int m_width;
211 unsigned int m_height;
244 #if ((VISP_HAVE_OPENCV_VERSION < 0x030000) && defined(HAVE_OPENCV_HIGHGUI)) || ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_VIDEOIO))
245 inline void setCodec(
const int fourcc_codec) { m_fourcc = fourcc_codec; }
248 void setFileName(
const std::string &filename);
249 void setFirstFrameIndex(
int first_frame);
260 #if ((VISP_HAVE_OPENCV_VERSION < 0x030000) && defined(HAVE_OPENCV_HIGHGUI)) || ((VISP_HAVE_OPENCV_VERSION >= 0x030000) && defined(HAVE_OPENCV_VIDEOIO))
261 inline void setFramerate(
const double framerate) { m_framerate = framerate; }
263 inline void setFramerate(
const double dummy) { (void)dummy; }
269 inline void setFrameStep(
const int frame_step) { m_frameStep = frame_step; }
272 vpVideoFormatType getFormat(
const std::string &filename);
273 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