2

I am trying to read and display the values off two arrays. I understand that one array has the values (x, y), and the other one has an ID part number as.

The code has Opencv, C++, and I believe Python as well, which makes it very confusing for a novice like me. The code below displays the variables framenumber and numberpeople on the screen as it is supposed to do it. I tried to print the arrays poseIds and poseKeypoints without luck.

Here's the code:

// Add each person ID
void GuiInfoAdder::addInfo(cv::Mat& cvOutputData, const int 
numberPeople, const unsigned long long id, const std::string& 
elementRenderedName, const  unsigned long long frameNumber, const 
Array<long long>&  poseIds, const  Array<float>& poseKeypoints)

// Frame number
putTextOnCvMat(cvOutputData, "Frame: " + std::to_string(frameNumber), 
{borderMargin, (int)(cvOutputData.rows - borderMargin)}, WHITE_SCALAR, 
false, cvOutputData.cols);

// Number people
putTextOnCvMat(cvOutputData, "People: " + std::to_string(numberPeople), 
{(int)(cvOutputData.cols - borderMargin), (int)(cvOutputData.rows - 
borderMargin)}, WHITE_SCALAR, true, cvOutputData.cols);

I will try to accommodate the line codes below I found on line to see if I can accomplish the task.Not so sure if I can use them and make them work

void PrintArrays()
{
    cout << text << "   " << IDpart <<"   "<< valuex << "   " << valuey << 
endl;
}
hbtousa
  • 19
  • 4
  • I tried to edit your question, but I still think, it's quite unclear what you're trying to achieve. Also, `putTextOnCvMat` is an [OpenPose](https://github.com/CMU-Perceptual-Computing-Lab/openpose/blob/master/include/openpose/utilities/openCv.hpp) function, so I'm not sure, if the opencv tag is justified here... – HansHirse Jun 20 '19 at 04:55
  • Thanks. Sorry about the post. I fixed it a little bit more to clarify the question. What I am try to do is to display poseIds and poseKeypoints values either on the screen and/or csv file. – hbtousa Jun 20 '19 at 13:31

0 Answers0