mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-12 12:20:22 +00:00
Now working on OpenCV with Qt support
This commit is contained in:
@@ -164,16 +164,19 @@ int openPoseTutorialThread1()
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
// Two different ways of running the program on multithread enviroment
|
||||
// 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
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
// Option b) Giving to the user the control of this thread
|
||||
// Start threads
|
||||
threadManager.start();
|
||||
// Keep program alive while running threads. Here the user could perform any other desired function
|
||||
while (threadManager.isRunning())
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// Stop and join threads
|
||||
op::log("Stopping thread(s)", op::Priority::Max);
|
||||
threadManager.stop();
|
||||
// // VERY IMPORTANT NOTE: if OpenCV is compiled with Qt support, this option will not work. Qt needs the main thread to
|
||||
// // plot visual results, so the final GUI (which uses OpenCV) would return an exception similar to:
|
||||
// // `QMetaMethod::invoke: Unable to invoke methods with return values in queued connections`
|
||||
// // Start threads
|
||||
// threadManager.start();
|
||||
// // Keep program alive while running threads. Here the user could perform any other desired function
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
|
||||
@@ -206,16 +206,19 @@ int openPoseTutorialThread2()
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
// Two different ways of running the program on multithread enviroment
|
||||
// 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
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
// Option b) Giving to the user the control of this thread
|
||||
// Start threads
|
||||
threadManager.start();
|
||||
// Keep program alive while running threads. Here the user could perform any other desired function
|
||||
while (threadManager.isRunning())
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// Stop and join threads
|
||||
op::log("Stopping thread(s)", op::Priority::Max);
|
||||
threadManager.stop();
|
||||
// // VERY IMPORTANT NOTE: if OpenCV is compiled with Qt support, this option will not work. Qt needs the main thread to
|
||||
// // plot visual results, so the final GUI (which uses OpenCV) would return an exception similar to:
|
||||
// // `QMetaMethod::invoke: Unable to invoke methods with return values in queued connections`
|
||||
// // Start threads
|
||||
// threadManager.start();
|
||||
// // Keep program alive while running threads. Here the user could perform any other desired function
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
|
||||
@@ -197,16 +197,19 @@ int openPoseTutorialThread3()
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
// Two different ways of running the program on multithread enviroment
|
||||
// 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
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
// Option b) Giving to the user the control of this thread
|
||||
// Start threads
|
||||
threadManager.start();
|
||||
// Keep program alive while running threads. Here the user could perform any other desired function
|
||||
while (threadManager.isRunning())
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// Stop and join threads
|
||||
op::log("Stopping thread(s)", op::Priority::Max);
|
||||
threadManager.stop();
|
||||
// // VERY IMPORTANT NOTE: if OpenCV is compiled with Qt support, this option will not work. Qt needs the main thread to
|
||||
// // plot visual results, so the final GUI (which uses OpenCV) would return an exception similar to:
|
||||
// // `QMetaMethod::invoke: Unable to invoke methods with return values in queued connections`
|
||||
// // Start threads
|
||||
// threadManager.start();
|
||||
// // Keep program alive while running threads. Here the user could perform any other desired function
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
|
||||
@@ -209,16 +209,19 @@ int openPoseTutorialThread4()
|
||||
op::log("Starting thread(s)", op::Priority::Max);
|
||||
// Two different ways of running the program on multithread enviroment
|
||||
// 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
|
||||
threadManager.exec(); // It blocks this thread until all threads have finished
|
||||
// Option b) Giving to the user the control of this thread
|
||||
// Start threads
|
||||
threadManager.start();
|
||||
// Keep program alive while running threads. Here the user could perform any other desired function
|
||||
while (threadManager.isRunning())
|
||||
std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// Stop and join threads
|
||||
op::log("Stopping thread(s)", op::Priority::Max);
|
||||
threadManager.stop();
|
||||
// // VERY IMPORTANT NOTE: if OpenCV is compiled with Qt support, this option will not work. Qt needs the main thread to
|
||||
// // plot visual results, so the final GUI (which uses OpenCV) would return an exception similar to:
|
||||
// // `QMetaMethod::invoke: Unable to invoke methods with return values in queued connections`
|
||||
// // Start threads
|
||||
// threadManager.start();
|
||||
// // Keep program alive while running threads. Here the user could perform any other desired function
|
||||
// while (threadManager.isRunning())
|
||||
// std::this_thread::sleep_for(std::chrono::milliseconds{33});
|
||||
// // Stop and join threads
|
||||
// op::log("Stopping thread(s)", op::Priority::Max);
|
||||
// threadManager.stop();
|
||||
|
||||
// ------------------------- CLOSING -------------------------
|
||||
// Logging information message
|
||||
|
||||
Reference in New Issue
Block a user