本文整理汇总了C++中Scan::getActiveSegments方法的典型用法代码示例。如果您正苦于以下问题:C++ Scan::getActiveSegments方法的具体用法?C++ Scan::getActiveSegments怎么用?C++ Scan::getActiveSegments使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Scan
的用法示例。
在下文中一共展示了Scan::getActiveSegments方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: computeActiveSegments
bool Recording::computeActiveSegments(const util::Params& params, const Scan& scene,
float maxDistToSegment, float maxDistGaze,
bool forceRecompute /* = false */) {
if (hasActiveSegments && !forceRecompute) {
return true;
}
cout << "[Recording] Computing actSegs: " << id << "...";
const int kNearestSegsPerJoint = params.get<int>("Interaction.kNearestSegsPerJoint");
const bool ignoreInferredJoints = params.get<bool>("Interaction.ignoreInferredJoints");
const float maxSegmentSizeRatio = params.get<float>("Interaction.maxSegmentSizeRatio");
for (Interaction* in : interactions) {
const int numSkels = static_cast<int>(in->skelRange.size());
in->jointSegments.resize(numSkels);
in->activeSegments.clear();
#pragma omp parallel for
for (int iSkel = 0; iSkel < numSkels; iSkel++) {
const Skeleton& skel = in->skelRange[iSkel];
scene.getActiveSegments(skel, ignoreInferredJoints, kNearestSegsPerJoint,
maxDistToSegment, maxDistGaze, maxSegmentSizeRatio,
&in->jointSegments[iSkel]);
}
// Also accumulate all segs in activeSegments
for (int iSkel = 0; iSkel < numSkels; iSkel++) {
const auto& segs = in->jointSegments[iSkel];
for (const auto& jointSegs : segs) {
in->activeSegments.insert(jointSegs.begin(), jointSegs.end());
}
}
}
cout << "done." << endl;
hasActiveSegments = true;
return true;
}