JU Heo
JU Heo

Reputation: 3

Questions about C++ Open-Pose Programming

I am Heo Ji Wook, majoring in information communication at a university in Korea. Please let us know that you are using an English translator and understand even if the flow of words is awkward.

I am creating a C++ program that can check 'Do I use my computer in my right posture using Openpose?' We used openforce to test for smleton tracking, and here I'd like to know if the key point of the shoulder was in line. I've seen through Google that data is being stored on JSON, but I'm not sure.

I would really appreciate it if you could give me a hint. Thank you for reading my question. Have a nice day.

openpose test image

*Development environment

Upvotes: 0

Views: 1309

Answers (2)

Peter Lee
Peter Lee

Reputation: 381

You can follow what @nchaumont suggested with the key points are exported to an json file. Or you could directly get them inside openpose by

  1. Download the source code from github Dlib on github
  2. Implement by the function void work(TDatums& tDatums) in the file /include/openpose/pose/wPoseExtractor.hpp
  3. Get the keypoints as below code

auto &ProceedData = (*tDatums)[0]; //get the key points of the first person

Array keypoints = ProceedData.poseKeypoints;

  1. You can then proceed with the keypoint

Upvotes: 2

nchaumont
nchaumont

Reputation: 103

You can definitely do this. The easiest way would be to: 1-run OpenPoseDemo and save the keypoints in a json file (--write_json option -- see the Main Flags section here) 2-Parse the json files for the keypoints that you need. See OpenPose outputs conventions here for the keyoint IDs and the json format.

Upvotes: 1

Related Questions