Definition at line 310 of file ShotSegmenter.h. References Impala::Core::Vector::ElemMin(), mFeatures, mPredictions, mRadius, mScores, mWindowSize, Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::SetValue(), and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::Value(). Referenced by HandleNewFrame(). 00311 { 00312 int predictBase = predictFrame - mRadius + 1; 00313 int size = mWindowSize; 00314 if (predictBase < 0) 00315 { 00316 mPredictions->SetValue(0.0, predictFrame, 0); 00317 return; 00318 } 00319 00320 // Update the feature vector 00321 for (int i=0 ; i<size ; i++) 00322 { 00323 (*mFeatures)[i] = mScores->Value(predictBase + i, 0); 00324 } 00325 00326 Real64 minScore = Vector::ElemMin(*mFeatures); 00327 if (mFeatures->Elem(mRadius-1) == minScore) 00328 { 00329 mPredictions->SetValue((4.0-minScore) / 2.0, predictFrame, 0); 00330 } 00331 else 00332 { 00333 mPredictions->SetValue(0.0, predictFrame, 0); 00334 } 00335 }
Here is the call graph for this function:
|