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

Method track

src/openpose/pose/poseExtractor.cpp:172–201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170 }
171
172 void PoseExtractor::track(Array<float>& poseKeypoints, Array<long long>& poseIds,
173 const Matrix& cvMatInput,
174 const unsigned long long imageViewIndex)
175 {
176 try
177 {
178 if (!spPersonTrackers->empty())
179 {
180 // Resize if required
181 while (spPersonTrackers->size() <= imageViewIndex)
182 spPersonTrackers->emplace_back(std::make_shared<PersonTracker>(
183 (*spPersonTrackers)[0]->getMergeResults()));
184 // Sanity check
185 if (!poseKeypoints.empty() && poseIds.empty() && mNumberPeopleMax != 1)
186 error(errorMessage, __LINE__, __FUNCTION__, __FILE__);
187 // Reset poseIds if keypoints is empty
188 if (poseKeypoints.empty())
189 poseIds.reset();
190 // Run person tracker
191 if (spPersonTrackers->at(imageViewIndex))
192 (*spPersonTrackers)[imageViewIndex]->track(poseKeypoints, poseIds, cvMatInput);
193 // Run person tracker
194 (*spPersonTrackers)[imageViewIndex]->track(poseKeypoints, poseIds, cvMatInput);
195 }
196 }
197 catch (const std::exception& e)
198 {
199 error(e.what(), __LINE__, __FUNCTION__, __FILE__);
200 }
201 }
202
203 void PoseExtractor::trackLockThread(Array<float>& poseKeypoints, Array<long long>& poseIds,
204 const Matrix& cvMatInput,

Callers

nothing calls this directly

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