mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-12 20:30:20 +00:00
Video can be saved without render_pose
This commit is contained in:
@@ -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())
|
||||
{
|
||||
|
||||
@@ -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__);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user