mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-16 22:30:19 +00:00
Fixed missing include and old GCC error
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
|
||||
// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
|
||||
// Debugging
|
||||
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
DEFINE_int32(logging_level, 4, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
" 255 will not output any. Current OpenPose library messages are in the range 0-4: 1 for"
|
||||
" low priority messages and 4 for important ones.");
|
||||
// Producer
|
||||
@@ -107,7 +107,7 @@ std::tuple<op::Point<int>, op::Point<int>, std::shared_ptr<op::Producer>> gflags
|
||||
|
||||
int openPoseTutorialThread1()
|
||||
{
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::Max);
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::High);
|
||||
// ------------------------- INITIALIZATION -------------------------
|
||||
// Step 1 - Set logging level
|
||||
// - 0 will output all the logging messages
|
||||
@@ -173,7 +173,7 @@ int openPoseTutorialThread1()
|
||||
// threadManager.add(threadId, {wDatumProducer, wGui}, queueIn, queueOut); // Thread 0, queues 0 -> 1
|
||||
|
||||
// ------------------------- STARTING AND STOPPING THREADING -------------------------
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
op::log("Starting thread(s)", op::Priority::High);
|
||||
// Two different ways of running the program on multithread environment
|
||||
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
@@ -187,12 +187,12 @@ int openPoseTutorialThread1()
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// op::log("Stopping thread(s)", op::Priority::High);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
op::log("Example 3 successfully finished.", op::Priority::Max);
|
||||
op::log("Example 3 successfully finished.", op::Priority::High);
|
||||
// Return successful message
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
|
||||
// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
|
||||
// Debugging
|
||||
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
DEFINE_int32(logging_level, 4, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
" 255 will not output any. Current OpenPose library messages are in the range 0-4: 1 for"
|
||||
" low priority messages and 4 for important ones.");
|
||||
// Producer
|
||||
@@ -141,7 +141,7 @@ std::tuple<op::Point<int>, op::Point<int>, std::shared_ptr<op::Producer>> gflags
|
||||
|
||||
int openPoseTutorialThread2()
|
||||
{
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::Max);
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::High);
|
||||
// ------------------------- INITIALIZATION -------------------------
|
||||
// Step 1 - Set logging level
|
||||
// - 0 will output all the logging messages
|
||||
@@ -215,7 +215,7 @@ int openPoseTutorialThread2()
|
||||
// threadManager.add(threadId, wGui, queueIn++, queueOut++); // Thread 0, queues 2 -> 3
|
||||
|
||||
// ------------------------- STARTING AND STOPPING THREADING -------------------------
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
op::log("Starting thread(s)", op::Priority::High);
|
||||
// Two different ways of running the program on multithread environment
|
||||
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
@@ -229,12 +229,12 @@ int openPoseTutorialThread2()
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// op::log("Stopping thread(s)", op::Priority::High);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
op::log("Example 3 successfully finished.", op::Priority::Max);
|
||||
op::log("Example 3 successfully finished.", op::Priority::High);
|
||||
// Return successful message
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
|
||||
// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
|
||||
// Debugging
|
||||
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
DEFINE_int32(logging_level, 4, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
" 255 will not output any. Current OpenPose library messages are in the range 0-4: 1 for"
|
||||
" low priority messages and 4 for important ones.");
|
||||
// Producer
|
||||
@@ -61,7 +61,7 @@ public:
|
||||
// Close program when empty frame
|
||||
if (mImageFiles.size() <= mCounter)
|
||||
{
|
||||
op::log("Last frame read and added to queue. Closing program after it is processed.", op::Priority::Max);
|
||||
op::log("Last frame read and added to queue. Closing program after it is processed.", op::Priority::High);
|
||||
// This funtion stops this worker, which will eventually stop the whole thread system once all the frames have been processed
|
||||
this->stop();
|
||||
return nullptr;
|
||||
@@ -79,7 +79,7 @@ public:
|
||||
// If empty frame -> return nullptr
|
||||
if (datum.cvInputData.empty())
|
||||
{
|
||||
op::log("Empty frame detected on path: " + mImageFiles.at(mCounter-1) + ". Closing program.", op::Priority::Max);
|
||||
op::log("Empty frame detected on path: " + mImageFiles.at(mCounter-1) + ". Closing program.", op::Priority::High);
|
||||
this->stop();
|
||||
datumsPtr = nullptr;
|
||||
}
|
||||
@@ -162,7 +162,7 @@ public:
|
||||
|
||||
int openPoseTutorialThread3()
|
||||
{
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::Max);
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::High);
|
||||
// ------------------------- INITIALIZATION -------------------------
|
||||
// Step 1 - Set logging level
|
||||
// - 0 will output all the logging messages
|
||||
@@ -197,7 +197,7 @@ int openPoseTutorialThread3()
|
||||
threadManager.add(threadId++, wUserOutput, queueIn++, queueOut++); // Thread 2, queues 2 -> 3
|
||||
|
||||
// ------------------------- STARTING AND STOPPING THREADING -------------------------
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
op::log("Starting thread(s)", op::Priority::High);
|
||||
// Two different ways of running the program on multithread environment
|
||||
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
@@ -211,12 +211,12 @@ int openPoseTutorialThread3()
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// op::log("Stopping thread(s)", op::Priority::High);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
op::log("Example 3 successfully finished.", op::Priority::Max);
|
||||
op::log("Example 3 successfully finished.", op::Priority::High);
|
||||
// Return successful message
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -27,7 +27,7 @@
|
||||
// Note: This command will show you flags for other unnecessary 3rdparty files. Check only the flags for the OpenPose
|
||||
// executable. E.g. for `openpose.bin`, look for `Flags from examples/openpose/openpose.cpp:`.
|
||||
// Debugging
|
||||
DEFINE_int32(logging_level, 3, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
DEFINE_int32(logging_level, 4, "The logging level. Integer in the range [0, 255]. 0 will output any log() message, while"
|
||||
" 255 will not output any. Current OpenPose library messages are in the range 0-4: 1 for"
|
||||
" low priority messages and 4 for important ones.");
|
||||
// Producer
|
||||
@@ -74,7 +74,7 @@ public:
|
||||
// Close program when empty frame
|
||||
if (mImageFiles.size() <= mCounter)
|
||||
{
|
||||
op::log("Last frame read and added to queue. Closing program after it is processed.", op::Priority::Max);
|
||||
op::log("Last frame read and added to queue. Closing program after it is processed.", op::Priority::High);
|
||||
// This funtion stops this worker, which will eventually stop the whole thread system once all the frames have been processed
|
||||
this->stop();
|
||||
return nullptr;
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
// If empty frame -> return nullptr
|
||||
if (datum.cvInputData.empty())
|
||||
{
|
||||
op::log("Empty frame detected on path: " + mImageFiles.at(mCounter-1) + ". Closing program.", op::Priority::Max);
|
||||
op::log("Empty frame detected on path: " + mImageFiles.at(mCounter-1) + ". Closing program.", op::Priority::High);
|
||||
this->stop();
|
||||
datumsPtr = nullptr;
|
||||
}
|
||||
@@ -175,7 +175,7 @@ public:
|
||||
|
||||
int openPoseTutorialThread4()
|
||||
{
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::Max);
|
||||
op::log("OpenPose Library Tutorial - Example 3.", op::Priority::High);
|
||||
// ------------------------- INITIALIZATION -------------------------
|
||||
// Step 1 - Set logging level
|
||||
// - 0 will output all the logging messages
|
||||
@@ -210,7 +210,7 @@ int openPoseTutorialThread4()
|
||||
threadManager.add(threadId++, wUserOutput, queueIn++, queueOut++); // Thread 2, queues 2 -> 3
|
||||
|
||||
// ------------------------- STARTING AND STOPPING THREADING -------------------------
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
op::log("Starting thread(s)", op::Priority::High);
|
||||
// Two different ways of running the program on multithread environment
|
||||
// Option a) Using the main thread (this thread) for processing (it saves 1 thread, recommended)
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
@@ -224,12 +224,12 @@ int openPoseTutorialThread4()
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// op::log("Stopping thread(s)", op::Priority::High);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
op::log("Example 3 successfully finished.", op::Priority::Max);
|
||||
op::log("Example 3 successfully finished.", op::Priority::High);
|
||||
// Return successful message
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user