Skip to content

Commit

Permalink
Allowed to output images without rendering (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
gineshidalgo99 committed Nov 3, 2017
1 parent 3d7bd82 commit 6523a7f
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 9 deletions.
1 change: 1 addition & 0 deletions doc/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ OpenPose Library - Release Notes
13. Net resolution can be dynamically changed (e.g. for images with different size).
14. Added example to add functionality/modules to OpenPose.
15. Added `disable_multi_thread` flag in order to allow debug and/or highly reduce the latency (e.g. when using webcam in real-time).
16. Allowed to output images without any rendering.
2. Functions or parameters renamed:
1. OpenPose able to change its size and initial size dynamically:
1. Flag `resolution` renamed as `output_resolution`.
Expand Down
20 changes: 11 additions & 9 deletions include/openpose/wrapper/wrapper.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -500,26 +500,28 @@ namespace op
+ additionalMessage;
error(message, __LINE__, __FUNCTION__, __FILE__);
}

if ((wrapperStructOutput.displayGui && wrapperStructOutput.guiVerbose) && !renderOutput)
{
const auto message = "No render is enabled (e.g. `no_render_pose`), so you should also remove the"
" display (set `no_display` or `no_gui_verbose`)." + additionalMessage;
error(message, __LINE__, __FUNCTION__, __FILE__);
}
if (wrapperStructInput.framesRepeat && savingSomething)
{
const auto message = "Frames repetition (`frames_repeat`) is enabled as well as some writing"
" function (`write_X`). This program would never stop recording the same"
" frames over and over. Please, disable repetition or remove writing.";
error(message, __LINE__, __FUNCTION__, __FILE__);
}
// Warnings
if ((wrapperStructOutput.displayGui && wrapperStructOutput.guiVerbose) && !renderOutput)
{
const auto message = "No render is enabled (e.g. `render_pose 0`), so you might also want to"
" remove the display (set `no_display` or `no_gui_verbose`). If you simply"
" want to use OpenPose to record video/images without keypoints, you only"
" need to set `num_gpu 0`." + additionalMessage;
log(message, Priority::High);
}
if (wrapperStructInput.realTimeProcessing && savingSomething)
{
const auto message = "Real time processing is enabled as well as some writing function. Thus, some"
" frames might be skipped. Consider disabling real time processing if you"
" intend to save any results.";
log(message, Priority::Max, __LINE__, __FUNCTION__, __FILE__);
log(message, Priority::High);
}
}
if (!wrapperStructOutput.writeVideo.empty() && wrapperStructInput.producerSharedPtr == nullptr)
Expand Down Expand Up @@ -1202,7 +1204,7 @@ namespace op
if (spWPoses.size() > 1)
log("Multi-threading disabled, only 1 thread running. All GPUs have been disabled but the"
" first one, which is defined by gpuNumberStart (e.g. in the OpenPose demo, it is set"
" with the `num_gpu_start` flag).");
" with the `num_gpu_start` flag).", Priority::High);
mThreadManager.add(mThreadId, spWPoses.at(0), queueIn, queueOut);
}
queueIn++;
Expand Down

0 comments on commit 6523a7f

Please sign in to comment.