本文整理汇总了C++中Gesture::getFrames方法的典型用法代码示例。如果您正苦于以下问题:C++ Gesture::getFrames方法的具体用法?C++ Gesture::getFrames怎么用?C++ Gesture::getFrames使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gesture
的用法示例。
在下文中一共展示了Gesture::getFrames方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: newSkeletonData
void ExecutionManager::newSkeletonData(QString pData)
{
if(this->role == INACTIVE)
{
return;
}
DAOLayer *daoLayer = DAOLayer::getInstance();
if(daoLayer != NULL)
{
RawJointState * rjs = RawJointState::fromInputLine(pData);
if(rjs == NULL)
{
qDebug() << "rjs is NULL";
return;
}
if (rjs->jointsCount < SkeletonData::leftPelvis)
{
delete rjs;
qDebug() << "rjs is NULL";
return;
}
if(this->segmenter->addState(rjs))
{
InputGesture *ig = this->segmenter->getLastInputGesture();
QList<QPair<Record*, double>* >* results = this->lra->recognizeSingleGesture(ig);
if(results == NULL)
{
qDebug() << "results are NULL";
return;
}
switch(role)
{
case RECORDER:
{
Gesture *g = InputGesture::toGesture(ig);
// TODO MANAGE CONFLICT
/*if (results->count() > 0 && results->first()->second > 0.8f)
{
qDebug()<<"Conflict with "<<results->first()->first->getName()<<" at "<<results->first()->second;
emit this->gestureConflict(g);
}
else*/
{
qDebug()<<"Nb frames "<<g->getFrames()->count();
emit this->gestureRecorded(g);
}
break;
}
case RECOGNIZER:
qDebug("-----------------------------");
for(int i=0; i<results->count(); i++)
{
if (results->at(i)->first == NULL)
{
continue;
}
qDebug()<< results->at(i)->first->getName()<< " "<< results->at(i)->second;
}
qDebug("-----------------------------");
// Compute threshold
float thresh = pow(0.9f, results->count());
/*if(thresh < 0.45f)
{
thresh = 0.45f;
}*/
qDebug()<<"Thresh "<<thresh;
// Consider recognized
DAOLayer *daoLayer = DAOLayer::getInstance();
if (daoLayer != NULL && results->count() > 0 && results->first()->second > thresh)
{
Record *r = daoLayer->getSingleRecord(results->first()->first->getId());
if(r != NULL && r->isGestureActive() && !r->isDeleted())
{
qDebug("Recognize with : %f", results->first()->second);
daoLayer->gestureRecognized(r);
}
}
break;
}
// qDebug()<<"Clear segmenter";
this->segmenter->clear();
delete results;
}
}
}