MCPcopy Create free account
hub / github.com/CMU-Perceptual-Computing-Lab/openpose / trackLockThread

Method trackLockThread

src/openpose/pose/poseExtractor.cpp:203–231  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

201 }
202
203 void PoseExtractor::trackLockThread(Array<float>& poseKeypoints, Array<long long>& poseIds,
204 const Matrix& cvMatInput,
205 const unsigned long long imageViewIndex, const long long frameId)
206 {
207 try
208 {
209 if (!spPersonTrackers->empty())
210 {
211 // Resize if required
212 while (spPersonTrackers->size() <= imageViewIndex)
213 spPersonTrackers->emplace_back(std::make_shared<PersonTracker>(
214 (*spPersonTrackers)[0]->getMergeResults()));
215 // Sanity check
216 if (!poseKeypoints.empty() && poseIds.empty() && mNumberPeopleMax != 1)
217 error(errorMessage, __LINE__, __FUNCTION__, __FILE__);
218 // Reset poseIds if keypoints is empty
219 if (poseKeypoints.empty())
220 poseIds.reset();
221 // Run person tracker
222 if (spPersonTrackers->at(imageViewIndex))
223 (*spPersonTrackers)[imageViewIndex]->trackLockThread(
224 poseKeypoints, poseIds, cvMatInput, frameId);
225 }
226 }
227 catch (const std::exception& e)
228 {
229 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
230 }
231 }
232}

Callers 1

workMethod · 0.45

Calls 6

getMergeResultsMethod · 0.80
whatMethod · 0.80
errorFunction · 0.50
emptyMethod · 0.45
sizeMethod · 0.45
resetMethod · 0.45

Tested by

no test coverage detected