Video can be saved without render_pose

This commit is contained in:
gineshidalgo99
2017-12-20 11:06:12 -05:00
parent b44b83cd5c
commit 7e64009305
2 changed files with 11 additions and 7 deletions
+3 -3
View File
@@ -456,9 +456,9 @@ namespace op
__LINE__, __FUNCTION__, __FILE__);
if (!renderOutput && (!wrapperStructOutput.writeImages.empty() || !wrapperStructOutput.writeVideo.empty()))
{
const auto message = "In order to save the rendered frames (`write_images` or `write_video`), you must"
" set `render_output` to true.";
error(message, __LINE__, __FUNCTION__, __FILE__);
const auto message = "In order to save the rendered frames (`write_images` or `write_video`), you"
" cannot disable `render_pose`.";
log(message, Priority::High);
}
if (!wrapperStructOutput.writeHeatMaps.empty() && wrapperStructPose.heatMapTypes.empty())
{
+8 -4
View File
@@ -2,12 +2,14 @@
namespace op
{
VideoSaver::VideoSaver(const std::string& videoSaverPath, const int cvFourcc, const double fps, const Point<int>& cvSize) :
VideoSaver::VideoSaver(const std::string& videoSaverPath, const int cvFourcc, const double fps,
const Point<int>& cvSize) :
VideoSaver::VideoSaver{std::vector<std::string>{videoSaverPath}, cvFourcc, fps, cvSize}
{
}
VideoSaver::VideoSaver(const std::vector<std::string>& videoSaverPaths, const int cvFourcc, const double fps, const Point<int>& cvSize)
VideoSaver::VideoSaver(const std::vector<std::string>& videoSaverPaths, const int cvFourcc, const double fps,
const Point<int>& cvSize)
{
try
{
@@ -23,8 +25,10 @@ namespace op
if (!mVideoWriters.crbegin()->isOpened())
{
const std::string errorMessage{"Video to write frames could not be opened on " + videoSaverPath + ". Please, "
"check OpenCV is properly compiled with the FFmpeg codecs in order to save video."};
const std::string errorMessage{"Video to write frames could not be opened as `" + videoSaverPath
+ "`. Please, check that:\n\t1. The path ends in *.avi."
"\n\t2. OpenCV is properly compiled with the FFmpeg codecs in"
" order to save video."};
error(errorMessage, __LINE__, __FUNCTION__, __FILE__);
}
}