Home || Visual Search || Applications || Architecture || Important Messages || OGL || Src

Real64 Impala::Core::VideoSet::ShotSegmenter::CalculateScores (  )  [inline, private]

Definition at line 275 of file ShotSegmenter.h.

References mRadius, mWeights, mWindowSize, and Impala::Core::Array::Array2dTem< StorT, elemSize, ArithT >::Value().

Referenced by HandleNewFrame().

00276     {
00277         int center = mRadius;
00278         Real64 disSimA = 0;
00279         Real64 disSimB = 0;
00280         Real64 simA = 0;
00281         Real64 simB = 0;
00282 
00283         for (int i=0 ; i<mRadius ; i++)
00284         {
00285             for (int j=0 ; j<mRadius ; j++)
00286             {
00287                 simA += mWeights->Value(i, j);
00288                 disSimA += mWeights->Value(i, j + center);
00289             }
00290         }
00291 
00292         for (int i=center ; i<mWindowSize ; i++)
00293         {
00294             for (int j=0 ; j<mRadius ; j++)
00295             {
00296                 simB += mWeights->Value(i, j + center);
00297                 disSimB += mWeights->Value(i, j);
00298             }
00299             
00300         }
00301 
00302         if ((simA * simB == 0) || (disSimA * disSimB == 0))
00303             return 4;
00304         Real64 cutAB = disSimA + disSimB;
00305         Real64 s = cutAB / simA + cutAB / simB;
00306         return s;
00307     }

Here is the call graph for this function:


Generated on Thu Jan 13 09:22:13 2011 for ImpalaSrc by  doxygen 1.5.1