mirror of
https://github.com/gosticks/openpose.git
synced 2026-08-12 20:30:20 +00:00
OpenCV (so all 3rdparty deps) removed from headers
This commit is contained in:
@@ -2,7 +2,9 @@
|
||||
// It reads images, process them, and display them with the pose (and optionally hand and face) keypoints. In addition,
|
||||
// it includes all the OpenPose configuration flags (enable/disable hand, face, output saving, etc.).
|
||||
|
||||
// Command-line user intraface
|
||||
// Third-party dependencies
|
||||
#include <opencv2/opencv.hpp>
|
||||
// Command-line user interface
|
||||
#define OPENPOSE_FLAGS_DISABLE_PRODUCER
|
||||
#define OPENPOSE_FLAGS_DISABLE_DISPLAY
|
||||
#include <openpose/flags.hpp>
|
||||
@@ -28,7 +30,8 @@ bool display(const std::shared_ptr<std::vector<std::shared_ptr<op::Datum>>>& dat
|
||||
if (datumsPtr != nullptr && !datumsPtr->empty())
|
||||
{
|
||||
// Display image and sleeps at least 1 ms (it usually sleeps ~5-10 msec to display the image)
|
||||
cv::imshow(OPEN_POSE_NAME_AND_VERSION + " - Tutorial C++ API", datumsPtr->at(0)->cvOutputData);
|
||||
const cv::Mat cvMat = OP_OP2CVCONSTMAT(datumsPtr->at(0)->cvOutputData);
|
||||
cv::imshow(OPEN_POSE_NAME_AND_VERSION + " - Tutorial C++ API", cvMat);
|
||||
}
|
||||
else
|
||||
op::log("Nullptr or empty datumsPtr found.", op::Priority::High);
|
||||
@@ -172,7 +175,8 @@ int tutorialApiCpp()
|
||||
// Process and display images
|
||||
for (const auto& imagePath : imagePaths)
|
||||
{
|
||||
const auto imageToProcess = cv::imread(imagePath);
|
||||
const cv::Mat cvImageToProcess = cv::imread(imagePath);
|
||||
const op::Matrix imageToProcess = OP_CV2OPCONSTMAT(cvImageToProcess);
|
||||
auto datumProcessed = opWrapper.emplaceAndPop(imageToProcess);
|
||||
if (datumProcessed != nullptr)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user